Bug 112987 - changing the Fill color and the Font on the LogicDiagram Preferences does not work
Summary: changing the Fill color and the Font on the LogicDiagram Preferences does not...
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: ---   Edit
Assignee: Tom Macdougall CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2005-10-18 15:20 EDT by Mohammed Mostafa CLA
Modified: 2010-07-19 12:26 EDT (History)
0 users

See Also:


Attachments
patch for LEDViewFactory (1.73 KB, patch)
2005-10-25 09:15 EDT, Tom Macdougall CLA
no flags Details | Diff
patch for AppearancePreferencePage (881 bytes, patch)
2005-10-28 12:22 EDT, Tom Macdougall CLA
no flags Details | Diff
patch for the Logic Diagram Plugin (6.46 KB, patch)
2005-10-28 12:25 EDT, Tom Macdougall CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mohammed Mostafa CLA 2005-10-18 15:20:16 EDT
creat a simple project
create a Logic Diagram inside the project
goto preferences and select the logic diagram appearanc settings
change the font, the line color , the fill color 
create a Led; the led still shows up with the default colors and font
Comment 1 Steven R. Shaw CLA 2005-10-18 17:24:11 EDT
The ViewFactory for the LED needs to respect the preferences.
Comment 2 Tom Macdougall CLA 2005-10-25 09:15:40 EDT
Created attachment 28746 [details]
patch for LEDViewFactory
Comment 3 Tom Macdougall CLA 2005-10-25 09:16:14 EDT
The LEDViewFactory createView method was hard coding the style:
color - logicGreen
font name - ""
font height - 19
font and line colors - determined by figure utilities 
(see below)


ShapeStyle style = (ShapeStyle)view.getStyle
(NotationPackage.eINSTANCE.getShapeStyle());
style.setFillColor((FigureUtilities.colorToInteger
(LogicColorConstants.logicGreen)).intValue());
style.setFontName(""); //$NON-NLS-1$
style.setFontHeight(19);
style.setFontColor((FigureUtilities.colorToInteger
(LogicColorConstants.displayText)).intValue());
style.setLineColor((FigureUtilities.colorToInteger
(LogicColorConstants.connectorGreen)).intValue());

The attached patch will only set the font height to 19 but all other 
preferences will be honored. The font height can be changed through the 
properties view if necessary. 

Comment 4 Tom Macdougall CLA 2005-10-28 12:22:06 EDT
Created attachment 28931 [details]
patch for AppearancePreferencePage

AppearancePreferencePage's setDefaultFontPreference method has been made
protected (changed from private)
Comment 5 Tom Macdougall CLA 2005-10-28 12:25:26 EDT
Created attachment 28932 [details]
patch for the Logic Diagram Plugin

The LEDViewFactory hard codes the colors for the LED display fill and text. The
logic diagram defaults have been modified to better suit the example's diagram
content.
Comment 6 Tom Macdougall CLA 2005-10-28 14:39:15 EDT
Comitted the changes.
Comment 7 Eclipse Webmaster CLA 2010-07-19 12:26:51 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime Diagram was the original product and component for this bug