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

Introduce ExtensionPointConfiguration #135

Closed
wants to merge 15 commits into from
Closed

Conversation

jlink
Copy link
Contributor

@jlink jlink commented Jan 24, 2016

This is an attempt to tackle some of the points discussed in #112 .

Every concrete subtype of ExtensionPoint can now register a configuration of type ExtensionPointConfiguration. For example:

public interface BeforeEachExtensionPoint extends ExtensionPoint...
    /**
     * Configuration for {@code BeforeEachExtensionPoint}
     */
    ExtensionPointConfiguration CONFIG = new ExtensionPointConfiguration(
        new ExtensionPointRegistry.Position[] { OUTERMOST, OUTSIDE_DEFAULT, DEFAULT, INSIDE_DEFAULT, INNERMOST },
        ExtensionPointRegistry.ApplicationOrder.FORWARD);

This configuration is used in ExtensionRegistry two things:

  • Determine the application order of an extension point. Formerly that was done by the applier of an extension point who had to know.
  • Allow only certain values for Position when registering an extension. All other values will lead to an ExtensionConfigurationException.

The concept has been introduced, because not all values make sense for all types of extension points. For example, ExceptionHandlerExtensionPoint allows FIRST, DEFAULT and LAST.

Extension point types that do not come with their own configuration only allow DEFAULT as position and are thus ordered by their position in the source only.

@jlink jlink mentioned this pull request Jan 24, 2016
7 tasks
@codecov-io
Copy link

Current coverage is 86.90%

Merging #135 into master will increase coverage by +0.09% as of bf5517e

@@            master   #135   diff @@
=====================================
  Files          134    135     +1
  Stmts         3072   3130    +58
  Branches         0      0       
  Methods        944    963    +19
=====================================
+ Hit           2667   2720    +53
  Partial          0      0       
- Missed         405    410     +5

Review entire Coverage Diff as of bf5517e

Powered by Codecov. Updated on successful CI builds.

@jlink jlink force-pushed the issue112-positions branch 8 times, most recently from b31a3e3 to 78a711c Compare January 29, 2016 15:56
@jlink jlink force-pushed the issue112-positions branch from 78a711c to 69597b7 Compare February 4, 2016 08:50
@marcphilipp
Copy link
Member

I'm closing this issue since we've decided not to ship any support for extension ordering in M1.

@marcphilipp marcphilipp closed this May 6, 2016
@marcphilipp marcphilipp deleted the issue112-positions branch April 14, 2019 13:11
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.

3 participants