Skip to content

redhat-developer/intellij-common

Repository files navigation

IntelliJ Common

Build status Validate against IJ versions Release Nightly

Overview

A JetBrains IntelliJ common library.

Getting Started Page

The IntelliJ common library can be leveraged to create a simple Getting Started page for your plugin.

The Getting Started page displays a course. A course is a collection of groups of lessons, where each lesson consists of a title, text, action buttons and a gif/image

To create a Getting Started page in your plugin, first set up your groups/lessons

        GettingStartedGroupLessons group = new GettingStartedGroupLessons(
                "Knative Functions",
                "Create, build, run and deploy your serverless function without leaving your preferred IDE",
                new GettingStartedLesson(
                    "Create new function",
                    "<html>my lesson in html format here</html>",
                    Collections.singletonList(new AbstractAction() {
                        @Override
                        public void actionPerformed(ActionEvent e) {
                            // do execute
                        }
                    }),
                    myGifURL
                ),
                new GettingStartedLesson(
                .....
                )
        )

Next create a course using the group created above. N.B: myFeedbackURL is the page which will be opened when the leave feedback link is clicked

        GettingStartedCourse course = new GettingStartedCourseBuilder()
                .createGettingStartedCourse(
                        "Learn IDE Features for Knative",
                        "Start deploying, running, and managing serverless applications on OpenShift and Kubernetes",
                        myFeedbackURL)
                .withGroupLessons(group)
                .build();

Finally you can use the course to create the content for your toolwindow

        GettingStartedContent content = new GettingStartedContent(toolWindow, "", course);
        toolWindow.getContentManager().addContent(content);

This is the final result you should see. Example of a main course page

Example of a lesson

Release notes

See the change log.

Contributing

This is an open source project open to anyone. This project welcomes contributions and suggestions!

For information on getting started, refer to the CONTRIBUTING instructions.

Feedback & Questions

If you discover an issue please file a bug and we will fix it as soon as possible.

License

EPL 2.0, See LICENSE for more information.