Bug 562978 - Model Generated class {YOUR_MODEL}EditPlugin$Implementation must instantiate {YOUR_MODEL}RelativeValueProviderAdapterFactory() in constructor
Summary: Model Generated class {YOUR_MODEL}EditPlugin$Implementation must instantiate ...
Status: NEW
Alias: None
Product: STEM
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X
: P3 enhancement (vote)
Target Milestone: 2.0.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-08 13:01 EDT by James Kaufman CLA
Modified: 2020-05-08 13:01 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Kaufman CLA 2020-05-08 13:01:01 EDT
There is a defect in the logger that occurs when running STEM headless (it will not pick up custom compartments defined in the model builder).  A workaround enables the normal STEM logger (just drag it into the scenario) and eliminates custom headless logger (so users will not need the `-log` flag in the headless command). The problem arises because the model (and it's value provider) are not being loaded early enough.

A work around is to add one line of code to the generated class {YOUR_MODEL}BEditPlugin$Implementation to instantiate a
 
new {YOUR_MODEL}RelativeValueProviderAdapterFactory() 
in the constructor for  {YOUR_MODEL}BEditPlugin$Implementation.

The model builder should be updated to add this line of code automatically.

Please find an example below. Also need to add an import for {YOUR_MODEL}RelativeValueProviderAdapterFactory. 

public final class {YOUR_MODEL}BEditPlugin extends EMFPlugin {
				. . . 

	/**
	 * The actual implementation of the Eclipse <b>Plugin</b>.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated NOT
	 */
	public static class Implementation extends EclipseUIPlugin {
		/**
		 * Creates an instance.
		 * <!-- begin-user-doc -->
		 * <!-- end-user-doc -->
		 * @generated NOT
		 */
		public Implementation() {
			super();
	
			// Remember the static instance.
			//
			plugin = this;
>>>>>>		new {YOUR_MODEL}RelativeValueProviderAdapterFactory();    
		}
	}

}