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

Declarative hint editor support fixes and improvements #7333

Merged

Conversation

mbien
Copy link
Member

@mbien mbien commented Apr 25, 2024

extracted some fixes and improvement from a cleanup branch, would be cool if we could get this into NB 22 still.

jackpot hint support improvements

  • source-level option does now understand the "new" java version scheme
  • use reasonable source level default reverted since tests failed
  • optional %% token allows marking the end of a test
  • register run-single action to hint file editor
  • log file parsing errors

update declarative hint templates

  • register hint file templates and descriptions
  • add file icon
  • add template for hint tests

demonstrates usecase for %% (without it, there couldn't be any space between test cases):
image

file templates:
image

file icons:
image

run file action in editor:
image

hint template:

<!description="Sample Inspection">

// see https://netbeans.apache.org/jackpot/HintsFileFormat

"use System.out for Hello World":
System.err.println("Hello World!");
=>
System.out.println("Hello World!");
;;

the hint test template matches to the hint template:

%%TestCase hint-test-case
package test;
public class TestClass {
    private static void foo() {
        System.err.println("Hello World!");
    }
}
%%=>

@mbien mbien added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) hints ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Apr 25, 2024
@mbien mbien added this to the NB22 milestone Apr 25, 2024
@mbien mbien force-pushed the jackpot-fixes-and-improvements_delivery branch from 18dc23e to 0b58f60 Compare April 25, 2024 16:01
@mbien
Copy link
Member Author

mbien commented Apr 26, 2024

todo for future: changing the source level default to RELEASE_8 caused many test failures, which is a red flag since javac can't compile to 1.3 anymore:

if (version == null || version.isEmpty()) {
this.sourceVersion = SourceVersion.RELEASE_3;
} else {
if (version.startsWith("1.")) {
version = version.substring(2);
}
try {
this.sourceVersion = SourceVersion.valueOf("RELEASE_" + version);
} catch (IllegalArgumentException ex) {
this.sourceVersion = SourceVersion.RELEASE_3;

(reverted the change)

Copy link
Contributor

Choose a reason for hiding this comment

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

Please add an entry to java/java.hints/licenseinfo.xml for the file, with the license.

Copy link
Member Author

Choose a reason for hiding this comment

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

it is the icon for jnlp / applets. It was already in NB. I don't know the license.

https://github.com/apache/netbeans/blob/master/java/form/src/org/netbeans/modules/form/resources/palette/applet.gif

Copy link
Contributor

Choose a reason for hiding this comment

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

My take on this is, that the file was donated by Oracle to the ASF. I don't see why Oracle would not be in a position to donate that file, so it is ALv2.

Copy link
Member Author

Choose a reason for hiding this comment

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

done, also mentioned in the commit that it is a copy of applet.gif

@mbien mbien added the ci:all-tests [ci] enable all tests label Apr 28, 2024
@mbien mbien force-pushed the jackpot-fixes-and-improvements_delivery branch from 0b58f60 to 3ecce48 Compare April 28, 2024 15:56
@mbien mbien removed the ci:all-tests [ci] enable all tests label Apr 28, 2024
 - register hint file templates and descriptions
 - add file icon (copy of applet.gif)
 - add template for hint tests
 - source-level option does now understand the new java version scheme
 - optional %% token allows marking the end of a test
 - register run-single action to hint file editor
 - log file parsing errors
@mbien mbien force-pushed the jackpot-fixes-and-improvements_delivery branch from 3ecce48 to 4d97642 Compare April 28, 2024 18:23
@ebarboni ebarboni merged commit 83d37ec into apache:delivery Apr 29, 2024
37 checks passed
Copy link
Contributor

@lahodaj lahodaj left a comment

Choose a reason for hiding this comment

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

Sorry for belated replay. Looks OK to me. Thanks!

@mbien
Copy link
Member Author

mbien commented Apr 29, 2024

this seems to degrade CV test stability. It is hard to say if it makes it worse just by bad luck (timing) or if there is something wrong with the hint editor support.

failures seem to be on linux only and they can be brute forced till green.

exception looks like:

    [junit] WARNING [org.netbeans.modules.ide.kit.VerifySimpleTemplatesTest]: Editing /home/runner/work/netbeans/netbeans/ide/ide.kit/build/test/qa-functional/work/o.n.m.i.k.V/at/Test85.xml
    [junit] WARNING [org.netbeans.modules.ide.kit.VerifySimpleTemplatesTest]: Processing Templates/Other/EmptyYAML.yml
    [junit] WARNING [org.netbeans.modules.ide.kit.VerifySimpleTemplatesTest]: Editing /home/runner/work/netbeans/netbeans/ide/ide.kit/build/test/qa-functional/work/o.n.m.i.k.V/at/Test86.yml
    [junit] WARNING [org.netbeans.modules.ide.kit.VerifySimpleTemplatesTest]: Processing Templates/Other/CustomTask.java
    [junit] WARNING [org.netbeans.modules.ide.kit.VerifySimpleTemplatesTest]: Editing /home/runner/work/netbeans/netbeans/ide/ide.kit/build/test/qa-functional/work/o.n.m.i.k.V/at/Test87.java
    [junit] WARNING [org.netbeans.modules.ide.kit.VerifySimpleTemplatesTest]: Processing Templates/Other/HintSample.hint
    [junit] WARNING [org.openide.filesystems.Ordering]: Not all children in / marked with the position attribute: [org-netbeans-modules-refactoring-java-plugins-InstantRefactoringPerformer$UndoableWrapper.instance, org-netbeans-modules-testng-ui-actions-TestClassInfoTask$TestNGComputeTestMethodsImpl.instance, org-netbeans-modules-java-hints-spiimpl-hints-HintsTask$SuggestionsPositionRefresherHelper.instance, org-netbeans-modules-java-hints-spiimpl-options-HintsSettings$GlobalSettingsProvider.instance, org-netbeans-modules-editor-java-JavaKit$JavaTypedTextInterceptor$Factory.instance, org-netbeans-modules-java-hints-declarative-debugging-EvaluationSpanTask$FactoryImpl.instance, org-netbeans-modules-refactoring-java-ui-HighlightsLayerFactory.instance, org-netbeans-modules-java-editor-codegen-RemoveSurroundingCodePanel$UnwrapCodeHighlightsLayerFactory.instance, EditorKit.instance, org-netbeans-modules-java-navigation-BreadCrumbsScanningTask$Factory.instance, org-netbeans-modules-java-hints-infrastructure-JavaErrorProvider.instance, org-netbeans-modules-java-hints-infrastructure-ErrorHintsFactory.instance, org-netbeans-modules-junit-ui-actions-TestClassInfoTask$JUnitComputeTestMethodsImpl.instance, org-netbeans-modules-java-editor-semantic-SemanticHighlighterFactory.instance, org-netbeans-modules-java-hints-infrastructure-EmbeddedLazyHintComputation$FactoryImpl.instance, Reformatter.instance, org-netbeans-modules-java-source-indexing-JavaCustomIndexer$Factory-register.instance, org-netbeans-modules-java-hints-infrastructure-ErrorPositionRefresherHelper.instance, org-netbeans-modules-java-hints-introduce-IntroduceHint$HLFImpl.instance, org-netbeans-modules-editor-htmlui-JSEmbeddingProvider$Factory.instance, org-netbeans-modules-editor-java-CamelCaseOperations$JavaCamelCaseInterceptor$JavaFactory.instance, org-netbeans-modules-java-editor-whitelist-WhiteListCheckTask$Factory.instance, org-netbeans-modules-gsf-codecoverage-CoverageHighlightsLayerFactory.instance, SourcePathCheck.instance, org-netbeans-modules-editor-java-JavaKit$JavaDeletedTextInterceptor$Factory.instance, org-netbeans-modules-javadoc-highlighting-Factory.instance, org-netbeans-modules-java-editor-fold-ResourceStringFoldProvider.instance, AutoIndenter.instance, org-netbeans-modules-java-guards-JavaGuardedSections.instance, org-netbeans-modules-whitelist-index-WhiteListIndexerPlugin$Factory.instance, org-netbeans-modules-java-debug-HighlightsLayerFactoryImpl.instance, CopyResourcesIndexer.instance, org-netbeans-modules-refactoring-java-plugins-InstantRefactoringPerformer$RenameDeletedTextInterceptor$Factory.instance, org-netbeans-modules-java-source-parsing-JavacParserFactory.instance, org-netbeans-modules-java-editor-semantic-HighlightsLayerFactoryImpl.instance, org-netbeans-modules-java-editor-rename-InstantRenamePerformer$RenameDeletedTextInterceptor$Factory.instance, org-netbeans-modules-java-editor-overridden-ComputeAnnotations$FactoryImpl.instance, org.netbeans.spi.editor.highlighting.HighlightsLayerFactory.instance, Reindenter.instance, org-netbeans-modules-java-editor-semantic-MarkOccurrencesHighlighterFactory.instance, org-netbeans-modules-debugger-jpda-projectsui-HighlightsLayerFactoryImpl.instance, org-netbeans-modules-java-source-parsing-VanillaPartialReparser$VerifyPartialReparse$FactoryImpl.instance, org-netbeans-modules-java-hints-spiimpl-hints-HintsTask$HintPositionRefresherHelper.instance, org-netbeans-modules-refactoring-java-callhierarchy-LspCallHierarchyProvider.instance, language.instance, org-netbeans-modules-editor-java-JavaKit$JavaTypedBreakInterceptor$JavaFactory.instance, org-netbeans-modules-java-hints-introduce-PositionRefresherHelperImpl.instance, org-netbeans-modules-java-hints-spiimpl-JavaHintsPositionRefresher.instance, org-netbeans-modules-lsp-client-bindings-SemanticHighlight$HighlightsLayerFactoryImpl.instance, org-netbeans-modules-editor-fold-ui-FoldingEditorSupport$F.instance, org-netbeans-modules-java-source-indexing-JavaBinaryIndexer$Factory-register.instance, org-netbeans-lib-editor-codetemplates-textsync-TextRegionManager$Highlighting$HLFactory.instance, org-netbeans-modules-lsp-client-bindings-MarkOccurrences$HighlightsLayerFactoryImpl.instance, org-netbeans-modules-lsp-client-bindings-CustomIndexerImpl$FactoryImpl.instance, org-netbeans-modules-merge-builtin-visualizer-MergeHighlightsLayerFactory.instance, org-netbeans-modules-csl-hints-infrastructure-SelectionHintsTaskFactory.instance, org-netbeans-modules-editor-hints-lsp-HintsDiagnosticsProvider.instance, org-netbeans-modules-java-hints-infrastructure-EmbeddedHintsCollector$Factory.instance, org-netbeans-modules-csl-core-CslCamelCaseInterceptor$Factory.instance, org-netbeans-modules-csl-editor-overridden-ComputeAnnotations$FactoryImpl.instance, org-netbeans-modules-spellchecker-SpellcheckerHighlightLayerFactory.instance, org-netbeans-modules-editor-impl-DocumentFactoryImpl.instance, org-netbeans-modules-diff-builtin-visualizer-editable-DiffHighlightsLayerFactory.instance, org-netbeans-modules-csl-editor-fold-GsfFoldManagerTaskFactory.instance, org-netbeans-modules-textmate-lexer-SyntaxHighlighting$FactoryImpl.instance, org-netbeans-modules-editor-impl-highlighting-HLFactory.instance, org-netbeans-modules-editor-hints-HighlightsLayerFactoryImpl.instance, org-netbeans-modules-editor-bracesmatching-BracesMatchHighlighting$Factory.instance, org-netbeans-lib-editor-hyperlink-HyperlinkOperation$HighlightFactoryImpl.instance, org-netbeans-modules-csl-editor-semantic-MarkOccurrencesHighlighterFactory.instance, org-netbeans-modules-editor-lib2-highlighting-Factory.instance, org-netbeans-modules-editor-search-TextSearchHighlighting$FactoryImpl.instance, org-netbeans-modules-csl-hints-infrastructure-HintsTaskFactory.instance, org-netbeans-modules-refactoring-spi-impl-UndoableWrapper.instance, COSSynchronizingIndexer.instance, org-netbeans-modules-java-lsp-server-protocol-Server$LSPServerTelemetryFactory-getDefault.instance, org-netbeans-modules-gsf-testrunner-ui-TestMethodFinderImpl$Factory.instance, org-netbeans-modules-csl-hints-GsfHintsFactory.instance, org-netbeans-modules-csl-navigation-BreadCrumbsTask$TaskFactoryImpl.instance, org-netbeans-modules-editor-url-HighlightURLs$FactoryImpl.instance, org-netbeans-modules-tasklist-impl-TaskIndexerFactory.instance, org-netbeans-modules-csl-hints-infrastructure-SuggestionsTaskFactory.instance, org-netbeans-modules-jumpto-file-FileIndexer$Factory.instance, org-netbeans-modules-csl-navigation-CaretListeningFactory.instance, org-netbeans-modules-csl-navigation-ClassMemberNavigatorSourceFactory.instance, org-netbeans-modules-csl-editor-semantic-SemanticHighlighterFactory.instance, org-netbeans-modules-spring-beans-index-SpringBinaryIndexer.instance], but some are: [org-netbeans-modules-editor-java-JavaStructureProvider.instance, org-netbeans-modules-java-file-launcher-indexer-CompilerOptionsIndexer$FactoryImpl.instance]
    [junit] INFO [org.netbeans.modules.parsing.impl.SourceCache]: Parser factory: org.netbeans.modules.java.source.parsing.JavacParserFactory@33f74cc7 returned null parser for Snapshot 986012916: MimePath[text/x-javahints/text/x-java] org.netbeans.editor.BaseDocument@68fe1087, mimeType='text/x-javahints', kitClass=null, length=1016, version=1, file=null( text/x-java -1--1)
    [junit] WARNING [org.netbeans.modules.ide.kit.VerifySimpleTemplatesTest]: Editing /home/runner/work/netbeans/netbeans/ide/ide.kit/build/test/qa-functional/work/o.n.m.i.k.V/at/Test88.hint
    [junit] WARNING [org.netbeans.modules.ide.kit.VerifySimpleTemplatesTest]: Processing Templates/Other/HintSample.test
    [junit] WARNING [org.openide.filesystems.Ordering]: Not all children in / marked with the position attribute: [org-netbeans-modules-refactoring-java-plugins-InstantRefactoringPerformer$UndoableWrapper.instance, org-netbeans-modules-testng-ui-actions-TestClassInfoTask$TestNGComputeTestMethodsImpl.instance, org-netbeans-modules-java-hints-spiimpl-hints-HintsTask$SuggestionsPositionRefresherHelper.instance, org-netbeans-modules-java-hints-spiimpl-options-HintsSettings$GlobalSettingsProvider.instance, org-netbeans-modules-editor-java-JavaKit$JavaTypedTextInterceptor$Factory.instance, org-netbeans-modules-java-hints-declarative-debugging-EvaluationSpanTask$FactoryImpl.instance, org-netbeans-modules-refactoring-java-ui-HighlightsLayerFactory.instance, org-netbeans-modules-java-editor-codegen-RemoveSurroundingCodePanel$UnwrapCodeHighlightsLayerFactory.instance, EditorKit.instance, org-netbeans-modules-java-navigation-BreadCrumbsScanningTask$Factory.instance, org-netbeans-modules-java-hints-infrastructure-JavaErrorProvider.instance, org-netbeans-modules-java-hints-infrastructure-ErrorHintsFactory.instance, org-netbeans-modules-junit-ui-actions-TestClassInfoTask$JUnitComputeTestMethodsImpl.instance, org-netbeans-modules-java-editor-semantic-SemanticHighlighterFactory.instance, org-netbeans-modules-java-hints-infrastructure-EmbeddedLazyHintComputation$FactoryImpl.instance, Reformatter.instance, org-netbeans-modules-java-source-indexing-JavaCustomIndexer$Factory-register.instance, org-netbeans-modules-java-hints-infrastructure-ErrorPositionRefresherHelper.instance, org-netbeans-modules-java-hints-introduce-IntroduceHint$HLFImpl.instance, org-netbeans-modules-editor-htmlui-JSEmbeddingProvider$Factory.instance, org-netbeans-modules-editor-java-CamelCaseOperations$JavaCamelCaseInterceptor$JavaFactory.instance, org-netbeans-modules-java-editor-whitelist-WhiteListCheckTask$Factory.instance, org-netbeans-modules-gsf-codecoverage-CoverageHighlightsLayerFactory.instance, SourcePathCheck.instance, org-netbeans-modules-editor-java-JavaKit$JavaDeletedTextInterceptor$Factory.instance, org-netbeans-modules-javadoc-highlighting-Factory.instance, org-netbeans-modules-java-editor-fold-ResourceStringFoldProvider.instance, AutoIndenter.instance, org-netbeans-modules-java-guards-JavaGuardedSections.instance, org-netbeans-modules-whitelist-index-WhiteListIndexerPlugin$Factory.instance, org-netbeans-modules-java-debug-HighlightsLayerFactoryImpl.instance, CopyResourcesIndexer.instance, org-netbeans-modules-refactoring-java-plugins-InstantRefactoringPerformer$RenameDeletedTextInterceptor$Factory.instance, org-netbeans-modules-java-source-parsing-JavacParserFactory.instance, org-netbeans-modules-java-editor-semantic-HighlightsLayerFactoryImpl.instance, org-netbeans-modules-java-editor-rename-InstantRenamePerformer$RenameDeletedTextInterceptor$Factory.instance, org-netbeans-modules-java-editor-overridden-ComputeAnnotations$FactoryImpl.instance, org.netbeans.spi.editor.highlighting.HighlightsLayerFactory.instance, Reindenter.instance, org-netbeans-modules-java-editor-semantic-MarkOccurrencesHighlighterFactory.instance, org-netbeans-modules-debugger-jpda-projectsui-HighlightsLayerFactoryImpl.instance, org-netbeans-modules-java-source-parsing-VanillaPartialReparser$VerifyPartialReparse$FactoryImpl.instance, org-netbeans-modules-java-hints-spiimpl-hints-HintsTask$HintPositionRefresherHelper.instance, org-netbeans-modules-refactoring-java-callhierarchy-LspCallHierarchyProvider.instance, language.instance, org-netbeans-modules-editor-java-JavaKit$JavaTypedBreakInterceptor$JavaFactory.instance, org-netbeans-modules-java-hints-introduce-PositionRefresherHelperImpl.instance, org-netbeans-modules-java-hints-spiimpl-JavaHintsPositionRefresher.instance, org-netbeans-modules-lsp-client-bindings-SemanticHighlight$HighlightsLayerFactoryImpl.instance, org-netbeans-modules-editor-fold-ui-FoldingEditorSupport$F.instance, org-netbeans-modules-java-source-indexing-JavaBinaryIndexer$Factory-register.instance, org-netbeans-lib-editor-codetemplates-textsync-TextRegionManager$Highlighting$HLFactory.instance, org-netbeans-modules-lsp-client-bindings-MarkOccurrences$HighlightsLayerFactoryImpl.instance, org-netbeans-modules-lsp-client-bindings-CustomIndexerImpl$FactoryImpl.instance, org-netbeans-modules-merge-builtin-visualizer-MergeHighlightsLayerFactory.instance, org-netbeans-modules-csl-hints-infrastructure-SelectionHintsTaskFactory.instance, org-netbeans-modules-editor-hints-lsp-HintsDiagnosticsProvider.instance, org-netbeans-modules-java-hints-infrastructure-EmbeddedHintsCollector$Factory.instance, org-netbeans-modules-csl-core-CslCamelCaseInterceptor$Factory.instance, org-netbeans-modules-csl-editor-overridden-ComputeAnnotations$FactoryImpl.instance, org-netbeans-modules-spellchecker-SpellcheckerHighlightLayerFactory.instance, org-netbeans-modules-editor-impl-DocumentFactoryImpl.instance, org-netbeans-modules-diff-builtin-visualizer-editable-DiffHighlightsLayerFactory.instance, org-netbeans-modules-csl-editor-fold-GsfFoldManagerTaskFactory.instance, org-netbeans-modules-textmate-lexer-SyntaxHighlighting$FactoryImpl.instance, org-netbeans-modules-editor-impl-highlighting-HLFactory.instance, org-netbeans-modules-editor-hints-HighlightsLayerFactoryImpl.instance, org-netbeans-modules-editor-bracesmatching-BracesMatchHighlighting$Factory.instance, org-netbeans-lib-editor-hyperlink-HyperlinkOperation$HighlightFactoryImpl.instance, org-netbeans-modules-csl-editor-semantic-MarkOccurrencesHighlighterFactory.instance, org-netbeans-modules-editor-lib2-highlighting-Factory.instance, org-netbeans-modules-editor-search-TextSearchHighlighting$FactoryImpl.instance, org-netbeans-modules-csl-hints-infrastructure-HintsTaskFactory.instance, org-netbeans-modules-refactoring-spi-impl-UndoableWrapper.instance, COSSynchronizingIndexer.instance, org-netbeans-modules-java-lsp-server-protocol-Server$LSPServerTelemetryFactory-getDefault.instance, org-netbeans-modules-gsf-testrunner-ui-TestMethodFinderImpl$Factory.instance, org-netbeans-modules-csl-hints-GsfHintsFactory.instance, org-netbeans-modules-csl-navigation-BreadCrumbsTask$TaskFactoryImpl.instance, org-netbeans-modules-editor-url-HighlightURLs$FactoryImpl.instance, org-netbeans-modules-tasklist-impl-TaskIndexerFactory.instance, org-netbeans-modules-csl-hints-infrastructure-SuggestionsTaskFactory.instance, org-netbeans-modules-jumpto-file-FileIndexer$Factory.instance, org-netbeans-modules-csl-navigation-CaretListeningFactory.instance, org-netbeans-modules-csl-navigation-ClassMemberNavigatorSourceFactory.instance, org-netbeans-modules-csl-editor-semantic-SemanticHighlighterFactory.instance, org-netbeans-modules-spring-beans-index-SpringBinaryIndexer.instance], but some are: [org-netbeans-modules-editor-java-JavaStructureProvider.instance, org-netbeans-modules-java-file-launcher-indexer-CompilerOptionsIndexer$FactoryImpl.instance]
    [junit] INFO [org.netbeans.modules.openide.filesystems.declmime.MIMEResolverImpl]: IOException in resolver FileElement(fast-check(magic:504b0304mask:ffffffff) null Result:application/x-java-archive
    [junit] 
    [junit] Caused by: java.lang.Throwable: opened stream here
    [junit] 	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.MutualExclusionSupport$Closeable.populateStack(MutualExclusionSupport.java:153)
    [junit] 	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.MutualExclusionSupport$Closeable.<init>(MutualExclusionSupport.java:149)
    [junit] 	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.MutualExclusionSupport$Closeable.<init>(MutualExclusionSupport.java:140)
    [junit] 	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.MutualExclusionSupport.addResource(MutualExclusionSupport.java:86)
    [junit] 	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.getOutputStream(FileObj.java:104)
    [junit] 	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.getOutputStream(FileObj.java:79)
    [junit] 	at org.netbeans.api.templates.CreateFromTemplateImpl.defaultCreate(CreateFromTemplateImpl.java:348)
    [junit] 	at org.netbeans.api.templates.CreateFromTemplateImpl.build(CreateFromTemplateImpl.java:151)
    [junit] 	at org.netbeans.api.templates.CreateFromTemplateImpl.lambda$build$0(CreateFromTemplateImpl.java:86)
    [junit] 	at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:102)
    [junit] 	at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:494)
    [junit] 	at org.netbeans.api.templates.CreateFromTemplateImpl.build(CreateFromTemplateImpl.java:84)
    [junit] 	at org.netbeans.api.templates.FileBuilder.build(FileBuilder.java:267)
    [junit] 	at org.netbeans.api.templates.FileBuilder.createFromTemplate(FileBuilder.java:369)
    [junit] 	at org.openide.loaders.FileEntry.createFromTemplate(FileEntry.java:130)
    [junit] 	at org.openide.loaders.MultiDataObject.handleCreateFromTemplate(MultiDataObject.java:863)
    [junit] 	at org.openide.loaders.MultiDataObject.handleCreateFromTemplate(MultiDataObject.java:841)
    [junit] 	at org.openide.loaders.DataObject$CreateAction.run(DataObject.java:1571)
    [junit] 	at org.openide.loaders.DataObjectPool$1WrapAtomicAction.run(DataObjectPool.java:236)
    [junit] 	at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:102)
    [junit] 	at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:494)
    [junit] 	at org.openide.loaders.DataObjectPool.runAtomicAction(DataObjectPool.java:261)
    [junit] 	at org.openide.loaders.DataObject.invokeAtomicAction(DataObject.java:1025)
    [junit] 	at org.openide.loaders.DataObject.createFromTemplate(DataObject.java:957)
    [junit] 	at org.openide.loaders.DataObject.createFromTemplate(DataObject.java:937)
    [junit] 	at org.netbeans.modules.ide.kit.VerifySimpleTemplatesTest.testAllTemplates(VerifySimpleTemplatesTest.java:72)
    [junit] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    [junit] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [junit] 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    [junit] 	at junit.framework.TestCase.runTest(TestCase.java:177)
    [junit] 	at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:79)
    [junit] 	at org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:484)
    [junit] 	at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:405)
    [junit] 	at java.base/java.lang.Thread.run(Thread.java:840)
    [junit] msg
    [junit] msg
    [junit] Caused: org.netbeans.modules.masterfs.filebasedfs.utils.FSException: Cannot get shared access to /home/runner/work/netbeans/netbeans/ide/ide.kit/build/test/qa-functional/work/o.n.m.i.k.V/at/Test89.test@b266916:72522e13 (probably opened for writing).
    [junit] 	at org.netbeans.modules.masterfs.filebasedfs.utils.FSException.io(FSException.java:93)
    [junit] 	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.MutualExclusionSupport.addResource(MutualExclusionSupport.java:78)
    [junit] 	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.getInputStream(FileObj.java:212)
    [junit] Caused: java.io.FileNotFoundException
    [junit] 	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.getInputStream(FileObj.java:239)
    [junit] 	at org.openide.filesystems.MIMESupport$CachedFileObject.getInputStream(MIMESupport.java:377)
    [junit] 	at org.netbeans.modules.openide.filesystems.declmime.FileElement$Type.accept(FileElement.java:563)
    [junit] 	at org.netbeans.modules.openide.filesystems.declmime.FileElement$Type.access$300(FileElement.java:133)
    [junit] [catch] at org.netbeans.modules.openide.filesystems.declmime.FileElement.resolve(FileElement.java:76)
    [junit] 	at org.netbeans.modules.openide.filesystems.declmime.MIMEResolverImpl$Impl.findMIMEType(MIMEResolverImpl.java:426)
    [junit] 	at org.openide.filesystems.MIMESupport$CachedFileObject.resolveMIME(MIMESupport.java:346)
    [junit] 	at org.openide.filesystems.MIMESupport$CachedFileObject.getMIMEType(MIMESupport.java:287)
    [junit] 	at org.openide.filesystems.MIMESupport.findMIMEType(MIMESupport.java:111)
    [junit] 	at org.openide.filesystems.FileUtil.getMIMEType(FileUtil.java:1388)
    [junit] 	at org.openide.filesystems.FileObject.getMIMEType(FileObject.java:642)
    [junit] 	at org.netbeans.modules.jshell.env.ShellOwnerQueryImpl.getOwner(ShellOwnerQueryImpl.java:56)
    [junit] 	at org.netbeans.api.project.FileOwnerQuery.getOwner(FileOwnerQuery.java:91)
    [junit] 	at org.netbeans.modules.java.file.launcher.queries.MultiSourceRootProvider$RootPathResourceImplementation.includes(MultiSourceRootProvider.java:345)
    [junit] 	at org.netbeans.api.java.classpath.ClassPath$Entry.includes(ClassPath.java:1017)
    [junit] 	at org.netbeans.modules.java.source.classpath.AptSourcePath$FR.includes(AptSourcePath.java:214)
    [junit] 	at org.netbeans.modules.java.source.classpath.SourcePath$FR.includes(SourcePath.java:192)
    [junit] 	at org.netbeans.api.java.classpath.ClassPath$Entry.includes(ClassPath.java:1086)
    [junit] 	at org.netbeans.modules.java.source.parsing.SourceFileManager.list(SourceFileManager.java:82)
    [junit] 	at org.netbeans.modules.java.source.parsing.ProxyFileManager.list(ProxyFileManager.java:115)
    [junit] 	at com.sun.tools.javac.code.ClassFinder.list(ClassFinder.java:749)
    [junit] 	at com.sun.tools.javac.code.ClassFinder.scanUserPaths(ClassFinder.java:699)
    [junit] 	at com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:567)
    [junit] 	at com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:311)
    [junit] 	at org.netbeans.lib.nbjavac.services.NBClassFinder.lambda$getCompleter$1(NBClassFinder.java:99)
    [junit] 	at com.sun.tools.javac.code.Symtab.lambda$addRootPackageFor$8(Symtab.java:855)
    [junit] 	at com.sun.tools.javac.code.Symbol.complete(Symbol.java:686)
    [junit] 	at com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:358)
    [junit] 	at org.netbeans.lib.nbjavac.services.NBEnter.visitTopLevel(NBEnter.java:71)
    [junit] 	at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:553)
    [junit] 	at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:290)
    [junit] 	at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:305)
    [junit] 	at com.sun.tools.javac.comp.Enter.complete(Enter.java:618)
    [junit] 	at com.sun.tools.javac.comp.Enter.main(Enter.java:599)
    [junit] 	at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1079)
    [junit] 	at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:345)
    [junit] 	at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:282)
    [junit] 	at org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:742)
    [junit] 	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:536)
    [junit] 	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:140)
    [junit] 	at org.netbeans.modules.parsing.impl.TaskProcessor.callGetResult(TaskProcessor.java:608)
    [junit] 	at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:241)
    [junit] 	at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:775)
    [junit] 	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:288)
    [junit] 	at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
    [junit] 	at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
    [junit] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    [junit] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    [junit] 	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1420)
    [junit] 	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
    [junit] 	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
    [junit] 	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2035)

@mbien
Copy link
Member Author

mbien commented Apr 29, 2024

lets see if its just the *.test template #7344

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) hints Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants