Community
Participate
Working Groups
The Eclipse QVTo project uses JDT's interfaces to configure new user projects such that they involve a Java build. To configure these projects, QVTo also requires an indication of the default execution environment. Unfortunately, there is no way to access JDT's getDefaultEEName() because it is part of the UI classes. To avoid code duplication, would you consider moving that method to a utility class that is publicly accessible?
Moving to jdt.ui
JDT Debug should already be providing APIs for the clients to access the default execution environment. Can you explore them and see if they suffice? What additional information is required from jdt.ui? Also, I see an internal helper class org.eclipse.pde.internal.launching.launcher.VMHelper in PDE which shows how to use the existing APIs.
(In reply to Noopur Gupta from comment #2) > JDT Debug should already be providing APIs for the clients to access the > default execution environment. Can you explore them and see if they suffice? Not sure which APIs you mean exactly. > What additional information is required from jdt.ui? Basically I was just wondering whether the getDefaultEEName() method could be moved from NewJavaProjectWizardPageOne$JREGroup to a public place like JavaCore, JavaRuntime, or JavaModelUtil. Maybe JavaRuntime is most appropriate as it already deals with execution environments. Instead of a String, returning the default IExecutionEnvironment directly would fit our purpose even better.
(In reply to Christopher Gerking from comment #3) > Maybe JavaRuntime is most > appropriate as it already deals with execution environments. Instead of a > String, returning the default IExecutionEnvironment directly would fit our > purpose even better. I think JavaRuntime should provide an API to get the default execution environment. Moving to Debug for consideration.