Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
04-11-2010 02:53 PM
I have a couple classes that use the following format with the preprocessor:
//#ifdef DEFINE public CLASS1 item = new CLASS1(); //#else public CLASS2 item = new CLASS1(); //#endif
Under the old eclipse plugin (1.1) this compiled. Now under 1.2 the class refuses to compile, it tells me that a variable of the name "item" already exists. I know that Eclipse gives false-positives on many preprocessor items but this worked before.
So does anyone have any ideas how to resolve this or is this an Issue Tracker item?
Also I have tried this (horrible) hack that also doesn't work:
//#ifdef DEFINE public CLASS1 //#else public CLASS2 //#endif item = //#ifdef DEFINE new CLASS1(); //#else new CLASS1(); //#endif
04-11-2010 03:04 PM
You haven't overlooked the //#preprocess tag right? There is also an issue where the preprocessor goes into an endless loop. I have to find the thread for it though.
04-11-2010 03:09 PM
Nope, this isn't the first class that I have that uses the preprocessor so I know to include the //#preprocess flag.
May I ask, what makes you think an infinite loop would cause something like this?
04-11-2010 03:15 PM
Well the first time the plugin detects that the preprocessor is used, it asks to restart Eclipse. Have you encountered that yet? If you haven't, maybe the preprocessor isn't firing.
Also, the infinite loop issue was causing issues for people who were using the preprocessor (I've never had this issue although I'm using the most unsupported OS-architecture combo; Windows 7/64-bit).
04-11-2010 03:28 PM
I've never had it ask me to restart Eclipse because of the preprocessor, only when I update the plugin. Do you know how to detect if Eclipse is using the preprocessor?
I'm running Vista 32bit.
04-11-2010 03:37 PM
Only place is under the project properties > Builders. Make sure BlackBerry Pre-Process Builder is first and checked. Next should be Resources then Java Builder.
04-11-2010 03:49 PM
Yep, those are there and checked.
04-11-2010 03:55 PM
Did you do an in-place upgrade or new Eclipse install? Have you tried creating a new workspace and importing your projects into the new one?
04-11-2010 04:28 PM
In-place, and yes (it doesn't work)
04-11-2010 04:34 PM
Ok. At this point, I'm not really sure. I usually install fresh (in case things go wrong I still have my previous install).
There must be some artifacts left over from your old install since you did an in-place upgrade.