You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, each EClass from every EPackage installed in the IDE in project's dependencies is made available to the interpreter and to the validators through AQL's IQueryEnvironment. This causes a lot of issues, especially when opening a class that exists both in user's metamodel and in some other metamodel:
// Can cause issues because State is also an EEnum // in the EPackage "http://eclipse.org/eclipse/gemoc/dsl/debug"openclassState {
}
Combined to #149 it makes the editing very unfriendly.
Investigation
Culprits seem to be calls to AQL's JavaExtensionManager::reloadIfNeeded. It may make sense in AQL's context to fetch every metamodel but it doesn't in ours.
This method is called by the AleInterpreterhere and here.
Proposition
First, make sure we understand what this method does and why we call it. Then, investigate one of the following
remove calls to this method,
replace current calls with calls to a custom method,
replace JavaExtensionsManager with a custom class.
The text was updated successfully, but these errors were encountered:
After digging a bit into the code I actually found a way easier solution.
The JavaExtensionManager internally uses a BundleClassLoading to discover available EPackages and Java services. Fortunately, the JavaExtensionManager::setClassLoadingOverride setter allows to provide a custom ClassLoader.
The ClassLoading interface is API and should allow us to easily tailor the EPackages and Java services we want to make available.
Motivation
Currently, each EClass from every EPackage
installed in the IDEin project's dependencies is made available to the interpreter and to the validators through AQL'sIQueryEnvironment
. This causes a lot of issues, especially when opening a class that exists both in user's metamodel and in some other metamodel:Combined to #149 it makes the editing very unfriendly.
Investigation
Culprits seem to be calls to AQL's
JavaExtensionManager::reloadIfNeeded
. It may make sense in AQL's context to fetch every metamodel but it doesn't in ours.This method is called by the
AleInterpreter
here and here.Proposition
First, make sure we understand what this method does and why we call it. Then, investigate one of the following
JavaExtensionsManager
with a custom class.The text was updated successfully, but these errors were encountered: