Bug 245056 - Need a default preverifier warning
Summary: Need a default preverifier warning
Status: CLOSED FIXED
Alias: None
Product: MTJ (Archived)
Classification: Tools
Component: SDK Management (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P1 major (vote)
Target Milestone: 0.9   Edit
Assignee: Hugo Raniere CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
: 244609 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-24 21:11 EDT by Craig Setera CLA
Modified: 2008-10-15 09:22 EDT (History)
4 users (show)

See Also:


Attachments
warning added on import devices screen (45.13 KB, image/jpeg)
2008-09-05 08:33 EDT, Hugo Raniere CLA
no flags Details
error marker added on project associated with a device that does not have a preverifier (75.99 KB, image/jpeg)
2008-09-05 08:40 EDT, Hugo Raniere CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Setera CLA 2008-08-24 21:11:44 EDT
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)
Comment 1 Hugo Raniere CLA 2008-08-25 11:26:37 EDT
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.
Comment 2 Craig Setera CLA 2008-08-25 21:01:31 EDT
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?
Comment 3 Hugo Raniere CLA 2008-09-05 08:33:51 EDT
Created attachment 111809 [details]
warning added on import devices screen
Comment 4 Hugo Raniere CLA 2008-09-05 08:40:23 EDT
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'
Comment 5 Hugo Raniere CLA 2008-09-05 08:43:41 EDT
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.
Comment 6 Hugo Raniere CLA 2008-09-05 09:29:08 EDT
I forgot to mention. If there is no preverifier, the build IS INTERRUPTED and
the error marker is shown.
Comment 7 Hugo Raniere CLA 2008-09-05 17:17:13 EDT
*** Bug 244609 has been marked as a duplicate of this bug. ***
Comment 8 Craig Setera CLA 2008-09-07 15:48:06 EDT
This looks good to me.
Comment 9 Gustavo de Paula CLA 2008-10-15 09:22:06 EDT
all bugs we integrated and release on MTj 0.9