Skip to content

Fixes most layer position warnings and improves logging#8916

Merged
mbien merged 1 commit intoapache:masterfrom
mbien:fix-some-layer-ordering-warnings
Nov 18, 2025
Merged

Fixes most layer position warnings and improves logging#8916
mbien merged 1 commit intoapache:masterfrom
mbien:fix-some-layer-ordering-warnings

Conversation

@mbien
Copy link
Member

@mbien mbien commented Oct 15, 2025

second round after #7235

bonus: The warning message will now include the position of the services to make picking a value easier.

Tested activation of all clusters and maven project creation, only one org.openide.filesystems.Ordering root '/' warning is left to fix in the log (which I avoided so far since it is a big one).

Might make the layer behave more deterministic in some cases.

conflict fixes:

same position 300 for both 
UI/ToolActions/Files/org-netbeans-modules-diff-tree-RecursiveDiffAction.shadow and  UI/ToolActions/Files/org-netbeans-modules-favorites-Add.shadow

 -> RecursiveDiffAction = 250
same position 650 for both Templates/Project/GradleGroovy and Templates/Project/Native

-> Native = 660

ordering fixes:

Not all children in Windows2/Modes/output/ marked with the position attribute:  [TextToolsTopComponent.wstcref], but some are: 
[watchesView.wstcref, NotificationCenterTopComponent.wstcref, ...]

 -> TextToolsTopComponent = 3400
Not all children in OptionsDialog/Editor/ marked with the position attribute:  
[InlineHints], but some are: 
[CodeCompletion, Formatting, Hints, MarkOccurrences, ...]

 -> InlineHints = 0
Not all children in Windows2/Modes/editor/ marked with the position attribute:  
[TreeDiffViewerTopComponent.wstcref, CoverageReportTopComponent.wstcref], but some are: 
[DashboardDisplayer.wstcref]

 -> CoverageReportTopComponent = 0
 -> TreeDiffViewerTopComponent = 0
Not all children in Templates/Project/Maven2/ marked with the position attribute: 
[settings.xml], but some are:
[JavaApp, org-netbeans-modules-maven-j2ee-ui-wizard-EEWizardIterator-createWebAppIterator, ...]

 -> settings.xml = 110
Not all children in Editors/text/x-java/CodeGenerators/ marked with the position attribute: 
[org-netbeans-modules-micronaut-db-MicronautDataEndpointGenerator$Factory.instance], but some are: 
[org-netbeans-modules-j2ee-ejbcore-ui-logicalview-ejb-action-AddMethodActions$AddBusinessMethodCodeGenerator.instance@10, ...]

 -> MicronautDataEndpointGenerator$Factory = 800
Not all children in / marked with the position attribute: 
[org-netbeans-modules-editor-java-JavaBracesMatcher.shadow], but some are: 
[org-netbeans-modules-editor-bracesmatching-LegacyEssMatcher.instance@100, org-netbeans-modules-editor-bracesmatching-DefaultMatcher.instance@200]

-> JavaBracesMatcher = 300
Not all children in / marked with the position attribute:
[org-netbeans-modules-spellchecker-completion-WordCompletion.instance], but some are:
[org-netbeans-modules-lsp-client-bindings-CompletionProviderImpl.instance@1000]

 -> WordCompletion = 600 (across several layer registrations)
Not all children in / marked with the position attribute:
[org-netbeans-modules-xml-text-completion-XMLCompletionProvider.instance, org-netbeans-modules-xml-schema-completion-SchemaBasedCompletionProvider.instance], but some are:
[org-netbeans-modules-spellchecker-completion-WordCompletion.instance@600, ...]

 -> XMLCompletionProvider = 700 
 -> SchemaBasedCompletionProvider = 800
Not all children in / marked with the position attribute: 
[org-netbeans-modules-lsp-client-bindings-CompletionProviderImpl.instance], but some are:
[org-netbeans-modules-editor-java-JavaCompletionProvider.instance, ...]

 -> CompletionProviderImpl = 1000

@mbien mbien added Code cleanup Label for cleanup done on the Netbeans IDE Platform [ci] enable platform tests (platform/*) ci:all-tests [ci] enable all tests ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Oct 15, 2025
Comment on lines -90 to 91
@MimeRegistration(mimeType="", service=CompletionProvider.class)
@MimeRegistration(mimeType="", service=CompletionProvider.class, position = 1000)
public class CompletionProviderImpl implements CompletionProvider {
Copy link
Member Author

@mbien mbien Oct 15, 2025

Choose a reason for hiding this comment

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

java completion provider is at 100, rest increments by 100 typically. Wasn't sure where to put the LSP provider. This would be at the end of the list. (I didn't check but I believe this is where items without position would land too)

Copy link
Member Author

Choose a reason for hiding this comment

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

@jlahoda having no position is essentially end of the list, so I believe setting pos=1000 should be ok here?

the org-netbeans-modules-spellchecker-completion-WordCompletion did also have no position, which means the end of the list wasn't "well defined" for the completion providers I believe.

@mbien mbien force-pushed the fix-some-layer-ordering-warnings branch 2 times, most recently from cfe70c4 to d3e03cf Compare October 15, 2025 05:34
@mbien mbien added this to the NB29 milestone Oct 15, 2025
@mbien mbien marked this pull request as ready for review October 15, 2025 19:08
@mbien mbien changed the title Fixes most layer position warnings and improved logging Fixes most layer position warnings and improves logging Oct 17, 2025
@mbien mbien force-pushed the fix-some-layer-ordering-warnings branch from d3e03cf to 5519192 Compare November 13, 2025 20:33
Copy link
Contributor

@eirikbakke eirikbakke left a comment

Choose a reason for hiding this comment

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

Looks fine, setting positions is unlikely to cause problems.

The warning message will now include the position of the services
to make picking a value easier.

Tested activation of all clusters and maven project creation, only one
root '/' warning is left to fix in the log.

Might make the layer behave more deterministic in some cases.

conflict fixes:

same position 300 for both
UI/ToolActions/Files/org-netbeans-modules-diff-tree-RecursiveDiffAction.shadow and
UI/ToolActions/Files/org-netbeans-modules-favorites-Add.shadow
 -> RecursiveDiffAction = 250

same position 650 for both Templates/Project/GradleGroovy and Templates/Project/Native
Native -> 660

ordering fixes:

Not all children in Windows2/Modes/output/ marked with the position attribute:
[TextToolsTopComponent.wstcref], but some are:
[watchesView.wstcref, NotificationCenterTopComponent.wstcref, ...]
 -> TextToolsTopComponent = 3400

Not all children in OptionsDialog/Editor/ marked with the position attribute:
[InlineHints], but some are:
[CodeCompletion, Formatting, Hints, MarkOccurrences, ...]
 -> InlineHints = 0

Not all children in Windows2/Modes/editor/ marked with the position attribute:
[TreeDiffViewerTopComponent.wstcref, CoverageReportTopComponent.wstcref], but some are:
[DashboardDisplayer.wstcref]
 -> CoverageReportTopComponent = 0
 -> TreeDiffViewerTopComponent = 0

Not all children in Templates/Project/Maven2/ marked with the position attribute:
[settings.xml], but some are:
[JavaApp, org-netbeans-modules-maven-j2ee-ui-wizard-EEWizardIterator-createWebAppIterator, ...]
 -> settings.xml = 110

Not all children in / marked with the position attribute:
[org-netbeans-modules-lsp-client-bindings-CompletionProviderImpl.instance], but some are:
[org-netbeans-modules-editor-java-JavaCompletionProvider.instance, ...]
 -> CompletionProviderImpl = 1000

Not all children in / marked with the position attribute:
[org-netbeans-modules-spellchecker-completion-WordCompletion.instance], but some are:
[org-netbeans-modules-lsp-client-bindings-CompletionProviderImpl.instance@1000]
 -> WordCompletion = 600 (across several layer registrations)

Not all children in Editors/text/x-java/CodeGenerators/ marked with the position attribute:
[org-netbeans-modules-micronaut-db-MicronautDataEndpointGenerator$Factory.instance], but some are:
[org-netbeans-modules-j2ee-ejbcore-ui-logicalview-ejb-action-AddMethodActions$AddBusinessMethodCodeGenerator.instance@10, ...]
 -> MicronautDataEndpointGenerator$Factory = 800

Not all children in / marked with the position attribute:
[org-netbeans-modules-editor-java-JavaBracesMatcher.shadow], but some are:
[org-netbeans-modules-editor-bracesmatching-LegacyEssMatcher.instance@100, org-netbeans-modules-editor-bracesmatching-DefaultMatcher.instance@200]
 -> JavaBracesMatcher = 300

Not all children in / marked with the position attribute:
[org-netbeans-modules-xml-text-completion-XMLCompletionProvider.instance, org-netbeans-modules-xml-schema-completion-SchemaBasedCompletionProvider.instance], but some are:
[org-netbeans-modules-spellchecker-completion-WordCompletion.instance@600, ...]
 -> XMLCompletionProvider = 700
 -> SchemaBasedCompletionProvider = 800
@mbien
Copy link
Member Author

mbien commented Nov 17, 2025

going to rebase and merge. thanks for the review!

@mbien mbien force-pushed the fix-some-layer-ordering-warnings branch from 5519192 to aad44dd Compare November 17, 2025 22:08
@mbien mbien removed the ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) label Nov 17, 2025
@mbien mbien merged commit b535ff5 into apache:master Nov 18, 2025
115 of 119 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:all-tests [ci] enable all tests Code cleanup Label for cleanup done on the Netbeans IDE Platform [ci] enable platform tests (platform/*)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants