[EMF Forms] Viewmodel migration to 1.9.0 fails [message #1735529] |
Mon, 20 June 2016 13:50  |
Eclipse User |
|
|
|
We are trying to upgrade from EMF-ECP 1.5.1 to the latest release candidate of version 1.9.0. We have two sets of view models. One set went through the conversion with no problems. All the view models in the other set result in the exception "org.eclipse.ui.PartInitException: The input resource does not contain a valid VView. Please check your file."
A difference between the two sets of view models is the ecore models they're based on. The ecore model for the set of view models that did convert is in a single model file. The set of view models that does not convert is based on models that have a common base model defined in one ecore file and are extended in their own ecore models.
I have recreated one of the view models with version 1.9.0 by hand and defined it with the same elements as the model that was created with version 1.5.1. The two appear identical except for the addition of "/170" in the xmlns:org.eclipse.emf.ecp.view.model value and the addition of the xmi:id to all of the elements.
Does the automatic conversion deal with view models whose ecore models extend other ecore models?
|
|
|
|
|
|
|
|
|
Re: [EMF Forms] Viewmodel migration to 1.9.0 fails [message #1735951 is a reply to message #1735931] |
Thu, 23 June 2016 20:08   |
Eclipse User |
|
|
|
After a bit more work, I am still not able to see view model elements being localized (such as the Name of a Leaf Category of a Categorization). I am pretty sure that I have removed all of our customizations (custom renderers and layout provider). I thought that maybe our customizations were interfering with the localization. But, when it gets to where a name is specified with a "%", the localizationAdapter is null. Below is the stack trace to the point where a "%"-prefixed word is supposed to be localized but the localizationAdapter is null. Does this give any clues?
Thanks for your attention.
--Charles Eutsler
Thread [main] (Suspended (breakpoint at line 136 in LocalizationViewModelService))
owns: RunnableLock (id=147)
LocalizationViewModelService.localize(LocalizationAdapter, VElement) line: 136
LocalizationViewModelService.checkContents(LocalizationAdapter, VElement) line: 124
LocalizationViewModelService.localizeView(LocalizationAdapter, VElement) line: 106
LocalizationViewModelService.instantiate(ViewModelContext) line: 83
EMFFormsLegacyLocalServiceFactory<T>(EMFFormsAbstractLegacyServiceFactory<T>).createService(EMFFormsViewContext) line: 96
EMFFormsLegacyLocalServiceFactory<T>(EMFFormsAbstractLegacyServiceFactory<T>).createService(EMFFormsViewContext) line: 1
EMFFormsViewServiceManagerImpl.getServiceOptional(Class<T>, Map<Class<?>,EMFFormsViewServiceFactory<?>>, EMFFormsViewContext) line: 100
EMFFormsViewServiceManagerImpl.createLocalImmediateService(Class<T>, EMFFormsViewContext) line: 112
ViewModelContextImpl.loadImmediateServices() line: 302
ViewModelContextImpl.instantiate() line: 266
ViewModelContextImpl.<init>(VElement, EObject) line: 164
ViewModelContextFactory.createViewModelContext(VElement, EObject) line: 42
ECPSWTViewRendererImpl.render(Composite, EObject, VView) line: 76
TablePropertyFormContributor.renderPropertyForm(Composite, Object, boolean, boolean) line: 52
TeradataTablePropertyForm(AdminPropertyForm).renderPropertyForm(Composite, IPropertyFormContributor) line: 442
TeradataTablePropertyForm(AdminPropertyForm).renderForm() line: 261
TeradataTablePropertyForm(AdminPropertyForm).createForm() line: 244
TeradataTablePropertyForm.<init>(String, String, IConnectionProfile, TeradataViewPartUtil$PropertyFormState, IPropertyFormContributor, NavigationContext, ObjectListView, CommonView) line: 97
OpenTeradataPropertyFormAction$1.run() line: 217
RunnableLock.run() line: 35
UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 136
Display.runAsyncMessages(boolean) line: 4147
Display.readAndDispatch() line: 3764
PartRenderingEngine$9.run() line: 1151
Realm.runWithDefault(Realm, Runnable) line: 332
PartRenderingEngine.run(MApplicationElement, IEclipseContext) line: 1032
E4Workbench.createAndRunUI(MApplicationElement) line: 148
Workbench$5.run() line: 636
Realm.runWithDefault(Realm, Runnable) line: 332
Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 579
PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 150
IDEApplication.start(IApplicationContext) line: 135
EclipseAppHandle.run(Object) line: 196
EclipseAppLauncher.runApplication(Object) line: 134
EclipseAppLauncher.start(Object) line: 104
EclipseStarter.run(Object) line: 380
EclipseStarter.run(String[], Runnable) line: 235
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not available
Method.invoke(Object, Object...) line: not available
Main.invokeFramework(String[], URL[]) line: 648
Main.basicRun(String[]) line: 603
Main.run(String[]) line: 1465
Main.main(String[]) line: 1438
|
|
|
Re: [EMF Forms] Viewmodel migration to 1.9.0 fails [message #1736062 is a reply to message #1735951] |
Fri, 24 June 2016 14:48  |
Eclipse User |
|
|
|
I figured out what I was missing in the localizing problem. I missed the sentence "If you provide a View Model by your own means (e.g. by implementing a ViewModelProvider), you can simply add a LocalizationAdapter to the View element manually." When I added the LocalizationAdapter in our ViewModelProvider, things work.
Thanks.
|
|
|
Powered by
FUDForum. Page generated in 0.04421 seconds