Eclipse Blackberry Preprocessor Not Working?

为君一笑 提交于 2019-12-13 14:17:57

问题


I've already followed the directions @ Using preprocessor directives in BlackBerry JDE plugin for eclipse? for making sure the blackberry plugin preprocessing hook is (theoretically) enabled.

I'm using Eclipse 3.5.1 with Blackberry Plugin 1.1 with BB SDKs 4.7.0 and 4.6.0.

I have my preprocessor defines set (and I've tried in both the Project's Blackberry Properties as well as the Workspace Blackberry Build settings), and checked their capitalization and spelling carefully too.

I'm fairly confident the actual code to say "this stuff should be preprocessed" is good, because including/excluding preprocessed code seems to work fine on command line builds:

//#preprocess --- at beginning of file

and then code blocks like this throughout:

//#ifndef jde_4_7
  /*
//#endif   
//#ifdef jde_4_7
import net.rim.device.api.ui.TouchEvent;
//#endif
//#ifndef jde_4_7
  */
//#endif   

So what I can't figure out what else could be wrong that would cause Eclipse to not compile in my preprocessed code unless I remove the comments that are supposed to prevent the touch code from building into a build for blackberries that don't support touch.

At one point it used to work (and no I haven't updated Eclipse), but sometime in the last couple of weeks it seemed to just stop working. And I'm getting kind of tired of the error-prone process of searching for ifdefs and manually commenting/uncommenting touch code and looking for a better solution while I do testing and initial development requiring testing both touch and non-touch functionality.

Any other ideas on what could be wrong or how to fix it?


回答1:


Yeah, I've had the same experience with this. Seems like they've dropped support for it with their new plug-in. Sometimes it feels like those guys can't get anything right. If you want preprocessing I'm afraid you'll have to use Eclipse 3.4 and the old plug-in (1.0.67). You can go here and fetch a bundled eclipse 3.4 with the said plug-in and any other component pack you may need.




回答2:


I managed to get this working by adding this in the eclipse ini file

osgi.framework.extensions=net.rim.ejde.preprocessing.hook

you would probably already have osgi.framework.extensions. Just add net.rim.ejde.preprocessing.hook to it.



来源:https://stackoverflow.com/questions/2336627/eclipse-blackberry-preprocessor-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!