Community
Participate
Working Groups
Created attachment 106685 [details] "run as Midlet" appears on a non-midlet When you start up MTJ, and right click any resource (project, folder, and file) and select ¡®run as/debug as¡¯, you will see ¡®Emulated Java ME MIDlet¡¯ menu. After the first time you use ¡®run/debug as MIDlet¡¯, the ¡®Emulated Java ME MIDlet¡¯ option will just appear on Midlet. This is because when you start MTJ, the org.eclipse.mtj.ui plug-in will not active until the first time you use it. So the propertyTester extensions in org.eclipse.mtj.ui will not function until the first time you use it. Possible solutions: 1. Set attribute forcePluginActivation="true" of <test> element in org.eclipse.debug.ui.launchShortcuts extentions. Like this: <extension point="org.eclipse.debug.ui.launchShortcuts"> ............ <test property="org.eclipse.mtj.ui.javaElement.isMidlet" forcePluginActivation="true"/> ............ 2. Use JDT build-in property tester, like this: <extension point="org.eclipse.debug.ui.launchShortcuts"> ............ <and> <adapt type="org.eclipse.jdt.core.IJavaElement"> <test property="org.eclipse.jdt.core.isInJavaProject" forcePluginActivation="true"/> </adapt> <test property="org.eclipse.jdt.launching.extendsClass" args="javax.microedition.midlet.MIDlet"/> </and> ............ I think the second solution is better.
Created attachment 107024 [details] patch for this bug If apply this patch, the org.eclipse.mtj.ui.internal.MidletPropertyTester class will no longer useful.
hi feng, just reviewed the change. i will commit to the repository today :) gep (In reply to comment #1) > Created an attachment (id=107024) [details] > patch for this bug > > If apply this patch, the org.eclipse.mtj.ui.internal.MidletPropertyTester class > will no longer useful. >
Hi gep, I found the patch contains something not useful. It is forcePluginActivation="true", this attribute is of no use. You can easily find it in the path in this line: <test property="org.eclipse.jdt.core.isInJavaProject" forcePluginActivation="true"/> Would you pls delete this attribute and commit again? After delete, the line will like this: <test property="org.eclipse.jdt.core.isInJavaProject"/>
just commited to svn thanks feng :) gep
all bugs we integrated and release on MTj 0.9