plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/GeronimoRuntimeWizardFragment.java [221:275]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    protected void addJRESelection(final Composite composite) {
        updateJREs();

        Label label = new Label(composite, SWT.NONE);
        label.setText(Messages.installedJRE);
        label.setLayoutData(new GridData());

        combo = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY);
        combo.setItems(jreNames);
        GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
        combo.setLayoutData(data);

        combo.addSelectionListener(new SelectionListener() {
            public void widgetSelected(SelectionEvent e) {
                // if the first item in the list is selected, then pass null
                // to setVMInstall to use the default JRE.
                // otherwise the array list of JRE's is one off from what is
                // in the combo; subtract 1 from the selection to get the
                // correct JRE.
                int sel = combo.getSelectionIndex();
                IVMInstall vmInstall = null;
                if (sel > 0) {
                    vmInstall = (IVMInstall) installedJREs.get(sel - 1);
                }
                getRuntimeDelegate().setVMInstall(vmInstall);
                validate();
            }

            public void widgetDefaultSelected(SelectionEvent e) {
                widgetSelected(e);
            }
        });

        Button button = SWTUtil.createButton(composite, Messages.installedJREs);
        button.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                String currentVM = combo.getText();
                if (showPreferencePage(composite)) {
                    updateJREs();
                    combo.setItems(jreNames);
                    combo.setText(currentVM);
                    if (combo.getSelectionIndex() == -1)
                        combo.select(0);
                }
            }
        });

        if (getRuntimeDelegate() != null) {
            if (getRuntimeDelegate().isUsingDefaultJRE()) {
                combo.select(0);
            } else {
                combo.setText(getRuntimeDelegate().getVMInstall().getName());
            }
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/GeronimoRuntimeWizardFragment.java [222:276]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    protected void addJRESelection(final Composite composite) {
        updateJREs();

        Label label = new Label(composite, SWT.NONE);
        label.setText(Messages.installedJRE);
        label.setLayoutData(new GridData());

        combo = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY);
        combo.setItems(jreNames);
        GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
        combo.setLayoutData(data);

        combo.addSelectionListener(new SelectionListener() {
            public void widgetSelected(SelectionEvent e) {
                // if the first item in the list is selected, then pass null
                // to setVMInstall to use the default JRE.
                // otherwise the array list of JRE's is one off from what is
                // in the combo; subtract 1 from the selection to get the
                // correct JRE.
                int sel = combo.getSelectionIndex();
                IVMInstall vmInstall = null;
                if (sel > 0) {
                    vmInstall = (IVMInstall) installedJREs.get(sel - 1);
                }
                getRuntimeDelegate().setVMInstall(vmInstall);
                validate();
            }

            public void widgetDefaultSelected(SelectionEvent e) {
                widgetSelected(e);
            }
        });

        Button button = SWTUtil.createButton(composite, Messages.installedJREs);
        button.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                String currentVM = combo.getText();
                if (showPreferencePage(composite)) {
                    updateJREs();
                    combo.setItems(jreNames);
                    combo.setText(currentVM);
                    if (combo.getSelectionIndex() == -1)
                        combo.select(0);
                }
            }
        });

        if (getRuntimeDelegate() != null) {
            if (getRuntimeDelegate().isUsingDefaultJRE()) {
                combo.select(0);
            } else {
                combo.setText(getRuntimeDelegate().getVMInstall().getName());
            }
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



