private void updateUIDescriptionText(IPluginElement parentElement) { IPluginObject pluginObject = parentElement.getChildren()[0]; if (pluginObject instanceof IPluginElement) { IPluginElement element = (IPluginElement) pluginObject; if (element.getName().equals(F_CS_ELEMENT_DESCRIPTION) && PDETextHelper.isDefinedAfterTrim(element.getText())) { // Triggers listener to update data description on load fDescriptionText.setText(element.getText().trim()); } } }
private void handleWidgetSelectedCategoryButton() { // Create a dialog allowing the user to input the category name NewCategoryNameDialog dialog = new NewCategoryNameDialog(PDEUserAssistanceUIPlugin.getActiveWorkbenchShell()); dialog.create(); dialog.getShell().setText(CSWizardMessages.RegisterCSWizardPage_descTooltip); if (dialog.open() == Window.OK) { String newCategoryName = dialog.getNameText(); if (PDETextHelper.isDefinedAfterTrim(newCategoryName)) { String trimmedText = newCategoryName.trim(); fCategoryCombo.add(trimmedText); fCategoryCombo.setText(trimmedText); fCategoryCombo.setFocus(); String id = generateCategoryID(trimmedText); fCategoryTrackerUtil.associate(id, trimmedText, CSCategoryTrackerUtil.F_TYPE_NEW_CATEGORY); } } }