Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315626

Summary: [Workbench] Creating new Midlet class after just created Midlet project doesn't use current selected project
Product: [Eclipse Project] Platform Reporter: Marco Vettorello <vettorello.marco>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: RESOLVED WORKSFORME QA Contact: Prakash Rangaraj <prakash>
Severity: minor    
Priority: P3 CC: gorkem.ercan, pwebster
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Marco Vettorello CLA 2010-06-03 12:48:12 EDT
Build Identifier: M20100211-1343

After creating a new Midlet Project with default options, selecting project folder on the Package Explorer view, selecting new JavaME Midlet class, I got and empty source folder inside the Wizard. After click Cancel and redo the "new JavaME Midlet" action the source appear.
I also have a similar error developing an Eclipse Plugin, that open a Wizard when selecting a JavaME project and check some files in the root folder of the project. During the plugin development I noticed that, just after creating a new Midlet Project the Project Selection was and Empty Selection.
This problem persist and appear just after the creation of a new JavaME project. If after creating a new Midlet project you do some operations and than eclipse need the project selection object there is no problem, but if you need the project selection element jsut after creating a new JavaME project you got an empty selection.
This is a bug that refers to MTJ development and also Plugin developments.

Reproducible: Always

Steps to Reproduce:
1.Open a New Midlet Project Wizard
2.Modify new project settings and click Finish 
3.Select the Project folder inside the Package Explorer View
4.Open the wizard "New-> Java ME Midlet"
5.See that the source folder is empty<----BUG
6.Click Cancel
7.Redo steps from step 3 and see that the source folder is the same of the project
Comment 1 Gorkem Ercan CLA 2010-06-17 17:06:43 EDT
I am not able to reproduce this with the Helios release candidate, tried not on Linux & windows. Are you able to repro every time?
Comment 2 Marco Vettorello CLA 2010-06-18 02:23:13 EDT
This is good if the bug isn't in Helios.
However I can reproduce everytime this bug with galileo.
The main thing is that you don't have to do any other sequence(open file/show view ecc) than the ones that I wrote to reproduce the bug.
I will test it on other system if possible.
Comment 3 Gorkem Ercan CLA 2010-06-25 08:36:57 EDT
I was now able to reproduce this one.
Comment 4 Gorkem Ercan CLA 2010-06-25 09:03:54 EDT
Moving to platform the problems seems to be more general. I am also able to see the similar behavior with a PDE project and the new class wizard. For some reason the selection field of the wizard both in case of MTJ new Midlet wizard and new Class wizard are populated with an empty structured selection.
Comment 5 Prakash Rangaraj CLA 2010-07-29 06:21:21 EDT
When you create a new Plugin project, it opens up Manifest Editor, so the Package Explorer is no longer active. So the current selection is decided by the Manifest Editor. When the new class wizard is invoked again, the current selection is not the newly created project, but its some text/other item from the editor, so the wizard's initial elements are not populated.
Comment 6 Paul Webster CLA 2010-07-29 07:54:59 EDT
(In reply to comment #5)
> When you create a new Plugin project, it opens up Manifest Editor, so the
> Package Explorer is no longer active. 

See his step #3, he selects a project in the package explorer (it must be active).

PW
Comment 7 Paul Webster CLA 2010-07-29 07:55:25 EDT
.
Comment 8 Paul Webster CLA 2010-07-29 07:56:15 EDT
Prakash, can you reproduce if you select the project before acting?

PW
Comment 9 Paul Webster CLA 2010-11-09 09:02:54 EST
Prakash, if you select the project as in his step #3, can you reproduce?

PW
Comment 10 Prakash Rangaraj CLA 2010-11-09 12:10:00 EST
(In reply to comment #9)
> Prakash, if you select the project as in his step #3, can you reproduce?
> 
> PW

   No. If I select the PackageExplorer in Step #3, the New Class wizard does fills up with the Source Folder.
Comment 11 Paul Webster CLA 2010-11-09 12:14:53 EST
We are not able to reproduce this.  Please provide updated steps, preferably against eclipse 3.7/Indigo M3 (just released) or 3.6.1

PW