Package org.osgi.resource

Examples of org.osgi.resource.Capability


        return true;
    }

    private static VersionedClause resourceToRunBundle(Resource resource) {
        Capability idCap = ResourceUtils.getIdentityCapability(resource);
        String identity = ResourceUtils.getIdentity(idCap);

        // Map version range string, using "latest" for any workspace resources
        Attrs attribs = new Attrs();
        String versionRangeStr;
View Full Code Here


        return label;
    }

    protected void appendResourceLabel(StyledString label, Resource resource) {
        Capability identity = ResourceUtils.getIdentityCapability(resource);
        String name = ResourceUtils.getIdentity(identity);
        if (name == null) {
            if (resource != null) {
                name = resource.toString();
            } else {
View Full Code Here

        label.append("]", StyledString.QUALIFIER_STYLER);

    }

    public static void appendResourceLabel(StyledString label, Resource resource) {
        Capability identity = ResourceUtils.getIdentityCapability(resource);
        String name = ResourceUtils.getIdentity(identity);
        if (name == null) {
            if (resource != null) {
                name = resource.toString();
            } else {
View Full Code Here

        return contents;
    }

    private void updateSavePreferenceText() {
        Resource resource = candidates.get(0).getResource();
        Capability identity = ResourceUtils.getIdentityCapability(resource);
        String name = ResourceUtils.getIdentity(identity);

        StyledString label = new StyledString("Save top candidate (");
        label.append(name, UIConstants.BOLD_STYLER);
        label.append(") as a ");
View Full Code Here

            super(Plugin.PLUGIN_ID);
        }

        @Override
        public void update(ViewerCell cell) {
            Capability capability = (Capability) cell.getElement();

            StyledString label = new StyledString();
            R5LabelFormatter.appendResourceLabel(label, capability.getResource());

            label.append(" (provides ", StyledString.QUALIFIER_STYLER);
            R5LabelFormatter.appendCapability(label, capability);
            label.append(")", StyledString.QUALIFIER_STYLER);
View Full Code Here

        model.setRunRequires(newRequires);
        reresolve();
    }

    private static Requirement resourceToRequirement(Resource resource) {
        Capability identity = ResourceUtils.getIdentityCapability(resource);
        String id = ResourceUtils.getIdentity(identity);
        Version version = ResourceUtils.getVersion(identity);
        Version dropQualifier = new Version(version.getMajor(), version.getMinor(), version.getMicro());

        AndFilter filter = new AndFilter();
View Full Code Here

        @Override
        public int compare(Viewer viewer, Object e1, Object e2) {
            Resource r1 = (Resource) e1;
            Resource r2 = (Resource) e2;

            Capability id1 = ResourceUtils.getIdentityCapability(r1);
            Capability id2 = ResourceUtils.getIdentityCapability(r2);

            String name1 = ResourceUtils.getIdentity(id1);
            if (name1 == null) {
                name1 = "";
            }
View Full Code Here

    public void update(ViewerCell cell) {
        Resource resource = (Resource) cell.getElement();

        StyledString label = new StyledString();
        try {
            Capability identityCap = ResourceUtils.getIdentityCapability(resource);

            String name = ResourceUtils.getIdentity(identityCap);
            label.append(name);

            Version version = ResourceUtils.getVersion(identityCap);
View Full Code Here

        return contents;
    }

    private void updateSavePreferenceText() {
        Resource resource = candidates.get(0).getResource();
        Capability identity = ResourceUtils.getIdentityCapability(resource);
        String name = ResourceUtils.getIdentity(identity);

        StyledString label = new StyledString("Save top candidate (");
        label.append(name, UIConstants.BOLD_STYLER);
        label.append(") as a ");
View Full Code Here

            super(Plugin.PLUGIN_ID);
        }

        @Override
        public void update(ViewerCell cell) {
            Capability capability = (Capability) cell.getElement();

            StyledString label = new StyledString();
            R5LabelFormatter.appendResourceLabel(label, capability.getResource());

            label.append(" (provides ", StyledString.QUALIFIER_STYLER);
            R5LabelFormatter.appendCapability(label, capability);
            label.append(")", StyledString.QUALIFIER_STYLER);
View Full Code Here

TOP

Related Classes of org.osgi.resource.Capability

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.