public void build()

in plugins/org.apache.karaf.eik.ui/src/main/java/org/apache/karaf/eik/ui/project/impl/KarafPlatformResourcesBuildUnit.java [41:83]


    public void build(final int kind, @SuppressWarnings("rawtypes") final Map args, final IProgressMonitor monitor) throws CoreException {
        final IKarafProject newKarafProject = getKarafProject();
        final IProject project = newKarafProject.getProjectHandle();

        for (final String folderName : new String[] { ".bin", ".bin/platform", ".bin/runtime" }) {
            final IFolder folder = project.getFolder(folderName);
            if (!folder.exists()) {
                folder.create(true, true, monitor);
            }
        }

        if (!project.getFolder(".bin/platform/etc").exists()) {
            project.getFolder(".bin/platform/etc").createLink(getKarafPlatformModel().getConfigurationDirectory(), 0, monitor);
        }

        if (!project.getFolder(".bin/platform/deploy").exists()) {
            project.getFolder(".bin/platform/deploy").createLink(getKarafPlatformModel().getUserDeployedDirectory(), 0, monitor);
        }

        if (!project.getFolder(".bin/platform/lib").exists()) {
            project.getFolder(".bin/platform/lib").createLink(getKarafPlatformModel().getRootDirectory().append("lib"), 0, monitor);
        }

        if (!project.getFolder(".bin/platform/system").exists()) {
            project.getFolder(".bin/platform/system").createLink(getKarafPlatformModel().getPluginRootDirectory(), 0, monitor);
        }

        // TODO: Is this the right way to add the current installation?
        final IDynamicVariable eclipseHomeVariable = VariablesPlugin.getDefault().getStringVariableManager().getDynamicVariable("eclipse_home");
        final String eclipseHome = eclipseHomeVariable.getValue("");

        if (!project.getFolder(".bin/platform/eclipse").exists()) {
            project.getFolder(".bin/platform/eclipse").create(true, true, monitor);
        }

        if (!project.getFolder(".bin/platform/eclipse/dropins").exists()) {
            project.getFolder(".bin/platform/eclipse/dropins").createLink(new Path(eclipseHome).append("dropins"), 0, monitor);
        }

        if (!project.getFolder(".bin/platform/eclipse/plugins").exists()) {
            project.getFolder(".bin/platform/eclipse/plugins").createLink(new Path(eclipseHome).append("plugins"), 0, monitor);
        }
    }