Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363207

Summary: ParametersComposite does not consequently implement the TYPE_INTEGER field type
Product: [Tools] CDT Reporter: Ueli Kunz <ueli.kunz>
Component: cdt-codanAssignee: CDT Codan Inbox <cdt-codan-inbox>
Status: NEW --- QA Contact: Elena Laskavaia <elaskavaia.cdt>
Severity: normal    
Priority: P3 CC: cdtdoug, malaperle, ueli.kunz, yevshif, zeratul976
Version: 8.1.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch to fix bug none

Description Ueli Kunz CLA 2011-11-08 12:27:27 EST
Build Identifier: 20110615-0604

Using a 'new BasicProblemPreference(StringKey, StringLabel, PreferenceType.TYPE_INTEGER);' results in a error when opening the problems preference dialog. The exception is thrown at ParametersComposite:199 because TYPE_INTEGER is not supported in the method createFieldEditorsForParameters. But other methods fully support TYPE_INTEGER.

Simply adding
case TYPE_INTEGER: {
						IntegerFieldEditor fe = new IntegerFieldEditor(info.getQualifiedKey(), info.getLabel(), getFieldEditorParent());
						addField(fe);
						break;
					}
in the method createFieldEditorsForParameters solves the problem.

Reproducible: Always

Steps to Reproduce:
1. Implement a BasicProblemPreference with type TYPE_INTEGER
2. Open your preference dialog
Comment 1 Ueli Kunz CLA 2011-11-14 07:49:16 EST
Created attachment 206935 [details]
patch to fix bug
Comment 2 Nathan Ridge CLA 2013-07-17 22:16:33 EDT
(In reply to comment #1)
> Created attachment 206935 [details]
> patch to fix bug

You are more likely to get the patch reviewed and committed if you submit it through gerrit. See http://wiki.eclipse.org/CDT/git#Using_Gerrit_for_CDT.