#IntelliJ SDK Plugin buttons not showing

1 messages · Page 1 of 1 (latest)

latent pebble
#

I'm currently trying to create some UI for the first time in a IntelliJ plugin
but in this one configuration there is no button to see

red skyBOT
#

<@&987246399047479336> please have a look, thanks.

red skyBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

latent pebble
#

code where I see the buttons in the toolbar:

public class TestMyCodeToolbar implements ToolWindowFactory, DumbAware {

    @Override
    public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
        // get list of selected organization then create multiple
        ContentFactory factory = ContentFactory.getInstance();
        ContentManager manager = toolWindow.getContentManager();

        RunAction runAction = new RunAction();
        TestAction testAction = new TestAction();
        UploadAction uploadAction = new UploadAction();

        ActionGroup actions = new ActionGroup() {
            @Override
            public AnAction @NotNull [] getChildren(@Nullable AnActionEvent e) {
                return new AnAction[]{runAction, testAction, uploadAction};
            }
        };
        ActionToolbarImpl actionToolbar = new ActionToolbarImpl(ActionPlaces.TOOLBAR, actions, true);

        manager.addContent(factory.createContent(actionToolbar, "Test", false));
    }
}
#

code what I really want to do but buttons are invisible:

 @Override
    public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
        // get list of selected organization then create multiple
        ContentFactory factory = ContentFactory.getInstance();
        ContentManager manager = toolWindow.getContentManager();

        SimpleToolWindowPanel panel = new SimpleToolWindowPanel(true);

        RunAction runAction = new RunAction();
        TestAction testAction = new TestAction();
        UploadAction uploadAction = new UploadAction();

        ActionGroup actions = new ActionGroup() {
            @Override
            public AnAction @NotNull [] getChildren(@Nullable AnActionEvent e) {
                return new AnAction[]{runAction, testAction, uploadAction};
            }
        };
        ActionToolbarImpl actionToolbar = new ActionToolbarImpl(ActionPlaces.TOOLBAR, actions, true);
        actionToolbar.setTargetComponent(panel);

        JBScrollPane courses = new JBScrollPane();
        JBViewport view = new JBViewport();
        SimpleTree tree = new SimpleTree();

        view.add(tree);
        courses.add(view);

        panel.add(actionToolbar);
        panel.add(courses);

        manager.addContent(factory.createContent(panel, "Test", false));
    }
latent pebble
#

location on screens are pretty weird

#

but the SimpleToolWindowPanel is on the correct position:

#

the JBScrollPane aswell

#

just got no content

neat rampart
#

in the second one your adding to "panel', that might be the issue

latent pebble