use of org.checkerframework.checker.initialization.qual.UnknownInitialization in project git-machete-intellij-plugin by VirtusLab.
the class GitPushDialog method createOptionsPanel.
protected JPanel createOptionsPanel() {
// A separate local class needs to be extracted so that explicit `this` can be annotated in `add` method.
class OptionsPanel extends JPanel {
@UIEffect
OptionsPanel() {
super(new MigLayout(/* layoutConstraints */
"ins 0 0, flowy"));
}
@Override
@UIEffect
public // `@UnknownInitialization` is needed to comply with Checker's Annotated JDK
Component add(@UnknownInitialization(java.awt.Container.class) OptionsPanel this, Component comp) {
JPanel wrapperPanel = new BorderLayoutPanel().addToCenter(comp);
wrapperPanel.setBorder(JBUI.Borders.empty(5, 15, 0, 0));
return super.add(wrapperPanel);
}
}
return new OptionsPanel();
}
Aggregations