eclipse-ecp / org.eclipse.emf.ecp.core

Eclipse Public License 2.0
0 stars 0 forks source link

View Model not loaded for Classes from SubPackages #44

Open eclipse-ecp-bot opened 5 months ago

eclipse-ecp-bot commented 5 months ago

| --- | --- | | Bugzilla Link | 507347 | | Status | NEW | | Importance | P2 normal | | Reported | Nov 10, 2016 07:38 EDT | | Modified | Dec 26, 2022 10:49 EDT | | Version | 1.10.0 | | Reporter | Eugen Neufeld |

Description

If you have an Ecore where you have a package and directly inside it a subpackage without an EClassifier next to the subpackage, then the view model for Classes of this subpackage is not loaded.\ The problem is, that EMF doesn't generate any package description for the parent package. But the ViewModel expects this parent package to exists. This way the uri of the rootEClass cannot be resolved and the ECLass of the ViewModel doesn't fit the provided EClass when retrieving the view.

We need to handle this case in the EcoreHelper class.

eclipse-ecp-bot commented 5 months ago

Nov 20, 2018 13:47

This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--\ The automated Eclipse Genie.

eclipse-ecp-bot commented 5 months ago

By Alexander Fedorov on Jan 14, 2019 04:45

@Eugen, many thanks for your comment, it was so helpful to find the workaround!

This bug is still actual and it blocks the EMF Forms usage for the good part of .ecore with subpackages.

For the .ecore like:

<?xml version="1.0" encoding="UTF-8"?>\ <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="emfforms" nsURI="http://www.example.org/emfforms" nsPrefix="emfforms">\ <eSubpackages name="subpackage" nsURI="http://www.example.org/emfforms/subpackage/1.0.0"\ nsPrefix="subpackage">\

\ \ \ \ The .view is saved with hrefs like \ \ \ \ \ \ \ \ /org.example.ecore/model/subpackages.ecore\ And then ViewModelFileExtensionsManager is unable to resolve view.getRootEClass() to EClass instance
eclipse-ecp-bot commented 5 months ago

By Eugen Neufeld on Jan 14, 2019 05:27

@Alexander\ Yes it is still a valid issue.\ The main reason nobody worked on this issue is, that subpackages are not well supported in many tools based on EMF.\ Maximilian lists the use of subpackages as one of the 5 don't when using EMF https://eclipsesource.com/blogs/2013/03/19/emf-dos-and-donts-5/

Nonetheless we would love to have a fix for this. Any help is appreciated.

eclipse-ecp-bot commented 5 months ago

Jan 04, 2021 16:43

This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--\ The automated Eclipse Genie.

eclipse-ecp-bot commented 5 months ago

Dec 26, 2022 10:49

This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--\ The automated Eclipse Genie.