Bug 111736 - Edit helper advice is not available when specialization type is registered in code
Summary: Edit helper advice is not available when specialization type is registered in...
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal
Target Milestone: ---   Edit
Assignee: Anthony Hunter CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2005-10-06 03:54 EDT by Dmitry Stadnik CLA
Modified: 2010-07-19 21:55 EDT (History)
1 user (show)

See Also:


Attachments
Patch for org.eclipse.gmf.runtime.emf.type.core (2.95 KB, patch)
2005-10-07 11:34 EDT, Linda Damus CLA
no flags Details | Diff
Patch for org.eclipse.gmf.tests.runtime.emf.type.core (4.72 KB, patch)
2005-10-07 11:39 EDT, Linda Damus CLA
no flags Details | Diff
Patch for org.eclipse.gmf.runtime.emf.type.core (3.22 KB, patch)
2005-10-07 11:59 EDT, Linda Damus CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Stadnik CLA 2005-10-06 03:54:17 EDT
Registration code:

ElementTypeRegistry.getInstance().register(new SpecializationType(...));

What''s wrong:

SpecializationTypeDescriptor class has two constructors: the one that accepts 
ISpecializationType instance and another one that accepts configuration element 
and metamodel descriptor; the latter creates edit helper advice descriptor so 
it normally added to the registry in 
SpecializationTypeRegistry.registerSpecializationType(SpecializationTypeDescriptor); 
the first constructor does not create descriptor for edit helper advice so it 
is not added to the registry and not available during command creation (see 
AbstractEditHelper.getEditHelperAdvice(IEditCommandRequest)).
Comment 1 Linda Damus CLA 2005-10-07 11:34:37 EDT
Created attachment 28032 [details]
Patch for org.eclipse.gmf.runtime.emf.type.core

SpecializationTypeDescriptors constructed with an ISpecializationType are now
given an EditHelperAdviceDescriptor, which is registered with the
SpecializationTypeRegistry.
Comment 2 Linda Damus CLA 2005-10-07 11:39:10 EDT
Created attachment 28034 [details]
Patch for org.eclipse.gmf.tests.runtime.emf.type.core

Updates the unit tests to verify that advice from an ISpecializationType that
is registered dynamically with the ElementTypeRegistry can be retrieved from
the registry.
Comment 3 Linda Damus CLA 2005-10-07 11:59:48 EDT
Created attachment 28038 [details]
Patch for org.eclipse.gmf.runtime.emf.type.core

Includes changes suggested in code review.
Comment 4 Anthony Hunter CLA 2005-10-07 13:46:17 EDT
Committed the new fix.
Comment 5 Eclipse Webmaster CLA 2010-07-19 21:55:04 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime Common was the original product and component for this bug