Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use @ServiceRanking component property type annotation in e4.core.tests #1588

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dsVersion=V1_3
dsVersion=V1_4
eclipse.preferences.version=1
enabled=true
generateBundleActivationPolicyLazy=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Import-Package: javax.annotation;version="[1.3.0,2.0.0)",
org.junit.runners;version="[4.13.0,5.0.0)",
org.osgi.framework;version="[1.10.0,2.0.0)",
org.osgi.service.component;version="1.3.0",
org.osgi.service.component.propertytypes;version="[1.4.0,2.0.0)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imports should actually not required for this

org.osgi.service.event;version="1.3.0",
org.osgi.util.tracker;version="[1.5.0,2.0.0)"
Export-Package: org.eclipse.e4.core.internal.tests;x-internal:=true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/**
* A function provided as a declarative service. See OSGI-INF/adder.xml.
*/
@Component(service = IContextFunction.class, property = "service.context.key:String=sum")
@Component(service = IContextFunction.class, property = IContextFunction.SERVICE_CONTEXT_KEY + "=sum")
public class AddContextFunction extends ContextFunction {

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package org.eclipse.e4.core.internal.tests.contexts.inject;

import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.propertytypes.ServiceRanking;

@Component(enabled = false, property = "service.ranking:Integer=5")
@Component(enabled = false)
@ServiceRanking(5)
public class TestServiceB implements TestService, TestOtherService {

}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package org.eclipse.e4.core.internal.tests.di.extensions;

import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.propertytypes.ServiceRanking;

@Component(name = "DisabledServiceB", enabled = false, property = { "component=disabled", "service.ranking:Integer=5" })
@Component(name = "DisabledServiceB", enabled = false, property = "component=disabled")
@ServiceRanking(5)
public class DisabledServiceB implements TestService {

}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package org.eclipse.e4.core.internal.tests.di.extensions;

import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.propertytypes.ServiceRanking;

@Component(property = { "filtervalue=Test", "service.ranking:Integer=1" })
@Component(property = "filtervalue=Test")
@ServiceRanking(1)
public class FilterServiceA implements TestService {

}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package org.eclipse.e4.core.internal.tests.di.extensions;

import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.propertytypes.ServiceRanking;

@Component(property = "service.ranking:Integer=50")
@Component
@ServiceRanking(50)
public class SampleServiceA implements TestService {

}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package org.eclipse.e4.core.internal.tests.di.extensions;

import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.propertytypes.ServiceRanking;

@Component(property = "service.ranking:Integer=40")
@Component
@ServiceRanking(40)
public class SampleServiceB implements TestService {

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dsVersion=V1_3
dsVersion=V1_4
eclipse.preferences.version=1
enabled=true
generateBundleActivationPolicyLazy=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Import-Package: jakarta.annotation;version="[2.1.0,3.0.0)",
org.junit.runners;version="[4.13.0,5.0.0)",
org.osgi.framework;version="[1.10.0,2.0.0)",
org.osgi.service.component;version="1.3.0",
org.osgi.service.component.propertytypes;version="[1.4.0,2.0.0)",
org.osgi.service.event;version="1.3.0",
org.osgi.util.tracker;version="[1.5.0,2.0.0)"
DynamicImport-Package: javax.annotation, javax.inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/**
* A function provided as a declarative service. See OSGI-INF/adder.xml.
*/
@Component(service = IContextFunction.class, property = "service.context.key:String=sum")
@Component(service = IContextFunction.class, property = IContextFunction.SERVICE_CONTEXT_KEY + "=sum")
public class AddContextFunction extends ContextFunction {

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package org.eclipse.e4.core.internal.tests.contexts.inject;

import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.propertytypes.ServiceRanking;

@Component(enabled = false, property = "service.ranking:Integer=5")
@Component(enabled = false)
@ServiceRanking(5)
public class TestServiceB implements TestService, TestOtherService {

}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package org.eclipse.e4.core.internal.tests.di.extensions;

import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.propertytypes.ServiceRanking;

@Component(name = "DisabledServiceB", enabled = false, property = { "component=disabled", "service.ranking:Integer=5" })
@Component(name = "DisabledServiceB", enabled = false, property = "component=disabled")
@ServiceRanking(5)
public class DisabledServiceB implements TestService {

}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package org.eclipse.e4.core.internal.tests.di.extensions;

import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.propertytypes.ServiceRanking;

@Component(property = { "filtervalue=Test", "service.ranking:Integer=1" })
@Component(property = { "filtervalue=Test" })
@ServiceRanking(1)
public class FilterServiceA implements TestService {

}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package org.eclipse.e4.core.internal.tests.di.extensions;

import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.propertytypes.ServiceRanking;

@Component(property = "service.ranking:Integer=40")
@Component
@ServiceRanking(40)
public class SampleServiceB implements TestService {

}
Loading