Examples of Capability


Examples of org.osgi.resource.Capability

        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

Examples of org.osgi.resource.Capability

        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

Examples of org.osgi.resource.Capability

        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

Examples of org.osgi.resource.Capability

            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

Examples of org.osgi.resource.Capability

        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

Examples of org.osgi.resource.Capability

        @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

Examples of org.osgi.resource.Capability

    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

Examples of org.osgi.resource.Capability

        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

Examples of org.osgi.resource.Capability

            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

Examples of org.osgi.resource.Capability

    @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
TOP
Copyright © 2018 www.massapi.com. 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.