Community
Participate
Working Groups
I attempted to import Microemulator and use it. I had not yet set a default preverifier. When I changed the project to use the Microemulator device, it failed with a NullPointerException. I believe this was because the default preverifier was not set. We should provide a warning to the user if they import a Java based emulator without having set a default preverifier in the preferences. java.lang.NullPointerException at org.eclipse.mtj.core.model.project.impl.MidletSuiteProject.preverify(MidletSuiteProject.java:625) at org.eclipse.mtj.core.internal.preverification.builder.ResourceDeltaBuilder.handleClassAddsAndChanges(ResourceDeltaBuilder.java:826) at org.eclipse.mtj.core.internal.preverification.builder.ResourceDeltaBuilder.handleNullDelta(ResourceDeltaBuilder.java:943) at org.eclipse.mtj.core.internal.preverification.builder.ResourceDeltaBuilder.build(ResourceDeltaBuilder.java:343) at org.eclipse.mtj.core.internal.preverification.builder.PreverificationBuilder.preverifyProject(PreverificationBuilder.java:1073) at org.eclipse.mtj.core.internal.preverification.builder.PreverificationBuilder.build(PreverificationBuilder.java:547) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:633) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:218) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:360) at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:516) at org.eclipse.core.internal.resources.Project.build(Project.java:94) at org.eclipse.mtj.core.model.project.impl.MidletSuiteProject.setDevice(MidletSuiteProject.java:701) at org.eclipse.mtj.ui.internal.properties.J2MEProjectPropertiesPage$1.run(J2MEProjectPropertiesPage.java:179) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Hi Craig, I agree that we have to change this behavior. Do you think we should only WARN the user if he has not set a default preverifier yet, or present an error message and DENY him from importing? P.S. Changed the Severity and Pririty, so we will solve it first.
I'm not sure what to say... A warning during import at a minimum. The only problem is that they could import and then remove the default preverifier (from preferences or from disk). It seems we almost need to warn somehow *during the build*. I'm wondering if it is as simple as raising a CoreException during the build if there is no valid preverifier?
Created attachment 111809 [details] warning added on import devices screen
Created attachment 111810 [details] error marker added on project associated with a device that does not have a preverifier I've added and error marker in the projects whose device does not have a preverifier. The complete message shown is: 'The project was not built since the device definition is incomplete. Cannot find the device preverifier. Fix device definition then try building this project'
Fixed the bug through a warning message on the import device screen and an error marker in the project during build (screenshots on attachment 111809 [details] and attachment 111810 [details]). Please validate the screenshots and suggest here any enhancements.
I forgot to mention. If there is no preverifier, the build IS INTERRUPTED and the error marker is shown.
*** Bug 244609 has been marked as a duplicate of this bug. ***
This looks good to me.
all bugs we integrated and release on MTj 0.9