@Override
	protected Control createContents(Composite parent) {
		noDefaultButton();
		
		FontData fontData = parent.getFont().getFontData()[0];
		Font bold =	new Font(parent.getDisplay(), fontData.getName(), fontData.getHeight(), SWT.BOLD);

		Composite container = new Composite(parent, SWT.None);
		container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
		container.setLayout(new GridLayout(2, false));

		// Description label
		Label descriptionLabel = new Label(container, SWT.NULL);
		descriptionLabel.setText("Add or remove Ghidra installation directories.\n" +
			"The checked Ghidra installation is the default used when creating new projects.\n" +
			"Red entries correspond to invalid Ghidra installation directories.");
		new Label(container, SWT.NONE).setText(""); // filler

		// Ghidra installations table
		table = new Table(container, SWT.CHECK | SWT.BORDER | SWT.FULL_SELECTION);
		table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
		table.setHeaderVisible(true);
		table.setLinesVisible(true);
		table.addListener(SWT.Selection, evt -> {
			if (evt.detail == SWT.CHECK) {
				for (TableItem item : table.getItems()) {
					item.setChecked(item.equals(evt.item));
					item.setFont(item.equals(evt.item) ? bold : parent.getFont());
				}
			}
		});
		TableColumn col = new TableColumn(table, SWT.FILL);
		col.setText("Ghidra installation directories");
		col.setWidth(400);
		for (File dir : GhidraProjectCreatorPreferences.getGhidraInstallDirs()) {
			TableItem item = new TableItem(table, SWT.NONE);
			item.setText(dir.getAbsolutePath());
			try {
				validateGhidraInstallation(dir);
				item.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_BLACK));
			}
			catch (IOException e) {
				item.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_RED));
			}
			if (dir.equals(GhidraProjectCreatorPreferences.getGhidraDefaultInstallDir())) {
				item.setFont(bold);
				item.setChecked(true);
			}
		}
		if (table.getItemCount() > 0) {
			col.pack();
		}

		// Buttons
		Composite buttons = new Composite(container, SWT.None);
		buttons.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
		buttons.setLayout(new FillLayout(SWT.VERTICAL));

		// Add button
		addButton = new Button(buttons, SWT.PUSH);
		addButton.setText("Add...");
		addButton.addListener(SWT.Selection, evt -> {
			DirectoryDialog dialog = new DirectoryDialog(container.getShell());
			String path = dialog.open();
			if (path == null) {
				return;
			}
			if (Arrays.stream(table.getItems()).anyMatch(item -> item.getText().equals(path))) {
				EclipseMessageUtils.showErrorDialog("Ghidra installation already specified.");
				return;
			}
			try {
				validateGhidraInstallation(new File(path));
				TableItem item = new TableItem(table, SWT.NONE);
				item.setText(path);
				item.setChecked(table.getItemCount() == 1);
				item.setFont(item.getChecked() ? bold : parent.getFont());
			}
			catch (IOException e) {
				EclipseMessageUtils.showErrorDialog(e.getMessage());
			}
		});

		// Remove button
		removeButton = new Button(buttons, SWT.PUSH);
		removeButton.setText("Remove");
		removeButton.addListener(SWT.Selection, evt -> {
			int selectionIndex = table.getSelectionIndex();
			if (selectionIndex == -1) {
				return;
			}
			boolean wasDefault = table.getItem(selectionIndex).getChecked();
			table.remove(selectionIndex);
			if (table.getItemCount() > 0) {
				if (selectionIndex < table.getItemCount()) {
					table.select(selectionIndex);
				}
				else {
					table.select(selectionIndex - 1);
				}
				if (wasDefault) {
					TableItem item = table.getItem(table.getSelectionIndex());
					item.setChecked(true);
					item.setFont(bold);
				}
			}
		});

		return parent;
	}
Page for Ghidra project creator preferences.
GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/src/main/java/ghidradev/ghidraprojectcreator/preferences/GhidraProjectCreatorPreferencePage.java