Package aQute.bnd.service

Examples of aQute.bnd.service.RepositoryPlugin


        Object element = cell.getElement();
        int index = cell.getColumnIndex();

        if (element instanceof RepositoryPlugin) {
            if (index == 0) {
                RepositoryPlugin repo = (RepositoryPlugin) element;
                cell.setText(repo.getName());

                Image image;
                if (RepoUtils.isWorkspaceRepo(repo))
                    image = projectImg;
                else if (isRemoteRepo((RepositoryPlugin) element))
View Full Code Here


    }

    public Image getImage(Object element) {
        Image img = null;
        if (element instanceof RepositoryPlugin) {
            RepositoryPlugin repo = (RepositoryPlugin) element;
            if (RepoUtils.isWorkspaceRepo(repo))
                img = projectImg;
            else
                img = isRemoteRepo(repo) ? remoteRepoImg : localRepoImg;
        } else if (element instanceof Project) {
View Full Code Here

    public void dispose() {}

    public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}

    public Object[] getChildren(Object parentElement) {
        RepositoryPlugin repoPlugin = (RepositoryPlugin) parentElement;

        List<String> bsns;
        try {
            bsns = repoPlugin.list(null);
        } catch (Exception e) {
            logger.logError("Error querying repository " + repoPlugin.getName(), e);
            bsns = Collections.emptyList();
        }
        return bsns.toArray(new String[bsns.size()]);
    }
View Full Code Here

            public void selectionChanged(SelectionChangedEvent event) {
                boolean writableRepoSelected = false;
                IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
                Object element = selection.getFirstElement();
                if (element instanceof RepositoryPlugin) {
                    RepositoryPlugin repo = (RepositoryPlugin) element;
                    writableRepoSelected = repo.canWrite();
                }
                addBundlesAction.setEnabled(writableRepoSelected);
            }
        });
        tree.addMouseListener(new MouseAdapter() {
View Full Code Here

            @Override
            public void run() {
                IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
                Object element = selection.getFirstElement();
                if (element != null && element instanceof RepositoryPlugin) {
                    RepositoryPlugin repo = (RepositoryPlugin) element;
                    if (repo.canWrite()) {
                        AddFilesToRepositoryWizard wizard = new AddFilesToRepositoryWizard(repo, new File[0]);
                        WizardDialog dialog = new WizardDialog(getViewSite().getShell(), wizard);
                        dialog.open();

                        viewer.refresh(repo);
View Full Code Here

    public Object[] getChildren(Object parentElement) {
        Object[] result = null;

        if (parentElement instanceof RepositoryPlugin) {
            RepositoryPlugin repo = (RepositoryPlugin) parentElement;
            result = getRepositoryBundles(repo);
        } else if (parentElement instanceof RepositoryBundle) {
            RepositoryBundle bundle = (RepositoryBundle) parentElement;
            result = getRepositoryBundleVersions(bundle);
        } else if (parentElement instanceof Project) {
View Full Code Here

    }

    private void addCollection(Collection<Object> result, Collection<Object> inputs) {
        for (Object input : inputs) {
            if (input instanceof RepositoryPlugin) {
                RepositoryPlugin repo = (RepositoryPlugin) input;
                if (repo instanceof IndexProvider) {
                    if (!supportsPhase((IndexProvider) repo))
                        continue;
                }
View Full Code Here

        Object element = cell.getElement();
        int index = cell.getColumnIndex();

        if (element instanceof RepositoryPlugin) {
            if (index == 0) {
                RepositoryPlugin repo = (RepositoryPlugin) element;
                cell.setText(repo.getName());

                Image image;
                if (RepoUtils.isWorkspaceRepo(repo))
                    image = projectImg;
                else if (isRemoteRepo((RepositoryPlugin) element))
View Full Code Here

    }

    public Image getImage(Object element) {
        Image img = null;
        if (element instanceof RepositoryPlugin) {
            RepositoryPlugin repo = (RepositoryPlugin) element;
            if (RepoUtils.isWorkspaceRepo(repo))
                img = projectImg;
            else
                img = isRemoteRepo(repo) ? remoteRepoImg : localRepoImg;
        } else if (element instanceof Project) {
View Full Code Here

    public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
        propSupport.removePropertyChangeListener(propertyName, listener);
    }

    private void setSelectedRepository(RepositoryPlugin item) {
        RepositoryPlugin old = selectedRepository;
        selectedRepository = item;
        propSupport.firePropertyChange(PROP_SELECTED_REPO, old, selectedRepository);

        getContainer().updateButtons();
    }
View Full Code Here

TOP

Related Classes of aQute.bnd.service.RepositoryPlugin

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.