Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350924 - [M2x IDE Integration] EditOutletDialog enhancement
Summary: [M2x IDE Integration] EditOutletDialog enhancement
Status: CLOSED FIXED
Alias: None
Product: Sphinx
Classification: Automotive
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Idrissa Dieng CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-01 07:38 EDT by Lan Phan CLA
Modified: 2021-07-14 02:16 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lan Phan CLA 2011-07-01 07:38:05 EDT
Build Identifier: Eclipse 3.6.2

In case "editableName" = false, Name field always displays "<default>" through this code:
protected Control createDialogArea(Composite ancestor) {
...
if (editableName) {
	if (outlet.getName() != null) {
		nameText.setText(outlet.getName());
	}
	nameText.addModifyListener(listener);
} else {
	nameText.setText(Messages.label_default);
}
...
}

The code is not generic enough (usecase: user don't want to edit name of Outlet "abc", but Name field displays "<default>" - NOT OK).

Proposed solution:
if (outlet.getName() != null) {
	nameText.setText(outlet.getName());
}
if (editableName) {
	nameText.addModifyListener(listener);
} else {
	if (outlet.getName() == null) {
		nameText.setText(Messages.label_default);
	}
}

Reproducible: Always
Comment 1 Idrissa Dieng CLA 2011-08-22 09:22:26 EDT
Fixed as proposed solution.
Comment 2 Balazs Grill CLA 2021-07-14 02:16:03 EDT
Mass-closing Resolved tickets