Bug 166068

Summary: ColorsAndFontsPropertySection is overwriting read only enablement on the refresh
Product: [Modeling] GMF-Runtime Reporter: Wayne <wdiu>
Component: GeneralAssignee: Anthony Hunter <ahunter.eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tikhomirov.artem
Version: 2.0Keywords: contributed
Target Milestone: 1.0.3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch for ColorsAndFontsPropertySection none

Description Wayne CLA 2006-11-28 10:49:43 EST
In org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ColorsAndFontsPropertySection, the createFontsGroup() correctly determines whether it's in read only mode (using isReadOnly()) and correctly disables controls using setEnabled(false) when in read only mode.

However, the refresh() method completely ignores the previous enablement and redetermines enablement based on ep.getNotationView().getStyle(NotationPackage.eINSTANCE.getFontStyle()) != null.

Two issues.
1) No need to set enablement in createFontsGroup() if it will be immediately overwritten by settings in the refresh() method.
2) refresh() method needs to take isReadOnly() into account.

Please compare v1.7 and v1.8 of the file.
Comment 1 Wayne CLA 2006-11-28 11:13:10 EST
Created attachment 54642 [details]
Patch for ColorsAndFontsPropertySection

Addresses the read only issue.  Also enablement for fill button didn't seem to be set consistently & fixed that too.
Comment 2 Anthony Hunter CLA 2007-01-09 16:50:02 EST
committed patch to R1_0_maintenance and HEAD (updated copyright to 2007).
Comment 3 Alex Boyko CLA 2007-04-04 12:51:22 EDT
*** Bug 157188 has been marked as a duplicate of this bug. ***
Comment 4 Eclipse Webmaster CLA 2010-07-19 12:30:27 EDT
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug