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

JBIDE-15518 Add to CDI model extensions provided without extension service #148

Merged
merged 1 commit into from
Sep 28, 2013

Conversation

scabanovich
Copy link
Contributor

Added an optional attribute "recognizer" to extension point
org.jboss.tools.cdi.core.cdiextensions that holds qualified name
of implementation of IExtensionRecognizer that determines if
Java project containes CDI extensions that are not supposed to be
registered in META-INF/services/javax.enterprise.inject.spi.Extension.

Tests are added:

  1. Check that extension is recognized.
  2. Check that bean created by test extension implementation
    is available for injection.
  3. Check that if dependent project has the same extension as
    parent project, exactly one bean is available for injection (this
    should be tested for each extension implementation).


IJavaProject javaProject = EclipseResourceUtil.getJavaProject(project.getProject());
Set<String> recognizedRuntimes = CDIExtensionFactory.getInstance().getRecognizedRuntimes(javaProject);
boolean nrd = project.getExtensionManager().setRuntimes("_recognized_", recognizedRuntimes);
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's move "recognized" to final static variable

…rvice

Added an optional attribute "recognizer" to extension point
org.jboss.tools.cdi.core.cdiextensions that holds qualified name
of implementation of IExtensionRecognizer that determines if
Java project containes CDI extensions that are not supposed to be
registered in META-INF/services/javax.enterprise.inject.spi.Extension.

Tests are added:
1. Check that extension is recognized.
2. Check that bean created by test extension implementation
is available for injection.
3. Check that if dependent project has the same extension as
parent project, exactly one bean is available for injection (this
should be tested for each extension implementation).
@alexeykazakov alexeykazakov merged commit eb8d129 into jbosstools:master Sep 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants