Package org.apache.karaf.eik.ui

Examples of org.apache.karaf.eik.ui.IKarafProject


    }

    private void addEclipseObrFile(
            final KarafWorkingPlatformModel platformModel,
            final Map<String, String> equinoxProperties) {
        final IKarafProject karafProject = (IKarafProject) platformModel.getAdapter(IKarafProject.class);
        // TODO: This should be factored out somehow
        final IFile file = karafProject.getFile("platform/eclipse.obr.xml");
        final IPath path = file.getRawLocation();

        final String obr = equinoxProperties.get(IKarafConstants.KARAF_OBR_REPOSITORY_PROP);
        if (obr.indexOf("eclipse.obr.xml") == -1) {
            final String obrUrls;
View Full Code Here


        super(karafPlatformModel, karafProject);
    }

    @Override
    public void build(final int kind, @SuppressWarnings("rawtypes") final Map args, final IProgressMonitor monitor) throws CoreException {
        final IKarafProject karafProject = getKarafProject();

        monitor.subTask("Creating OBR for Apache Karaf Project: " + karafProject.getName());

        final IFolder platformFolder = karafProject.getFolder("platform");

        final IPath obrFile =
            platformFolder.getRawLocation().append("eclipse.obr").addFileExtension("xml");

        platformFolder.refreshLocal(0, monitor);

        final PopulateObrFileJob populateObrJob = new PopulateObrFileJob(karafProject.getName(), obrFile.toFile());
        populateObrJob.schedule();

        try {
          populateObrJob.join();
        } catch (final InterruptedException e) {
View Full Code Here

                return null;
            }
        } else if (    IKarafProject.class.equals(adapterType)
                    && adaptableObject instanceof KarafPlatformModel)
        {
            IKarafProject karafProject = null;
            final KarafPlatformModel karafPlatformModel = (KarafPlatformModel) adaptableObject;
            for (final IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) {
                if (KarafProject.isKarafProject(project)) {
                    karafProject = new KarafProject(project);
                    if (karafPlatformModel.getRootDirectory().equals(karafProject.getPlatformRootDirectory())) {
                        break;
                    }
                }
            }
View Full Code Here

        super(karafPlatformModel, karafProject);
    }

    @Override
    public void build(final int kind, @SuppressWarnings("rawtypes") final Map args, final IProgressMonitor monitor) throws CoreException {
        final IKarafProject karafProject = getKarafProject();
        final KarafPlatformModel karafPlatformModel = getKarafPlatformModel();

        monitor.subTask("Resolving Features Repository for Apache Karaf Project: " + karafProject.getName());

        final FeaturesSection featuresSection = (FeaturesSection) karafPlatformModel.getAdapter(FeaturesSection.class);
        final FeaturesResolverJob job = new FeaturesResolverJob(karafProject.getName(), karafPlatformModel, featuresSection);
        job.schedule();
        try {
            job.join();

            final List<FeaturesRepository> featuresRepositories = job.getFeaturesRepositories();
View Full Code Here

        super(karafPlatformModel, karafProject);
    }

    @Override
    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);
View Full Code Here

     *            the source JAR
     * @throws CoreException
     *             if there is a problem filtering the input JAR's contents
     */
    private void filterOsgiInterfaceClasses(final File karafJar) throws CoreException {
        final IKarafProject karafProject = getKarafProject();

        final IFile generatedKarafFile = karafProject.getFile("runtime");
        final IPath path = generatedKarafFile.getRawLocation();

        JarInputStream sourceJar = null;
        JarOutputStream destJar = null;

View Full Code Here

    @Override
    public Object[] getChildren(final Object parentElement) {
        if (parentElement instanceof IProject && KarafProject.isKarafProject((IProject) parentElement)) {
            final IProject project = (IProject) parentElement;
            final IKarafProject karafProject = (IKarafProject) project.getAdapter(IKarafProject.class);

            return new Object[] { new FeatureRepositoryContentModel(karafProject) };
        } else if (parentElement instanceof ContentModel) {
            final ContentModel contentModel = (ContentModel) parentElement;
            return contentModel.getElements();
View Full Code Here

                try {
                    // Begin: Refactor this out in to an OPS4j mvn URL configuration
                    final Properties mvnConfiguration =
                        KarafCorePluginUtils.loadProperties(karafPlatformModel.getConfigurationDirectory().toFile(), ORG_OPS4J_PAX_URL_MVN_CFG);

                    final IKarafProject karafProject = (IKarafProject) karafPlatformModel.getAdapter(IKarafProject.class);
                    final Properties runtimeProperties = karafProject.getRuntimeProperties();

                    PropertyUtils.interpolateVariables(mvnConfiguration, runtimeProperties);

                    final String defaultRepos = (String) mvnConfiguration.get("org.ops4j.pax.url.mvn.defaultRepositories");
                    final String repos = (String) mvnConfiguration.get("org.ops4j.pax.url.mvn.repositories");
View Full Code Here

     *
     * @param karafJar the source JAR
     * @throws CoreException if there is a problem filtering the input JAR's contents
     */
    private void filterOsgiInterfaceClasses(final File karafJar) throws CoreException {
        final IKarafProject karafProject = getKarafProject();

        final IFile generatedKarafFile = karafProject.getFile("runtime");
        final IPath path = generatedKarafFile.getRawLocation();

        JarInputStream sourceJar = null;
        JarOutputStream destJar = null;

View Full Code Here

     *
     * @param monitor
     * @throws CoreException
     */
    private void buildFeaturesRepositories(final IProgressMonitor monitor) throws CoreException {
        final IKarafProject karafProject = getKarafProject();
        final KarafPlatformModel karafPlatformModel = getKarafPlatformModel();

        monitor.subTask("Resolving Features Repository for Apache Karaf Project: " + karafProject.getName());

        final FeaturesSection featuresSection = (FeaturesSection) karafPlatformModel.getAdapter(FeaturesSection.class);
        final FeaturesResolverJob job = new FeaturesResolverJob(karafProject.getName(), karafPlatformModel, featuresSection);
        job.schedule();
        try {
            job.join();

            final List<FeaturesRepository> featuresRepositories = job.getFeaturesRepositories();
View Full Code Here

TOP

Related Classes of org.apache.karaf.eik.ui.IKarafProject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.