Skip to content

Commit

Permalink
Fixed #14 NoSuchMethodError if older SDK does not support notificatio…
Browse files Browse the repository at this point in the history
…n panel's icon
  • Loading branch information
hsz committed Jul 8, 2014
1 parent a57acd4 commit 93ea6b7
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public EditorNotificationPanel createNotificationPanel(VirtualFile file, FileEdi
private EditorNotificationPanel createPanel(@NotNull final Project project) {
final EditorNotificationPanel panel = new EditorNotificationPanel();
panel.setText("Missing .gitignore file in GIT project");
panel.icon(Icons.FILE);
panel.createActionLabel("Create .gitignore", new Runnable() {
@Override
public void run() {
Expand All @@ -73,6 +72,11 @@ public void run() {
notifications.updateAllNotifications();
}
});

try { // ignore if older SDK does not support panel icon
panel.icon(Icons.FILE);
} catch (NoSuchMethodError ignored) {}

return panel;
}
}

0 comments on commit 93ea6b7

Please sign in to comment.