Community
Participate
Working Groups
Problem: Exceptions when enter negative number in Font Height Value in Property View. Diagram corrupted when Closed and reopened Expected: should not be allowed to enter negative numbers in Font Property Value (in Toolbar the Font can be selected from a list box so you are not able to enter negative numbers Supporting: Tested with Capspian I5 build Xtools_esdk_700-20051014_0200 from: \\kan-bld-repos\pxdebld\builds\7.0.0\GA\Iteration5\Xtools_esdk\Xtools_esdk_700-20051014_0200\I5_FVT_Verify\Almost-RSA-2005Oct14.zip based on Eclipse SDK/Version: 3.1.1/Build id: M20050914-1235 Steps: 1. Just create a Logic diagram. 2. Create a Note 3. Select the note and open Property View. 4. Select Advanced Tab n Property View and expand View->Styles node 5. Add any negative number in Font Height property Value (e.g. -100 ) and press Enter. Actual: Teh value is accepted and shows as the negative numbetr (-100) and you get exceptions in log (see below the error log): Expected: negative number should not get accepted (should be the same as when you try to enter alphabetic characters) Now if you try to close the diagram and reopen it, yopu get a biunch of other errors and Diagram is corrupted - cannot open it anymore Errol log when enter negative number in Font Height !ENTRY org.eclipse.gmf.runtime.emf.core 4 1 2005-11-04 11:16:57.640 !MESSAGE Event handler failed. !STACK 0 java.lang.IllegalArgumentException: Argument not valid at org.eclipse.swt.SWT.error(SWT.java:2926) at org.eclipse.swt.SWT.error(SWT.java:2865) at org.eclipse.swt.SWT.error(SWT.java:2836) at org.eclipse.swt.graphics.FontData.setHeight(FontData.java:464) at org.eclipse.swt.graphics.FontData.<init>(FontData.java:261) at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.refreshFont(GraphicalEditPart.java:649) at org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart.handleNotificationEvent(ShapeEditPart.java:109)
Created attachment 32761 [details] patch for font height validation This patch has not been committed and may be followed up with another patch if the affected files change.
Committed the code.
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug