Can't find 'Build.xml' after export Antenna files - eclipse

I have made a J2ME program. This program will be used in 3 specific countries and has to support 7 different screen resolutions.
At the moment I have created 7 different builds for each resolution type and 3 variants in each for each of the 3 countries.
I am using LWUIT as my UI framework. I have configured MTJ with the following.
antenna-bin-1.2.1-beta.jar
WTK2.5.2_01
proguard4.8
on Eclipse 3.7.2
In the package explorer i right click on my project directory
select 'Export' (I couldn't find 'Export Antenna Build Files' under the 'Mobile Tools for Java' option)
I wait for it to do its thing.
I open the project folder and search for Build.xml. But can't find anything .
I find a folder called 'mtj-build' that contains another folder(custom-tasks) and two files mtj-build.properties and mtj-build.xml .
I want to able to write a build file that would be able to do the following
put in the correct resources according to the resolution its building
put in the correct theme according to the resolution its building
set the relevant attributes in the Application Descriptor file for each country
repeat this process automatically for each resolution and each country and place the respective .Jad and .Jar files in a particular folder structure as shown.
MainFolder:
{
Country1:{
Res1,
Res2,
Res3,
....},
Country2:{
Res1,
Res2,
Res3,
....},
Country3:{
Res1,
Res2,
Res3,
....},
....etc}
}
As I understand to do this I would need to set up a Build.xml. But then I can't find Build.xml after selecting the Export Antenna Build Files option.
How do I achieve this goal? Is it even possible to do this? Please do help . Thanks in Advance
===================UPDATE TO THIS POST #1======================
Follow the links mentioned by Eugen Martynov below.
on a side note: The reason I wasn't getting the option to Export Antenna Build files on the right click of the project was because they were referring to a customized version of the Eclipse IDE called Pulsar Eclipse.[ http://www.eclipse.org/pulsar/ ]
The Antenna build xml file generated by it is far more optimized than the one you get out of the standard Eclipse. I dunno why that is. But thats my Observation.
===================UPDATE TO THIS POST #2======================
Thanks for your suggestion Eugen. I will be writing a few sub Ant Build files to simplify my problem. I still have to figure out how to break this down.
Thanks for the link Telmo Pimentel Mota. In my current build I have 'wtkbuild' and 'wtkpackage'. And the build is working great. I just now have to figure out how to call or execute one build file from another following Eguen's suggestion.

I wouldn't give you complete answer but I give you way to find out it yourself.
Here about ant and building process. Here is building j2me with antenna. There are also should be examples of build.xml files in antenna sample folder. Here is alternate example about ant and building j2me without using antenna.
In your case you have to use different res folders and set different manifest options based on two additional properties country and resolution. You could pass properties outside build.xml by using properties file or by command line:
ant -f <path to build.xml> -D<property name>=<property value>

Related

Multiple Eclipse Projects - same source code - how to?

So I'm fighting eclipse (STM32 CUBE, and TI CodeComposer, etc)
I want this:
$(PROJ_ROOT) is some directory where the project is located
$(PROJ_ROOT)/src_common <- All common source code here
$(PROJ_ROOT)/src_ti <-- all TI specific stuff is here
$(PROJ_ROOT)/src_stm32 <- All STM32 specific stuff is here
$(PROJ_ROOT)/inc <- All headers here
$(PROJ_ROOT)/ti-ccs/.project <- for TI CodeComposer
$(PROJ_ROOT)/stm32/.project <- for STM32 IDE
Right now, keeping it simple (only 2 tools)
Reality adds Xilinx, and Microsemi, and ESP32, all Eclipse based
Would like to add "Platform.IO" later .. not now
From an eclipse point of view:
The source directory is: "../src" (up-and-over) from the .project directory
And likewise for the INCLUDE directory
Why? Because I want to share the source between two different boards different tools
I have board specific stuff in two separate directories
What the eclipse tools seem to demand is this:
$(PROJ_ROOT)/.project <- The project file must be at the root
$(PROJ_ROOT)/src <- Source directory is parallel to .project location
$(PROJ_ROOT)/inc <- Include directory is parallel to .project
location
$(PROJ_ROOT)/../someplaceelse is expressly DISALLOWED and FORBIDDEN
What I need seems to be absolutely not allowed (or I cannot figure out how to) I simply need to say the source directory is not here, it is elsewhere
Why do I want this? I need to maintain these applications/static-libraries as separate entities with multiple targets
Note: In this example the TWO (reality N) different versions of eclipse with two different setups for tools etc do not work and cannot share project files, they are incompatible with each other.
I know this is possible, the STM32 out-of-box examples generally are built(arranged) this way but I am trying to create my own project for MY STUFF

Eclipse Plugin Development: Adding items to a working set with the path of the item?

Hello,
I'm an eclipse plugin development newbie looking for pointers to get me started on a particular project.
I am trying to build an eclipse plugin that will automatically construct a working set from a text file that simply consists of a list of file path names. The files/items need not share any parent directories. The rough idea is represented in the following diagram:
I am not asking for the solution to this task. That's the over-arching goal. To achieve that goal, I want to conquer some smaller goals first.
With that in mind, here's the smaller goal I'm currently trying to tackle:
In Eclipse, how can I prompt the user for a single file's path, and then add that file to an existing working set?
I'm not sure where to start. Should I work directly off of the existing org.eclipse.ui.workingSets extension point? Or should I use a collection of other extension points? How do I convert strings into something that can be added to a working set? Do I write code that directly modifies the workingsets.xml file?
Even with a much simpler goal, I still feel quite overwhelmed with the vastness of eclipse extension options. There are probably many ways to go about implementing something like this, but I just need one to get started.
Thanks a bunch!
To manipulate working sets you use the working set manager interface IWorkingSetManager. Get this with:
IWorkingSetManager manager = PlatformUI.getWorkbench().getWorkingSetManager();
From this you can get a particular working by name with:
IWorkingSet workingSet = manager.getWorkingSet("name");
The contents of a working set is an array of IAdaptable objects:
IAdaptable [] contents = workingSet.getElements();
You add to the contents by adding to this array and setting the contents:
IAdaptable [] newContents
.... get new array with old contents + new contents
workingSet.setElements(newContents);
A lot of Eclipse objects implement IAdaptable, for a file in the workspace you would use IFile. You can use dialogs such as ResourceSelectionDialog to select resources from the workspace.

FlexUnitApplication.html and FlexUnitApplication.swf not generated

Context
I have
a project Flex-Java in Eclipse Indigo service Release 2, (a web application)
and i use the plugin Flash-builder to work on it.
I use sdk 4.5.1
What i try to do
1) I try to make a simple test case with FlexUnit4. When i create a new Test Case) : New > Test Case Class, Eclipse by Default create :
package flexUnitTests + with my new Test case : (for example :
TestDoc.as)
package byDefault with one file : FlexUnitCompilerApplication.mxml
a html a swf file for FlexUnitCompilerApplication is auto-generated in bin-debug folder.
Till this point all seems to be good, so I try to execute the unit test :
2) I want to execute the unit test :
A FlexUnitApplication.mxml is created in the default package
The problem :
The compilator doesn't generate the files : FlexUnitApplication.hmtl and FlexUnitApplication.swf in bin-debug folder...
And there is an error written in the "error screen" :
description Impossible to resolve all the ressources "FlexUnitTestRunner"
place or Localisation : Unknown
sorry i try to translate the description from a French version
Other informations
I succeeded doing this in other projects... the FlexUnitApplication files are auto-generated.
Question(s)
It seems that, it is bound with something in this particular project. Maybe something is hindering the process to autogenerate these files ?? I cannot figure it out why??
Is it Possible to force the compilator doing these files (html and swf) ??
I am really lost.. and i tried things, i looked in the properties, in the metadata's ... i really don't understand.
Somebody maybe has an idea for that, what could i do, what could i check ?
Thank you in advance
I always have troubles with unit tests in eclips+FB plugin as well.
After the FlexUnitApplication.mxml is created goto your project settings and update the following:
remove the dynamic {locale} compiler flag and add a specific '-locale=en_US' only.
if you have custom locale files add those to the source path manually
in the library path find the entry that points to the dynamic locale library '..sdk/../{locale} and copy the path. click on add SWC to library path. Paste the copied path and replace '{locale}' with 'en_US'
Generally this turns out favorable for me.

Getting IntelliJ 12 to put GWT output in the right location

For reasons that I have to ask you to accept as a given, I need to have my GWT application be built such that all the output is available at "/Foo/bar/1.0", rather than the normal "/".
Specifically, I need the result of compiling my GWT app inside of IntelliJ to look like this:
~/.IntelliJIdea12/system/gwt/Project.534b2263/Test.ef6cd448/run/www/
- Foo
- bar
- 1.0
- Testing.html
- Testing.css
- (other files in here too, like favicon.ico, etc...)
- WEB-INF
- (contents left out here)
- testing
- testing.devmode.js
- testing.nocache.js
The best I can seem to do is to get the Testing.html, Testing.css, etc... in the right place. I get this by setting the "Output Relative Path" for my GWT module to "/Foo/bar/1.0/" and the "Path Relative to DeploymentRoot" for my Web Resource Directory to the same "/Foo/bar/1.0/".
However, the "testing" directory, containing the testing.devmode.js and testing.nocache.js seem to wind up in the ~/.IntelliJIdea12/system/gwt/Project/534b2263/Test.ef6cd448/run/www/testing directory.
Obviously, this means that when the Testing.html tries to include the testing/testing.nocache.js it cannot be found, and my GWT app doesn't work.
Hopefully I'm just missing something easy, but I've been digging around for hours...
For those who may be interested, I've created a sample project to illustrate the problem and posted it, along with this same basic question, at the IntelliJ Forums: http://devnet.jetbrains.com/thread/442050.
(Copied from IntelliJ forums)
If you need to put GWT compiler output somewhere you need to create an artifact (File | Project Structure | Artifacts) and add 'GWT Compiler Output'
element to it. Also you can put 'Web facet resources' element to the same artifact. If you need to place the GWT output into a subfolder under the
artifact output root use 'New Folder' action in the 'Output layout' tree in the artifact editor.
Just for future reference and easy of finding this answer, the final result (see http://devnet.jetbrains.com/thread/442050) it is not possible to control the location of the output of the GWT compiler.
Practically what this means (for my project anyways) is that I have to do a runtime check: GWT.isProdMode() and then load resources from different locations.

Weka EM cluster get "Error: Could not find or load main class test" in eclipse

I want to use weka to cluster tweets in the database in JSP. In GUI, I find only HierarchiccalClusterer and Filteredcluster available for string clustering. Then I find this clusteringdemo sample code from weka official website: https://svn.scms.waikato.ac.nz/svn/weka/trunk/wekaexamples/src/main/java/wekaexamples/clusterers/ClusteringDemo.java
However, after set up the sample arff code in weka directory, I get this error "Error: Could not find or load main class ClusteringDemo".
Can anyone help me to find out the reason?
I only change filename in the sentence data = DataSource.read(filename);. Besides, my classpath set up correctly for I already done some classifier.
1.- Maybe the ClusteringDemo.class is not in your classpath.
You should add the class of jar file to your project.
2.- Anyway, you can download the java code from: http://weka.wikispaces.com/file/detail/ClusteringDemo.java
Compile and run it (make sure that weka.jar is in your classpath).
3.- If you have added ClusteringDemo.java to your project. Make sure that it has the "package" line (the first line) according to its location. Otherwise Java will not be able to find it.
Good luck using EM, maybe you can also try N-grams + Naive Bayes.