public void createPartControl()

in PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.appservice/src/com/microsoft/azure/toolkit/eclipse/appservice/property/AppServiceBasePropertyEditor.java [104:313]


    public void createPartControl(Composite parent) {

        GridLayout glCpRoot = new GridLayout(1, false);
        glCpRoot.marginWidth = 0;
        glCpRoot.verticalSpacing = 0;
        glCpRoot.horizontalSpacing = 0;
        glCpRoot.marginHeight = 0;
        Composite cpRoot = new Composite(parent, SWT.NONE);
        cpRoot.setLayout(glCpRoot);

        progressBar = new ProgressBar(cpRoot, SWT.INDETERMINATE);
        GridData gdProgressBar = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
        gdProgressBar.heightHint = PROGRESS_BAR_HEIGHT;
        progressBar.setLayoutData(gdProgressBar);

        ScrolledComposite scrolledComposite = new ScrolledComposite(cpRoot, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
        scrolledComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
        scrolledComposite.setExpandHorizontal(true);
        scrolledComposite.setExpandVertical(true);

        Composite area = new Composite(scrolledComposite, SWT.NONE);
        GridLayout glArea = new GridLayout(1, false);
        area.setLayout(glArea);

        Composite composite = new Composite(area, SWT.NONE);
        composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
        GridLayout glComposite = new GridLayout(1, false);
        composite.setLayout(glComposite);

        Composite cpControlButtons = new Composite(composite, SWT.NONE);
        cpControlButtons.setLayout(new GridLayout(3, false));
        cpControlButtons.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));

        btnGetPublishProfile = new Button(cpControlButtons, SWT.NONE);
        btnGetPublishProfile.setText("Get Publish Profile");
        btnGetPublishProfile.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages
            .IMG_ETOOL_PRINT_EDIT));
        btnGetPublishProfile
            .addListener(SWT.Selection, new AzureListenerWrapper(INSIGHT_NAME, "btnGetPublishProfile", null) {
                @Override
                protected void handleEventFunc(Event event) {
                    onBtnGetPublishProfileSelection();
                }
            });

        btnSave = new Button(cpControlButtons, SWT.NONE);
        btnSave.setText("Save");
        btnSave.setEnabled(false);
        btnSave.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_ETOOL_SAVE_EDIT));
        btnSave.addListener(SWT.Selection, new AzureListenerWrapper(INSIGHT_NAME, "btnSave", null) {
            @Override
            protected void handleEventFunc(Event event) {
                setBtnEnableStatus(false);
                presenter
                    .onUpdateWebAppProperty(subscriptionId, webAppId, slotName, cachedAppSettings, editedAppSettings);
            }
        });

        btnDiscard = new Button(cpControlButtons, SWT.NONE);
        btnDiscard.setText("Discard");
        btnDiscard.setEnabled(false);
        btnDiscard.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_DELETE));
        btnDiscard.addListener(SWT.Selection, new AzureListenerWrapper(INSIGHT_NAME, "btnDiscard", null) {
            @Override
            protected void handleEventFunc(Event event) {
                updateMapStatus(editedAppSettings, cachedAppSettings);
                resetTblAppSettings(editedAppSettings);
            }
        });

        cpOverview = new Composite(composite, SWT.NONE);
        cpOverview.setLayout(new GridLayout(4, false));
        cpOverview.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

        Label lblResourceGroup = new Label(cpOverview, SWT.NONE);
        lblResourceGroup.setText("Resource Group:");

        txtResourceGroup = new Text(cpOverview, SWT.NONE);
        txtResourceGroup.setEditable(false);
        txtResourceGroup.setText(TXT_LOADING);
        txtResourceGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

        Label lblAppServicePlan = new Label(cpOverview, SWT.NONE);
        lblAppServicePlan.setText("App Service Plan:");

        txtAppServicePlan = new Text(cpOverview, SWT.NONE);
        txtAppServicePlan.setEditable(false);
        txtAppServicePlan.setText(TXT_LOADING);
        txtAppServicePlan.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

        Label lblStatus = new Label(cpOverview, SWT.NONE);
        lblStatus.setText("Status:");

        txtStatus = new Text(cpOverview, SWT.NONE);
        txtStatus.setEditable(false);
        txtStatus.setText(TXT_LOADING);
        txtStatus.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

        Label lblUrl = new Label(cpOverview, SWT.NONE);
        lblUrl.setText("URL:");

        lnkUrl = new Link(cpOverview, SWT.NONE);
        lnkUrl.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
        lnkUrl.setText(TXT_LOADING);
        // click to open browser
        lnkUrl.addListener(SWT.Selection, event -> Program.launch(event.text));

        Label lblLocation = new Label(cpOverview, SWT.NONE);
        lblLocation.setText("Location:");

        txtLocation = new Text(cpOverview, SWT.NONE);
        txtLocation.setEditable(false);
        txtLocation.setText(TXT_LOADING);
        txtLocation.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

        Label lblPricingTier = new Label(cpOverview, SWT.NONE);
        lblPricingTier.setText("Pricing Tier:");

        txtPricingTier = new Text(cpOverview, SWT.NONE);
        txtPricingTier.setEditable(false);
        txtPricingTier.setText(TXT_LOADING);
        txtPricingTier.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

        Label lblSubscription = new Label(cpOverview, SWT.NONE);
        lblSubscription.setText("Subscription ID:");

        txtSubscription = new Text(cpOverview, SWT.NONE);
        txtSubscription.setEditable(false);
        txtSubscription.setText(TXT_LOADING);
        txtSubscription.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));

        cpExtraInfo = new Composite(composite, SWT.NONE);
        cpExtraInfo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
        cpExtraInfo.setLayout(new GridLayout(2, false));

        lblJavaVersion = new Label(cpExtraInfo, SWT.NONE);
        lblJavaVersion.setText("Java Version:");

        txtJavaVersion = new Text(cpExtraInfo, SWT.NONE);
        txtJavaVersion.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
        txtJavaVersion.setEditable(false);
        txtJavaVersion.setText(TXT_LOADING);

        lblContainer = new Label(cpExtraInfo, SWT.NONE);
        lblContainer.setText("Web Container:");

        txtContainer = new Text(cpExtraInfo, SWT.NONE);
        txtContainer.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
        txtContainer.setEditable(false);
        txtContainer.setText(TXT_LOADING);

        Composite cpAppSettings = new Composite(composite, SWT.NONE);
        cpAppSettings.setLayout(new GridLayout(2, false));
        cpAppSettings.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

        tblAppSettings = new Table(cpAppSettings, SWT.BORDER | SWT.FULL_SELECTION);
        tblAppSettings.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
        tblAppSettings.setHeaderVisible(true);
        tblAppSettings.setLinesVisible(true);
        tblAppSettings.addListener(SWT.MouseDoubleClick, event -> onTblAppSettingMouseDoubleClick(event));

        editor = new TableEditor(tblAppSettings);
        editor.horizontalAlignment = SWT.LEFT;
        editor.grabHorizontal = true;

        TableColumn tblclmnKey = new TableColumn(tblAppSettings, SWT.NONE);
        tblclmnKey.setWidth(300);
        tblclmnKey.setText("Key");

        TableColumn tblclmnValue = new TableColumn(tblAppSettings, SWT.NONE);
        tblclmnValue.setWidth(300);
        tblclmnValue.setText("Value");

        Composite cpTableButtons = new Composite(cpAppSettings, SWT.NONE);
        cpTableButtons.setLayout(new GridLayout(1, false));
        cpTableButtons.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));

        btnNewItem = new Button(cpTableButtons, SWT.NONE);
        btnNewItem.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
        btnNewItem.setText("New");
        btnNewItem.setToolTipText("New");
        btnNewItem.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ADD));
        btnNewItem.setEnabled(false);
        btnNewItem.addListener(SWT.Selection, event -> onBtnNewItemSelection());

        btnDeleteItem = new Button(cpTableButtons, SWT.NONE);
        btnDeleteItem.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
        btnDeleteItem.setText("Delete");
        btnDeleteItem.setToolTipText("Delete");
        btnDeleteItem.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_DELETE));
        btnDeleteItem.setEnabled(false);
        btnDeleteItem.addListener(SWT.Selection, event -> onBtnDeleteItemSelection());

        btnEditItem = new Button(cpTableButtons, SWT.NONE);
        btnEditItem.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
        btnEditItem.setText("Edit");
        btnEditItem.setToolTipText("Edit");
        btnEditItem.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_ETOOL_CLEAR));
        btnEditItem.setEnabled(false);
        btnEditItem.addListener(SWT.Selection, event -> onBtnEditItemSelection());

        scrolledComposite.setContent(area);
        scrolledComposite.setMinSize(area.computeSize(SWT.DEFAULT, SWT.DEFAULT));

        setExtraInfoVisible(false);
        setChildrenTransparent(cpOverview);
        setChildrenTransparent(cpExtraInfo);

        btnGetPublishProfile.setFocus();
    }