Skip to content

Commit

Permalink
Merge pull request #94 from codota/boaz-rolling
Browse files Browse the repository at this point in the history
Bug fixes
  • Loading branch information
boaz-codota authored Dec 29, 2020
2 parents 5fbb18e + ff878e9 commit f0cf93c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ class BinaryPromotionStatusBarLifecycle(private val binaryRequestFacade: BinaryR
return null
}

val statusBar = WindowManager.getInstance().getStatusBar(openProjects[0])
val promotionWidget = statusBar.getWidget(StatusBarPromotionWidget::class.java.name) as StatusBarPromotionWidget
val statusBar = WindowManager.getInstance()?.getStatusBar(openProjects[0])
val widget = statusBar?.getWidget(StatusBarPromotionWidget::class.java.name) ?: return null
val promotionWidget = widget as StatusBarPromotionWidget

return promotionWidget.component as StatusBarPromotionWidget.StatusBarPromotionComponent
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import java.util.Objects;
import java.util.List;

import static com.tabnine.general.StaticConfig.*;
import static java.awt.Color.decode;
import static com.tabnine.general.StaticConfig.PROMOTION_LIGHT_TEXT_COLOR;
import static com.tabnine.general.StaticConfig.PROMOTION_TEXT_COLOR;

public class StatusBarPromotionWidget extends EditorBasedWidget implements CustomStatusBarWidget, StatusBarWidget.WidgetPresentation {
private final BinaryRequestFacade binaryRequestFacade;
Expand All @@ -41,6 +41,7 @@ public String ID() {
}

// Compatability implementation. DO NOT ADD @Override.
@NotNull
public JComponent getComponent() {
if (component != null) {
return component;
Expand Down

0 comments on commit f0cf93c

Please sign in to comment.