public PackageManagerDialogForm()

in src/main/java/org/apache/openwhisk/intellij/explorer/dialog/pkg/ui/PackageManagerDialogForm.java [62:90]


    public PackageManagerDialogForm(Project project, WhiskAuth whiskAuth, WhiskPackageWithActions whiskPackage) {
        this.project = project;
        this.whiskAuth = whiskAuth;
        this.whiskPackage = whiskPackage;

        nameJLabel.setText(whiskPackage.getName());
        namespaceJPanel.setText(whiskPackage.getNamespace());
        versionJLabel.setText(whiskPackage.getVersion());

        Optional<Binding> binding = whiskPackage.getBinding();
        if (binding.isPresent()) {
            sharedJPanel.remove(shareJCheckBox);
            Binding b = binding.get();
            JLabel label = new JLabel("from " + b.getNamespace() + "/" + b.getName());
            label.setPreferredSize(new Dimension(250, -1));
            sharedJPanel.add(label, new GridConstraints(0, 2, 1, 1,
                    SIZEPOLICY_CAN_GROW | SIZEPOLICY_CAN_SHRINK,
                    SIZEPOLICY_CAN_GROW | SIZEPOLICY_CAN_SHRINK, FILL_NONE, ANCHOR_CENTER,
                    new Dimension(-1, -1), new Dimension(250, -1), new Dimension(-1, -1), 0));
        } else {
            shareJCheckBox.setSelected(whiskPackage.isPublish());
        }

        try {
            defaultParameterTextArea.setText(JsonParserUtils.writeParameterToJson(whiskPackage.getParameters()));
        } catch (JsonProcessingException e) {
            LOG.error("Failed to parse json: " + whiskPackage.getName(), e);
        }
    }