Bug 363207 - ParametersComposite does not consequently implement the TYPE_INTEGER field type
Summary: ParametersComposite does not consequently implement the TYPE_INTEGER field type
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 8.1.0   Edit
Hardware: All All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: CDT Codan Inbox CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-08 12:27 EST by Ueli Kunz CLA
Modified: 2013-07-17 22:16 EDT (History)
5 users (show)

See Also:


Attachments
patch to fix bug (1.19 KB, patch)
2011-11-14 07:49 EST, Ueli Kunz CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.