Bug 264086 - [fiximprove]: Preprocessor not working
Summary: [fiximprove]: Preprocessor not working
Status: CLOSED INVALID
Alias: None
Product: MTJ (Archived)
Classification: Tools
Component: MTJ projects (show other bugs)
Version: 0.9.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 1.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2009-02-08 09:45 EST by ArLi Weng CLA
Modified: 2009-07-09 11:58 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ArLi Weng CLA 2009-02-08 09:45:12 EST
Build ID: M20080911-1700
jdk: sun-jdk 1.6.0_11
cpu: intel core2

Steps To Reproduce:
create new midlet project in the eclipse.
enter the code:

public HelloWorld() {
	String s="A";
	//#ifdef impossible
	s="B"; 
	//#endif
}

the s="B" always.. because "impossible" is not define anywhere..

it's working fine at netbeans-6.5
is mtj unrealized? 

at java file in the .processed/ the code is:
public HelloWorld() {
	String s="A";
	//#ifdef impossible
//@		s="B"; 
	//#endif
}

why i `create package` or `run it` or `debug it`, s="B" always ?
Comment 1 Diego Madruga Sandin CLA 2009-02-08 11:56:20 EST
Hi Weng,

Have you followed the preprocessing support steps available in the user guide?
- http://dsdp.eclipse.org/help/latest/topic/org.eclipse.mtj.doc.user/html/gettingstarted/prepare_workbench.html "Configuring Preprocessor Support" section.

When this steps are not followed correctly, the generated preprocessed code is ignored during the build process.

Please, could you attach your log file, so we can analyze the problem? 
(http://wiki.eclipse.org/FAQ_Where_can_I_find_that_elusive_.log_file%3F)

Thanks 
Comment 2 ArLi Weng CLA 2009-02-08 23:03:49 EST
i fix my question
the s="B" always.. because "impossible" is not define anywhere..
to
the s="B" always.. but "impossible" is not define anywhere..
Comment 3 ArLi Weng CLA 2009-02-08 23:05:17 EST
(In reply to comment #1)

its solved follow:
append osgi.framework.extensions=org.eclipse.mtj.core.hooks to config.ini
restart with -clean args.
clean the project.
rebuild to all

thank you for help.
Comment 4 Gustavo de Paula CLA 2009-04-02 12:30:54 EDT
change the resolution since it was not an issue with mtj.
Comment 5 Gustavo de Paula CLA 2009-07-09 10:08:30 EDT
close bugs that are invalid / worksforme
Comment 6 Gustavo de Paula CLA 2009-07-09 11:58:05 EDT
close bug