Home Patches


sinofoolsinofool Member Bochun BaiOrganization: sinofool.comProject: http://sinofool.com/ ✭✭
I use ant build system for both Java and C++ compile in the project.

IceJ includes Slice2JavaTask but no Slice2CppTask.

I copied Slice2JavaTask.java to Slice2CppTask.java and changed some class name. But it does not handle the dependencies correctly.

By overriding parseDependencies method, it works.
    protected java.util.List
    parseDependencies(String allDependencies)
        java.util.List sResult = super.parseDependencies(allDependencies);
        java.util.Iterator p = sResult.iterator();
            SliceDependency dep = (SliceDependency)p.next();

            String[] newDependencies = new String[dep._dependencies.length - 1];
            for(int initNewDep=0;initNewDep < newDependencies.length;++initNewDep)
                newDependencies[initNewDep] = dep._dependencies[initNewDep+1];
            dep._dependencies = newDependencies;
        return sResult;
Sign In or Register to comment.