Hallvard,

I apologize that I didn't get this fix in previously. Can you please create a new Sourceforge bug report with this information so that it does not get lost?

Thanks,
Craig

Hallvard Trætteberg wrote:
Hi,

I have previously reported a problem with EclipseME (and Eclipse 3.2M4),
when creating new Midlet Suite projects. The problem is still there, even
though I've upgraded to EclipseME 1.5.0. I managed to fix the problem, by
changing NewJ2MEProjectWizard.java in the eclipseme.ui plugin, as follows:

eclipseme.ui.internal.wizards.NewJ2MEProjectWizard: When the location path
overlaps with the workspace path, an error is generated. This happens when
the default is used, so the standard behavior produces the error. The trick
was to pass null to the JavaCapabilityConfigurationPage.createProject
method, when the default is used (checked by the following expression:
Platform.getLocation().toString().equals(locationPath.toString())). The
following code in an inner class of getProjectCreationRunnable():

        
JavaCapabilityConfigurationPage.createProject(
                                                project,
                                                mainPage.getLocationPath(),
                                                new
SubProgressMonitor(monitor, 1));

must be replaced by:

                                        IPath locationPath =
mainPage.getLocationPath();
                                        // cannot specify a location path
that overlaps with the default location, so null must be used instead
                                        if
(Platform.getLocation().toString().equals(locationPath.toString())) {
                                                locationPath = null;
                                        }
        
JavaCapabilityConfigurationPage.createProject(
                                                project,
                                                locationPath,
                                                new
SubProgressMonitor(monitor, 1));

I hope Craig can take the time to verify the code and include the fix if
it's OK.

Hallvard



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Eclipseme-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/eclipseme-users


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Eclipseme-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/eclipseme-users

Reply via email to