fix: replace deprecated getComponent()
This commit is contained in:
parent
7a375814c9
commit
fc2998b15e
3 changed files with 8 additions and 3 deletions
|
@ -74,7 +74,7 @@ public class ZigModuleBuilder extends ModuleBuilder {
|
|||
|
||||
@Override
|
||||
public JComponent getComponent() {
|
||||
return withBorderIfNeeded(peer.getComponent());
|
||||
return withBorderIfNeeded(peer.createComponent());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -64,7 +64,7 @@ public class ZigNewProjectWizard implements LanguageGeneratorNewProjectWizard {
|
|||
@Override
|
||||
public void setupUI(@NotNull Panel builder) {
|
||||
builder.row((JLabel) null, (r) -> {
|
||||
r.cell(peer.getComponent())
|
||||
r.cell(peer.createComponent())
|
||||
.align(AlignX.FILL);
|
||||
return null;
|
||||
});
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package com.falsepattern.zigbrains.project.ide.newproject;
|
||||
|
||||
import com.intellij.openapi.ui.TextFieldWithBrowseButton;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.platform.GeneratorPeerImpl;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
@ -37,7 +38,11 @@ public class ZigProjectGeneratorPeer extends GeneratorPeerImpl<ZigProjectConfigu
|
|||
}
|
||||
|
||||
@Override
|
||||
public @NotNull JComponent getComponent() {
|
||||
public @NotNull JComponent getComponent(@NotNull TextFieldWithBrowseButton myLocationField, @NotNull Runnable checkValid) {
|
||||
return createComponent();
|
||||
}
|
||||
|
||||
public @NotNull JComponent createComponent() {
|
||||
return newPanel(newProjectPanel::attachPanelTo);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue