liptga / headlesseclipse

Automatically exported from code.google.com/p/headlesseclipse
0 stars 0 forks source link

Problems while building a product #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

first of all, I really like this plugin. It is so much more convenient than 
buckminster and so on :)

I ran into a problem when i wanted to build products that where located in a 
project called my.project.product.
The ProductExporter interpreted this project as an IFile (which it is not, 
which caused an exception).

A fix for this is to change the resourcevisitor to something like this:

        ResourcesPlugin.getWorkspace().getRoot().accept(new IResourceVisitor() {

            public boolean visit(final IResource res) throws CoreException
            {
                if (res.getName().endsWith(".product") && (res instanceof IFile))
                {
                        products.add(res);
                }

                if (res.getProjectRelativePath().segmentCount() > 0)
                {
                    return false;
                }
                return true;
            }
        });

Original issue reported on code.google.com by christian.koestlin on 8 Jun 2010 at 11:40