Bug 156702 - [gmfgraph] gmfgraph.PolygonDecoration with colors produce uncompilable code
Summary: [gmfgraph] gmfgraph.PolygonDecoration with colors produce uncompilable code
Status: RESOLVED INVALID
Alias: None
Product: GMF-Tooling (ARCHIVED)
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Michael Golubev CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2006-09-08 10:13 EDT by Michael Golubev CLA
Modified: 2010-07-19 22:19 EDT (History)
0 users

See Also:


Attachments
Patch for gmfgraph.tests that demonstrates the issue (2.55 KB, patch)
2006-09-08 10:15 EDT, Michael Golubev CLA
no flags Details | Diff
Fixes the subj (6.68 KB, patch)
2006-09-08 12:18 EDT, Michael Golubev CLA
no flags Details | Diff
Corrected tests for the (obsolete) fix (3.45 KB, patch)
2006-09-14 12:37 EDT, Michael Golubev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Golubev CLA 2006-09-08 10:13:34 EDT
Originally reported at news group, ["GMF diagram generator chocking on colors", 2006-09-08], news:edrnq7$jin$1@utils.eclipse.org.

In case if background/foreground colors are set for PolygonDecoration, containing connection can not be generated due to exception in generator.

Attached is the patch for the gmfgraph tests that allows to reproduce the issue.
Expected: Tests should pass
Comment 1 Michael Golubev CLA 2006-09-08 10:15:54 EDT
Created attachment 49719 [details]
Patch for gmfgraph.tests that demonstrates the issue

Changed test now fails due to compilation errors.
Comment 2 Michael Golubev CLA 2006-09-08 10:21:46 EDT
org.eclipse.emf.codegen.jet.JETException: InvocationTargetException
	at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:394)
	at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:367)
	at org.eclipse.gmf.internal.codegen.dispatch.DispatcherImpl.dispatch(DispatcherImpl.java:53)
        at <skipped>

Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:386)
	... 98 more

Caused by: java.lang.NullPointerException
	at org.eclipse.gmf.graphdef.codegen.templates.FigureAttrGenerator.generate(FigureAttrGenerator.java:72)
	... 103 more
Comment 3 Michael Golubev CLA 2006-09-08 12:18:43 EDT
Created attachment 49737 [details]
Fixes the subj

Includes previously attached test, thus obsoleting the previous patch.
Comment 4 Michael Golubev CLA 2006-09-14 12:37:14 EDT
Created attachment 50167 [details]
Corrected tests for the (obsolete) fix

It was finally decided, that it is correct failure, because it is reproducible only when decoreation does not have required name attribute.

Attached patch adds the correctly setup decoration with colors into the test fixture.
Comment 5 Artem Tikhomirov CLA 2006-09-14 12:44:35 EDT
Patch with test reviewed and committed.
Comment 6 Eclipse Webmaster CLA 2010-07-19 22:19:34 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Generation was the original product and component for this bug