Bug 237290 - Complain when creating a new MIDlet but there are no suits
Summary: Complain when creating a new MIDlet but there are no suits
Status: CLOSED FIXED
Alias: None
Product: MTJ (Archived)
Classification: Tools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: All Windows XP
: P3 normal (vote)
Target Milestone: 0.9   Edit
Assignee: Gustavo de Paula CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, ui, usability
Depends on:
Blocks:
 
Reported: 2008-06-16 11:01 EDT by Gustavo de Paula CLA
Modified: 2008-10-15 09:23 EDT (History)
2 users (show)

See Also:


Attachments
patch for this bug (19.84 KB, patch)
2008-06-23 00:04 EDT, Feng(Marvin) Wang CLA
no flags Details | Diff
remove internal class dependency (16.65 KB, patch)
2008-06-25 21:42 EDT, Feng(Marvin) Wang CLA
wds057: iplog+
armstrong.wang2000: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo de Paula CLA 2008-06-16 11:01:45 EDT
Currently there are options on MTJ to create a MIDlet and a MIDlet. The MIDlet suite represents the MIDP Project while the MIDlet shuild only existis on the context of a project.

If the user tries to create MIDlet before creating a project, no error message is shown.
 
There are two options to solve this
1. Create MIDlet option should only be available when there is a MIDlet suite project already created.
2. show an error message when the user tries to create a MIDet outside a MTJ project

probably the option 1 seems to be best one.
Comment 1 Feng(Marvin) Wang CLA 2008-06-23 00:04:11 EDT
Created attachment 105608 [details]
patch for this bug
Comment 2 Gustavo de Paula CLA 2008-06-23 16:00:30 EDT
hi wang,

thanks for your contribution.

i started to review the code today. some quick questions
- where does the StatusInfo class come from? i saw that the copyright is from IBM not from sybase. can you clarify from where you got that code?
- about the NewMIDletWizardPage, it would be nice if you can update the revisionh history and add your name to the list of contributors

as for the functionality it self, i executed some basic test here and everything seems to be ok.

i will continue to look at the code and see if i have specific comments about the code it self.

thanks again for your work on that
:)
gustavo
Comment 3 Feng(Marvin) Wang CLA 2008-06-23 22:11:19 EDT
> - where does the StatusInfo class come from? i saw that the copyright is from
> IBM not from sybase. can you clarify from where you got that code?

The StatusInfo class come from JDT, it is
org.eclipse.jdt.internal.ui.dialogs.StatusInfo.
I copy it out and put it into MTJ. I don't make any change except the package declaration. It also possible to use the original StatusInfo, but it will be a "Discouraged access" warning.
I have examined the existing MTJ code, it also use some internal classes, for example, org.eclipse.mtj.core.internal.utils.tools.AbstractJavaTool and org.eclipse.mtj.core.internal.utils.Utils. 
I think if the internal class depends a lot of other internal class (or other package scope visible class), we may just use them. Otherwise, we may copy them out.Any comments?


> - about the NewMIDletWizardPage, it would be nice if you can update the
> revisionh history and add your name to the list of contributors

I will add them in the final version patch:)

Comment 4 Gustavo de Paula CLA 2008-06-24 12:34:12 EDT
i finished looking at the code and everything is ok. please submit the final patch. if you based the code on some other internal eclipse code, please indicate that on the revision history

about the internal MTJ classes, we want to do a refectoring after a first release and this knowledge that you have of the code will definitly help us to do a better job on that. the main focus of this refactoring will be:
- add more flexibility with focus on the build environment
- reduce the coupling inside the code 

thanks,
:)
gustavo

please submit the final patch that i will commit the code on the

(In reply to comment #3)
> > - where does the StatusInfo class come from? i saw that the copyright is from
> > IBM not from sybase. can you clarify from where you got that code?
> 
> The StatusInfo class come from JDT, it is
> org.eclipse.jdt.internal.ui.dialogs.StatusInfo.
> I copy it out and put it into MTJ. I don't make any change except the package
> declaration. It also possible to use the original StatusInfo, but it will be a
> "Discouraged access" warning.
> I have examined the existing MTJ code, it also use some internal classes, for
> example, org.eclipse.mtj.core.internal.utils.tools.AbstractJavaTool and
> org.eclipse.mtj.core.internal.utils.Utils. 
> I think if the internal class depends a lot of other internal class (or other
> package scope visible class), we may just use them. Otherwise, we may copy them
> out.Any comments?
> 
> 
> > - about the NewMIDletWizardPage, it would be nice if you can update the
> > revisionh history and add your name to the list of contributors
> 
> I will add them in the final version patch:)
> 

Comment 5 Feng(Marvin) Wang CLA 2008-06-25 21:42:15 EDT
Created attachment 105853 [details]
remove internal class dependency

1. Add change history.
2. Remove internal class dependency.
Comment 6 Gustavo de Paula CLA 2008-07-02 13:49:12 EDT
all changes committed to svn. sorry for the delay. my laptop crashed last week :(

on Friday nightly build, you will be able to download them. 
Comment 7 Gustavo de Paula CLA 2008-10-15 09:23:06 EDT
all bugs we integrated and release on MTj 0.9