Skip to content

Commit 3b1747e

Browse files
authored
Merge pull request #22 from XieEDeHeiShou/master
master
2 parents 2776a89 + 9003ec9 commit 3b1747e

File tree

6 files changed

+132
-60
lines changed

6 files changed

+132
-60
lines changed

.idea/workspace.xml

Lines changed: 115 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353

5454
### 或者
5555
#### 第一步
56-
下载[MvpHelper_v2_2_release.jar](MVPHelper_v2_2_release.jar)
57-
或者前往 [releases](https://github.com/XieEDeHeiShou/MVPHelper/releases/tag/2.2)
56+
下载[MvpHelper_v2_3_release.jar](MVPHelper_v2_3_release.jar)
57+
或者前往 [releases](https://github.com/XieEDeHeiShou/MVPHelper/releases/latest)
5858

5959
#### 第二步
6060
安装插件
@@ -106,6 +106,9 @@
106106

107107
## 更新日志
108108
### v2.x版 -基于Intellij Open Api 实现 by [XieEDeHeiShou](https://github.com/XieEDeHeiShou)
109+
+ 2017-07-19
110+
+ 修复潜在的NPE异常(#20)
111+
+ MvpHelper_v2_3_release.jar
109112
+ 2017-04-27
110113
+ 修复实现类修饰符异常 package-private -> public
111114
+ 新增日志类EventLogger

README_EN.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ will greatly reduce the number of source files:
5252

5353
### Or install plugin.jar
5454
#### step1
55-
Download [MvpHelper_v2_2_release.jar](MVPHelper_v2_2_release.jar)
56-
or redirect to [releases](https://github.com/XieEDeHeiShou/MVPHelper/releases/tag/2.2)
55+
Download [MvpHelper_v2_3_release.jar](MVPHelper_v2_3_release.jar)
56+
or redirect to [releases](https://github.com/XieEDeHeiShou/MVPHelper/releases/latest)
5757

5858
#### step2
5959
Install it.
@@ -104,6 +104,9 @@ select ```Mvp Helper``` .
104104

105105
## Change log
106106
### v2.x -Based on Intellij Open Api, by [XieEDeHeiShou](https://github.com/XieEDeHeiShou)
107+
+ 2017-07-19
108+
+ Fix NPE(#20)
109+
+ MvpHelper_v2_3_release.jar
107110
+ 2017-04-27
108111
+ Fix generated class modifier bug:package-private -> public
109112
+ Add EventLogger

resources/META-INF/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html for description -->
55
<idea-version since-build="141.0"/>
66
<name>MVPHelper</name>
7-
<version>2.2</version>
7+
<version>2.3</version>
88
<vendor email="[email protected]" url="https://github.com/githubwing/MVPHelper"/>
99
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
1010
on how to target different products -->

src/com/wingsofts/mvphelper/biz/EventLogger.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.intellij.notification.Notification;
44
import com.intellij.notification.NotificationType;
55
import com.intellij.notification.Notifications;
6+
import com.intellij.openapi.ui.popup.Balloon;
67

78
/**
89
* @author Administrator
@@ -17,8 +18,11 @@ public class EventLogger {
1718
*/
1819
public static void log(String msg) {
1920
Notification notification = new Notification(GROUP_ID, TITLE, msg, NotificationType.INFORMATION);//build a notification
21+
//notification.hideBalloon();//didn't work
2022
Notifications.Bus.notify(notification);//use the default bus to notify (application level)
21-
//noinspection ConstantConditions: since the notification has been notified, the balloon won't be null.
22-
notification.getBalloon().hide(true);//try to hide the balloon immediately.
23+
Balloon balloon = notification.getBalloon();
24+
if (balloon != null) {//fix: #20 潜在的NPE
25+
balloon.hide(true);//try to hide the balloon immediately.
26+
}
2327
}
2428
}

0 commit comments

Comments
 (0)