Merging cleanups to the donation_review branch. donation_review
authorjlahoda
Mon, 27 Feb 2017 22:40:44 +0100
branchdonation_review
changeset 104357843026e60b
parent 1027 205b7632914c
parent 1040 f7b6892fd754
child 1044 7feb751ba76b
Merging cleanups to the donation_review branch.
cmdline/compiler/src/com/sun/tools/javac/api/JavacTaskImplHack.java
cmdline/compiler/src/com/sun/tools/javac/resources/compiler.java
cmdline/compiler/src/com/sun/tools/javac/resources/javac.java
cmdline/maven/src/test/resources/unit/test-project-1/pom.xml
cmdline/maven/src/test/resources/unit/test-project-1/src/main/java/org/netbeans/modules/jackpot30/test/testproject1/App.java
cmdline/maven/src/test/resources/unit/test-project-1/src/test/java/org/netbeans/modules/jackpot30/test/testproject1/AppTest.java
cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/DoRunTests.classx
cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/DoRunTests.javax
hudson.indexerinstaller/build.xml
hudson.indexerinstaller/manifest.mf
hudson.indexerinstaller/nbproject/build-impl.xml
hudson.indexerinstaller/nbproject/genfiles.properties
hudson.indexerinstaller/nbproject/platform.properties
hudson.indexerinstaller/nbproject/project.properties
hudson.indexerinstaller/nbproject/project.xml
hudson.indexerinstaller/src/org/netbeans/modules/hudson/indexerinstaller/Bundle.properties
hudson.indexerinstaller/src/org/netbeans/modules/hudson/indexerinstaller/InstallHudsonExtension.java
hudson.indexerinstaller/src/org/netbeans/modules/hudson/indexerinstaller/Installer.java
remoting/server/hudson/data/compiler/.must-exist
remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/BuildWrapperImpl/config.jelly
remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/BuildWrapperImpl/help-hardcodedHintsEnabled.html
remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/JackpotIndexBuilder/config.jelly
remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/JackpotIndexBuilder/help.html
remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/org.netbeans.modules.jackpot30.hudson.InstallIndexingTool
remoting/server/web/web.main/src/web/main/MainPage.java
remoting/server/web/web.main/src/web/main/WebMain.java
remoting/server/web/web.ui/src/org/netbeans/modules/jackpot30/backend/ui/highlighting/ColoringAttributes.diff
remoting/server/web/web.ui/src/org/netbeans/modules/jackpot30/backend/ui/highlighting/SemanticHighlighter.diff
remoting/server/web/web.ui/src/org/netbeans/modules/jackpot30/backend/ui/highlighting/TokenList.diff
sandbox/attributed-index-web/API.java
sandbox/attributed-index-web/Progress.java
sandbox/attributed-index-web/StandaloneFinder.java
sandbox/attributed-index-web/UI.java
sandbox/attributed-index-web/ui-apply.html
sandbox/attributed-index-web/ui-cat.html
sandbox/attributed-index-web/ui-findType.html
sandbox/attributed-index-web/ui-search.html
sandbox/attributed-index-web/ui-snippet.html
sandbox/java.hints/build.sh
sandbox/java.hints/build.xml
sandbox/java.hints/hintsimpl/build.xml
sandbox/java.hints/hintsimpl/manifest.mf
sandbox/java.hints/hintsimpl/nbproject/build-impl.xml
sandbox/java.hints/hintsimpl/nbproject/genfiles.properties
sandbox/java.hints/hintsimpl/nbproject/project.properties
sandbox/java.hints/hintsimpl/nbproject/project.xml
sandbox/java.hints/hintsimpl/nbproject/suite.properties
sandbox/java.hints/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/Bundle.properties
sandbox/java.hints/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/GlobalyUnused.java
sandbox/java.hints/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/NonPrivateMakeFinal.java
sandbox/java.hints/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/duplicates/DuplicateMethodRefactoring.java
sandbox/java.hints/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/duplicates/DuplicateMethodRefactoringAction.java
sandbox/java.hints/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/duplicates/DuplicateMethodRefactoringPlugin.java
sandbox/java.hints/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/duplicates/DuplicateMethodRefactoringUI.java
sandbox/java.hints/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/duplicates/RefactoringPluginFactoryImpl.java
sandbox/java.hints/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/GlobalyUnusedNGTest.java
sandbox/java.hints/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/NonPrivateMakeFinalNGTest.java
sandbox/java.hints/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/borrowed/RefactoringTestBase.java
sandbox/java.hints/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/duplicates/DuplicateMethodRefactoringPluginTest.java
sandbox/java.hints/java.hints.test/apichanges.xml
sandbox/java.hints/java.hints.test/arch.xml
sandbox/java.hints/java.hints.test/build.xml
sandbox/java.hints/java.hints.test/manifest.mf
sandbox/java.hints/java.hints.test/nbproject/build-impl.xml
sandbox/java.hints/java.hints.test/nbproject/genfiles.properties
sandbox/java.hints/java.hints.test/nbproject/org-netbeans-modules-java-hints-test.sig
sandbox/java.hints/java.hints.test/nbproject/project.properties
sandbox/java.hints/java.hints.test/nbproject/project.xml
sandbox/java.hints/java.hints.test/nbproject/suite.properties
sandbox/java.hints/java.hints.test/src/org/netbeans/modules/java/hints/test/Bundle.properties
sandbox/java.hints/java.hints.test/src/org/netbeans/modules/java/hints/test/Utilities.java
sandbox/java.hints/java.hints.test/src/org/netbeans/modules/java/hints/test/api/HintTest.java
sandbox/java.hints/java.hints.test/src/org/netbeans/modules/parsing/impl/indexing/MimeTypes.java
sandbox/java.hints/java.hints.test/test/unit/src/org/netbeans/modules/java/hints/test/api/HintTestTest.java
sandbox/java.hints/nbproject/build-impl.xml
sandbox/java.hints/nbproject/genfiles.properties
sandbox/java.hints/nbproject/platform.properties
sandbox/java.hints/nbproject/platform.xml
sandbox/java.hints/nbproject/project.properties
sandbox/java.hints/nbproject/project.xml
sandbox/java.hints/spi.java.hints/apichanges.xml
sandbox/java.hints/spi.java.hints/arch.xml
sandbox/java.hints/spi.java.hints/build.xml
sandbox/java.hints/spi.java.hints/manifest.mf
sandbox/java.hints/spi.java.hints/nbproject/build-impl.xml
sandbox/java.hints/spi.java.hints/nbproject/genfiles.properties
sandbox/java.hints/spi.java.hints/nbproject/org-netbeans-spi-java-hints.sig
sandbox/java.hints/spi.java.hints/nbproject/project.properties
sandbox/java.hints/spi.java.hints/nbproject/project.xml
sandbox/java.hints/spi.java.hints/nbproject/suite.properties
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/jackpot/spi/Bundle.properties
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/jackpot/spi/HintsRunner.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/jackpot/spi/PatternConvertor.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/jackpot/spi/ProjectDependencyUpgrader.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/code/CodeHintProviderImpl.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/code/FSWrapper.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/code/ReflectiveCustomizerProvider.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/spi/ClassPathBasedHintProvider.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/spi/ElementBasedHintProvider.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/spi/HintDescription.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/spi/HintDescriptionFactory.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/spi/HintMetadata.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/spi/HintProvider.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/spi/PositionRefresherHelper.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/spi/Trigger.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/Bundle.properties
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/Hacks.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/JackpotTrees.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/JavaFixImpl.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/JavaHintsPositionRefresher.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/MessageImpl.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/RulesManager.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/RulesManagerImpl.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/SPIAccessor.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/SyntheticFix.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/Utilities.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchSearch.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchUtilities.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/batch/ProgressHandleWrapper.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/batch/Scopes.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/hints/GlobalProcessingContext.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/hints/HintsInvoker.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/hints/HintsTask.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/ipi/upgrade/ProjectDependencyUpgrader.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/options/HintsSettings.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/pm/BulkSearch.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/pm/CopyFinderBasedBulkSearch.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/pm/NFA.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/pm/NFABasedBulkSearch.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/pm/PatternCompiler.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/processor/Bundle.properties
sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/processor/JavaHintsAnnotationProcessor.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/BooleanOption.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/Bundle.properties
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/ConstraintVariableType.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/CustomizerProvider.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/Decision.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/ErrorDescriptionFactory.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/Hint.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/HintContext.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/HintSeverity.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/IntegerOption.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/JavaFix.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/JavaFixUtilities.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/MatcherUtilities.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/TriggerDecision.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/TriggerPattern.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/TriggerPatterns.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/TriggerTreeKind.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/UseOptions.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/support/FixFactory.java
sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/support/TransformationSupport.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/providers/code/CodeHintProviderImplTest.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/providers/code/FSWrapperTest.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/providers/code/TestAnnotations.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/TestBase.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/TestCompilerSettings.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/TestUtilities.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/UtilitiesTest.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchSearchTest.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchUtilitiesTest.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/batch/ProgressHandleWrapperTest.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/batch/TestUtils.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/hints/HintsInvokerTest.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/pm/BulkSearchTestPerformer.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/pm/CopyFinderBasedBulkSearchTest.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/pm/NFABasedBulkSearchTest.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/pm/PatternCompilerTest.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/pm/PatternCompilerUtilities.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/processor/JavaHintsAnnotationProcessorTest.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/spi/java/hints/JavaFixUtilitiesTest.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/spi/java/hints/MatcherUtilitiesTest.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/spi/java/hints/TestUtils.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/spi/java/hints/matching/CopyFinderTest.java
sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/spi/java/hints/support/FixFactoryTest.java
sandbox/nb-scripts/jackpot-to-nb
sandbox/nb-scripts/nb-jackpot-lib
sandbox/nb-scripts/nb-to-jackpot
sandbox/nb-scripts/nb-to-jackpot.mapping
sandbox/old-modules/api/build.xml
sandbox/old-modules/api/manifest.mf
sandbox/old-modules/api/nbproject/build-impl.xml
sandbox/old-modules/api/nbproject/genfiles.properties
sandbox/old-modules/api/nbproject/project.properties
sandbox/old-modules/api/nbproject/project.xml
sandbox/old-modules/api/nbproject/suite.properties
sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/examples/Bundle.properties
sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/examples/Example.java
sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/examples/ExamplesList.form
sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/examples/ExamplesList.java
sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/examples/LoadExamples.java
sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/examples/double-checked-locking.example
sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/examples/examples.list
sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/examples/lambda-candidate.example
sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/examples/new-string.example
sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/hints/ExplicitFindDuplicates.java
sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/resources/Bundle.properties
sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/resources/examples_icon.png
sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/resources/layer.xml
sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/resources/recent_icon.png
sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/spi/Hacks.java
sandbox/old-modules/api/test/unit/src/org/netbeans/modules/jackpot30/impl/TestBase.java
sandbox/old-modules/api/test/unit/src/org/netbeans/modules/jackpot30/impl/examples/LoadExamplesTest.java
sandbox/old-modules/api/test/unit/src/org/netbeans/modules/jackpot30/impl/examples/test-example1.example
sandbox/old-modules/api/test/unit/src/org/netbeans/modules/jackpot30/impl/examples/test-examples.list
sandbox/old-modules/api/test/unit/src/org/netbeans/modules/jackpot30/impl/hints/ExplicitFindDuplicatesTest.java
sandbox/old-modules/api/test/unit/src/org/netbeans/modules/jackpot30/impl/pm/BulkSearchPerformance.java
sandbox/old-modules/api/test/unit/src/org/netbeans/modules/jackpot30/impl/pm/IndexBulkTest.java
sandbox/old-modules/api/test/unit/src/org/netbeans/modules/jackpot30/spi/refactoring/JackpotBasedRefactoringTestBase.java
sandbox/old-modules/bridges/refactoring/build.xml
sandbox/old-modules/bridges/refactoring/manifest.mf
sandbox/old-modules/bridges/refactoring/nbproject/build-impl.xml
sandbox/old-modules/bridges/refactoring/nbproject/genfiles.properties
sandbox/old-modules/bridges/refactoring/nbproject/project.properties
sandbox/old-modules/bridges/refactoring/nbproject/project.xml
sandbox/old-modules/bridges/refactoring/nbproject/suite.properties
sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/Bundle.properties
sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/ExtraData.java
sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/GenerateScriptPanel.form
sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/GenerateScriptPanel.java
sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/RefactoringActionsProviderExt.java
sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/RefactoringElementImpl.java
sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/RefactoringPluginFactoryImpl.java
sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/RenameRefactoringPluginImpl.java
sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/RenameRefactoringWrapper.java
sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/ScriptGenerator.java
sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/layer.xml
sandbox/old-modules/bridges/refactoring/test/unit/src/org/netbeans/modules/jackpot30/refactoring/RefactoringTestBase.java
sandbox/old-modules/bridges/refactoring/test/unit/src/org/netbeans/modules/jackpot30/refactoring/RenameRefactoringPluginImplTest.java
sandbox/old-modules/bridges/refactoring/test/unit/src/org/netbeans/modules/jackpot30/refactoring/ScriptGeneratorTest.java
sandbox/old-modules/help/build.xml
sandbox/old-modules/help/jackpot30-help.tex
sandbox/old-modules/help/jackpot30-helpset.xml
sandbox/old-modules/help/manifest.mf
sandbox/old-modules/help/nbproject-help.tex/build-settings.properties
sandbox/old-modules/help/nbproject/build-impl.xml
sandbox/old-modules/help/nbproject/genfiles.properties
sandbox/old-modules/help/nbproject/project.properties
sandbox/old-modules/help/nbproject/project.xml
sandbox/old-modules/help/nbproject/suite.properties
sandbox/old-modules/help/src/org/netbeans/modules/jackpot30/help/Bundle.properties
sandbox/old-modules/help/src/org/netbeans/modules/jackpot30/help/CreateMap.java
sandbox/old-modules/help/src/org/netbeans/modules/jackpot30/help/jackpot30-helpset.xml
sandbox/old-modules/help/src/org/netbeans/modules/jackpot30/help/layer.xml
sandbox/old-modules/hintsimpl/build.xml
sandbox/old-modules/hintsimpl/manifest.mf
sandbox/old-modules/hintsimpl/nbproject/build-impl.xml
sandbox/old-modules/hintsimpl/nbproject/genfiles.properties
sandbox/old-modules/hintsimpl/nbproject/project.properties
sandbox/old-modules/hintsimpl/nbproject/project.xml
sandbox/old-modules/hintsimpl/nbproject/suite.properties
sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/Bundle.properties
sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/abstract-document.hint
sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/assert2if.hint
sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/double-checked-locking.hint
sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/jackpot/AddConditionals.hint
sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/jackpot/EnhancedFor.hint
sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/jdk7/Bundle.properties
sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/jdk7/SafeConvertToSwitchString.java
sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/jdk7/java.util.Objects.hint
sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/jdk7/jdk7.upgrade
sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/layer.xml
sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/sync-on-non-final.hint
sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/variable-decl-assignment.hint
sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/wrong-string-comparison.hint
sandbox/old-modules/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/HintsTest.java
sandbox/old-modules/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/abstract-document.test
sandbox/old-modules/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/double-checked-locking.test
sandbox/old-modules/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/jackpot/AddConditionals.test
sandbox/old-modules/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/jackpot/EnhancedFor.test
sandbox/old-modules/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/jdk7/java.util.Objects.test
sandbox/old-modules/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/wrong-string-comparison.test
sandbox/old-modules/kit/build.xml
sandbox/old-modules/kit/manifest.mf
sandbox/old-modules/kit/nbproject/build-impl.xml
sandbox/old-modules/kit/nbproject/genfiles.properties
sandbox/old-modules/kit/nbproject/project.properties
sandbox/old-modules/kit/nbproject/project.xml
sandbox/old-modules/kit/nbproject/suite.properties
sandbox/old-modules/kit/src/org/netbeans/modules/jackpot30/kit/Bundle.properties
sandbox/old-modules/overlays/netbeans
sandbox/old-modules/server/do-indexing
sandbox/old-modules/server/indexer/build.xml
sandbox/old-modules/server/indexer/manifest.mf
sandbox/old-modules/server/indexer/nbproject/build-impl.xml
sandbox/old-modules/server/indexer/nbproject/genfiles.properties
sandbox/old-modules/server/indexer/nbproject/project.properties
sandbox/old-modules/server/indexer/nbproject/project.xml
sandbox/old-modules/server/indexer/src/org/netbeans/modules/jackpot30/server/indexer/Index.java
sandbox/old-modules/server/indexer/src/org/netbeans/modules/jackpot30/server/indexer/StandaloneFinder.java
sandbox/old-modules/server/indexer/src/org/netbeans/modules/jackpot30/server/indexer/StandaloneIndexer.java
sandbox/old-modules/server/indexer/test/org/netbeans/modules/jackpot30/server/indexer/IndexTest.java
sandbox/old-modules/server/indexer/test/org/netbeans/modules/jackpot30/server/indexer/LargeScaleTester.java
sandbox/old-modules/server/indexer/test/org/netbeans/modules/jackpot30/server/indexer/StandaloneFinderTest.java
sandbox/old-modules/server/web.api/build.xml
sandbox/old-modules/server/web.api/manifest.mf
sandbox/old-modules/server/web.api/nbproject/build-impl.xml
sandbox/old-modules/server/web.api/nbproject/genfiles.properties
sandbox/old-modules/server/web.api/nbproject/project.properties
sandbox/old-modules/server/web.api/nbproject/project.xml
sandbox/old-modules/server/web.api/src/org/netbeans/modules/jackpot30/server/webapi/API.java
sandbox/old-modules/server/web.api/src/org/netbeans/modules/jackpot30/server/webapi/Main.java
sandbox/old-modules/server/web.api/src/org/netbeans/modules/jackpot30/server/webapi/UI.java
sandbox/old-modules/server/web.api/src/org/netbeans/modules/jackpot30/server/webapi/ui-cat.html
sandbox/old-modules/server/web.api/src/org/netbeans/modules/jackpot30/server/webapi/ui-search.html
sandbox/old-modules/server/web.api/src/org/netbeans/modules/jackpot30/server/webapi/ui-snippet.html
sandbox/old-modules/server/web.api/test/org/netbeans/modules/jackpot30/server/webapi/APITest.java
sandbox/old-modules/transformer/build.xml
sandbox/old-modules/transformer/manifest.mf
sandbox/old-modules/transformer/nbproject/build-impl.xml
sandbox/old-modules/transformer/nbproject/genfiles.properties
sandbox/old-modules/transformer/nbproject/project.properties
sandbox/old-modules/transformer/nbproject/project.xml
sandbox/old-modules/transformer/nbproject/suite.properties
sandbox/old-modules/transformer/release/libs/annotations.jar
sandbox/old-modules/transformer/src/org/netbeans/modules/jackpot30/transformers/Annotations.java
sandbox/old-modules/transformer/src/org/netbeans/modules/jackpot30/transformers/TransformationHintProviderImpl.java
sandbox/old-modules/transformer/src/org/netbeans/modules/jackpot30/transformers/Utilities.java
sandbox/old-modules/transformer/src/org/netbeans/modules/jackpot30/transformers/resources/Bundle.properties
sandbox/old-modules/transformer/src/org/netbeans/modules/jackpot30/transformers/resources/layer.xml
sandbox/old-modules/transformer/test/unit/src/org/netbeans/modules/jackpot30/transformers/TransformationHintProviderImplTest.java
     1.1 --- a/build.xml	Mon Dec 19 11:37:36 2016 +0100
     1.2 +++ b/build.xml	Mon Feb 27 22:40:44 2017 +0100
     1.3 @@ -1,4 +1,47 @@
     1.4  <?xml version="1.0" encoding="UTF-8"?>
     1.5 +<!--
     1.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     1.7 +
     1.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
     1.9 +
    1.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    1.11 +Other names may be trademarks of their respective owners.
    1.12 +
    1.13 +The contents of this file are subject to the terms of either the GNU
    1.14 +General Public License Version 2 only ("GPL") or the Common
    1.15 +Development and Distribution License("CDDL") (collectively, the
    1.16 +"License"). You may not use this file except in compliance with the
    1.17 +License. You can obtain a copy of the License at
    1.18 +http://www.netbeans.org/cddl-gplv2.html
    1.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    1.20 +specific language governing permissions and limitations under the
    1.21 +License.  When distributing the software, include this License Header
    1.22 +Notice in each file and include the License file at
    1.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
    1.24 +particular file as subject to the "Classpath" exception as provided
    1.25 +by Oracle in the GPL Version 2 section of the License file that
    1.26 +accompanied this code. If applicable, add the following below the
    1.27 +License Header, with the fields enclosed by brackets [] replaced by
    1.28 +your own identifying information:
    1.29 +"Portions Copyrighted [year] [name of copyright owner]"
    1.30 +
    1.31 +Contributor(s):
    1.32 +
    1.33 +The Original Software is NetBeans. The Initial Developer of the Original
    1.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
    1.35 +Microsystems, Inc. All Rights Reserved.
    1.36 +
    1.37 +If you wish your version of this file to be governed by only the CDDL
    1.38 +or only the GPL Version 2, indicate your decision by adding
    1.39 +"[Contributor] elects to include this software in this distribution
    1.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
    1.41 +single choice of license, a recipient has the option to distribute
    1.42 +your version of this file under either the CDDL, the GPL Version 2 or
    1.43 +to extend the choice of license to its licensees as provided above.
    1.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
    1.45 +Version 2 license, then the option applies only if the new code is
    1.46 +made subject to such option by the copyright holder.
    1.47 +-->
    1.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
    1.49  <!-- for some information on what you could do (e.g. targets to override). -->
    1.50  <!-- If you delete this file and reopen the project it will be recreated. -->
     2.1 --- a/cmdline/ant/build.xml	Mon Dec 19 11:37:36 2016 +0100
     2.2 +++ b/cmdline/ant/build.xml	Mon Feb 27 22:40:44 2017 +0100
     2.3 @@ -1,4 +1,47 @@
     2.4  <?xml version="1.0" encoding="UTF-8"?>
     2.5 +<!--
     2.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     2.7 +
     2.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
     2.9 +
    2.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    2.11 +Other names may be trademarks of their respective owners.
    2.12 +
    2.13 +The contents of this file are subject to the terms of either the GNU
    2.14 +General Public License Version 2 only ("GPL") or the Common
    2.15 +Development and Distribution License("CDDL") (collectively, the
    2.16 +"License"). You may not use this file except in compliance with the
    2.17 +License. You can obtain a copy of the License at
    2.18 +http://www.netbeans.org/cddl-gplv2.html
    2.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    2.20 +specific language governing permissions and limitations under the
    2.21 +License.  When distributing the software, include this License Header
    2.22 +Notice in each file and include the License file at
    2.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
    2.24 +particular file as subject to the "Classpath" exception as provided
    2.25 +by Oracle in the GPL Version 2 section of the License file that
    2.26 +accompanied this code. If applicable, add the following below the
    2.27 +License Header, with the fields enclosed by brackets [] replaced by
    2.28 +your own identifying information:
    2.29 +"Portions Copyrighted [year] [name of copyright owner]"
    2.30 +
    2.31 +Contributor(s):
    2.32 +
    2.33 +The Original Software is NetBeans. The Initial Developer of the Original
    2.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
    2.35 +Microsystems, Inc. All Rights Reserved.
    2.36 +
    2.37 +If you wish your version of this file to be governed by only the CDDL
    2.38 +or only the GPL Version 2, indicate your decision by adding
    2.39 +"[Contributor] elects to include this software in this distribution
    2.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
    2.41 +single choice of license, a recipient has the option to distribute
    2.42 +your version of this file under either the CDDL, the GPL Version 2 or
    2.43 +to extend the choice of license to its licensees as provided above.
    2.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
    2.45 +Version 2 license, then the option applies only if the new code is
    2.46 +made subject to such option by the copyright holder.
    2.47 +-->
    2.48  <!-- You may freely edit this file. See commented blocks below for -->
    2.49  <!-- some examples of how to customize the build. -->
    2.50  <!-- (If you delete it and reopen the project it will be recreated.) -->
     3.1 --- a/cmdline/ant/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
     3.2 +++ b/cmdline/ant/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
     3.3 @@ -1,5 +1,48 @@
     3.4  <?xml version="1.0" encoding="UTF-8"?>
     3.5  <!--
     3.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     3.7 +
     3.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
     3.9 +
    3.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    3.11 +Other names may be trademarks of their respective owners.
    3.12 +
    3.13 +The contents of this file are subject to the terms of either the GNU
    3.14 +General Public License Version 2 only ("GPL") or the Common
    3.15 +Development and Distribution License("CDDL") (collectively, the
    3.16 +"License"). You may not use this file except in compliance with the
    3.17 +License. You can obtain a copy of the License at
    3.18 +http://www.netbeans.org/cddl-gplv2.html
    3.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    3.20 +specific language governing permissions and limitations under the
    3.21 +License.  When distributing the software, include this License Header
    3.22 +Notice in each file and include the License file at
    3.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
    3.24 +particular file as subject to the "Classpath" exception as provided
    3.25 +by Oracle in the GPL Version 2 section of the License file that
    3.26 +accompanied this code. If applicable, add the following below the
    3.27 +License Header, with the fields enclosed by brackets [] replaced by
    3.28 +your own identifying information:
    3.29 +"Portions Copyrighted [year] [name of copyright owner]"
    3.30 +
    3.31 +Contributor(s):
    3.32 +
    3.33 +The Original Software is NetBeans. The Initial Developer of the Original
    3.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
    3.35 +Microsystems, Inc. All Rights Reserved.
    3.36 +
    3.37 +If you wish your version of this file to be governed by only the CDDL
    3.38 +or only the GPL Version 2, indicate your decision by adding
    3.39 +"[Contributor] elects to include this software in this distribution
    3.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
    3.41 +single choice of license, a recipient has the option to distribute
    3.42 +your version of this file under either the CDDL, the GPL Version 2 or
    3.43 +to extend the choice of license to its licensees as provided above.
    3.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
    3.45 +Version 2 license, then the option applies only if the new code is
    3.46 +made subject to such option by the copyright holder.
    3.47 +-->
    3.48 +<!--
    3.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
    3.50  ***         EDIT ../build.xml INSTEAD         ***
    3.51  
     4.1 --- a/cmdline/ant/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
     4.2 +++ b/cmdline/ant/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
     4.3 @@ -1,3 +1,44 @@
     4.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     4.5 +#
     4.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
     4.7 +#
     4.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
     4.9 +# Other names may be trademarks of their respective owners.
    4.10 +#
    4.11 +# The contents of this file are subject to the terms of either the GNU
    4.12 +# General Public License Version 2 only ("GPL") or the Common
    4.13 +# Development and Distribution License("CDDL") (collectively, the
    4.14 +# "License"). You may not use this file except in compliance with the
    4.15 +# License. You can obtain a copy of the License at
    4.16 +# http://www.netbeans.org/cddl-gplv2.html
    4.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    4.18 +# specific language governing permissions and limitations under the
    4.19 +# License.  When distributing the software, include this License Header
    4.20 +# Notice in each file and include the License file at
    4.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
    4.22 +# particular file as subject to the "Classpath" exception as provided
    4.23 +# by Oracle in the GPL Version 2 section of the License file that
    4.24 +# accompanied this code. If applicable, add the following below the
    4.25 +# License Header, with the fields enclosed by brackets [] replaced by
    4.26 +# your own identifying information:
    4.27 +# "Portions Copyrighted [year] [name of copyright owner]"
    4.28 +#
    4.29 +# Contributor(s):
    4.30 +#
    4.31 +# The Original Software is NetBeans. The Initial Developer of the Original
    4.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
    4.33 +# Microsystems, Inc. All Rights Reserved.
    4.34 +#
    4.35 +# If you wish your version of this file to be governed by only the CDDL
    4.36 +# or only the GPL Version 2, indicate your decision by adding
    4.37 +# "[Contributor] elects to include this software in this distribution
    4.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
    4.39 +# single choice of license, a recipient has the option to distribute
    4.40 +# your version of this file under either the CDDL, the GPL Version 2 or
    4.41 +# to extend the choice of license to its licensees as provided above.
    4.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
    4.43 +# Version 2 license, then the option applies only if the new code is
    4.44 +# made subject to such option by the copyright holder.
    4.45  build.xml.data.CRC32=3eef813c
    4.46  build.xml.script.CRC32=b703d7de
    4.47  build.xml.stylesheet.CRC32=8064a381@1.78.0.48
     5.1 --- a/cmdline/ant/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
     5.2 +++ b/cmdline/ant/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
     5.3 @@ -1,3 +1,44 @@
     5.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     5.5 +#
     5.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
     5.7 +#
     5.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
     5.9 +# Other names may be trademarks of their respective owners.
    5.10 +#
    5.11 +# The contents of this file are subject to the terms of either the GNU
    5.12 +# General Public License Version 2 only ("GPL") or the Common
    5.13 +# Development and Distribution License("CDDL") (collectively, the
    5.14 +# "License"). You may not use this file except in compliance with the
    5.15 +# License. You can obtain a copy of the License at
    5.16 +# http://www.netbeans.org/cddl-gplv2.html
    5.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    5.18 +# specific language governing permissions and limitations under the
    5.19 +# License.  When distributing the software, include this License Header
    5.20 +# Notice in each file and include the License file at
    5.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
    5.22 +# particular file as subject to the "Classpath" exception as provided
    5.23 +# by Oracle in the GPL Version 2 section of the License file that
    5.24 +# accompanied this code. If applicable, add the following below the
    5.25 +# License Header, with the fields enclosed by brackets [] replaced by
    5.26 +# your own identifying information:
    5.27 +# "Portions Copyrighted [year] [name of copyright owner]"
    5.28 +#
    5.29 +# Contributor(s):
    5.30 +#
    5.31 +# The Original Software is NetBeans. The Initial Developer of the Original
    5.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
    5.33 +# Microsystems, Inc. All Rights Reserved.
    5.34 +#
    5.35 +# If you wish your version of this file to be governed by only the CDDL
    5.36 +# or only the GPL Version 2, indicate your decision by adding
    5.37 +# "[Contributor] elects to include this software in this distribution
    5.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
    5.39 +# single choice of license, a recipient has the option to distribute
    5.40 +# your version of this file under either the CDDL, the GPL Version 2 or
    5.41 +# to extend the choice of license to its licensees as provided above.
    5.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
    5.43 +# Version 2 license, then the option applies only if the new code is
    5.44 +# made subject to such option by the copyright holder.
    5.45  annotation.processing.enabled=true
    5.46  annotation.processing.enabled.in.editor=false
    5.47  annotation.processing.processors.list=
     6.1 --- a/cmdline/ant/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
     6.2 +++ b/cmdline/ant/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
     6.3 @@ -1,4 +1,47 @@
     6.4  <?xml version="1.0" encoding="UTF-8"?>
     6.5 +<!--
     6.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     6.7 +
     6.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
     6.9 +
    6.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    6.11 +Other names may be trademarks of their respective owners.
    6.12 +
    6.13 +The contents of this file are subject to the terms of either the GNU
    6.14 +General Public License Version 2 only ("GPL") or the Common
    6.15 +Development and Distribution License("CDDL") (collectively, the
    6.16 +"License"). You may not use this file except in compliance with the
    6.17 +License. You can obtain a copy of the License at
    6.18 +http://www.netbeans.org/cddl-gplv2.html
    6.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    6.20 +specific language governing permissions and limitations under the
    6.21 +License.  When distributing the software, include this License Header
    6.22 +Notice in each file and include the License file at
    6.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
    6.24 +particular file as subject to the "Classpath" exception as provided
    6.25 +by Oracle in the GPL Version 2 section of the License file that
    6.26 +accompanied this code. If applicable, add the following below the
    6.27 +License Header, with the fields enclosed by brackets [] replaced by
    6.28 +your own identifying information:
    6.29 +"Portions Copyrighted [year] [name of copyright owner]"
    6.30 +
    6.31 +Contributor(s):
    6.32 +
    6.33 +The Original Software is NetBeans. The Initial Developer of the Original
    6.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
    6.35 +Microsystems, Inc. All Rights Reserved.
    6.36 +
    6.37 +If you wish your version of this file to be governed by only the CDDL
    6.38 +or only the GPL Version 2, indicate your decision by adding
    6.39 +"[Contributor] elects to include this software in this distribution
    6.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
    6.41 +single choice of license, a recipient has the option to distribute
    6.42 +your version of this file under either the CDDL, the GPL Version 2 or
    6.43 +to extend the choice of license to its licensees as provided above.
    6.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
    6.45 +Version 2 license, then the option applies only if the new code is
    6.46 +made subject to such option by the copyright holder.
    6.47 +-->
    6.48  <project xmlns="http://www.netbeans.org/ns/project/1">
    6.49      <type>org.netbeans.modules.java.j2seproject</type>
    6.50      <configuration>
     7.1 --- a/cmdline/ap/build.xml	Mon Dec 19 11:37:36 2016 +0100
     7.2 +++ b/cmdline/ap/build.xml	Mon Feb 27 22:40:44 2017 +0100
     7.3 @@ -1,4 +1,47 @@
     7.4  <?xml version="1.0" encoding="UTF-8"?>
     7.5 +<!--
     7.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     7.7 +
     7.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
     7.9 +
    7.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    7.11 +Other names may be trademarks of their respective owners.
    7.12 +
    7.13 +The contents of this file are subject to the terms of either the GNU
    7.14 +General Public License Version 2 only ("GPL") or the Common
    7.15 +Development and Distribution License("CDDL") (collectively, the
    7.16 +"License"). You may not use this file except in compliance with the
    7.17 +License. You can obtain a copy of the License at
    7.18 +http://www.netbeans.org/cddl-gplv2.html
    7.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    7.20 +specific language governing permissions and limitations under the
    7.21 +License.  When distributing the software, include this License Header
    7.22 +Notice in each file and include the License file at
    7.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
    7.24 +particular file as subject to the "Classpath" exception as provided
    7.25 +by Oracle in the GPL Version 2 section of the License file that
    7.26 +accompanied this code. If applicable, add the following below the
    7.27 +License Header, with the fields enclosed by brackets [] replaced by
    7.28 +your own identifying information:
    7.29 +"Portions Copyrighted [year] [name of copyright owner]"
    7.30 +
    7.31 +Contributor(s):
    7.32 +
    7.33 +The Original Software is NetBeans. The Initial Developer of the Original
    7.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
    7.35 +Microsystems, Inc. All Rights Reserved.
    7.36 +
    7.37 +If you wish your version of this file to be governed by only the CDDL
    7.38 +or only the GPL Version 2, indicate your decision by adding
    7.39 +"[Contributor] elects to include this software in this distribution
    7.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
    7.41 +single choice of license, a recipient has the option to distribute
    7.42 +your version of this file under either the CDDL, the GPL Version 2 or
    7.43 +to extend the choice of license to its licensees as provided above.
    7.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
    7.45 +Version 2 license, then the option applies only if the new code is
    7.46 +made subject to such option by the copyright holder.
    7.47 +-->
    7.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
    7.49  <!-- for some information on what you could do (e.g. targets to override). -->
    7.50  <!-- If you delete this file and reopen the project it will be recreated. -->
     8.1 --- a/cmdline/ap/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
     8.2 +++ b/cmdline/ap/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
     8.3 @@ -1,5 +1,48 @@
     8.4  <?xml version="1.0" encoding="UTF-8"?>
     8.5  <!--
     8.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     8.7 +
     8.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
     8.9 +
    8.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    8.11 +Other names may be trademarks of their respective owners.
    8.12 +
    8.13 +The contents of this file are subject to the terms of either the GNU
    8.14 +General Public License Version 2 only ("GPL") or the Common
    8.15 +Development and Distribution License("CDDL") (collectively, the
    8.16 +"License"). You may not use this file except in compliance with the
    8.17 +License. You can obtain a copy of the License at
    8.18 +http://www.netbeans.org/cddl-gplv2.html
    8.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    8.20 +specific language governing permissions and limitations under the
    8.21 +License.  When distributing the software, include this License Header
    8.22 +Notice in each file and include the License file at
    8.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
    8.24 +particular file as subject to the "Classpath" exception as provided
    8.25 +by Oracle in the GPL Version 2 section of the License file that
    8.26 +accompanied this code. If applicable, add the following below the
    8.27 +License Header, with the fields enclosed by brackets [] replaced by
    8.28 +your own identifying information:
    8.29 +"Portions Copyrighted [year] [name of copyright owner]"
    8.30 +
    8.31 +Contributor(s):
    8.32 +
    8.33 +The Original Software is NetBeans. The Initial Developer of the Original
    8.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
    8.35 +Microsystems, Inc. All Rights Reserved.
    8.36 +
    8.37 +If you wish your version of this file to be governed by only the CDDL
    8.38 +or only the GPL Version 2, indicate your decision by adding
    8.39 +"[Contributor] elects to include this software in this distribution
    8.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
    8.41 +single choice of license, a recipient has the option to distribute
    8.42 +your version of this file under either the CDDL, the GPL Version 2 or
    8.43 +to extend the choice of license to its licensees as provided above.
    8.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
    8.45 +Version 2 license, then the option applies only if the new code is
    8.46 +made subject to such option by the copyright holder.
    8.47 +-->
    8.48 +<!--
    8.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
    8.50  ***         EDIT ../build.xml INSTEAD         ***
    8.51  -->
     9.1 --- a/cmdline/ap/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
     9.2 +++ b/cmdline/ap/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
     9.3 @@ -1,3 +1,44 @@
     9.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     9.5 +#
     9.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
     9.7 +#
     9.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
     9.9 +# Other names may be trademarks of their respective owners.
    9.10 +#
    9.11 +# The contents of this file are subject to the terms of either the GNU
    9.12 +# General Public License Version 2 only ("GPL") or the Common
    9.13 +# Development and Distribution License("CDDL") (collectively, the
    9.14 +# "License"). You may not use this file except in compliance with the
    9.15 +# License. You can obtain a copy of the License at
    9.16 +# http://www.netbeans.org/cddl-gplv2.html
    9.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    9.18 +# specific language governing permissions and limitations under the
    9.19 +# License.  When distributing the software, include this License Header
    9.20 +# Notice in each file and include the License file at
    9.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
    9.22 +# particular file as subject to the "Classpath" exception as provided
    9.23 +# by Oracle in the GPL Version 2 section of the License file that
    9.24 +# accompanied this code. If applicable, add the following below the
    9.25 +# License Header, with the fields enclosed by brackets [] replaced by
    9.26 +# your own identifying information:
    9.27 +# "Portions Copyrighted [year] [name of copyright owner]"
    9.28 +#
    9.29 +# Contributor(s):
    9.30 +#
    9.31 +# The Original Software is NetBeans. The Initial Developer of the Original
    9.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
    9.33 +# Microsystems, Inc. All Rights Reserved.
    9.34 +#
    9.35 +# If you wish your version of this file to be governed by only the CDDL
    9.36 +# or only the GPL Version 2, indicate your decision by adding
    9.37 +# "[Contributor] elects to include this software in this distribution
    9.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
    9.39 +# single choice of license, a recipient has the option to distribute
    9.40 +# your version of this file under either the CDDL, the GPL Version 2 or
    9.41 +# to extend the choice of license to its licensees as provided above.
    9.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
    9.43 +# Version 2 license, then the option applies only if the new code is
    9.44 +# made subject to such option by the copyright holder.
    9.45  build.xml.data.CRC32=abf35b3d
    9.46  build.xml.script.CRC32=434ef419
    9.47  build.xml.stylesheet.CRC32=a56c6a5b@2.70
    10.1 --- a/cmdline/ap/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
    10.2 +++ b/cmdline/ap/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
    10.3 @@ -1,3 +1,44 @@
    10.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    10.5 +#
    10.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    10.7 +#
    10.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    10.9 +# Other names may be trademarks of their respective owners.
   10.10 +#
   10.11 +# The contents of this file are subject to the terms of either the GNU
   10.12 +# General Public License Version 2 only ("GPL") or the Common
   10.13 +# Development and Distribution License("CDDL") (collectively, the
   10.14 +# "License"). You may not use this file except in compliance with the
   10.15 +# License. You can obtain a copy of the License at
   10.16 +# http://www.netbeans.org/cddl-gplv2.html
   10.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   10.18 +# specific language governing permissions and limitations under the
   10.19 +# License.  When distributing the software, include this License Header
   10.20 +# Notice in each file and include the License file at
   10.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   10.22 +# particular file as subject to the "Classpath" exception as provided
   10.23 +# by Oracle in the GPL Version 2 section of the License file that
   10.24 +# accompanied this code. If applicable, add the following below the
   10.25 +# License Header, with the fields enclosed by brackets [] replaced by
   10.26 +# your own identifying information:
   10.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   10.28 +#
   10.29 +# Contributor(s):
   10.30 +#
   10.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   10.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   10.33 +# Microsystems, Inc. All Rights Reserved.
   10.34 +#
   10.35 +# If you wish your version of this file to be governed by only the CDDL
   10.36 +# or only the GPL Version 2, indicate your decision by adding
   10.37 +# "[Contributor] elects to include this software in this distribution
   10.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   10.39 +# single choice of license, a recipient has the option to distribute
   10.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   10.41 +# to extend the choice of license to its licensees as provided above.
   10.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   10.43 +# Version 2 license, then the option applies only if the new code is
   10.44 +# made subject to such option by the copyright holder.
   10.45  javac.source=1.7
   10.46  javac.compilerargs=-Xlint -Xlint:-serial
   10.47  cp.extra=build/jackpot-ap-lib.jar:${tools.jar}
    11.1 --- a/cmdline/ap/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
    11.2 +++ b/cmdline/ap/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
    11.3 @@ -1,4 +1,47 @@
    11.4  <?xml version="1.0" encoding="UTF-8"?>
    11.5 +<!--
    11.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    11.7 +
    11.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    11.9 +
   11.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   11.11 +Other names may be trademarks of their respective owners.
   11.12 +
   11.13 +The contents of this file are subject to the terms of either the GNU
   11.14 +General Public License Version 2 only ("GPL") or the Common
   11.15 +Development and Distribution License("CDDL") (collectively, the
   11.16 +"License"). You may not use this file except in compliance with the
   11.17 +License. You can obtain a copy of the License at
   11.18 +http://www.netbeans.org/cddl-gplv2.html
   11.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   11.20 +specific language governing permissions and limitations under the
   11.21 +License.  When distributing the software, include this License Header
   11.22 +Notice in each file and include the License file at
   11.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   11.24 +particular file as subject to the "Classpath" exception as provided
   11.25 +by Oracle in the GPL Version 2 section of the License file that
   11.26 +accompanied this code. If applicable, add the following below the
   11.27 +License Header, with the fields enclosed by brackets [] replaced by
   11.28 +your own identifying information:
   11.29 +"Portions Copyrighted [year] [name of copyright owner]"
   11.30 +
   11.31 +Contributor(s):
   11.32 +
   11.33 +The Original Software is NetBeans. The Initial Developer of the Original
   11.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   11.35 +Microsystems, Inc. All Rights Reserved.
   11.36 +
   11.37 +If you wish your version of this file to be governed by only the CDDL
   11.38 +or only the GPL Version 2, indicate your decision by adding
   11.39 +"[Contributor] elects to include this software in this distribution
   11.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   11.41 +single choice of license, a recipient has the option to distribute
   11.42 +your version of this file under either the CDDL, the GPL Version 2 or
   11.43 +to extend the choice of license to its licensees as provided above.
   11.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   11.45 +Version 2 license, then the option applies only if the new code is
   11.46 +made subject to such option by the copyright holder.
   11.47 +-->
   11.48  <project xmlns="http://www.netbeans.org/ns/project/1">
   11.49      <type>org.netbeans.modules.apisupport.project</type>
   11.50      <configuration>
    12.1 --- a/cmdline/ap/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
    12.2 +++ b/cmdline/ap/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
    12.3 @@ -1,1 +1,42 @@
    12.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    12.5 +#
    12.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    12.7 +#
    12.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    12.9 +# Other names may be trademarks of their respective owners.
   12.10 +#
   12.11 +# The contents of this file are subject to the terms of either the GNU
   12.12 +# General Public License Version 2 only ("GPL") or the Common
   12.13 +# Development and Distribution License("CDDL") (collectively, the
   12.14 +# "License"). You may not use this file except in compliance with the
   12.15 +# License. You can obtain a copy of the License at
   12.16 +# http://www.netbeans.org/cddl-gplv2.html
   12.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   12.18 +# specific language governing permissions and limitations under the
   12.19 +# License.  When distributing the software, include this License Header
   12.20 +# Notice in each file and include the License file at
   12.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   12.22 +# particular file as subject to the "Classpath" exception as provided
   12.23 +# by Oracle in the GPL Version 2 section of the License file that
   12.24 +# accompanied this code. If applicable, add the following below the
   12.25 +# License Header, with the fields enclosed by brackets [] replaced by
   12.26 +# your own identifying information:
   12.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   12.28 +#
   12.29 +# Contributor(s):
   12.30 +#
   12.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   12.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   12.33 +# Microsystems, Inc. All Rights Reserved.
   12.34 +#
   12.35 +# If you wish your version of this file to be governed by only the CDDL
   12.36 +# or only the GPL Version 2, indicate your decision by adding
   12.37 +# "[Contributor] elects to include this software in this distribution
   12.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   12.39 +# single choice of license, a recipient has the option to distribute
   12.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   12.41 +# to extend the choice of license to its licensees as provided above.
   12.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   12.43 +# Version 2 license, then the option applies only if the new code is
   12.44 +# made subject to such option by the copyright holder.
   12.45  suite.dir=${basedir}/..
    13.1 --- a/cmdline/ap/src/META-INF/services/javax.annotation.processing.Processor	Mon Dec 19 11:37:36 2016 +0100
    13.2 +++ b/cmdline/ap/src/META-INF/services/javax.annotation.processing.Processor	Mon Feb 27 22:40:44 2017 +0100
    13.3 @@ -1,1 +1,43 @@
    13.4 + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    13.5 + #
    13.6 + # Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    13.7 + #
    13.8 + # Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    13.9 + # Other names may be trademarks of their respective owners.
   13.10 + #
   13.11 + # The contents of this file are subject to the terms of either the GNU
   13.12 + # General Public License Version 2 only ("GPL") or the Common
   13.13 + # Development and Distribution License("CDDL") (collectively, the
   13.14 + # "License"). You may not use this file except in compliance with the
   13.15 + # License. You can obtain a copy of the License at
   13.16 + # http://www.netbeans.org/cddl-gplv2.html
   13.17 + # or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   13.18 + # specific language governing permissions and limitations under the
   13.19 + # License.  When distributing the software, include this License Header
   13.20 + # Notice in each file and include the License file at
   13.21 + # nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   13.22 + # particular file as subject to the "Classpath" exception as provided
   13.23 + # by Oracle in the GPL Version 2 section of the License file that
   13.24 + # accompanied this code. If applicable, add the following below the
   13.25 + # License Header, with the fields enclosed by brackets [] replaced by
   13.26 + # your own identifying information:
   13.27 + # "Portions Copyrighted [year] [name of copyright owner]"
   13.28 + #
   13.29 + # Contributor(s):
   13.30 + #
   13.31 + # The Original Software is NetBeans. The Initial Developer of the Original
   13.32 + # Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   13.33 + # Microsystems, Inc. All Rights Reserved.
   13.34 + #
   13.35 + # If you wish your version of this file to be governed by only the CDDL
   13.36 + # or only the GPL Version 2, indicate your decision by adding
   13.37 + # "[Contributor] elects to include this software in this distribution
   13.38 + # under the [CDDL or GPL Version 2] license." If you do not indicate a
   13.39 + # single choice of license, a recipient has the option to distribute
   13.40 + # your version of this file under either the CDDL, the GPL Version 2 or
   13.41 + # to extend the choice of license to its licensees as provided above.
   13.42 + # However, if you add GPL Version 2 code and therefore, elected the GPL
   13.43 + # Version 2 license, then the option applies only if the new code is
   13.44 + # made subject to such option by the copyright holder.
   13.45 +
   13.46  org.netbeans.modules.jackpot30.ap.ProcessorImpl
    14.1 --- a/cmdline/ap/src/org/netbeans/modules/jackpot30/ap/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
    14.2 +++ b/cmdline/ap/src/org/netbeans/modules/jackpot30/ap/Bundle.properties	Mon Feb 27 22:40:44 2017 +0100
    14.3 @@ -1,1 +1,42 @@
    14.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    14.5 +#
    14.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    14.7 +#
    14.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    14.9 +# Other names may be trademarks of their respective owners.
   14.10 +#
   14.11 +# The contents of this file are subject to the terms of either the GNU
   14.12 +# General Public License Version 2 only ("GPL") or the Common
   14.13 +# Development and Distribution License("CDDL") (collectively, the
   14.14 +# "License"). You may not use this file except in compliance with the
   14.15 +# License. You can obtain a copy of the License at
   14.16 +# http://www.netbeans.org/cddl-gplv2.html
   14.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   14.18 +# specific language governing permissions and limitations under the
   14.19 +# License.  When distributing the software, include this License Header
   14.20 +# Notice in each file and include the License file at
   14.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   14.22 +# particular file as subject to the "Classpath" exception as provided
   14.23 +# by Oracle in the GPL Version 2 section of the License file that
   14.24 +# accompanied this code. If applicable, add the following below the
   14.25 +# License Header, with the fields enclosed by brackets [] replaced by
   14.26 +# your own identifying information:
   14.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   14.28 +#
   14.29 +# Contributor(s):
   14.30 +#
   14.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   14.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   14.33 +# Microsystems, Inc. All Rights Reserved.
   14.34 +#
   14.35 +# If you wish your version of this file to be governed by only the CDDL
   14.36 +# or only the GPL Version 2, indicate your decision by adding
   14.37 +# "[Contributor] elects to include this software in this distribution
   14.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   14.39 +# single choice of license, a recipient has the option to distribute
   14.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   14.41 +# to extend the choice of license to its licensees as provided above.
   14.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   14.43 +# Version 2 license, then the option applies only if the new code is
   14.44 +# made subject to such option by the copyright holder.
   14.45  OpenIDE-Module-Name=Jackpot 3.0 Annotation Processing
    15.1 --- a/cmdline/build.sh	Mon Dec 19 11:37:36 2016 +0100
    15.2 +++ b/cmdline/build.sh	Mon Feb 27 22:40:44 2017 +0100
    15.3 @@ -1,4 +1,47 @@
    15.4  #!/bin/bash -x
    15.5 +
    15.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    15.7 +#
    15.8 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    15.9 +#
   15.10 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   15.11 +# Other names may be trademarks of their respective owners.
   15.12 +#
   15.13 +# The contents of this file are subject to the terms of either the GNU
   15.14 +# General Public License Version 2 only ("GPL") or the Common
   15.15 +# Development and Distribution License("CDDL") (collectively, the
   15.16 +# "License"). You may not use this file except in compliance with the
   15.17 +# License. You can obtain a copy of the License at
   15.18 +# http://www.netbeans.org/cddl-gplv2.html
   15.19 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   15.20 +# specific language governing permissions and limitations under the
   15.21 +# License.  When distributing the software, include this License Header
   15.22 +# Notice in each file and include the License file at
   15.23 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   15.24 +# particular file as subject to the "Classpath" exception as provided
   15.25 +# by Oracle in the GPL Version 2 section of the License file that
   15.26 +# accompanied this code. If applicable, add the following below the
   15.27 +# License Header, with the fields enclosed by brackets [] replaced by
   15.28 +# your own identifying information:
   15.29 +# "Portions Copyrighted [year] [name of copyright owner]"
   15.30 +#
   15.31 +# Contributor(s):
   15.32 +#
   15.33 +# The Original Software is NetBeans. The Initial Developer of the Original
   15.34 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   15.35 +# Microsystems, Inc. All Rights Reserved.
   15.36 +#
   15.37 +# If you wish your version of this file to be governed by only the CDDL
   15.38 +# or only the GPL Version 2, indicate your decision by adding
   15.39 +# "[Contributor] elects to include this software in this distribution
   15.40 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   15.41 +# single choice of license, a recipient has the option to distribute
   15.42 +# your version of this file under either the CDDL, the GPL Version 2 or
   15.43 +# to extend the choice of license to its licensees as provided above.
   15.44 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   15.45 +# Version 2 license, then the option applies only if the new code is
   15.46 +# made subject to such option by the copyright holder.
   15.47 +
   15.48  ant "$@" clean && ant "$@" build && ant "$@" test && (cd compiler; ant "$@" create-standalone-compiler && build/test/scripted/run )  && (cd tool; ant "$@" create-standalone-tool && build/test/scripted/run ) && (cd lib; ant "$@" create-cmdline-lib ) && (cd ap; ant "$@" build-ap-jar ) || exit 1
   15.49  mvn $MAVEN_EXTRA_ARGS install:install-file -Dfile=tool/build/jackpot/jackpot.jar -DgroupId=org.netbeans.modules.jackpot30 -DartifactId=tool -Dversion=8.1-SNAPSHOT -Dpackaging=jar -DgeneratePom=true
   15.50  (cd maven; mvn $MAVEN_EXTRA_ARGS install -DskipTests;  mvn $MAVEN_EXTRA_ARGS -Dmaven.executable=`which mvn` test)
    16.1 --- a/cmdline/build.xml	Mon Dec 19 11:37:36 2016 +0100
    16.2 +++ b/cmdline/build.xml	Mon Feb 27 22:40:44 2017 +0100
    16.3 @@ -1,4 +1,47 @@
    16.4  <?xml version="1.0" encoding="UTF-8"?>
    16.5 +<!--
    16.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    16.7 +
    16.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    16.9 +
   16.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   16.11 +Other names may be trademarks of their respective owners.
   16.12 +
   16.13 +The contents of this file are subject to the terms of either the GNU
   16.14 +General Public License Version 2 only ("GPL") or the Common
   16.15 +Development and Distribution License("CDDL") (collectively, the
   16.16 +"License"). You may not use this file except in compliance with the
   16.17 +License. You can obtain a copy of the License at
   16.18 +http://www.netbeans.org/cddl-gplv2.html
   16.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   16.20 +specific language governing permissions and limitations under the
   16.21 +License.  When distributing the software, include this License Header
   16.22 +Notice in each file and include the License file at
   16.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   16.24 +particular file as subject to the "Classpath" exception as provided
   16.25 +by Oracle in the GPL Version 2 section of the License file that
   16.26 +accompanied this code. If applicable, add the following below the
   16.27 +License Header, with the fields enclosed by brackets [] replaced by
   16.28 +your own identifying information:
   16.29 +"Portions Copyrighted [year] [name of copyright owner]"
   16.30 +
   16.31 +Contributor(s):
   16.32 +
   16.33 +The Original Software is NetBeans. The Initial Developer of the Original
   16.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   16.35 +Microsystems, Inc. All Rights Reserved.
   16.36 +
   16.37 +If you wish your version of this file to be governed by only the CDDL
   16.38 +or only the GPL Version 2, indicate your decision by adding
   16.39 +"[Contributor] elects to include this software in this distribution
   16.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   16.41 +single choice of license, a recipient has the option to distribute
   16.42 +your version of this file under either the CDDL, the GPL Version 2 or
   16.43 +to extend the choice of license to its licensees as provided above.
   16.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   16.45 +Version 2 license, then the option applies only if the new code is
   16.46 +made subject to such option by the copyright holder.
   16.47 +-->
   16.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
   16.49  <!-- for some information on what you could do (e.g. targets to override). -->
   16.50  <!-- If you delete this file and reopen the project it will be recreated. -->
    17.1 --- a/cmdline/compiler/build.xml	Mon Dec 19 11:37:36 2016 +0100
    17.2 +++ b/cmdline/compiler/build.xml	Mon Feb 27 22:40:44 2017 +0100
    17.3 @@ -1,4 +1,47 @@
    17.4  <?xml version="1.0" encoding="UTF-8"?>
    17.5 +<!--
    17.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    17.7 +
    17.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    17.9 +
   17.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   17.11 +Other names may be trademarks of their respective owners.
   17.12 +
   17.13 +The contents of this file are subject to the terms of either the GNU
   17.14 +General Public License Version 2 only ("GPL") or the Common
   17.15 +Development and Distribution License("CDDL") (collectively, the
   17.16 +"License"). You may not use this file except in compliance with the
   17.17 +License. You can obtain a copy of the License at
   17.18 +http://www.netbeans.org/cddl-gplv2.html
   17.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   17.20 +specific language governing permissions and limitations under the
   17.21 +License.  When distributing the software, include this License Header
   17.22 +Notice in each file and include the License file at
   17.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   17.24 +particular file as subject to the "Classpath" exception as provided
   17.25 +by Oracle in the GPL Version 2 section of the License file that
   17.26 +accompanied this code. If applicable, add the following below the
   17.27 +License Header, with the fields enclosed by brackets [] replaced by
   17.28 +your own identifying information:
   17.29 +"Portions Copyrighted [year] [name of copyright owner]"
   17.30 +
   17.31 +Contributor(s):
   17.32 +
   17.33 +The Original Software is NetBeans. The Initial Developer of the Original
   17.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   17.35 +Microsystems, Inc. All Rights Reserved.
   17.36 +
   17.37 +If you wish your version of this file to be governed by only the CDDL
   17.38 +or only the GPL Version 2, indicate your decision by adding
   17.39 +"[Contributor] elects to include this software in this distribution
   17.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   17.41 +single choice of license, a recipient has the option to distribute
   17.42 +your version of this file under either the CDDL, the GPL Version 2 or
   17.43 +to extend the choice of license to its licensees as provided above.
   17.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   17.45 +Version 2 license, then the option applies only if the new code is
   17.46 +made subject to such option by the copyright holder.
   17.47 +-->
   17.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
   17.49  <!-- for some information on what you could do (e.g. targets to override). -->
   17.50  <!-- If you delete this file and reopen the project it will be recreated. -->
    18.1 --- a/cmdline/compiler/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
    18.2 +++ b/cmdline/compiler/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
    18.3 @@ -1,5 +1,48 @@
    18.4  <?xml version="1.0" encoding="UTF-8"?>
    18.5  <!--
    18.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    18.7 +
    18.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    18.9 +
   18.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   18.11 +Other names may be trademarks of their respective owners.
   18.12 +
   18.13 +The contents of this file are subject to the terms of either the GNU
   18.14 +General Public License Version 2 only ("GPL") or the Common
   18.15 +Development and Distribution License("CDDL") (collectively, the
   18.16 +"License"). You may not use this file except in compliance with the
   18.17 +License. You can obtain a copy of the License at
   18.18 +http://www.netbeans.org/cddl-gplv2.html
   18.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   18.20 +specific language governing permissions and limitations under the
   18.21 +License.  When distributing the software, include this License Header
   18.22 +Notice in each file and include the License file at
   18.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   18.24 +particular file as subject to the "Classpath" exception as provided
   18.25 +by Oracle in the GPL Version 2 section of the License file that
   18.26 +accompanied this code. If applicable, add the following below the
   18.27 +License Header, with the fields enclosed by brackets [] replaced by
   18.28 +your own identifying information:
   18.29 +"Portions Copyrighted [year] [name of copyright owner]"
   18.30 +
   18.31 +Contributor(s):
   18.32 +
   18.33 +The Original Software is NetBeans. The Initial Developer of the Original
   18.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   18.35 +Microsystems, Inc. All Rights Reserved.
   18.36 +
   18.37 +If you wish your version of this file to be governed by only the CDDL
   18.38 +or only the GPL Version 2, indicate your decision by adding
   18.39 +"[Contributor] elects to include this software in this distribution
   18.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   18.41 +single choice of license, a recipient has the option to distribute
   18.42 +your version of this file under either the CDDL, the GPL Version 2 or
   18.43 +to extend the choice of license to its licensees as provided above.
   18.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   18.45 +Version 2 license, then the option applies only if the new code is
   18.46 +made subject to such option by the copyright holder.
   18.47 +-->
   18.48 +<!--
   18.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
   18.50  ***         EDIT ../build.xml INSTEAD         ***
   18.51  -->
    19.1 --- a/cmdline/compiler/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
    19.2 +++ b/cmdline/compiler/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
    19.3 @@ -1,3 +1,44 @@
    19.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    19.5 +#
    19.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    19.7 +#
    19.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    19.9 +# Other names may be trademarks of their respective owners.
   19.10 +#
   19.11 +# The contents of this file are subject to the terms of either the GNU
   19.12 +# General Public License Version 2 only ("GPL") or the Common
   19.13 +# Development and Distribution License("CDDL") (collectively, the
   19.14 +# "License"). You may not use this file except in compliance with the
   19.15 +# License. You can obtain a copy of the License at
   19.16 +# http://www.netbeans.org/cddl-gplv2.html
   19.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   19.18 +# specific language governing permissions and limitations under the
   19.19 +# License.  When distributing the software, include this License Header
   19.20 +# Notice in each file and include the License file at
   19.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   19.22 +# particular file as subject to the "Classpath" exception as provided
   19.23 +# by Oracle in the GPL Version 2 section of the License file that
   19.24 +# accompanied this code. If applicable, add the following below the
   19.25 +# License Header, with the fields enclosed by brackets [] replaced by
   19.26 +# your own identifying information:
   19.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   19.28 +#
   19.29 +# Contributor(s):
   19.30 +#
   19.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   19.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   19.33 +# Microsystems, Inc. All Rights Reserved.
   19.34 +#
   19.35 +# If you wish your version of this file to be governed by only the CDDL
   19.36 +# or only the GPL Version 2, indicate your decision by adding
   19.37 +# "[Contributor] elects to include this software in this distribution
   19.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   19.39 +# single choice of license, a recipient has the option to distribute
   19.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   19.41 +# to extend the choice of license to its licensees as provided above.
   19.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   19.43 +# Version 2 license, then the option applies only if the new code is
   19.44 +# made subject to such option by the copyright holder.
   19.45  build.xml.data.CRC32=bbccd04c
   19.46  build.xml.script.CRC32=3d84c86a
   19.47  build.xml.stylesheet.CRC32=79c3b980@1.33
    20.1 --- a/cmdline/compiler/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
    20.2 +++ b/cmdline/compiler/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
    20.3 @@ -1,3 +1,44 @@
    20.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    20.5 +#
    20.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    20.7 +#
    20.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    20.9 +# Other names may be trademarks of their respective owners.
   20.10 +#
   20.11 +# The contents of this file are subject to the terms of either the GNU
   20.12 +# General Public License Version 2 only ("GPL") or the Common
   20.13 +# Development and Distribution License("CDDL") (collectively, the
   20.14 +# "License"). You may not use this file except in compliance with the
   20.15 +# License. You can obtain a copy of the License at
   20.16 +# http://www.netbeans.org/cddl-gplv2.html
   20.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   20.18 +# specific language governing permissions and limitations under the
   20.19 +# License.  When distributing the software, include this License Header
   20.20 +# Notice in each file and include the License file at
   20.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   20.22 +# particular file as subject to the "Classpath" exception as provided
   20.23 +# by Oracle in the GPL Version 2 section of the License file that
   20.24 +# accompanied this code. If applicable, add the following below the
   20.25 +# License Header, with the fields enclosed by brackets [] replaced by
   20.26 +# your own identifying information:
   20.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   20.28 +#
   20.29 +# Contributor(s):
   20.30 +#
   20.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   20.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   20.33 +# Microsystems, Inc. All Rights Reserved.
   20.34 +#
   20.35 +# If you wish your version of this file to be governed by only the CDDL
   20.36 +# or only the GPL Version 2, indicate your decision by adding
   20.37 +# "[Contributor] elects to include this software in this distribution
   20.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   20.39 +# single choice of license, a recipient has the option to distribute
   20.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   20.41 +# to extend the choice of license to its licensees as provided above.
   20.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   20.43 +# Version 2 license, then the option applies only if the new code is
   20.44 +# made subject to such option by the copyright holder.
   20.45  ant.jar=${ant.core.lib}
   20.46  is.autoload=true
   20.47  javac.source=1.6
    21.1 --- a/cmdline/compiler/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
    21.2 +++ b/cmdline/compiler/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
    21.3 @@ -1,4 +1,47 @@
    21.4  <?xml version="1.0" encoding="UTF-8"?>
    21.5 +<!--
    21.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    21.7 +
    21.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    21.9 +
   21.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   21.11 +Other names may be trademarks of their respective owners.
   21.12 +
   21.13 +The contents of this file are subject to the terms of either the GNU
   21.14 +General Public License Version 2 only ("GPL") or the Common
   21.15 +Development and Distribution License("CDDL") (collectively, the
   21.16 +"License"). You may not use this file except in compliance with the
   21.17 +License. You can obtain a copy of the License at
   21.18 +http://www.netbeans.org/cddl-gplv2.html
   21.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   21.20 +specific language governing permissions and limitations under the
   21.21 +License.  When distributing the software, include this License Header
   21.22 +Notice in each file and include the License file at
   21.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   21.24 +particular file as subject to the "Classpath" exception as provided
   21.25 +by Oracle in the GPL Version 2 section of the License file that
   21.26 +accompanied this code. If applicable, add the following below the
   21.27 +License Header, with the fields enclosed by brackets [] replaced by
   21.28 +your own identifying information:
   21.29 +"Portions Copyrighted [year] [name of copyright owner]"
   21.30 +
   21.31 +Contributor(s):
   21.32 +
   21.33 +The Original Software is NetBeans. The Initial Developer of the Original
   21.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   21.35 +Microsystems, Inc. All Rights Reserved.
   21.36 +
   21.37 +If you wish your version of this file to be governed by only the CDDL
   21.38 +or only the GPL Version 2, indicate your decision by adding
   21.39 +"[Contributor] elects to include this software in this distribution
   21.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   21.41 +single choice of license, a recipient has the option to distribute
   21.42 +your version of this file under either the CDDL, the GPL Version 2 or
   21.43 +to extend the choice of license to its licensees as provided above.
   21.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   21.45 +Version 2 license, then the option applies only if the new code is
   21.46 +made subject to such option by the copyright holder.
   21.47 +-->
   21.48  <project xmlns="http://www.netbeans.org/ns/project/1">
   21.49      <type>org.netbeans.modules.apisupport.project</type>
   21.50      <configuration>
    22.1 --- a/cmdline/compiler/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
    22.2 +++ b/cmdline/compiler/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
    22.3 @@ -1,1 +1,42 @@
    22.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    22.5 +#
    22.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    22.7 +#
    22.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    22.9 +# Other names may be trademarks of their respective owners.
   22.10 +#
   22.11 +# The contents of this file are subject to the terms of either the GNU
   22.12 +# General Public License Version 2 only ("GPL") or the Common
   22.13 +# Development and Distribution License("CDDL") (collectively, the
   22.14 +# "License"). You may not use this file except in compliance with the
   22.15 +# License. You can obtain a copy of the License at
   22.16 +# http://www.netbeans.org/cddl-gplv2.html
   22.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   22.18 +# specific language governing permissions and limitations under the
   22.19 +# License.  When distributing the software, include this License Header
   22.20 +# Notice in each file and include the License file at
   22.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   22.22 +# particular file as subject to the "Classpath" exception as provided
   22.23 +# by Oracle in the GPL Version 2 section of the License file that
   22.24 +# accompanied this code. If applicable, add the following below the
   22.25 +# License Header, with the fields enclosed by brackets [] replaced by
   22.26 +# your own identifying information:
   22.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   22.28 +#
   22.29 +# Contributor(s):
   22.30 +#
   22.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   22.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   22.33 +# Microsystems, Inc. All Rights Reserved.
   22.34 +#
   22.35 +# If you wish your version of this file to be governed by only the CDDL
   22.36 +# or only the GPL Version 2, indicate your decision by adding
   22.37 +# "[Contributor] elects to include this software in this distribution
   22.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   22.39 +# single choice of license, a recipient has the option to distribute
   22.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   22.41 +# to extend the choice of license to its licensees as provided above.
   22.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   22.43 +# Version 2 license, then the option applies only if the new code is
   22.44 +# made subject to such option by the copyright holder.
   22.45  suite.dir=${basedir}/..
    23.1 --- a/cmdline/compiler/scripts/jackpotc	Mon Dec 19 11:37:36 2016 +0100
    23.2 +++ b/cmdline/compiler/scripts/jackpotc	Mon Feb 27 22:40:44 2017 +0100
    23.3 @@ -1,2 +1,45 @@
    23.4  #!/bin/bash
    23.5 +
    23.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    23.7 +#
    23.8 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    23.9 +#
   23.10 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   23.11 +# Other names may be trademarks of their respective owners.
   23.12 +#
   23.13 +# The contents of this file are subject to the terms of either the GNU
   23.14 +# General Public License Version 2 only ("GPL") or the Common
   23.15 +# Development and Distribution License("CDDL") (collectively, the
   23.16 +# "License"). You may not use this file except in compliance with the
   23.17 +# License. You can obtain a copy of the License at
   23.18 +# http://www.netbeans.org/cddl-gplv2.html
   23.19 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   23.20 +# specific language governing permissions and limitations under the
   23.21 +# License.  When distributing the software, include this License Header
   23.22 +# Notice in each file and include the License file at
   23.23 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   23.24 +# particular file as subject to the "Classpath" exception as provided
   23.25 +# by Oracle in the GPL Version 2 section of the License file that
   23.26 +# accompanied this code. If applicable, add the following below the
   23.27 +# License Header, with the fields enclosed by brackets [] replaced by
   23.28 +# your own identifying information:
   23.29 +# "Portions Copyrighted [year] [name of copyright owner]"
   23.30 +#
   23.31 +# Contributor(s):
   23.32 +#
   23.33 +# The Original Software is NetBeans. The Initial Developer of the Original
   23.34 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   23.35 +# Microsystems, Inc. All Rights Reserved.
   23.36 +#
   23.37 +# If you wish your version of this file to be governed by only the CDDL
   23.38 +# or only the GPL Version 2, indicate your decision by adding
   23.39 +# "[Contributor] elects to include this software in this distribution
   23.40 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   23.41 +# single choice of license, a recipient has the option to distribute
   23.42 +# your version of this file under either the CDDL, the GPL Version 2 or
   23.43 +# to extend the choice of license to its licensees as provided above.
   23.44 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   23.45 +# Version 2 license, then the option applies only if the new code is
   23.46 +# made subject to such option by the copyright holder.
   23.47 +
   23.48  java -Xbootclasspath/p:`dirname $0`/jackpotc.jar com.sun.tools.javac.Main -Xjcov "$@"
    24.1 --- a/cmdline/compiler/src/com/sun/tools/javac/api/JavacTaskImplHack.java	Mon Dec 19 11:37:36 2016 +0100
    24.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.3 @@ -1,54 +0,0 @@
    24.4 -/*
    24.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    24.6 - *
    24.7 - * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
    24.8 - *
    24.9 - * The contents of this file are subject to the terms of either the GNU
   24.10 - * General Public License Version 2 only ("GPL") or the Common
   24.11 - * Development and Distribution License("CDDL") (collectively, the
   24.12 - * "License"). You may not use this file except in compliance with the
   24.13 - * License. You can obtain a copy of the License at
   24.14 - * http://www.netbeans.org/cddl-gplv2.html
   24.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   24.16 - * specific language governing permissions and limitations under the
   24.17 - * License.  When distributing the software, include this License Header
   24.18 - * Notice in each file and include the License file at
   24.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   24.20 - * particular file as subject to the "Classpath" exception as provided
   24.21 - * by Sun in the GPL Version 2 section of the License file that
   24.22 - * accompanied this code. If applicable, add the following below the
   24.23 - * License Header, with the fields enclosed by brackets [] replaced by
   24.24 - * your own identifying information:
   24.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   24.26 - *
   24.27 - * If you wish your version of this file to be governed by only the CDDL
   24.28 - * or only the GPL Version 2, indicate your decision by adding
   24.29 - * "[Contributor] elects to include this software in this distribution
   24.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   24.31 - * single choice of license, a recipient has the option to distribute
   24.32 - * your version of this file under either the CDDL, the GPL Version 2 or
   24.33 - * to extend the choice of license to its licensees as provided above.
   24.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   24.35 - * Version 2 license, then the option applies only if the new code is
   24.36 - * made subject to such option by the copyright holder.
   24.37 - *
   24.38 - * Contributor(s):
   24.39 - *
   24.40 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
   24.41 - */
   24.42 -
   24.43 -package com.sun.tools.javac.api;
   24.44 -
   24.45 -import com.sun.tools.javac.util.Context;
   24.46 -
   24.47 -/**
   24.48 - *
   24.49 - * @author lahvac
   24.50 - */
   24.51 -public class JavacTaskImplHack extends JavacTaskImpl {
   24.52 -
   24.53 -    public JavacTaskImplHack(Context ctx) {
   24.54 -        super(ctx);
   24.55 -    }
   24.56 -
   24.57 -}
    25.1 --- a/cmdline/compiler/src/com/sun/tools/javac/resources/compiler.java	Mon Dec 19 11:37:36 2016 +0100
    25.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.3 @@ -1,48 +0,0 @@
    25.4 -/*
    25.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    25.6 - *
    25.7 - * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
    25.8 - *
    25.9 - * The contents of this file are subject to the terms of either the GNU
   25.10 - * General Public License Version 2 only ("GPL") or the Common
   25.11 - * Development and Distribution License("CDDL") (collectively, the
   25.12 - * "License"). You may not use this file except in compliance with the
   25.13 - * License. You can obtain a copy of the License at
   25.14 - * http://www.netbeans.org/cddl-gplv2.html
   25.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   25.16 - * specific language governing permissions and limitations under the
   25.17 - * License.  When distributing the software, include this License Header
   25.18 - * Notice in each file and include the License file at
   25.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   25.20 - * particular file as subject to the "Classpath" exception as provided
   25.21 - * by Sun in the GPL Version 2 section of the License file that
   25.22 - * accompanied this code. If applicable, add the following below the
   25.23 - * License Header, with the fields enclosed by brackets [] replaced by
   25.24 - * your own identifying information:
   25.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   25.26 - *
   25.27 - * If you wish your version of this file to be governed by only the CDDL
   25.28 - * or only the GPL Version 2, indicate your decision by adding
   25.29 - * "[Contributor] elects to include this software in this distribution
   25.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   25.31 - * single choice of license, a recipient has the option to distribute
   25.32 - * your version of this file under either the CDDL, the GPL Version 2 or
   25.33 - * to extend the choice of license to its licensees as provided above.
   25.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   25.35 - * Version 2 license, then the option applies only if the new code is
   25.36 - * made subject to such option by the copyright holder.
   25.37 - *
   25.38 - * Contributor(s):
   25.39 - *
   25.40 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
   25.41 - */
   25.42 -
   25.43 -package com.sun.tools.javac.resources;
   25.44 -
   25.45 -import org.netbeans.modules.jackpot30.compiler.CompilerResourcesImpl;
   25.46 -
   25.47 -/**
   25.48 - *
   25.49 - * @author lahvac
   25.50 - */
   25.51 -public class compiler extends CompilerResourcesImpl {}
    26.1 --- a/cmdline/compiler/src/com/sun/tools/javac/resources/javac.java	Mon Dec 19 11:37:36 2016 +0100
    26.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.3 @@ -1,48 +0,0 @@
    26.4 -/*
    26.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    26.6 - *
    26.7 - * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
    26.8 - *
    26.9 - * The contents of this file are subject to the terms of either the GNU
   26.10 - * General Public License Version 2 only ("GPL") or the Common
   26.11 - * Development and Distribution License("CDDL") (collectively, the
   26.12 - * "License"). You may not use this file except in compliance with the
   26.13 - * License. You can obtain a copy of the License at
   26.14 - * http://www.netbeans.org/cddl-gplv2.html
   26.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   26.16 - * specific language governing permissions and limitations under the
   26.17 - * License.  When distributing the software, include this License Header
   26.18 - * Notice in each file and include the License file at
   26.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   26.20 - * particular file as subject to the "Classpath" exception as provided
   26.21 - * by Sun in the GPL Version 2 section of the License file that
   26.22 - * accompanied this code. If applicable, add the following below the
   26.23 - * License Header, with the fields enclosed by brackets [] replaced by
   26.24 - * your own identifying information:
   26.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   26.26 - *
   26.27 - * If you wish your version of this file to be governed by only the CDDL
   26.28 - * or only the GPL Version 2, indicate your decision by adding
   26.29 - * "[Contributor] elects to include this software in this distribution
   26.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   26.31 - * single choice of license, a recipient has the option to distribute
   26.32 - * your version of this file under either the CDDL, the GPL Version 2 or
   26.33 - * to extend the choice of license to its licensees as provided above.
   26.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   26.35 - * Version 2 license, then the option applies only if the new code is
   26.36 - * made subject to such option by the copyright holder.
   26.37 - *
   26.38 - * Contributor(s):
   26.39 - *
   26.40 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
   26.41 - */
   26.42 -
   26.43 -package com.sun.tools.javac.resources;
   26.44 -
   26.45 -import org.netbeans.modules.jackpot30.compiler.CompilerResourcesImpl;
   26.46 -
   26.47 -/**
   26.48 - *
   26.49 - * @author lahvac
   26.50 - */
   26.51 -public class javac extends CompilerResourcesImpl {}
    27.1 --- a/cmdline/compiler/src/org/netbeans/api/java/source/CompilationInfoHack.java	Mon Dec 19 11:37:36 2016 +0100
    27.2 +++ b/cmdline/compiler/src/org/netbeans/api/java/source/CompilationInfoHack.java	Mon Feb 27 22:40:44 2017 +0100
    27.3 @@ -43,7 +43,7 @@
    27.4  import com.sun.source.util.JavacTask;
    27.5  import com.sun.source.util.TreePath;
    27.6  import com.sun.source.util.Trees;
    27.7 -import com.sun.tools.javac.api.JavacTaskImplHack;
    27.8 +import com.sun.tools.javac.api.JavacTaskImpl;
    27.9  import com.sun.tools.javac.api.JavacTrees;
   27.10  import com.sun.tools.javac.code.Source;
   27.11  import com.sun.tools.javac.model.JavacElements;
   27.12 @@ -118,7 +118,7 @@
   27.13  
   27.14              try {
   27.15                  context.put(JavacTask.class, (JavacTask) null);
   27.16 -                javacTask.set(this.impl, new JavacTaskImplHack(context));
   27.17 +                javacTask.set(this.impl, new JavacTaskImpl(context) {});
   27.18              } finally {
   27.19                  context.put(JavacTask.class, (JavacTask) null);
   27.20                  context.put(JavacTask.class, prevTask);
    28.1 --- a/cmdline/lib/build.xml	Mon Dec 19 11:37:36 2016 +0100
    28.2 +++ b/cmdline/lib/build.xml	Mon Feb 27 22:40:44 2017 +0100
    28.3 @@ -1,4 +1,47 @@
    28.4  <?xml version="1.0" encoding="UTF-8"?>
    28.5 +<!--
    28.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    28.7 +
    28.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    28.9 +
   28.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   28.11 +Other names may be trademarks of their respective owners.
   28.12 +
   28.13 +The contents of this file are subject to the terms of either the GNU
   28.14 +General Public License Version 2 only ("GPL") or the Common
   28.15 +Development and Distribution License("CDDL") (collectively, the
   28.16 +"License"). You may not use this file except in compliance with the
   28.17 +License. You can obtain a copy of the License at
   28.18 +http://www.netbeans.org/cddl-gplv2.html
   28.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   28.20 +specific language governing permissions and limitations under the
   28.21 +License.  When distributing the software, include this License Header
   28.22 +Notice in each file and include the License file at
   28.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   28.24 +particular file as subject to the "Classpath" exception as provided
   28.25 +by Oracle in the GPL Version 2 section of the License file that
   28.26 +accompanied this code. If applicable, add the following below the
   28.27 +License Header, with the fields enclosed by brackets [] replaced by
   28.28 +your own identifying information:
   28.29 +"Portions Copyrighted [year] [name of copyright owner]"
   28.30 +
   28.31 +Contributor(s):
   28.32 +
   28.33 +The Original Software is NetBeans. The Initial Developer of the Original
   28.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   28.35 +Microsystems, Inc. All Rights Reserved.
   28.36 +
   28.37 +If you wish your version of this file to be governed by only the CDDL
   28.38 +or only the GPL Version 2, indicate your decision by adding
   28.39 +"[Contributor] elects to include this software in this distribution
   28.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   28.41 +single choice of license, a recipient has the option to distribute
   28.42 +your version of this file under either the CDDL, the GPL Version 2 or
   28.43 +to extend the choice of license to its licensees as provided above.
   28.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   28.45 +Version 2 license, then the option applies only if the new code is
   28.46 +made subject to such option by the copyright holder.
   28.47 +-->
   28.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
   28.49  <!-- for some information on what you could do (e.g. targets to override). -->
   28.50  <!-- If you delete this file and reopen the project it will be recreated. -->
    29.1 --- a/cmdline/lib/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
    29.2 +++ b/cmdline/lib/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
    29.3 @@ -1,5 +1,48 @@
    29.4  <?xml version="1.0" encoding="UTF-8"?>
    29.5  <!--
    29.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    29.7 +
    29.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    29.9 +
   29.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   29.11 +Other names may be trademarks of their respective owners.
   29.12 +
   29.13 +The contents of this file are subject to the terms of either the GNU
   29.14 +General Public License Version 2 only ("GPL") or the Common
   29.15 +Development and Distribution License("CDDL") (collectively, the
   29.16 +"License"). You may not use this file except in compliance with the
   29.17 +License. You can obtain a copy of the License at
   29.18 +http://www.netbeans.org/cddl-gplv2.html
   29.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   29.20 +specific language governing permissions and limitations under the
   29.21 +License.  When distributing the software, include this License Header
   29.22 +Notice in each file and include the License file at
   29.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   29.24 +particular file as subject to the "Classpath" exception as provided
   29.25 +by Oracle in the GPL Version 2 section of the License file that
   29.26 +accompanied this code. If applicable, add the following below the
   29.27 +License Header, with the fields enclosed by brackets [] replaced by
   29.28 +your own identifying information:
   29.29 +"Portions Copyrighted [year] [name of copyright owner]"
   29.30 +
   29.31 +Contributor(s):
   29.32 +
   29.33 +The Original Software is NetBeans. The Initial Developer of the Original
   29.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   29.35 +Microsystems, Inc. All Rights Reserved.
   29.36 +
   29.37 +If you wish your version of this file to be governed by only the CDDL
   29.38 +or only the GPL Version 2, indicate your decision by adding
   29.39 +"[Contributor] elects to include this software in this distribution
   29.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   29.41 +single choice of license, a recipient has the option to distribute
   29.42 +your version of this file under either the CDDL, the GPL Version 2 or
   29.43 +to extend the choice of license to its licensees as provided above.
   29.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   29.45 +Version 2 license, then the option applies only if the new code is
   29.46 +made subject to such option by the copyright holder.
   29.47 +-->
   29.48 +<!--
   29.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
   29.50  ***         EDIT ../build.xml INSTEAD         ***
   29.51  -->
    30.1 --- a/cmdline/lib/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
    30.2 +++ b/cmdline/lib/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
    30.3 @@ -1,3 +1,44 @@
    30.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    30.5 +#
    30.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    30.7 +#
    30.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    30.9 +# Other names may be trademarks of their respective owners.
   30.10 +#
   30.11 +# The contents of this file are subject to the terms of either the GNU
   30.12 +# General Public License Version 2 only ("GPL") or the Common
   30.13 +# Development and Distribution License("CDDL") (collectively, the
   30.14 +# "License"). You may not use this file except in compliance with the
   30.15 +# License. You can obtain a copy of the License at
   30.16 +# http://www.netbeans.org/cddl-gplv2.html
   30.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   30.18 +# specific language governing permissions and limitations under the
   30.19 +# License.  When distributing the software, include this License Header
   30.20 +# Notice in each file and include the License file at
   30.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   30.22 +# particular file as subject to the "Classpath" exception as provided
   30.23 +# by Oracle in the GPL Version 2 section of the License file that
   30.24 +# accompanied this code. If applicable, add the following below the
   30.25 +# License Header, with the fields enclosed by brackets [] replaced by
   30.26 +# your own identifying information:
   30.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   30.28 +#
   30.29 +# Contributor(s):
   30.30 +#
   30.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   30.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   30.33 +# Microsystems, Inc. All Rights Reserved.
   30.34 +#
   30.35 +# If you wish your version of this file to be governed by only the CDDL
   30.36 +# or only the GPL Version 2, indicate your decision by adding
   30.37 +# "[Contributor] elects to include this software in this distribution
   30.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   30.39 +# single choice of license, a recipient has the option to distribute
   30.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   30.41 +# to extend the choice of license to its licensees as provided above.
   30.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   30.43 +# Version 2 license, then the option applies only if the new code is
   30.44 +# made subject to such option by the copyright holder.
   30.45  build.xml.data.CRC32=bbccd04c
   30.46  build.xml.script.CRC32=3d84c86a
   30.47  build.xml.stylesheet.CRC32=79c3b980@1.33
    31.1 --- a/cmdline/lib/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
    31.2 +++ b/cmdline/lib/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
    31.3 @@ -1,3 +1,44 @@
    31.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    31.5 +#
    31.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    31.7 +#
    31.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    31.9 +# Other names may be trademarks of their respective owners.
   31.10 +#
   31.11 +# The contents of this file are subject to the terms of either the GNU
   31.12 +# General Public License Version 2 only ("GPL") or the Common
   31.13 +# Development and Distribution License("CDDL") (collectively, the
   31.14 +# "License"). You may not use this file except in compliance with the
   31.15 +# License. You can obtain a copy of the License at
   31.16 +# http://www.netbeans.org/cddl-gplv2.html
   31.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   31.18 +# specific language governing permissions and limitations under the
   31.19 +# License.  When distributing the software, include this License Header
   31.20 +# Notice in each file and include the License file at
   31.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   31.22 +# particular file as subject to the "Classpath" exception as provided
   31.23 +# by Oracle in the GPL Version 2 section of the License file that
   31.24 +# accompanied this code. If applicable, add the following below the
   31.25 +# License Header, with the fields enclosed by brackets [] replaced by
   31.26 +# your own identifying information:
   31.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   31.28 +#
   31.29 +# Contributor(s):
   31.30 +#
   31.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   31.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   31.33 +# Microsystems, Inc. All Rights Reserved.
   31.34 +#
   31.35 +# If you wish your version of this file to be governed by only the CDDL
   31.36 +# or only the GPL Version 2, indicate your decision by adding
   31.37 +# "[Contributor] elects to include this software in this distribution
   31.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   31.39 +# single choice of license, a recipient has the option to distribute
   31.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   31.41 +# to extend the choice of license to its licensees as provided above.
   31.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   31.43 +# Version 2 license, then the option applies only if the new code is
   31.44 +# made subject to such option by the copyright holder.
   31.45  is.autoload=true
   31.46  javac.source=1.7
   31.47  javac.compilerargs=-Xlint -Xlint:-serial
    32.1 --- a/cmdline/lib/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
    32.2 +++ b/cmdline/lib/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
    32.3 @@ -1,4 +1,47 @@
    32.4  <?xml version="1.0" encoding="UTF-8"?>
    32.5 +<!--
    32.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    32.7 +
    32.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    32.9 +
   32.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   32.11 +Other names may be trademarks of their respective owners.
   32.12 +
   32.13 +The contents of this file are subject to the terms of either the GNU
   32.14 +General Public License Version 2 only ("GPL") or the Common
   32.15 +Development and Distribution License("CDDL") (collectively, the
   32.16 +"License"). You may not use this file except in compliance with the
   32.17 +License. You can obtain a copy of the License at
   32.18 +http://www.netbeans.org/cddl-gplv2.html
   32.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   32.20 +specific language governing permissions and limitations under the
   32.21 +License.  When distributing the software, include this License Header
   32.22 +Notice in each file and include the License file at
   32.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   32.24 +particular file as subject to the "Classpath" exception as provided
   32.25 +by Oracle in the GPL Version 2 section of the License file that
   32.26 +accompanied this code. If applicable, add the following below the
   32.27 +License Header, with the fields enclosed by brackets [] replaced by
   32.28 +your own identifying information:
   32.29 +"Portions Copyrighted [year] [name of copyright owner]"
   32.30 +
   32.31 +Contributor(s):
   32.32 +
   32.33 +The Original Software is NetBeans. The Initial Developer of the Original
   32.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   32.35 +Microsystems, Inc. All Rights Reserved.
   32.36 +
   32.37 +If you wish your version of this file to be governed by only the CDDL
   32.38 +or only the GPL Version 2, indicate your decision by adding
   32.39 +"[Contributor] elects to include this software in this distribution
   32.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   32.41 +single choice of license, a recipient has the option to distribute
   32.42 +your version of this file under either the CDDL, the GPL Version 2 or
   32.43 +to extend the choice of license to its licensees as provided above.
   32.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   32.45 +Version 2 license, then the option applies only if the new code is
   32.46 +made subject to such option by the copyright holder.
   32.47 +-->
   32.48  <project xmlns="http://www.netbeans.org/ns/project/1">
   32.49      <type>org.netbeans.modules.apisupport.project</type>
   32.50      <configuration>
    33.1 --- a/cmdline/lib/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
    33.2 +++ b/cmdline/lib/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
    33.3 @@ -1,1 +1,42 @@
    33.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    33.5 +#
    33.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    33.7 +#
    33.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    33.9 +# Other names may be trademarks of their respective owners.
   33.10 +#
   33.11 +# The contents of this file are subject to the terms of either the GNU
   33.12 +# General Public License Version 2 only ("GPL") or the Common
   33.13 +# Development and Distribution License("CDDL") (collectively, the
   33.14 +# "License"). You may not use this file except in compliance with the
   33.15 +# License. You can obtain a copy of the License at
   33.16 +# http://www.netbeans.org/cddl-gplv2.html
   33.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   33.18 +# specific language governing permissions and limitations under the
   33.19 +# License.  When distributing the software, include this License Header
   33.20 +# Notice in each file and include the License file at
   33.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   33.22 +# particular file as subject to the "Classpath" exception as provided
   33.23 +# by Oracle in the GPL Version 2 section of the License file that
   33.24 +# accompanied this code. If applicable, add the following below the
   33.25 +# License Header, with the fields enclosed by brackets [] replaced by
   33.26 +# your own identifying information:
   33.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   33.28 +#
   33.29 +# Contributor(s):
   33.30 +#
   33.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   33.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   33.33 +# Microsystems, Inc. All Rights Reserved.
   33.34 +#
   33.35 +# If you wish your version of this file to be governed by only the CDDL
   33.36 +# or only the GPL Version 2, indicate your decision by adding
   33.37 +# "[Contributor] elects to include this software in this distribution
   33.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   33.39 +# single choice of license, a recipient has the option to distribute
   33.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   33.41 +# to extend the choice of license to its licensees as provided above.
   33.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   33.43 +# Version 2 license, then the option applies only if the new code is
   33.44 +# made subject to such option by the copyright holder.
   33.45  suite.dir=${basedir}/..
    34.1 --- a/cmdline/maven/pom.xml	Mon Dec 19 11:37:36 2016 +0100
    34.2 +++ b/cmdline/maven/pom.xml	Mon Feb 27 22:40:44 2017 +0100
    34.3 @@ -1,3 +1,46 @@
    34.4 +<!--
    34.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    34.6 +
    34.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    34.8 +
    34.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   34.10 +Other names may be trademarks of their respective owners.
   34.11 +
   34.12 +The contents of this file are subject to the terms of either the GNU
   34.13 +General Public License Version 2 only ("GPL") or the Common
   34.14 +Development and Distribution License("CDDL") (collectively, the
   34.15 +"License"). You may not use this file except in compliance with the
   34.16 +License. You can obtain a copy of the License at
   34.17 +http://www.netbeans.org/cddl-gplv2.html
   34.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   34.19 +specific language governing permissions and limitations under the
   34.20 +License.  When distributing the software, include this License Header
   34.21 +Notice in each file and include the License file at
   34.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   34.23 +particular file as subject to the "Classpath" exception as provided
   34.24 +by Oracle in the GPL Version 2 section of the License file that
   34.25 +accompanied this code. If applicable, add the following below the
   34.26 +License Header, with the fields enclosed by brackets [] replaced by
   34.27 +your own identifying information:
   34.28 +"Portions Copyrighted [year] [name of copyright owner]"
   34.29 +
   34.30 +Contributor(s):
   34.31 +
   34.32 +The Original Software is NetBeans. The Initial Developer of the Original
   34.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   34.34 +Microsystems, Inc. All Rights Reserved.
   34.35 +
   34.36 +If you wish your version of this file to be governed by only the CDDL
   34.37 +or only the GPL Version 2, indicate your decision by adding
   34.38 +"[Contributor] elects to include this software in this distribution
   34.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   34.40 +single choice of license, a recipient has the option to distribute
   34.41 +your version of this file under either the CDDL, the GPL Version 2 or
   34.42 +to extend the choice of license to its licensees as provided above.
   34.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
   34.44 +Version 2 license, then the option applies only if the new code is
   34.45 +made subject to such option by the copyright holder.
   34.46 +-->
   34.47  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   34.48    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   34.49    <modelVersion>4.0.0</modelVersion>
    35.1 --- a/cmdline/maven/src/test/resources/unit/test-project-1/pom.xml	Mon Dec 19 11:37:36 2016 +0100
    35.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.3 @@ -1,35 +0,0 @@
    35.4 -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    35.5 -  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    35.6 -  <modelVersion>4.0.0</modelVersion>
    35.7 -
    35.8 -  <groupId>org.netbeans.modules.jackpot30.test</groupId>
    35.9 -  <artifactId>test-project-1</artifactId>
   35.10 -  <version>1.0-SNAPSHOT</version>
   35.11 -  <packaging>jar</packaging>
   35.12 -
   35.13 -  <name>test-project-1</name>
   35.14 -  <url>http://maven.apache.org</url>
   35.15 -
   35.16 -  <properties>
   35.17 -    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
   35.18 -  </properties>
   35.19 -
   35.20 -  <dependencies>
   35.21 -    <dependency>
   35.22 -      <groupId>junit</groupId>
   35.23 -      <artifactId>junit</artifactId>
   35.24 -      <version>3.8.1</version>
   35.25 -      <scope>test</scope>
   35.26 -    </dependency>
   35.27 -  </dependencies>
   35.28 -  <build>
   35.29 -    <plugins>
   35.30 -      <plugin>
   35.31 -        <groupId>org.netbeans.modules.jackpot30</groupId>
   35.32 -        <artifactId>jackpot30-maven-plugin</artifactId>
   35.33 -        <version>1.0-SNAPSHOT</version>
   35.34 -        <configuration/>
   35.35 -      </plugin>
   35.36 -    </plugins>
   35.37 -  </build>
   35.38 -</project>
    36.1 --- a/cmdline/maven/src/test/resources/unit/test-project-1/src/main/java/org/netbeans/modules/jackpot30/test/testproject1/App.java	Mon Dec 19 11:37:36 2016 +0100
    36.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.3 @@ -1,13 +0,0 @@
    36.4 -package org.netbeans.modules.jackpot30.test.testproject1;
    36.5 -
    36.6 -/**
    36.7 - * Hello world!
    36.8 - *
    36.9 - */
   36.10 -public class App 
   36.11 -{
   36.12 -    public static void main( String[] args )
   36.13 -    {
   36.14 -        System.out.println( "Hello World!" );
   36.15 -    }
   36.16 -}
    37.1 --- a/cmdline/maven/src/test/resources/unit/test-project-1/src/test/java/org/netbeans/modules/jackpot30/test/testproject1/AppTest.java	Mon Dec 19 11:37:36 2016 +0100
    37.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    37.3 @@ -1,38 +0,0 @@
    37.4 -package org.netbeans.modules.jackpot30.test.testproject1;
    37.5 -
    37.6 -import junit.framework.Test;
    37.7 -import junit.framework.TestCase;
    37.8 -import junit.framework.TestSuite;
    37.9 -
   37.10 -/**
   37.11 - * Unit test for simple App.
   37.12 - */
   37.13 -public class AppTest 
   37.14 -    extends TestCase
   37.15 -{
   37.16 -    /**
   37.17 -     * Create the test case
   37.18 -     *
   37.19 -     * @param testName name of the test case
   37.20 -     */
   37.21 -    public AppTest( String testName )
   37.22 -    {
   37.23 -        super( testName );
   37.24 -    }
   37.25 -
   37.26 -    /**
   37.27 -     * @return the suite of tests being tested
   37.28 -     */
   37.29 -    public static Test suite()
   37.30 -    {
   37.31 -        return new TestSuite( AppTest.class );
   37.32 -    }
   37.33 -
   37.34 -    /**
   37.35 -     * Rigourous Test :-)
   37.36 -     */
   37.37 -    public void testApp()
   37.38 -    {
   37.39 -        assertTrue( true );
   37.40 -    }
   37.41 -}
    38.1 --- a/cmdline/maven/tests/sl-15/jackpot-settings.xml	Mon Dec 19 11:37:36 2016 +0100
    38.2 +++ b/cmdline/maven/tests/sl-15/jackpot-settings.xml	Mon Feb 27 22:40:44 2017 +0100
    38.3 @@ -1,4 +1,47 @@
    38.4  <?xml version="1.0" encoding="UTF-8"?>
    38.5 +<!--
    38.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    38.7 +
    38.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    38.9 +
   38.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   38.11 +Other names may be trademarks of their respective owners.
   38.12 +
   38.13 +The contents of this file are subject to the terms of either the GNU
   38.14 +General Public License Version 2 only ("GPL") or the Common
   38.15 +Development and Distribution License("CDDL") (collectively, the
   38.16 +"License"). You may not use this file except in compliance with the
   38.17 +License. You can obtain a copy of the License at
   38.18 +http://www.netbeans.org/cddl-gplv2.html
   38.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   38.20 +specific language governing permissions and limitations under the
   38.21 +License.  When distributing the software, include this License Header
   38.22 +Notice in each file and include the License file at
   38.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   38.24 +particular file as subject to the "Classpath" exception as provided
   38.25 +by Oracle in the GPL Version 2 section of the License file that
   38.26 +accompanied this code. If applicable, add the following below the
   38.27 +License Header, with the fields enclosed by brackets [] replaced by
   38.28 +your own identifying information:
   38.29 +"Portions Copyrighted [year] [name of copyright owner]"
   38.30 +
   38.31 +Contributor(s):
   38.32 +
   38.33 +The Original Software is NetBeans. The Initial Developer of the Original
   38.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   38.35 +Microsystems, Inc. All Rights Reserved.
   38.36 +
   38.37 +If you wish your version of this file to be governed by only the CDDL
   38.38 +or only the GPL Version 2, indicate your decision by adding
   38.39 +"[Contributor] elects to include this software in this distribution
   38.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   38.41 +single choice of license, a recipient has the option to distribute
   38.42 +your version of this file under either the CDDL, the GPL Version 2 or
   38.43 +to extend the choice of license to its licensees as provided above.
   38.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   38.45 +Version 2 license, then the option applies only if the new code is
   38.46 +made subject to such option by the copyright holder.
   38.47 +-->
   38.48  <hints>
   38.49      <settings>
   38.50          <Javac_canUseDiamond enabled="true"/>
    39.1 --- a/cmdline/maven/tests/sl-15/pom.xml	Mon Dec 19 11:37:36 2016 +0100
    39.2 +++ b/cmdline/maven/tests/sl-15/pom.xml	Mon Feb 27 22:40:44 2017 +0100
    39.3 @@ -1,3 +1,46 @@
    39.4 +<!--
    39.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    39.6 +
    39.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    39.8 +
    39.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   39.10 +Other names may be trademarks of their respective owners.
   39.11 +
   39.12 +The contents of this file are subject to the terms of either the GNU
   39.13 +General Public License Version 2 only ("GPL") or the Common
   39.14 +Development and Distribution License("CDDL") (collectively, the
   39.15 +"License"). You may not use this file except in compliance with the
   39.16 +License. You can obtain a copy of the License at
   39.17 +http://www.netbeans.org/cddl-gplv2.html
   39.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   39.19 +specific language governing permissions and limitations under the
   39.20 +License.  When distributing the software, include this License Header
   39.21 +Notice in each file and include the License file at
   39.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   39.23 +particular file as subject to the "Classpath" exception as provided
   39.24 +by Oracle in the GPL Version 2 section of the License file that
   39.25 +accompanied this code. If applicable, add the following below the
   39.26 +License Header, with the fields enclosed by brackets [] replaced by
   39.27 +your own identifying information:
   39.28 +"Portions Copyrighted [year] [name of copyright owner]"
   39.29 +
   39.30 +Contributor(s):
   39.31 +
   39.32 +The Original Software is NetBeans. The Initial Developer of the Original
   39.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   39.34 +Microsystems, Inc. All Rights Reserved.
   39.35 +
   39.36 +If you wish your version of this file to be governed by only the CDDL
   39.37 +or only the GPL Version 2, indicate your decision by adding
   39.38 +"[Contributor] elects to include this software in this distribution
   39.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   39.40 +single choice of license, a recipient has the option to distribute
   39.41 +your version of this file under either the CDDL, the GPL Version 2 or
   39.42 +to extend the choice of license to its licensees as provided above.
   39.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
   39.44 +Version 2 license, then the option applies only if the new code is
   39.45 +made subject to such option by the copyright holder.
   39.46 +-->
   39.47  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   39.48    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   39.49    <modelVersion>4.0.0</modelVersion>
    40.1 --- a/cmdline/maven/tests/sl-15/src/main/java/test/App.java	Mon Dec 19 11:37:36 2016 +0100
    40.2 +++ b/cmdline/maven/tests/sl-15/src/main/java/test/App.java	Mon Feb 27 22:40:44 2017 +0100
    40.3 @@ -1,3 +1,46 @@
    40.4 +/*
    40.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    40.6 + *
    40.7 + * Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    40.8 + *
    40.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   40.10 + * Other names may be trademarks of their respective owners.
   40.11 + *
   40.12 + * The contents of this file are subject to the terms of either the GNU
   40.13 + * General Public License Version 2 only ("GPL") or the Common
   40.14 + * Development and Distribution License("CDDL") (collectively, the
   40.15 + * "License"). You may not use this file except in compliance with the
   40.16 + * License. You can obtain a copy of the License at
   40.17 + * http://www.netbeans.org/cddl-gplv2.html
   40.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   40.19 + * specific language governing permissions and limitations under the
   40.20 + * License.  When distributing the software, include this License Header
   40.21 + * Notice in each file and include the License file at
   40.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   40.23 + * particular file as subject to the "Classpath" exception as provided
   40.24 + * by Oracle in the GPL Version 2 section of the License file that
   40.25 + * accompanied this code. If applicable, add the following below the
   40.26 + * License Header, with the fields enclosed by brackets [] replaced by
   40.27 + * your own identifying information:
   40.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   40.29 + *
   40.30 + * Contributor(s):
   40.31 + *
   40.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   40.33 + * Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   40.34 + * Microsystems, Inc. All Rights Reserved.
   40.35 + *
   40.36 + * If you wish your version of this file to be governed by only the CDDL
   40.37 + * or only the GPL Version 2, indicate your decision by adding
   40.38 + * "[Contributor] elects to include this software in this distribution
   40.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   40.40 + * single choice of license, a recipient has the option to distribute
   40.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   40.42 + * to extend the choice of license to its licensees as provided above.
   40.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   40.44 + * Version 2 license, then the option applies only if the new code is
   40.45 + * made subject to such option by the copyright holder.
   40.46 + */
   40.47  package test;
   40.48  
   40.49  import java.util.*;
    41.1 --- a/cmdline/maven/tests/sl-17/golden	Mon Dec 19 11:37:36 2016 +0100
    41.2 +++ b/cmdline/maven/tests/sl-17/golden	Mon Feb 27 22:40:44 2017 +0100
    41.3 @@ -1,3 +1,3 @@
    41.4 -${basedir}/src/main/java/test/App.java:8: warning: [Can_Use_Diamond] redundant type arguments in new expression (use diamond operator instead).
    41.5 +${basedir}/src/main/java/test/App.java:51: warning: [Can_Use_Diamond] redundant type arguments in new expression (use diamond operator instead).
    41.6          List<String> l = new ArrayList<String>();
    41.7                               ^
    42.1 --- a/cmdline/maven/tests/sl-17/jackpot-settings.xml	Mon Dec 19 11:37:36 2016 +0100
    42.2 +++ b/cmdline/maven/tests/sl-17/jackpot-settings.xml	Mon Feb 27 22:40:44 2017 +0100
    42.3 @@ -1,4 +1,47 @@
    42.4  <?xml version="1.0" encoding="UTF-8"?>
    42.5 +<!--
    42.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    42.7 +
    42.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    42.9 +
   42.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   42.11 +Other names may be trademarks of their respective owners.
   42.12 +
   42.13 +The contents of this file are subject to the terms of either the GNU
   42.14 +General Public License Version 2 only ("GPL") or the Common
   42.15 +Development and Distribution License("CDDL") (collectively, the
   42.16 +"License"). You may not use this file except in compliance with the
   42.17 +License. You can obtain a copy of the License at
   42.18 +http://www.netbeans.org/cddl-gplv2.html
   42.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   42.20 +specific language governing permissions and limitations under the
   42.21 +License.  When distributing the software, include this License Header
   42.22 +Notice in each file and include the License file at
   42.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   42.24 +particular file as subject to the "Classpath" exception as provided
   42.25 +by Oracle in the GPL Version 2 section of the License file that
   42.26 +accompanied this code. If applicable, add the following below the
   42.27 +License Header, with the fields enclosed by brackets [] replaced by
   42.28 +your own identifying information:
   42.29 +"Portions Copyrighted [year] [name of copyright owner]"
   42.30 +
   42.31 +Contributor(s):
   42.32 +
   42.33 +The Original Software is NetBeans. The Initial Developer of the Original
   42.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   42.35 +Microsystems, Inc. All Rights Reserved.
   42.36 +
   42.37 +If you wish your version of this file to be governed by only the CDDL
   42.38 +or only the GPL Version 2, indicate your decision by adding
   42.39 +"[Contributor] elects to include this software in this distribution
   42.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   42.41 +single choice of license, a recipient has the option to distribute
   42.42 +your version of this file under either the CDDL, the GPL Version 2 or
   42.43 +to extend the choice of license to its licensees as provided above.
   42.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   42.45 +Version 2 license, then the option applies only if the new code is
   42.46 +made subject to such option by the copyright holder.
   42.47 +-->
   42.48  <hints>
   42.49      <settings>
   42.50          <Javac_canUseDiamond enabled="true"/>
    43.1 --- a/cmdline/maven/tests/sl-17/pom.xml	Mon Dec 19 11:37:36 2016 +0100
    43.2 +++ b/cmdline/maven/tests/sl-17/pom.xml	Mon Feb 27 22:40:44 2017 +0100
    43.3 @@ -1,3 +1,46 @@
    43.4 +<!--
    43.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    43.6 +
    43.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    43.8 +
    43.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   43.10 +Other names may be trademarks of their respective owners.
   43.11 +
   43.12 +The contents of this file are subject to the terms of either the GNU
   43.13 +General Public License Version 2 only ("GPL") or the Common
   43.14 +Development and Distribution License("CDDL") (collectively, the
   43.15 +"License"). You may not use this file except in compliance with the
   43.16 +License. You can obtain a copy of the License at
   43.17 +http://www.netbeans.org/cddl-gplv2.html
   43.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   43.19 +specific language governing permissions and limitations under the
   43.20 +License.  When distributing the software, include this License Header
   43.21 +Notice in each file and include the License file at
   43.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   43.23 +particular file as subject to the "Classpath" exception as provided
   43.24 +by Oracle in the GPL Version 2 section of the License file that
   43.25 +accompanied this code. If applicable, add the following below the
   43.26 +License Header, with the fields enclosed by brackets [] replaced by
   43.27 +your own identifying information:
   43.28 +"Portions Copyrighted [year] [name of copyright owner]"
   43.29 +
   43.30 +Contributor(s):
   43.31 +
   43.32 +The Original Software is NetBeans. The Initial Developer of the Original
   43.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   43.34 +Microsystems, Inc. All Rights Reserved.
   43.35 +
   43.36 +If you wish your version of this file to be governed by only the CDDL
   43.37 +or only the GPL Version 2, indicate your decision by adding
   43.38 +"[Contributor] elects to include this software in this distribution
   43.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   43.40 +single choice of license, a recipient has the option to distribute
   43.41 +your version of this file under either the CDDL, the GPL Version 2 or
   43.42 +to extend the choice of license to its licensees as provided above.
   43.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
   43.44 +Version 2 license, then the option applies only if the new code is
   43.45 +made subject to such option by the copyright holder.
   43.46 +-->
   43.47  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   43.48    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   43.49    <modelVersion>4.0.0</modelVersion>
    44.1 --- a/cmdline/maven/tests/sl-17/src/main/java/test/App.java	Mon Dec 19 11:37:36 2016 +0100
    44.2 +++ b/cmdline/maven/tests/sl-17/src/main/java/test/App.java	Mon Feb 27 22:40:44 2017 +0100
    44.3 @@ -1,3 +1,46 @@
    44.4 +/*
    44.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    44.6 + *
    44.7 + * Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    44.8 + *
    44.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   44.10 + * Other names may be trademarks of their respective owners.
   44.11 + *
   44.12 + * The contents of this file are subject to the terms of either the GNU
   44.13 + * General Public License Version 2 only ("GPL") or the Common
   44.14 + * Development and Distribution License("CDDL") (collectively, the
   44.15 + * "License"). You may not use this file except in compliance with the
   44.16 + * License. You can obtain a copy of the License at
   44.17 + * http://www.netbeans.org/cddl-gplv2.html
   44.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   44.19 + * specific language governing permissions and limitations under the
   44.20 + * License.  When distributing the software, include this License Header
   44.21 + * Notice in each file and include the License file at
   44.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   44.23 + * particular file as subject to the "Classpath" exception as provided
   44.24 + * by Oracle in the GPL Version 2 section of the License file that
   44.25 + * accompanied this code. If applicable, add the following below the
   44.26 + * License Header, with the fields enclosed by brackets [] replaced by
   44.27 + * your own identifying information:
   44.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   44.29 + *
   44.30 + * Contributor(s):
   44.31 + *
   44.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   44.33 + * Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   44.34 + * Microsystems, Inc. All Rights Reserved.
   44.35 + *
   44.36 + * If you wish your version of this file to be governed by only the CDDL
   44.37 + * or only the GPL Version 2, indicate your decision by adding
   44.38 + * "[Contributor] elects to include this software in this distribution
   44.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   44.40 + * single choice of license, a recipient has the option to distribute
   44.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   44.42 + * to extend the choice of license to its licensees as provided above.
   44.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   44.44 + * Version 2 license, then the option applies only if the new code is
   44.45 + * made subject to such option by the copyright holder.
   44.46 + */
   44.47  package test;
   44.48  
   44.49  import java.util.*;
    45.1 --- a/cmdline/maven/tests/test-custom/golden	Mon Dec 19 11:37:36 2016 +0100
    45.2 +++ b/cmdline/maven/tests/test-custom/golden	Mon Feb 27 22:40:44 2017 +0100
    45.3 @@ -1,3 +1,3 @@
    45.4 -${basedir}/src/main/java/test/App.java:5: warning: [test] test
    45.5 +${basedir}/src/main/java/test/App.java:48: warning: [test] test
    45.6          System.err.println(args[0].length() == 0);
    45.7                             ^
    46.1 --- a/cmdline/maven/tests/test-custom/pom.xml	Mon Dec 19 11:37:36 2016 +0100
    46.2 +++ b/cmdline/maven/tests/test-custom/pom.xml	Mon Feb 27 22:40:44 2017 +0100
    46.3 @@ -1,3 +1,46 @@
    46.4 +<!--
    46.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    46.6 +
    46.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    46.8 +
    46.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   46.10 +Other names may be trademarks of their respective owners.
   46.11 +
   46.12 +The contents of this file are subject to the terms of either the GNU
   46.13 +General Public License Version 2 only ("GPL") or the Common
   46.14 +Development and Distribution License("CDDL") (collectively, the
   46.15 +"License"). You may not use this file except in compliance with the
   46.16 +License. You can obtain a copy of the License at
   46.17 +http://www.netbeans.org/cddl-gplv2.html
   46.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   46.19 +specific language governing permissions and limitations under the
   46.20 +License.  When distributing the software, include this License Header
   46.21 +Notice in each file and include the License file at
   46.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   46.23 +particular file as subject to the "Classpath" exception as provided
   46.24 +by Oracle in the GPL Version 2 section of the License file that
   46.25 +accompanied this code. If applicable, add the following below the
   46.26 +License Header, with the fields enclosed by brackets [] replaced by
   46.27 +your own identifying information:
   46.28 +"Portions Copyrighted [year] [name of copyright owner]"
   46.29 +
   46.30 +Contributor(s):
   46.31 +
   46.32 +The Original Software is NetBeans. The Initial Developer of the Original
   46.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   46.34 +Microsystems, Inc. All Rights Reserved.
   46.35 +
   46.36 +If you wish your version of this file to be governed by only the CDDL
   46.37 +or only the GPL Version 2, indicate your decision by adding
   46.38 +"[Contributor] elects to include this software in this distribution
   46.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   46.40 +single choice of license, a recipient has the option to distribute
   46.41 +your version of this file under either the CDDL, the GPL Version 2 or
   46.42 +to extend the choice of license to its licensees as provided above.
   46.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
   46.44 +Version 2 license, then the option applies only if the new code is
   46.45 +made subject to such option by the copyright holder.
   46.46 +-->
   46.47  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   46.48    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   46.49    <modelVersion>4.0.0</modelVersion>
    47.1 --- a/cmdline/maven/tests/test-custom/src/main/java/test/App.java	Mon Dec 19 11:37:36 2016 +0100
    47.2 +++ b/cmdline/maven/tests/test-custom/src/main/java/test/App.java	Mon Feb 27 22:40:44 2017 +0100
    47.3 @@ -1,3 +1,46 @@
    47.4 +/*
    47.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    47.6 + *
    47.7 + * Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    47.8 + *
    47.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   47.10 + * Other names may be trademarks of their respective owners.
   47.11 + *
   47.12 + * The contents of this file are subject to the terms of either the GNU
   47.13 + * General Public License Version 2 only ("GPL") or the Common
   47.14 + * Development and Distribution License("CDDL") (collectively, the
   47.15 + * "License"). You may not use this file except in compliance with the
   47.16 + * License. You can obtain a copy of the License at
   47.17 + * http://www.netbeans.org/cddl-gplv2.html
   47.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   47.19 + * specific language governing permissions and limitations under the
   47.20 + * License.  When distributing the software, include this License Header
   47.21 + * Notice in each file and include the License file at
   47.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   47.23 + * particular file as subject to the "Classpath" exception as provided
   47.24 + * by Oracle in the GPL Version 2 section of the License file that
   47.25 + * accompanied this code. If applicable, add the following below the
   47.26 + * License Header, with the fields enclosed by brackets [] replaced by
   47.27 + * your own identifying information:
   47.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   47.29 + *
   47.30 + * Contributor(s):
   47.31 + *
   47.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   47.33 + * Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   47.34 + * Microsystems, Inc. All Rights Reserved.
   47.35 + *
   47.36 + * If you wish your version of this file to be governed by only the CDDL
   47.37 + * or only the GPL Version 2, indicate your decision by adding
   47.38 + * "[Contributor] elects to include this software in this distribution
   47.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   47.40 + * single choice of license, a recipient has the option to distribute
   47.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   47.42 + * to extend the choice of license to its licensees as provided above.
   47.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   47.44 + * Version 2 license, then the option applies only if the new code is
   47.45 + * made subject to such option by the copyright holder.
   47.46 + */
   47.47  package test;
   47.48  
   47.49  public class App  {
    48.1 --- a/cmdline/maven/tests/test-custom/src/main/resources/META-INF/upgrade/test.hint	Mon Dec 19 11:37:36 2016 +0100
    48.2 +++ b/cmdline/maven/tests/test-custom/src/main/resources/META-INF/upgrade/test.hint	Mon Feb 27 22:40:44 2017 +0100
    48.3 @@ -1,1 +1,45 @@
    48.4 +/*
    48.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    48.6 + *
    48.7 + * Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    48.8 + *
    48.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   48.10 + * Other names may be trademarks of their respective owners.
   48.11 + *
   48.12 + * The contents of this file are subject to the terms of either the GNU
   48.13 + * General Public License Version 2 only ("GPL") or the Common
   48.14 + * Development and Distribution License("CDDL") (collectively, the
   48.15 + * "License"). You may not use this file except in compliance with the
   48.16 + * License. You can obtain a copy of the License at
   48.17 + * http://www.netbeans.org/cddl-gplv2.html
   48.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   48.19 + * specific language governing permissions and limitations under the
   48.20 + * License.  When distributing the software, include this License Header
   48.21 + * Notice in each file and include the License file at
   48.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   48.23 + * particular file as subject to the "Classpath" exception as provided
   48.24 + * by Oracle in the GPL Version 2 section of the License file that
   48.25 + * accompanied this code. If applicable, add the following below the
   48.26 + * License Header, with the fields enclosed by brackets [] replaced by
   48.27 + * your own identifying information:
   48.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   48.29 + *
   48.30 + * Contributor(s):
   48.31 + *
   48.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   48.33 + * Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   48.34 + * Microsystems, Inc. All Rights Reserved.
   48.35 + *
   48.36 + * If you wish your version of this file to be governed by only the CDDL
   48.37 + * or only the GPL Version 2, indicate your decision by adding
   48.38 + * "[Contributor] elects to include this software in this distribution
   48.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   48.40 + * single choice of license, a recipient has the option to distribute
   48.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   48.42 + * to extend the choice of license to its licensees as provided above.
   48.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   48.44 + * Version 2 license, then the option applies only if the new code is
   48.45 + * made subject to such option by the copyright holder.
   48.46 + */
   48.47 +
   48.48  $str.length() == 0 :: $str instanceof java.lang.String;;
    49.1 --- a/cmdline/maven/tests/test1/golden	Mon Dec 19 11:37:36 2016 +0100
    49.2 +++ b/cmdline/maven/tests/test1/golden	Mon Feb 27 22:40:44 2017 +0100
    49.3 @@ -1,3 +1,3 @@
    49.4 -${basedir}/src/main/java/test/App.java:7: warning: [Synchronization_on_non_final_field] Synchronization on non-final field
    49.5 +${basedir}/src/main/java/test/App.java:50: warning: [Synchronization_on_non_final_field] Synchronization on non-final field
    49.6          synchronized (LOCK) {
    49.7                       ^
    50.1 --- a/cmdline/maven/tests/test1/jackpot-settings.xml	Mon Dec 19 11:37:36 2016 +0100
    50.2 +++ b/cmdline/maven/tests/test1/jackpot-settings.xml	Mon Feb 27 22:40:44 2017 +0100
    50.3 @@ -1,4 +1,47 @@
    50.4  <?xml version="1.0" encoding="UTF-8"?>
    50.5 +<!--
    50.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    50.7 +
    50.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    50.9 +
   50.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   50.11 +Other names may be trademarks of their respective owners.
   50.12 +
   50.13 +The contents of this file are subject to the terms of either the GNU
   50.14 +General Public License Version 2 only ("GPL") or the Common
   50.15 +Development and Distribution License("CDDL") (collectively, the
   50.16 +"License"). You may not use this file except in compliance with the
   50.17 +License. You can obtain a copy of the License at
   50.18 +http://www.netbeans.org/cddl-gplv2.html
   50.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   50.20 +specific language governing permissions and limitations under the
   50.21 +License.  When distributing the software, include this License Header
   50.22 +Notice in each file and include the License file at
   50.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   50.24 +particular file as subject to the "Classpath" exception as provided
   50.25 +by Oracle in the GPL Version 2 section of the License file that
   50.26 +accompanied this code. If applicable, add the following below the
   50.27 +License Header, with the fields enclosed by brackets [] replaced by
   50.28 +your own identifying information:
   50.29 +"Portions Copyrighted [year] [name of copyright owner]"
   50.30 +
   50.31 +Contributor(s):
   50.32 +
   50.33 +The Original Software is NetBeans. The Initial Developer of the Original
   50.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   50.35 +Microsystems, Inc. All Rights Reserved.
   50.36 +
   50.37 +If you wish your version of this file to be governed by only the CDDL
   50.38 +or only the GPL Version 2, indicate your decision by adding
   50.39 +"[Contributor] elects to include this software in this distribution
   50.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   50.41 +single choice of license, a recipient has the option to distribute
   50.42 +your version of this file under either the CDDL, the GPL Version 2 or
   50.43 +to extend the choice of license to its licensees as provided above.
   50.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   50.45 +Version 2 license, then the option applies only if the new code is
   50.46 +made subject to such option by the copyright holder.
   50.47 +-->
   50.48  <hints>
   50.49      <settings>
   50.50          <org.netbeans.modules.java.hints.SyncOnNonFinal enabled="true"/>
    51.1 --- a/cmdline/maven/tests/test1/pom.xml	Mon Dec 19 11:37:36 2016 +0100
    51.2 +++ b/cmdline/maven/tests/test1/pom.xml	Mon Feb 27 22:40:44 2017 +0100
    51.3 @@ -1,3 +1,46 @@
    51.4 +<!--
    51.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    51.6 +
    51.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    51.8 +
    51.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   51.10 +Other names may be trademarks of their respective owners.
   51.11 +
   51.12 +The contents of this file are subject to the terms of either the GNU
   51.13 +General Public License Version 2 only ("GPL") or the Common
   51.14 +Development and Distribution License("CDDL") (collectively, the
   51.15 +"License"). You may not use this file except in compliance with the
   51.16 +License. You can obtain a copy of the License at
   51.17 +http://www.netbeans.org/cddl-gplv2.html
   51.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   51.19 +specific language governing permissions and limitations under the
   51.20 +License.  When distributing the software, include this License Header
   51.21 +Notice in each file and include the License file at
   51.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   51.23 +particular file as subject to the "Classpath" exception as provided
   51.24 +by Oracle in the GPL Version 2 section of the License file that
   51.25 +accompanied this code. If applicable, add the following below the
   51.26 +License Header, with the fields enclosed by brackets [] replaced by
   51.27 +your own identifying information:
   51.28 +"Portions Copyrighted [year] [name of copyright owner]"
   51.29 +
   51.30 +Contributor(s):
   51.31 +
   51.32 +The Original Software is NetBeans. The Initial Developer of the Original
   51.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   51.34 +Microsystems, Inc. All Rights Reserved.
   51.35 +
   51.36 +If you wish your version of this file to be governed by only the CDDL
   51.37 +or only the GPL Version 2, indicate your decision by adding
   51.38 +"[Contributor] elects to include this software in this distribution
   51.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   51.40 +single choice of license, a recipient has the option to distribute
   51.41 +your version of this file under either the CDDL, the GPL Version 2 or
   51.42 +to extend the choice of license to its licensees as provided above.
   51.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
   51.44 +Version 2 license, then the option applies only if the new code is
   51.45 +made subject to such option by the copyright holder.
   51.46 +-->
   51.47  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   51.48    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   51.49    <modelVersion>4.0.0</modelVersion>
    52.1 --- a/cmdline/maven/tests/test1/src/main/java/test/App.java	Mon Dec 19 11:37:36 2016 +0100
    52.2 +++ b/cmdline/maven/tests/test1/src/main/java/test/App.java	Mon Feb 27 22:40:44 2017 +0100
    52.3 @@ -1,3 +1,46 @@
    52.4 +/*
    52.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    52.6 + *
    52.7 + * Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    52.8 + *
    52.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   52.10 + * Other names may be trademarks of their respective owners.
   52.11 + *
   52.12 + * The contents of this file are subject to the terms of either the GNU
   52.13 + * General Public License Version 2 only ("GPL") or the Common
   52.14 + * Development and Distribution License("CDDL") (collectively, the
   52.15 + * "License"). You may not use this file except in compliance with the
   52.16 + * License. You can obtain a copy of the License at
   52.17 + * http://www.netbeans.org/cddl-gplv2.html
   52.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   52.19 + * specific language governing permissions and limitations under the
   52.20 + * License.  When distributing the software, include this License Header
   52.21 + * Notice in each file and include the License file at
   52.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   52.23 + * particular file as subject to the "Classpath" exception as provided
   52.24 + * by Oracle in the GPL Version 2 section of the License file that
   52.25 + * accompanied this code. If applicable, add the following below the
   52.26 + * License Header, with the fields enclosed by brackets [] replaced by
   52.27 + * your own identifying information:
   52.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   52.29 + *
   52.30 + * Contributor(s):
   52.31 + *
   52.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   52.33 + * Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   52.34 + * Microsystems, Inc. All Rights Reserved.
   52.35 + *
   52.36 + * If you wish your version of this file to be governed by only the CDDL
   52.37 + * or only the GPL Version 2, indicate your decision by adding
   52.38 + * "[Contributor] elects to include this software in this distribution
   52.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   52.40 + * single choice of license, a recipient has the option to distribute
   52.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   52.42 + * to extend the choice of license to its licensees as provided above.
   52.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   52.44 + * Version 2 license, then the option applies only if the new code is
   52.45 + * made subject to such option by the copyright holder.
   52.46 + */
   52.47  package test;
   52.48  
   52.49  public class App  {
    53.1 --- a/cmdline/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
    53.2 +++ b/cmdline/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
    53.3 @@ -1,5 +1,48 @@
    53.4  <?xml version="1.0" encoding="UTF-8"?>
    53.5  <!--
    53.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    53.7 +
    53.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    53.9 +
   53.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   53.11 +Other names may be trademarks of their respective owners.
   53.12 +
   53.13 +The contents of this file are subject to the terms of either the GNU
   53.14 +General Public License Version 2 only ("GPL") or the Common
   53.15 +Development and Distribution License("CDDL") (collectively, the
   53.16 +"License"). You may not use this file except in compliance with the
   53.17 +License. You can obtain a copy of the License at
   53.18 +http://www.netbeans.org/cddl-gplv2.html
   53.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   53.20 +specific language governing permissions and limitations under the
   53.21 +License.  When distributing the software, include this License Header
   53.22 +Notice in each file and include the License file at
   53.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   53.24 +particular file as subject to the "Classpath" exception as provided
   53.25 +by Oracle in the GPL Version 2 section of the License file that
   53.26 +accompanied this code. If applicable, add the following below the
   53.27 +License Header, with the fields enclosed by brackets [] replaced by
   53.28 +your own identifying information:
   53.29 +"Portions Copyrighted [year] [name of copyright owner]"
   53.30 +
   53.31 +Contributor(s):
   53.32 +
   53.33 +The Original Software is NetBeans. The Initial Developer of the Original
   53.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   53.35 +Microsystems, Inc. All Rights Reserved.
   53.36 +
   53.37 +If you wish your version of this file to be governed by only the CDDL
   53.38 +or only the GPL Version 2, indicate your decision by adding
   53.39 +"[Contributor] elects to include this software in this distribution
   53.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   53.41 +single choice of license, a recipient has the option to distribute
   53.42 +your version of this file under either the CDDL, the GPL Version 2 or
   53.43 +to extend the choice of license to its licensees as provided above.
   53.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   53.45 +Version 2 license, then the option applies only if the new code is
   53.46 +made subject to such option by the copyright holder.
   53.47 +-->
   53.48 +<!--
   53.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
   53.50  ***         EDIT ../build.xml INSTEAD         ***
   53.51  -->
    54.1 --- a/cmdline/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
    54.2 +++ b/cmdline/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
    54.3 @@ -1,3 +1,44 @@
    54.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    54.5 +#
    54.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    54.7 +#
    54.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    54.9 +# Other names may be trademarks of their respective owners.
   54.10 +#
   54.11 +# The contents of this file are subject to the terms of either the GNU
   54.12 +# General Public License Version 2 only ("GPL") or the Common
   54.13 +# Development and Distribution License("CDDL") (collectively, the
   54.14 +# "License"). You may not use this file except in compliance with the
   54.15 +# License. You can obtain a copy of the License at
   54.16 +# http://www.netbeans.org/cddl-gplv2.html
   54.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   54.18 +# specific language governing permissions and limitations under the
   54.19 +# License.  When distributing the software, include this License Header
   54.20 +# Notice in each file and include the License file at
   54.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   54.22 +# particular file as subject to the "Classpath" exception as provided
   54.23 +# by Oracle in the GPL Version 2 section of the License file that
   54.24 +# accompanied this code. If applicable, add the following below the
   54.25 +# License Header, with the fields enclosed by brackets [] replaced by
   54.26 +# your own identifying information:
   54.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   54.28 +#
   54.29 +# Contributor(s):
   54.30 +#
   54.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   54.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   54.33 +# Microsystems, Inc. All Rights Reserved.
   54.34 +#
   54.35 +# If you wish your version of this file to be governed by only the CDDL
   54.36 +# or only the GPL Version 2, indicate your decision by adding
   54.37 +# "[Contributor] elects to include this software in this distribution
   54.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   54.39 +# single choice of license, a recipient has the option to distribute
   54.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   54.41 +# to extend the choice of license to its licensees as provided above.
   54.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   54.43 +# Version 2 license, then the option applies only if the new code is
   54.44 +# made subject to such option by the copyright holder.
   54.45  build.xml.data.CRC32=56bbc279
   54.46  build.xml.script.CRC32=ed17867f
   54.47  build.xml.stylesheet.CRC32=eaf9f76a@1.44
    55.1 --- a/cmdline/nbproject/platform.properties	Mon Dec 19 11:37:36 2016 +0100
    55.2 +++ b/cmdline/nbproject/platform.properties	Mon Feb 27 22:40:44 2017 +0100
    55.3 @@ -1,3 +1,44 @@
    55.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    55.5 +#
    55.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    55.7 +#
    55.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    55.9 +# Other names may be trademarks of their respective owners.
   55.10 +#
   55.11 +# The contents of this file are subject to the terms of either the GNU
   55.12 +# General Public License Version 2 only ("GPL") or the Common
   55.13 +# Development and Distribution License("CDDL") (collectively, the
   55.14 +# "License"). You may not use this file except in compliance with the
   55.15 +# License. You can obtain a copy of the License at
   55.16 +# http://www.netbeans.org/cddl-gplv2.html
   55.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   55.18 +# specific language governing permissions and limitations under the
   55.19 +# License.  When distributing the software, include this License Header
   55.20 +# Notice in each file and include the License file at
   55.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   55.22 +# particular file as subject to the "Classpath" exception as provided
   55.23 +# by Oracle in the GPL Version 2 section of the License file that
   55.24 +# accompanied this code. If applicable, add the following below the
   55.25 +# License Header, with the fields enclosed by brackets [] replaced by
   55.26 +# your own identifying information:
   55.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   55.28 +#
   55.29 +# Contributor(s):
   55.30 +#
   55.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   55.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   55.33 +# Microsystems, Inc. All Rights Reserved.
   55.34 +#
   55.35 +# If you wish your version of this file to be governed by only the CDDL
   55.36 +# or only the GPL Version 2, indicate your decision by adding
   55.37 +# "[Contributor] elects to include this software in this distribution
   55.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   55.39 +# single choice of license, a recipient has the option to distribute
   55.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   55.41 +# to extend the choice of license to its licensees as provided above.
   55.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   55.43 +# Version 2 license, then the option applies only if the new code is
   55.44 +# made subject to such option by the copyright holder.
   55.45  cluster.path=\
   55.46      ${nbplatform.active.dir}/apisupport:\
   55.47      ${nbplatform.active.dir}/cnd:\
    56.1 --- a/cmdline/nbproject/platform.xml	Mon Dec 19 11:37:36 2016 +0100
    56.2 +++ b/cmdline/nbproject/platform.xml	Mon Feb 27 22:40:44 2017 +0100
    56.3 @@ -1,4 +1,47 @@
    56.4  <?xml version="1.0" encoding="UTF-8"?>
    56.5 +<!--
    56.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    56.7 +
    56.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    56.9 +
   56.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   56.11 +Other names may be trademarks of their respective owners.
   56.12 +
   56.13 +The contents of this file are subject to the terms of either the GNU
   56.14 +General Public License Version 2 only ("GPL") or the Common
   56.15 +Development and Distribution License("CDDL") (collectively, the
   56.16 +"License"). You may not use this file except in compliance with the
   56.17 +License. You can obtain a copy of the License at
   56.18 +http://www.netbeans.org/cddl-gplv2.html
   56.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   56.20 +specific language governing permissions and limitations under the
   56.21 +License.  When distributing the software, include this License Header
   56.22 +Notice in each file and include the License file at
   56.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   56.24 +particular file as subject to the "Classpath" exception as provided
   56.25 +by Oracle in the GPL Version 2 section of the License file that
   56.26 +accompanied this code. If applicable, add the following below the
   56.27 +License Header, with the fields enclosed by brackets [] replaced by
   56.28 +your own identifying information:
   56.29 +"Portions Copyrighted [year] [name of copyright owner]"
   56.30 +
   56.31 +Contributor(s):
   56.32 +
   56.33 +The Original Software is NetBeans. The Initial Developer of the Original
   56.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   56.35 +Microsystems, Inc. All Rights Reserved.
   56.36 +
   56.37 +If you wish your version of this file to be governed by only the CDDL
   56.38 +or only the GPL Version 2, indicate your decision by adding
   56.39 +"[Contributor] elects to include this software in this distribution
   56.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   56.41 +single choice of license, a recipient has the option to distribute
   56.42 +your version of this file under either the CDDL, the GPL Version 2 or
   56.43 +to extend the choice of license to its licensees as provided above.
   56.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   56.45 +Version 2 license, then the option applies only if the new code is
   56.46 +made subject to such option by the copyright holder.
   56.47 +-->
   56.48  <project name="platform" default="download" basedir="..">
   56.49      <condition property="download.required">
   56.50          <and>
    57.1 --- a/cmdline/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
    57.2 +++ b/cmdline/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
    57.3 @@ -1,3 +1,44 @@
    57.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    57.5 +#
    57.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    57.7 +#
    57.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    57.9 +# Other names may be trademarks of their respective owners.
   57.10 +#
   57.11 +# The contents of this file are subject to the terms of either the GNU
   57.12 +# General Public License Version 2 only ("GPL") or the Common
   57.13 +# Development and Distribution License("CDDL") (collectively, the
   57.14 +# "License"). You may not use this file except in compliance with the
   57.15 +# License. You can obtain a copy of the License at
   57.16 +# http://www.netbeans.org/cddl-gplv2.html
   57.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   57.18 +# specific language governing permissions and limitations under the
   57.19 +# License.  When distributing the software, include this License Header
   57.20 +# Notice in each file and include the License file at
   57.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   57.22 +# particular file as subject to the "Classpath" exception as provided
   57.23 +# by Oracle in the GPL Version 2 section of the License file that
   57.24 +# accompanied this code. If applicable, add the following below the
   57.25 +# License Header, with the fields enclosed by brackets [] replaced by
   57.26 +# your own identifying information:
   57.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   57.28 +#
   57.29 +# Contributor(s):
   57.30 +#
   57.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   57.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   57.33 +# Microsystems, Inc. All Rights Reserved.
   57.34 +#
   57.35 +# If you wish your version of this file to be governed by only the CDDL
   57.36 +# or only the GPL Version 2, indicate your decision by adding
   57.37 +# "[Contributor] elects to include this software in this distribution
   57.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   57.39 +# single choice of license, a recipient has the option to distribute
   57.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   57.41 +# to extend the choice of license to its licensees as provided above.
   57.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   57.43 +# Version 2 license, then the option applies only if the new code is
   57.44 +# made subject to such option by the copyright holder.
   57.45  modules=\
   57.46      ${project.org.netbeans.modules.jackpot30.cmdline.lib}:\
   57.47      ${project.org.netbeans.modules.jackpot30.compiler}:\
    58.1 --- a/cmdline/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
    58.2 +++ b/cmdline/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
    58.3 @@ -1,4 +1,47 @@
    58.4  <?xml version="1.0" encoding="UTF-8"?>
    58.5 +<!--
    58.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    58.7 +
    58.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    58.9 +
   58.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   58.11 +Other names may be trademarks of their respective owners.
   58.12 +
   58.13 +The contents of this file are subject to the terms of either the GNU
   58.14 +General Public License Version 2 only ("GPL") or the Common
   58.15 +Development and Distribution License("CDDL") (collectively, the
   58.16 +"License"). You may not use this file except in compliance with the
   58.17 +License. You can obtain a copy of the License at
   58.18 +http://www.netbeans.org/cddl-gplv2.html
   58.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   58.20 +specific language governing permissions and limitations under the
   58.21 +License.  When distributing the software, include this License Header
   58.22 +Notice in each file and include the License file at
   58.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   58.24 +particular file as subject to the "Classpath" exception as provided
   58.25 +by Oracle in the GPL Version 2 section of the License file that
   58.26 +accompanied this code. If applicable, add the following below the
   58.27 +License Header, with the fields enclosed by brackets [] replaced by
   58.28 +your own identifying information:
   58.29 +"Portions Copyrighted [year] [name of copyright owner]"
   58.30 +
   58.31 +Contributor(s):
   58.32 +
   58.33 +The Original Software is NetBeans. The Initial Developer of the Original
   58.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   58.35 +Microsystems, Inc. All Rights Reserved.
   58.36 +
   58.37 +If you wish your version of this file to be governed by only the CDDL
   58.38 +or only the GPL Version 2, indicate your decision by adding
   58.39 +"[Contributor] elects to include this software in this distribution
   58.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   58.41 +single choice of license, a recipient has the option to distribute
   58.42 +your version of this file under either the CDDL, the GPL Version 2 or
   58.43 +to extend the choice of license to its licensees as provided above.
   58.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   58.45 +Version 2 license, then the option applies only if the new code is
   58.46 +made subject to such option by the copyright holder.
   58.47 +-->
   58.48  <project xmlns="http://www.netbeans.org/ns/project/1">
   58.49      <type>org.netbeans.modules.apisupport.project.suite</type>
   58.50      <configuration>
    59.1 --- a/cmdline/tool/build.xml	Mon Dec 19 11:37:36 2016 +0100
    59.2 +++ b/cmdline/tool/build.xml	Mon Feb 27 22:40:44 2017 +0100
    59.3 @@ -1,4 +1,47 @@
    59.4  <?xml version="1.0" encoding="UTF-8"?>
    59.5 +<!--
    59.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    59.7 +
    59.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    59.9 +
   59.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   59.11 +Other names may be trademarks of their respective owners.
   59.12 +
   59.13 +The contents of this file are subject to the terms of either the GNU
   59.14 +General Public License Version 2 only ("GPL") or the Common
   59.15 +Development and Distribution License("CDDL") (collectively, the
   59.16 +"License"). You may not use this file except in compliance with the
   59.17 +License. You can obtain a copy of the License at
   59.18 +http://www.netbeans.org/cddl-gplv2.html
   59.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   59.20 +specific language governing permissions and limitations under the
   59.21 +License.  When distributing the software, include this License Header
   59.22 +Notice in each file and include the License file at
   59.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   59.24 +particular file as subject to the "Classpath" exception as provided
   59.25 +by Oracle in the GPL Version 2 section of the License file that
   59.26 +accompanied this code. If applicable, add the following below the
   59.27 +License Header, with the fields enclosed by brackets [] replaced by
   59.28 +your own identifying information:
   59.29 +"Portions Copyrighted [year] [name of copyright owner]"
   59.30 +
   59.31 +Contributor(s):
   59.32 +
   59.33 +The Original Software is NetBeans. The Initial Developer of the Original
   59.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   59.35 +Microsystems, Inc. All Rights Reserved.
   59.36 +
   59.37 +If you wish your version of this file to be governed by only the CDDL
   59.38 +or only the GPL Version 2, indicate your decision by adding
   59.39 +"[Contributor] elects to include this software in this distribution
   59.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   59.41 +single choice of license, a recipient has the option to distribute
   59.42 +your version of this file under either the CDDL, the GPL Version 2 or
   59.43 +to extend the choice of license to its licensees as provided above.
   59.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   59.45 +Version 2 license, then the option applies only if the new code is
   59.46 +made subject to such option by the copyright holder.
   59.47 +-->
   59.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
   59.49  <!-- for some information on what you could do (e.g. targets to override). -->
   59.50  <!-- If you delete this file and reopen the project it will be recreated. -->
    60.1 --- a/cmdline/tool/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
    60.2 +++ b/cmdline/tool/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
    60.3 @@ -1,5 +1,48 @@
    60.4  <?xml version="1.0" encoding="UTF-8"?>
    60.5  <!--
    60.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    60.7 +
    60.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    60.9 +
   60.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   60.11 +Other names may be trademarks of their respective owners.
   60.12 +
   60.13 +The contents of this file are subject to the terms of either the GNU
   60.14 +General Public License Version 2 only ("GPL") or the Common
   60.15 +Development and Distribution License("CDDL") (collectively, the
   60.16 +"License"). You may not use this file except in compliance with the
   60.17 +License. You can obtain a copy of the License at
   60.18 +http://www.netbeans.org/cddl-gplv2.html
   60.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   60.20 +specific language governing permissions and limitations under the
   60.21 +License.  When distributing the software, include this License Header
   60.22 +Notice in each file and include the License file at
   60.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   60.24 +particular file as subject to the "Classpath" exception as provided
   60.25 +by Oracle in the GPL Version 2 section of the License file that
   60.26 +accompanied this code. If applicable, add the following below the
   60.27 +License Header, with the fields enclosed by brackets [] replaced by
   60.28 +your own identifying information:
   60.29 +"Portions Copyrighted [year] [name of copyright owner]"
   60.30 +
   60.31 +Contributor(s):
   60.32 +
   60.33 +The Original Software is NetBeans. The Initial Developer of the Original
   60.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   60.35 +Microsystems, Inc. All Rights Reserved.
   60.36 +
   60.37 +If you wish your version of this file to be governed by only the CDDL
   60.38 +or only the GPL Version 2, indicate your decision by adding
   60.39 +"[Contributor] elects to include this software in this distribution
   60.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   60.41 +single choice of license, a recipient has the option to distribute
   60.42 +your version of this file under either the CDDL, the GPL Version 2 or
   60.43 +to extend the choice of license to its licensees as provided above.
   60.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   60.45 +Version 2 license, then the option applies only if the new code is
   60.46 +made subject to such option by the copyright holder.
   60.47 +-->
   60.48 +<!--
   60.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
   60.50  ***         EDIT ../build.xml INSTEAD         ***
   60.51  -->
    61.1 --- a/cmdline/tool/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
    61.2 +++ b/cmdline/tool/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
    61.3 @@ -1,3 +1,44 @@
    61.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    61.5 +#
    61.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    61.7 +#
    61.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    61.9 +# Other names may be trademarks of their respective owners.
   61.10 +#
   61.11 +# The contents of this file are subject to the terms of either the GNU
   61.12 +# General Public License Version 2 only ("GPL") or the Common
   61.13 +# Development and Distribution License("CDDL") (collectively, the
   61.14 +# "License"). You may not use this file except in compliance with the
   61.15 +# License. You can obtain a copy of the License at
   61.16 +# http://www.netbeans.org/cddl-gplv2.html
   61.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   61.18 +# specific language governing permissions and limitations under the
   61.19 +# License.  When distributing the software, include this License Header
   61.20 +# Notice in each file and include the License file at
   61.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   61.22 +# particular file as subject to the "Classpath" exception as provided
   61.23 +# by Oracle in the GPL Version 2 section of the License file that
   61.24 +# accompanied this code. If applicable, add the following below the
   61.25 +# License Header, with the fields enclosed by brackets [] replaced by
   61.26 +# your own identifying information:
   61.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   61.28 +#
   61.29 +# Contributor(s):
   61.30 +#
   61.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   61.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   61.33 +# Microsystems, Inc. All Rights Reserved.
   61.34 +#
   61.35 +# If you wish your version of this file to be governed by only the CDDL
   61.36 +# or only the GPL Version 2, indicate your decision by adding
   61.37 +# "[Contributor] elects to include this software in this distribution
   61.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   61.39 +# single choice of license, a recipient has the option to distribute
   61.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   61.41 +# to extend the choice of license to its licensees as provided above.
   61.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   61.43 +# Version 2 license, then the option applies only if the new code is
   61.44 +# made subject to such option by the copyright holder.
   61.45  build.xml.data.CRC32=e6358ca2
   61.46  build.xml.script.CRC32=4c2aebb3
   61.47  build.xml.stylesheet.CRC32=a56c6a5b@1.44
    62.1 --- a/cmdline/tool/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
    62.2 +++ b/cmdline/tool/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
    62.3 @@ -1,3 +1,44 @@
    62.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    62.5 +#
    62.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    62.7 +#
    62.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    62.9 +# Other names may be trademarks of their respective owners.
   62.10 +#
   62.11 +# The contents of this file are subject to the terms of either the GNU
   62.12 +# General Public License Version 2 only ("GPL") or the Common
   62.13 +# Development and Distribution License("CDDL") (collectively, the
   62.14 +# "License"). You may not use this file except in compliance with the
   62.15 +# License. You can obtain a copy of the License at
   62.16 +# http://www.netbeans.org/cddl-gplv2.html
   62.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   62.18 +# specific language governing permissions and limitations under the
   62.19 +# License.  When distributing the software, include this License Header
   62.20 +# Notice in each file and include the License file at
   62.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   62.22 +# particular file as subject to the "Classpath" exception as provided
   62.23 +# by Oracle in the GPL Version 2 section of the License file that
   62.24 +# accompanied this code. If applicable, add the following below the
   62.25 +# License Header, with the fields enclosed by brackets [] replaced by
   62.26 +# your own identifying information:
   62.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   62.28 +#
   62.29 +# Contributor(s):
   62.30 +#
   62.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   62.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   62.33 +# Microsystems, Inc. All Rights Reserved.
   62.34 +#
   62.35 +# If you wish your version of this file to be governed by only the CDDL
   62.36 +# or only the GPL Version 2, indicate your decision by adding
   62.37 +# "[Contributor] elects to include this software in this distribution
   62.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   62.39 +# single choice of license, a recipient has the option to distribute
   62.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   62.41 +# to extend the choice of license to its licensees as provided above.
   62.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   62.43 +# Version 2 license, then the option applies only if the new code is
   62.44 +# made subject to such option by the copyright holder.
   62.45  javac.source=1.7
   62.46  javac.compilerargs=-Xlint -Xlint:-serial
   62.47  cp.extra=../../lib/jopt-simple/jopt-simple-3.2.jar
    63.1 --- a/cmdline/tool/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
    63.2 +++ b/cmdline/tool/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
    63.3 @@ -1,4 +1,47 @@
    63.4  <?xml version="1.0" encoding="UTF-8"?>
    63.5 +<!--
    63.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    63.7 +
    63.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    63.9 +
   63.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   63.11 +Other names may be trademarks of their respective owners.
   63.12 +
   63.13 +The contents of this file are subject to the terms of either the GNU
   63.14 +General Public License Version 2 only ("GPL") or the Common
   63.15 +Development and Distribution License("CDDL") (collectively, the
   63.16 +"License"). You may not use this file except in compliance with the
   63.17 +License. You can obtain a copy of the License at
   63.18 +http://www.netbeans.org/cddl-gplv2.html
   63.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   63.20 +specific language governing permissions and limitations under the
   63.21 +License.  When distributing the software, include this License Header
   63.22 +Notice in each file and include the License file at
   63.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   63.24 +particular file as subject to the "Classpath" exception as provided
   63.25 +by Oracle in the GPL Version 2 section of the License file that
   63.26 +accompanied this code. If applicable, add the following below the
   63.27 +License Header, with the fields enclosed by brackets [] replaced by
   63.28 +your own identifying information:
   63.29 +"Portions Copyrighted [year] [name of copyright owner]"
   63.30 +
   63.31 +Contributor(s):
   63.32 +
   63.33 +The Original Software is NetBeans. The Initial Developer of the Original
   63.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   63.35 +Microsystems, Inc. All Rights Reserved.
   63.36 +
   63.37 +If you wish your version of this file to be governed by only the CDDL
   63.38 +or only the GPL Version 2, indicate your decision by adding
   63.39 +"[Contributor] elects to include this software in this distribution
   63.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   63.41 +single choice of license, a recipient has the option to distribute
   63.42 +your version of this file under either the CDDL, the GPL Version 2 or
   63.43 +to extend the choice of license to its licensees as provided above.
   63.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   63.45 +Version 2 license, then the option applies only if the new code is
   63.46 +made subject to such option by the copyright holder.
   63.47 +-->
   63.48  <project xmlns="http://www.netbeans.org/ns/project/1">
   63.49      <type>org.netbeans.modules.apisupport.project</type>
   63.50      <configuration>
    64.1 --- a/cmdline/tool/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
    64.2 +++ b/cmdline/tool/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
    64.3 @@ -1,1 +1,42 @@
    64.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    64.5 +#
    64.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    64.7 +#
    64.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    64.9 +# Other names may be trademarks of their respective owners.
   64.10 +#
   64.11 +# The contents of this file are subject to the terms of either the GNU
   64.12 +# General Public License Version 2 only ("GPL") or the Common
   64.13 +# Development and Distribution License("CDDL") (collectively, the
   64.14 +# "License"). You may not use this file except in compliance with the
   64.15 +# License. You can obtain a copy of the License at
   64.16 +# http://www.netbeans.org/cddl-gplv2.html
   64.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   64.18 +# specific language governing permissions and limitations under the
   64.19 +# License.  When distributing the software, include this License Header
   64.20 +# Notice in each file and include the License file at
   64.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   64.22 +# particular file as subject to the "Classpath" exception as provided
   64.23 +# by Oracle in the GPL Version 2 section of the License file that
   64.24 +# accompanied this code. If applicable, add the following below the
   64.25 +# License Header, with the fields enclosed by brackets [] replaced by
   64.26 +# your own identifying information:
   64.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   64.28 +#
   64.29 +# Contributor(s):
   64.30 +#
   64.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   64.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   64.33 +# Microsystems, Inc. All Rights Reserved.
   64.34 +#
   64.35 +# If you wish your version of this file to be governed by only the CDDL
   64.36 +# or only the GPL Version 2, indicate your decision by adding
   64.37 +# "[Contributor] elects to include this software in this distribution
   64.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   64.39 +# single choice of license, a recipient has the option to distribute
   64.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   64.41 +# to extend the choice of license to its licensees as provided above.
   64.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   64.43 +# Version 2 license, then the option applies only if the new code is
   64.44 +# made subject to such option by the copyright holder.
   64.45  suite.dir=${basedir}/..
    65.1 --- a/cmdline/tool/scripts/jackpot	Mon Dec 19 11:37:36 2016 +0100
    65.2 +++ b/cmdline/tool/scripts/jackpot	Mon Feb 27 22:40:44 2017 +0100
    65.3 @@ -1,4 +1,47 @@
    65.4  #!/bin/bash
    65.5 +
    65.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    65.7 +#
    65.8 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    65.9 +#
   65.10 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   65.11 +# Other names may be trademarks of their respective owners.
   65.12 +#
   65.13 +# The contents of this file are subject to the terms of either the GNU
   65.14 +# General Public License Version 2 only ("GPL") or the Common
   65.15 +# Development and Distribution License("CDDL") (collectively, the
   65.16 +# "License"). You may not use this file except in compliance with the
   65.17 +# License. You can obtain a copy of the License at
   65.18 +# http://www.netbeans.org/cddl-gplv2.html
   65.19 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   65.20 +# specific language governing permissions and limitations under the
   65.21 +# License.  When distributing the software, include this License Header
   65.22 +# Notice in each file and include the License file at
   65.23 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   65.24 +# particular file as subject to the "Classpath" exception as provided
   65.25 +# by Oracle in the GPL Version 2 section of the License file that
   65.26 +# accompanied this code. If applicable, add the following below the
   65.27 +# License Header, with the fields enclosed by brackets [] replaced by
   65.28 +# your own identifying information:
   65.29 +# "Portions Copyrighted [year] [name of copyright owner]"
   65.30 +#
   65.31 +# Contributor(s):
   65.32 +#
   65.33 +# The Original Software is NetBeans. The Initial Developer of the Original
   65.34 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   65.35 +# Microsystems, Inc. All Rights Reserved.
   65.36 +#
   65.37 +# If you wish your version of this file to be governed by only the CDDL
   65.38 +# or only the GPL Version 2, indicate your decision by adding
   65.39 +# "[Contributor] elects to include this software in this distribution
   65.40 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   65.41 +# single choice of license, a recipient has the option to distribute
   65.42 +# your version of this file under either the CDDL, the GPL Version 2 or
   65.43 +# to extend the choice of license to its licensees as provided above.
   65.44 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   65.45 +# Version 2 license, then the option applies only if the new code is
   65.46 +# made subject to such option by the copyright holder.
   65.47 +
   65.48  JACKPOT_JAR=`readlink -f "$0"`
   65.49  JACKPOT_JAR=`dirname "$JACKPOT_JAR"`/jackpot.jar
   65.50  java -classpath `dirname "$JACKPOT_JAR"`/jackpot.jar org.netbeans.modules.jackpot30.cmdline.Main "$@"
    66.1 --- a/cmdline/tool/scripts/jackpot.bat	Mon Dec 19 11:37:36 2016 +0100
    66.2 +++ b/cmdline/tool/scripts/jackpot.bat	Mon Feb 27 22:40:44 2017 +0100
    66.3 @@ -1,3 +1,46 @@
    66.4 +@echo off
    66.5 +REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    66.6 +REM
    66.7 +REM Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    66.8 +REM
    66.9 +REM Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   66.10 +REM Other names may be trademarks of their respective owners.
   66.11 +REM
   66.12 +REM The contents of this file are subject to the terms of either the GNU
   66.13 +REM General Public License Version 2 only ("GPL") or the Common
   66.14 +REM Development and Distribution License("CDDL") (collectively, the
   66.15 +REM "License"). You may not use this file except in compliance with the
   66.16 +REM License. You can obtain a copy of the License at
   66.17 +REM http://www.netbeans.org/cddl-gplv2.html
   66.18 +REM or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   66.19 +REM specific language governing permissions and limitations under the
   66.20 +REM License.  When distributing the software, include this License Header
   66.21 +REM Notice in each file and include the License file at
   66.22 +REM nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   66.23 +REM particular file as subject to the "Classpath" exception as provided
   66.24 +REM by Oracle in the GPL Version 2 section of the License file that
   66.25 +REM accompanied this code. If applicable, add the following below the
   66.26 +REM License Header, with the fields enclosed by brackets [] replaced by
   66.27 +REM your own identifying information:
   66.28 +REM "Portions Copyrighted [year] [name of copyright owner]"
   66.29 +REM
   66.30 +REM Contributor(s):
   66.31 +REM
   66.32 +REM The Original Software is NetBeans. The Initial Developer of the Original
   66.33 +REM Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   66.34 +REM Microsystems, Inc. All Rights Reserved.
   66.35 +REM
   66.36 +REM If you wish your version of this file to be governed by only the CDDL
   66.37 +REM or only the GPL Version 2, indicate your decision by adding
   66.38 +REM "[Contributor] elects to include this software in this distribution
   66.39 +REM under the [CDDL or GPL Version 2] license." If you do not indicate a
   66.40 +REM single choice of license, a recipient has the option to distribute
   66.41 +REM your version of this file under either the CDDL, the GPL Version 2 or
   66.42 +REM to extend the choice of license to its licensees as provided above.
   66.43 +REM However, if you add GPL Version 2 code and therefore, elected the GPL
   66.44 +REM Version 2 license, then the option applies only if the new code is
   66.45 +REM made subject to such option by the copyright holder.
   66.46 +
   66.47  @echo on
   66.48  set dirname=%0%\..
   66.49  java -classpath "%dirname:"=%\jackpot.jar" org.netbeans.modules.jackpot30.cmdline.Main %*
    67.1 --- a/cmdline/tool/src/org/netbeans/modules/jackpot30/cmdline/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
    67.2 +++ b/cmdline/tool/src/org/netbeans/modules/jackpot30/cmdline/Bundle.properties	Mon Feb 27 22:40:44 2017 +0100
    67.3 @@ -1,1 +1,42 @@
    67.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    67.5 +#
    67.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    67.7 +#
    67.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    67.9 +# Other names may be trademarks of their respective owners.
   67.10 +#
   67.11 +# The contents of this file are subject to the terms of either the GNU
   67.12 +# General Public License Version 2 only ("GPL") or the Common
   67.13 +# Development and Distribution License("CDDL") (collectively, the
   67.14 +# "License"). You may not use this file except in compliance with the
   67.15 +# License. You can obtain a copy of the License at
   67.16 +# http://www.netbeans.org/cddl-gplv2.html
   67.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   67.18 +# specific language governing permissions and limitations under the
   67.19 +# License.  When distributing the software, include this License Header
   67.20 +# Notice in each file and include the License file at
   67.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   67.22 +# particular file as subject to the "Classpath" exception as provided
   67.23 +# by Oracle in the GPL Version 2 section of the License file that
   67.24 +# accompanied this code. If applicable, add the following below the
   67.25 +# License Header, with the fields enclosed by brackets [] replaced by
   67.26 +# your own identifying information:
   67.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   67.28 +#
   67.29 +# Contributor(s):
   67.30 +#
   67.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   67.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   67.33 +# Microsystems, Inc. All Rights Reserved.
   67.34 +#
   67.35 +# If you wish your version of this file to be governed by only the CDDL
   67.36 +# or only the GPL Version 2, indicate your decision by adding
   67.37 +# "[Contributor] elects to include this software in this distribution
   67.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   67.39 +# single choice of license, a recipient has the option to distribute
   67.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   67.41 +# to extend the choice of license to its licensees as provided above.
   67.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   67.43 +# Version 2 license, then the option applies only if the new code is
   67.44 +# made subject to such option by the copyright holder.
   67.45  OpenIDE-Module-Name=Jackpot 3.0 Command Line Tool
    68.1 Binary file cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/DoRunTests.classx has changed
    69.1 --- a/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/DoRunTests.javax	Mon Dec 19 11:37:36 2016 +0100
    69.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    69.3 @@ -1,16 +0,0 @@
    69.4 -package org.netbeans.modules.jackpot30.cmdline.testtool;
    69.5 -
    69.6 -import junit.framework.TestSuite;
    69.7 -import org.netbeans.modules.java.hints.declarative.test.api.DeclarativeHintsTestBase;
    69.8 -
    69.9 -/**
   69.10 - *
   69.11 - * @author lahvac
   69.12 - */
   69.13 -public class DoRunTests extends DeclarativeHintsTestBase {
   69.14 -
   69.15 -    public static TestSuite suite() {
   69.16 -        return suite(DoRunTests.class);
   69.17 -    }
   69.18 -
   69.19 -}
    70.1 --- a/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/MainTest.java	Mon Dec 19 11:37:36 2016 +0100
    70.2 +++ b/cmdline/tool/test/unit/src/org/netbeans/modules/jackpot30/cmdline/MainTest.java	Mon Feb 27 22:40:44 2017 +0100
    70.3 @@ -42,8 +42,11 @@
    70.4  import java.io.ByteArrayOutputStream;
    70.5  import java.io.File;
    70.6  import java.io.FileOutputStream;
    70.7 +import java.io.IOException;
    70.8  import java.io.InputStream;
    70.9  import java.io.PrintStream;
   70.10 +import java.net.URI;
   70.11 +import java.net.URISyntaxException;
   70.12  import java.net.URL;
   70.13  import java.net.URLClassLoader;
   70.14  import java.util.Arrays;
   70.15 @@ -52,6 +55,8 @@
   70.16  import java.util.List;
   70.17  import java.util.regex.Matcher;
   70.18  import java.util.regex.Pattern;
   70.19 +import javax.tools.SimpleJavaFileObject;
   70.20 +import javax.tools.ToolProvider;
   70.21  import org.junit.runner.Result;
   70.22  import org.netbeans.api.java.source.TestUtilities;
   70.23  import org.netbeans.junit.NbTestCase;
   70.24 @@ -633,6 +638,19 @@
   70.25      }
   70.26  
   70.27      //verify that the DeclarativeHintsTestBase works:
   70.28 +    private static final String CODE_RUN_DECLARATIVE =
   70.29 +            "package org.netbeans.modules.jackpot30.cmdline.testtool;\n" +
   70.30 +            "\n" +
   70.31 +            "import junit.framework.TestSuite;\n" +
   70.32 +            "import org.netbeans.modules.java.hints.declarative.test.api.DeclarativeHintsTestBase;\n" +
   70.33 +            "\n" +
   70.34 +            "public class DoRunTests extends DeclarativeHintsTestBase {\n" +
   70.35 +            "\n" +
   70.36 +            "    public static TestSuite suite() {\n" +
   70.37 +            "        return suite(DoRunTests.class);\n" +
   70.38 +            "    }\n" +
   70.39 +            "\n" +
   70.40 +            "}\n";
   70.41      public void testRunTest() throws Exception {
   70.42          clearWorkDir();
   70.43  
   70.44 @@ -664,22 +682,29 @@
   70.45                        "}}\n";
   70.46          TestUtilities.copyStringToFile(new File(classes, "h.test"), test);
   70.47  
   70.48 -        File runner = new File(classes, "org/netbeans/modules/jackpot30/cmdline/testtool/DoRunTests.class");
   70.49 +        List<String> options = Arrays.asList("-d", classes.getAbsolutePath());
   70.50 +        List<SourceFO> files = Arrays.asList(new SourceFO("DoRunTests.java", CODE_RUN_DECLARATIVE));
   70.51  
   70.52 -        assertTrue(runner.getParentFile().mkdirs());
   70.53 -
   70.54 -        FileOutputStream os = new FileOutputStream(runner);
   70.55 -        InputStream is = MainTest.class.getResourceAsStream("DoRunTests.classx");
   70.56 -
   70.57 -        assertNotNull(is);
   70.58 -
   70.59 -        FileUtil.copy(is, os);
   70.60 -        os.close ();
   70.61 -        is.close();
   70.62 +        assertTrue(ToolProvider.getSystemJavaCompiler().getTask(null, null, null, options, null, files).call());
   70.63  
   70.64          runAndTest(classes);
   70.65      }
   70.66  
   70.67 +    private static final class SourceFO extends SimpleJavaFileObject {
   70.68 +
   70.69 +        private final String code;
   70.70 +        private SourceFO(String name, String code) throws URISyntaxException {
   70.71 +            super(new URI("mem:///" + name), Kind.SOURCE);
   70.72 +            this.code = code;
   70.73 +        }
   70.74 +
   70.75 +        @Override
   70.76 +        public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException {
   70.77 +            return code;
   70.78 +        }
   70.79 +
   70.80 +    }
   70.81 +
   70.82      protected void runAndTest(File classes) throws Exception {
   70.83          ClassLoader cl = new URLClassLoader(new URL[] {classes.toURI().toURL()}, MainTest.class.getClassLoader());
   70.84          Class<?> doRunTests = Class.forName("org.netbeans.modules.jackpot30.cmdline.testtool.DoRunTests", true, cl);
    71.1 --- a/duplicates/build.sh	Mon Dec 19 11:37:36 2016 +0100
    71.2 +++ b/duplicates/build.sh	Mon Feb 27 22:40:44 2017 +0100
    71.3 @@ -1,4 +1,47 @@
    71.4  #!/bin/bash
    71.5 +
    71.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    71.7 +#
    71.8 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    71.9 +#
   71.10 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   71.11 +# Other names may be trademarks of their respective owners.
   71.12 +#
   71.13 +# The contents of this file are subject to the terms of either the GNU
   71.14 +# General Public License Version 2 only ("GPL") or the Common
   71.15 +# Development and Distribution License("CDDL") (collectively, the
   71.16 +# "License"). You may not use this file except in compliance with the
   71.17 +# License. You can obtain a copy of the License at
   71.18 +# http://www.netbeans.org/cddl-gplv2.html
   71.19 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   71.20 +# specific language governing permissions and limitations under the
   71.21 +# License.  When distributing the software, include this License Header
   71.22 +# Notice in each file and include the License file at
   71.23 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   71.24 +# particular file as subject to the "Classpath" exception as provided
   71.25 +# by Oracle in the GPL Version 2 section of the License file that
   71.26 +# accompanied this code. If applicable, add the following below the
   71.27 +# License Header, with the fields enclosed by brackets [] replaced by
   71.28 +# your own identifying information:
   71.29 +# "Portions Copyrighted [year] [name of copyright owner]"
   71.30 +#
   71.31 +# Contributor(s):
   71.32 +#
   71.33 +# The Original Software is NetBeans. The Initial Developer of the Original
   71.34 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   71.35 +# Microsystems, Inc. All Rights Reserved.
   71.36 +#
   71.37 +# If you wish your version of this file to be governed by only the CDDL
   71.38 +# or only the GPL Version 2, indicate your decision by adding
   71.39 +# "[Contributor] elects to include this software in this distribution
   71.40 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   71.41 +# single choice of license, a recipient has the option to distribute
   71.42 +# your version of this file under either the CDDL, the GPL Version 2 or
   71.43 +# to extend the choice of license to its licensees as provided above.
   71.44 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   71.45 +# Version 2 license, then the option applies only if the new code is
   71.46 +# made subject to such option by the copyright holder.
   71.47 +
   71.48  (cd ide; ant "$@" clean && ant "$@" nbms && ant "$@" test) || exit 1
   71.49  (cd server/indexer; ant "$@" clean && ant "$@" build && cp -r build/cluster build/indexer; cp -r ../../ide/build/cluster/* build/indexer/; cp -r ../../../remoting/ide/build/cluster/* build/indexer/; cd build; zip -r ../../../../remoting/build/duplicates-indexer.zip indexer/) || exit 1
   71.50  (cd server/web/duplicates.web.api; ant "$@" clean && ant "$@") || exit 1
    72.1 --- a/duplicates/ide/build.xml	Mon Dec 19 11:37:36 2016 +0100
    72.2 +++ b/duplicates/ide/build.xml	Mon Feb 27 22:40:44 2017 +0100
    72.3 @@ -1,4 +1,47 @@
    72.4  <?xml version="1.0" encoding="UTF-8"?>
    72.5 +<!--
    72.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    72.7 +
    72.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    72.9 +
   72.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   72.11 +Other names may be trademarks of their respective owners.
   72.12 +
   72.13 +The contents of this file are subject to the terms of either the GNU
   72.14 +General Public License Version 2 only ("GPL") or the Common
   72.15 +Development and Distribution License("CDDL") (collectively, the
   72.16 +"License"). You may not use this file except in compliance with the
   72.17 +License. You can obtain a copy of the License at
   72.18 +http://www.netbeans.org/cddl-gplv2.html
   72.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   72.20 +specific language governing permissions and limitations under the
   72.21 +License.  When distributing the software, include this License Header
   72.22 +Notice in each file and include the License file at
   72.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   72.24 +particular file as subject to the "Classpath" exception as provided
   72.25 +by Oracle in the GPL Version 2 section of the License file that
   72.26 +accompanied this code. If applicable, add the following below the
   72.27 +License Header, with the fields enclosed by brackets [] replaced by
   72.28 +your own identifying information:
   72.29 +"Portions Copyrighted [year] [name of copyright owner]"
   72.30 +
   72.31 +Contributor(s):
   72.32 +
   72.33 +The Original Software is NetBeans. The Initial Developer of the Original
   72.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   72.35 +Microsystems, Inc. All Rights Reserved.
   72.36 +
   72.37 +If you wish your version of this file to be governed by only the CDDL
   72.38 +or only the GPL Version 2, indicate your decision by adding
   72.39 +"[Contributor] elects to include this software in this distribution
   72.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   72.41 +single choice of license, a recipient has the option to distribute
   72.42 +your version of this file under either the CDDL, the GPL Version 2 or
   72.43 +to extend the choice of license to its licensees as provided above.
   72.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   72.45 +Version 2 license, then the option applies only if the new code is
   72.46 +made subject to such option by the copyright holder.
   72.47 +-->
   72.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
   72.49  <!-- for some information on what you could do (e.g. targets to override). -->
   72.50  <!-- If you delete this file and reopen the project it will be recreated. -->
    73.1 --- a/duplicates/ide/impl/build.xml	Mon Dec 19 11:37:36 2016 +0100
    73.2 +++ b/duplicates/ide/impl/build.xml	Mon Feb 27 22:40:44 2017 +0100
    73.3 @@ -1,4 +1,47 @@
    73.4  <?xml version="1.0" encoding="UTF-8"?>
    73.5 +<!--
    73.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    73.7 +
    73.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    73.9 +
   73.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   73.11 +Other names may be trademarks of their respective owners.
   73.12 +
   73.13 +The contents of this file are subject to the terms of either the GNU
   73.14 +General Public License Version 2 only ("GPL") or the Common
   73.15 +Development and Distribution License("CDDL") (collectively, the
   73.16 +"License"). You may not use this file except in compliance with the
   73.17 +License. You can obtain a copy of the License at
   73.18 +http://www.netbeans.org/cddl-gplv2.html
   73.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   73.20 +specific language governing permissions and limitations under the
   73.21 +License.  When distributing the software, include this License Header
   73.22 +Notice in each file and include the License file at
   73.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   73.24 +particular file as subject to the "Classpath" exception as provided
   73.25 +by Oracle in the GPL Version 2 section of the License file that
   73.26 +accompanied this code. If applicable, add the following below the
   73.27 +License Header, with the fields enclosed by brackets [] replaced by
   73.28 +your own identifying information:
   73.29 +"Portions Copyrighted [year] [name of copyright owner]"
   73.30 +
   73.31 +Contributor(s):
   73.32 +
   73.33 +The Original Software is NetBeans. The Initial Developer of the Original
   73.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   73.35 +Microsystems, Inc. All Rights Reserved.
   73.36 +
   73.37 +If you wish your version of this file to be governed by only the CDDL
   73.38 +or only the GPL Version 2, indicate your decision by adding
   73.39 +"[Contributor] elects to include this software in this distribution
   73.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   73.41 +single choice of license, a recipient has the option to distribute
   73.42 +your version of this file under either the CDDL, the GPL Version 2 or
   73.43 +to extend the choice of license to its licensees as provided above.
   73.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   73.45 +Version 2 license, then the option applies only if the new code is
   73.46 +made subject to such option by the copyright holder.
   73.47 +-->
   73.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
   73.49  <!-- for some information on what you could do (e.g. targets to override). -->
   73.50  <!-- If you delete this file and reopen the project it will be recreated. -->
    74.1 --- a/duplicates/ide/impl/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
    74.2 +++ b/duplicates/ide/impl/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
    74.3 @@ -1,5 +1,48 @@
    74.4  <?xml version="1.0" encoding="UTF-8"?>
    74.5  <!--
    74.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    74.7 +
    74.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    74.9 +
   74.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   74.11 +Other names may be trademarks of their respective owners.
   74.12 +
   74.13 +The contents of this file are subject to the terms of either the GNU
   74.14 +General Public License Version 2 only ("GPL") or the Common
   74.15 +Development and Distribution License("CDDL") (collectively, the
   74.16 +"License"). You may not use this file except in compliance with the
   74.17 +License. You can obtain a copy of the License at
   74.18 +http://www.netbeans.org/cddl-gplv2.html
   74.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   74.20 +specific language governing permissions and limitations under the
   74.21 +License.  When distributing the software, include this License Header
   74.22 +Notice in each file and include the License file at
   74.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   74.24 +particular file as subject to the "Classpath" exception as provided
   74.25 +by Oracle in the GPL Version 2 section of the License file that
   74.26 +accompanied this code. If applicable, add the following below the
   74.27 +License Header, with the fields enclosed by brackets [] replaced by
   74.28 +your own identifying information:
   74.29 +"Portions Copyrighted [year] [name of copyright owner]"
   74.30 +
   74.31 +Contributor(s):
   74.32 +
   74.33 +The Original Software is NetBeans. The Initial Developer of the Original
   74.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   74.35 +Microsystems, Inc. All Rights Reserved.
   74.36 +
   74.37 +If you wish your version of this file to be governed by only the CDDL
   74.38 +or only the GPL Version 2, indicate your decision by adding
   74.39 +"[Contributor] elects to include this software in this distribution
   74.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   74.41 +single choice of license, a recipient has the option to distribute
   74.42 +your version of this file under either the CDDL, the GPL Version 2 or
   74.43 +to extend the choice of license to its licensees as provided above.
   74.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   74.45 +Version 2 license, then the option applies only if the new code is
   74.46 +made subject to such option by the copyright holder.
   74.47 +-->
   74.48 +<!--
   74.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
   74.50  ***         EDIT ../build.xml INSTEAD         ***
   74.51  -->
    75.1 --- a/duplicates/ide/impl/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
    75.2 +++ b/duplicates/ide/impl/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
    75.3 @@ -1,3 +1,44 @@
    75.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    75.5 +#
    75.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    75.7 +#
    75.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    75.9 +# Other names may be trademarks of their respective owners.
   75.10 +#
   75.11 +# The contents of this file are subject to the terms of either the GNU
   75.12 +# General Public License Version 2 only ("GPL") or the Common
   75.13 +# Development and Distribution License("CDDL") (collectively, the
   75.14 +# "License"). You may not use this file except in compliance with the
   75.15 +# License. You can obtain a copy of the License at
   75.16 +# http://www.netbeans.org/cddl-gplv2.html
   75.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   75.18 +# specific language governing permissions and limitations under the
   75.19 +# License.  When distributing the software, include this License Header
   75.20 +# Notice in each file and include the License file at
   75.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   75.22 +# particular file as subject to the "Classpath" exception as provided
   75.23 +# by Oracle in the GPL Version 2 section of the License file that
   75.24 +# accompanied this code. If applicable, add the following below the
   75.25 +# License Header, with the fields enclosed by brackets [] replaced by
   75.26 +# your own identifying information:
   75.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   75.28 +#
   75.29 +# Contributor(s):
   75.30 +#
   75.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   75.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   75.33 +# Microsystems, Inc. All Rights Reserved.
   75.34 +#
   75.35 +# If you wish your version of this file to be governed by only the CDDL
   75.36 +# or only the GPL Version 2, indicate your decision by adding
   75.37 +# "[Contributor] elects to include this software in this distribution
   75.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   75.39 +# single choice of license, a recipient has the option to distribute
   75.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   75.41 +# to extend the choice of license to its licensees as provided above.
   75.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   75.43 +# Version 2 license, then the option applies only if the new code is
   75.44 +# made subject to such option by the copyright holder.
   75.45  build.xml.data.CRC32=f3f3f30d
   75.46  build.xml.script.CRC32=b45f306d
   75.47  build.xml.stylesheet.CRC32=a56c6a5b@2.49
    76.1 --- a/duplicates/ide/impl/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
    76.2 +++ b/duplicates/ide/impl/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
    76.3 @@ -1,2 +1,43 @@
    76.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    76.5 +#
    76.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    76.7 +#
    76.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    76.9 +# Other names may be trademarks of their respective owners.
   76.10 +#
   76.11 +# The contents of this file are subject to the terms of either the GNU
   76.12 +# General Public License Version 2 only ("GPL") or the Common
   76.13 +# Development and Distribution License("CDDL") (collectively, the
   76.14 +# "License"). You may not use this file except in compliance with the
   76.15 +# License. You can obtain a copy of the License at
   76.16 +# http://www.netbeans.org/cddl-gplv2.html
   76.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   76.18 +# specific language governing permissions and limitations under the
   76.19 +# License.  When distributing the software, include this License Header
   76.20 +# Notice in each file and include the License file at
   76.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   76.22 +# particular file as subject to the "Classpath" exception as provided
   76.23 +# by Oracle in the GPL Version 2 section of the License file that
   76.24 +# accompanied this code. If applicable, add the following below the
   76.25 +# License Header, with the fields enclosed by brackets [] replaced by
   76.26 +# your own identifying information:
   76.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   76.28 +#
   76.29 +# Contributor(s):
   76.30 +#
   76.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   76.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   76.33 +# Microsystems, Inc. All Rights Reserved.
   76.34 +#
   76.35 +# If you wish your version of this file to be governed by only the CDDL
   76.36 +# or only the GPL Version 2, indicate your decision by adding
   76.37 +# "[Contributor] elects to include this software in this distribution
   76.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   76.39 +# single choice of license, a recipient has the option to distribute
   76.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   76.41 +# to extend the choice of license to its licensees as provided above.
   76.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   76.43 +# Version 2 license, then the option applies only if the new code is
   76.44 +# made subject to such option by the copyright holder.
   76.45  javac.source=1.6
   76.46  javac.compilerargs=-Xlint -Xlint:-serial
    77.1 --- a/duplicates/ide/impl/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
    77.2 +++ b/duplicates/ide/impl/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
    77.3 @@ -1,4 +1,47 @@
    77.4  <?xml version="1.0" encoding="UTF-8"?>
    77.5 +<!--
    77.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    77.7 +
    77.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    77.9 +
   77.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   77.11 +Other names may be trademarks of their respective owners.
   77.12 +
   77.13 +The contents of this file are subject to the terms of either the GNU
   77.14 +General Public License Version 2 only ("GPL") or the Common
   77.15 +Development and Distribution License("CDDL") (collectively, the
   77.16 +"License"). You may not use this file except in compliance with the
   77.17 +License. You can obtain a copy of the License at
   77.18 +http://www.netbeans.org/cddl-gplv2.html
   77.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   77.20 +specific language governing permissions and limitations under the
   77.21 +License.  When distributing the software, include this License Header
   77.22 +Notice in each file and include the License file at
   77.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   77.24 +particular file as subject to the "Classpath" exception as provided
   77.25 +by Oracle in the GPL Version 2 section of the License file that
   77.26 +accompanied this code. If applicable, add the following below the
   77.27 +License Header, with the fields enclosed by brackets [] replaced by
   77.28 +your own identifying information:
   77.29 +"Portions Copyrighted [year] [name of copyright owner]"
   77.30 +
   77.31 +Contributor(s):
   77.32 +
   77.33 +The Original Software is NetBeans. The Initial Developer of the Original
   77.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   77.35 +Microsystems, Inc. All Rights Reserved.
   77.36 +
   77.37 +If you wish your version of this file to be governed by only the CDDL
   77.38 +or only the GPL Version 2, indicate your decision by adding
   77.39 +"[Contributor] elects to include this software in this distribution
   77.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   77.41 +single choice of license, a recipient has the option to distribute
   77.42 +your version of this file under either the CDDL, the GPL Version 2 or
   77.43 +to extend the choice of license to its licensees as provided above.
   77.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   77.45 +Version 2 license, then the option applies only if the new code is
   77.46 +made subject to such option by the copyright holder.
   77.47 +-->
   77.48  <project xmlns="http://www.netbeans.org/ns/project/1">
   77.49      <type>org.netbeans.modules.apisupport.project</type>
   77.50      <configuration>
    78.1 --- a/duplicates/ide/impl/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
    78.2 +++ b/duplicates/ide/impl/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
    78.3 @@ -1,1 +1,42 @@
    78.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    78.5 +#
    78.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    78.7 +#
    78.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    78.9 +# Other names may be trademarks of their respective owners.
   78.10 +#
   78.11 +# The contents of this file are subject to the terms of either the GNU
   78.12 +# General Public License Version 2 only ("GPL") or the Common
   78.13 +# Development and Distribution License("CDDL") (collectively, the
   78.14 +# "License"). You may not use this file except in compliance with the
   78.15 +# License. You can obtain a copy of the License at
   78.16 +# http://www.netbeans.org/cddl-gplv2.html
   78.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   78.18 +# specific language governing permissions and limitations under the
   78.19 +# License.  When distributing the software, include this License Header
   78.20 +# Notice in each file and include the License file at
   78.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   78.22 +# particular file as subject to the "Classpath" exception as provided
   78.23 +# by Oracle in the GPL Version 2 section of the License file that
   78.24 +# accompanied this code. If applicable, add the following below the
   78.25 +# License Header, with the fields enclosed by brackets [] replaced by
   78.26 +# your own identifying information:
   78.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   78.28 +#
   78.29 +# Contributor(s):
   78.30 +#
   78.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   78.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   78.33 +# Microsystems, Inc. All Rights Reserved.
   78.34 +#
   78.35 +# If you wish your version of this file to be governed by only the CDDL
   78.36 +# or only the GPL Version 2, indicate your decision by adding
   78.37 +# "[Contributor] elects to include this software in this distribution
   78.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   78.39 +# single choice of license, a recipient has the option to distribute
   78.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   78.41 +# to extend the choice of license to its licensees as provided above.
   78.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   78.43 +# Version 2 license, then the option applies only if the new code is
   78.44 +# made subject to such option by the copyright holder.
   78.45  suite.dir=${basedir}/..
    79.1 --- a/duplicates/ide/impl/src/org/netbeans/modules/jackpot30/duplicates/impl/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
    79.2 +++ b/duplicates/ide/impl/src/org/netbeans/modules/jackpot30/duplicates/impl/Bundle.properties	Mon Feb 27 22:40:44 2017 +0100
    79.3 @@ -1,1 +1,42 @@
    79.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    79.5 +#
    79.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    79.7 +#
    79.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    79.9 +# Other names may be trademarks of their respective owners.
   79.10 +#
   79.11 +# The contents of this file are subject to the terms of either the GNU
   79.12 +# General Public License Version 2 only ("GPL") or the Common
   79.13 +# Development and Distribution License("CDDL") (collectively, the
   79.14 +# "License"). You may not use this file except in compliance with the
   79.15 +# License. You can obtain a copy of the License at
   79.16 +# http://www.netbeans.org/cddl-gplv2.html
   79.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   79.18 +# specific language governing permissions and limitations under the
   79.19 +# License.  When distributing the software, include this License Header
   79.20 +# Notice in each file and include the License file at
   79.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   79.22 +# particular file as subject to the "Classpath" exception as provided
   79.23 +# by Oracle in the GPL Version 2 section of the License file that
   79.24 +# accompanied this code. If applicable, add the following below the
   79.25 +# License Header, with the fields enclosed by brackets [] replaced by
   79.26 +# your own identifying information:
   79.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   79.28 +#
   79.29 +# Contributor(s):
   79.30 +#
   79.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   79.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   79.33 +# Microsystems, Inc. All Rights Reserved.
   79.34 +#
   79.35 +# If you wish your version of this file to be governed by only the CDDL
   79.36 +# or only the GPL Version 2, indicate your decision by adding
   79.37 +# "[Contributor] elects to include this software in this distribution
   79.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   79.39 +# single choice of license, a recipient has the option to distribute
   79.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   79.41 +# to extend the choice of license to its licensees as provided above.
   79.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   79.43 +# Version 2 license, then the option applies only if the new code is
   79.44 +# made subject to such option by the copyright holder.
   79.45  OpenIDE-Module-Name=Jackpot 3.0 Duplicates Impl
    80.1 --- a/duplicates/ide/impl/src/org/netbeans/modules/jackpot30/impl/duplicates/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
    80.2 +++ b/duplicates/ide/impl/src/org/netbeans/modules/jackpot30/impl/duplicates/Bundle.properties	Mon Feb 27 22:40:44 2017 +0100
    80.3 @@ -1,3 +1,44 @@
    80.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    80.5 +#
    80.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    80.7 +#
    80.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    80.9 +# Other names may be trademarks of their respective owners.
   80.10 +#
   80.11 +# The contents of this file are subject to the terms of either the GNU
   80.12 +# General Public License Version 2 only ("GPL") or the Common
   80.13 +# Development and Distribution License("CDDL") (collectively, the
   80.14 +# "License"). You may not use this file except in compliance with the
   80.15 +# License. You can obtain a copy of the License at
   80.16 +# http://www.netbeans.org/cddl-gplv2.html
   80.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   80.18 +# specific language governing permissions and limitations under the
   80.19 +# License.  When distributing the software, include this License Header
   80.20 +# Notice in each file and include the License file at
   80.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   80.22 +# particular file as subject to the "Classpath" exception as provided
   80.23 +# by Oracle in the GPL Version 2 section of the License file that
   80.24 +# accompanied this code. If applicable, add the following below the
   80.25 +# License Header, with the fields enclosed by brackets [] replaced by
   80.26 +# your own identifying information:
   80.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   80.28 +#
   80.29 +# Contributor(s):
   80.30 +#
   80.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   80.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   80.33 +# Microsystems, Inc. All Rights Reserved.
   80.34 +#
   80.35 +# If you wish your version of this file to be governed by only the CDDL
   80.36 +# or only the GPL Version 2, indicate your decision by adding
   80.37 +# "[Contributor] elects to include this software in this distribution
   80.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   80.39 +# single choice of license, a recipient has the option to distribute
   80.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   80.41 +# to extend the choice of license to its licensees as provided above.
   80.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   80.43 +# Version 2 license, then the option applies only if the new code is
   80.44 +# made subject to such option by the copyright holder.
   80.45  CTL_GlobalFindDuplicates=Global Find Duplicates
   80.46  DuplicatesListPanel.findMore.text=<html><body><a href="">Look for More</a>
   80.47  DuplicatesListPanel.progressLabel.text=
    81.1 --- a/duplicates/ide/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
    81.2 +++ b/duplicates/ide/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
    81.3 @@ -1,5 +1,48 @@
    81.4  <?xml version="1.0" encoding="UTF-8"?>
    81.5  <!--
    81.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    81.7 +
    81.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    81.9 +
   81.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   81.11 +Other names may be trademarks of their respective owners.
   81.12 +
   81.13 +The contents of this file are subject to the terms of either the GNU
   81.14 +General Public License Version 2 only ("GPL") or the Common
   81.15 +Development and Distribution License("CDDL") (collectively, the
   81.16 +"License"). You may not use this file except in compliance with the
   81.17 +License. You can obtain a copy of the License at
   81.18 +http://www.netbeans.org/cddl-gplv2.html
   81.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   81.20 +specific language governing permissions and limitations under the
   81.21 +License.  When distributing the software, include this License Header
   81.22 +Notice in each file and include the License file at
   81.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   81.24 +particular file as subject to the "Classpath" exception as provided
   81.25 +by Oracle in the GPL Version 2 section of the License file that
   81.26 +accompanied this code. If applicable, add the following below the
   81.27 +License Header, with the fields enclosed by brackets [] replaced by
   81.28 +your own identifying information:
   81.29 +"Portions Copyrighted [year] [name of copyright owner]"
   81.30 +
   81.31 +Contributor(s):
   81.32 +
   81.33 +The Original Software is NetBeans. The Initial Developer of the Original
   81.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   81.35 +Microsystems, Inc. All Rights Reserved.
   81.36 +
   81.37 +If you wish your version of this file to be governed by only the CDDL
   81.38 +or only the GPL Version 2, indicate your decision by adding
   81.39 +"[Contributor] elects to include this software in this distribution
   81.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   81.41 +single choice of license, a recipient has the option to distribute
   81.42 +your version of this file under either the CDDL, the GPL Version 2 or
   81.43 +to extend the choice of license to its licensees as provided above.
   81.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   81.45 +Version 2 license, then the option applies only if the new code is
   81.46 +made subject to such option by the copyright holder.
   81.47 +-->
   81.48 +<!--
   81.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
   81.50  ***         EDIT ../build.xml INSTEAD         ***
   81.51  -->
    82.1 --- a/duplicates/ide/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
    82.2 +++ b/duplicates/ide/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
    82.3 @@ -1,3 +1,44 @@
    82.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    82.5 +#
    82.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    82.7 +#
    82.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    82.9 +# Other names may be trademarks of their respective owners.
   82.10 +#
   82.11 +# The contents of this file are subject to the terms of either the GNU
   82.12 +# General Public License Version 2 only ("GPL") or the Common
   82.13 +# Development and Distribution License("CDDL") (collectively, the
   82.14 +# "License"). You may not use this file except in compliance with the
   82.15 +# License. You can obtain a copy of the License at
   82.16 +# http://www.netbeans.org/cddl-gplv2.html
   82.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   82.18 +# specific language governing permissions and limitations under the
   82.19 +# License.  When distributing the software, include this License Header
   82.20 +# Notice in each file and include the License file at
   82.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   82.22 +# particular file as subject to the "Classpath" exception as provided
   82.23 +# by Oracle in the GPL Version 2 section of the License file that
   82.24 +# accompanied this code. If applicable, add the following below the
   82.25 +# License Header, with the fields enclosed by brackets [] replaced by
   82.26 +# your own identifying information:
   82.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   82.28 +#
   82.29 +# Contributor(s):
   82.30 +#
   82.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   82.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   82.33 +# Microsystems, Inc. All Rights Reserved.
   82.34 +#
   82.35 +# If you wish your version of this file to be governed by only the CDDL
   82.36 +# or only the GPL Version 2, indicate your decision by adding
   82.37 +# "[Contributor] elects to include this software in this distribution
   82.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   82.39 +# single choice of license, a recipient has the option to distribute
   82.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   82.41 +# to extend the choice of license to its licensees as provided above.
   82.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   82.43 +# Version 2 license, then the option applies only if the new code is
   82.44 +# made subject to such option by the copyright holder.
   82.45  build.xml.data.CRC32=891734f5
   82.46  build.xml.script.CRC32=82b74f72
   82.47  build.xml.stylesheet.CRC32=eaf9f76a@2.49
    83.1 --- a/duplicates/ide/nbproject/platform.properties	Mon Dec 19 11:37:36 2016 +0100
    83.2 +++ b/duplicates/ide/nbproject/platform.properties	Mon Feb 27 22:40:44 2017 +0100
    83.3 @@ -1,3 +1,44 @@
    83.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    83.5 +#
    83.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    83.7 +#
    83.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    83.9 +# Other names may be trademarks of their respective owners.
   83.10 +#
   83.11 +# The contents of this file are subject to the terms of either the GNU
   83.12 +# General Public License Version 2 only ("GPL") or the Common
   83.13 +# Development and Distribution License("CDDL") (collectively, the
   83.14 +# "License"). You may not use this file except in compliance with the
   83.15 +# License. You can obtain a copy of the License at
   83.16 +# http://www.netbeans.org/cddl-gplv2.html
   83.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   83.18 +# specific language governing permissions and limitations under the
   83.19 +# License.  When distributing the software, include this License Header
   83.20 +# Notice in each file and include the License file at
   83.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   83.22 +# particular file as subject to the "Classpath" exception as provided
   83.23 +# by Oracle in the GPL Version 2 section of the License file that
   83.24 +# accompanied this code. If applicable, add the following below the
   83.25 +# License Header, with the fields enclosed by brackets [] replaced by
   83.26 +# your own identifying information:
   83.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   83.28 +#
   83.29 +# Contributor(s):
   83.30 +#
   83.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   83.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   83.33 +# Microsystems, Inc. All Rights Reserved.
   83.34 +#
   83.35 +# If you wish your version of this file to be governed by only the CDDL
   83.36 +# or only the GPL Version 2, indicate your decision by adding
   83.37 +# "[Contributor] elects to include this software in this distribution
   83.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   83.39 +# single choice of license, a recipient has the option to distribute
   83.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   83.41 +# to extend the choice of license to its licensees as provided above.
   83.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   83.43 +# Version 2 license, then the option applies only if the new code is
   83.44 +# made subject to such option by the copyright holder.
   83.45  cluster.path=\
   83.46      ${nbplatform.active.dir}/apisupport:\
   83.47      ${nbplatform.active.dir}/cnd:\
    84.1 --- a/duplicates/ide/nbproject/platform.xml	Mon Dec 19 11:37:36 2016 +0100
    84.2 +++ b/duplicates/ide/nbproject/platform.xml	Mon Feb 27 22:40:44 2017 +0100
    84.3 @@ -1,4 +1,47 @@
    84.4  <?xml version="1.0" encoding="UTF-8"?>
    84.5 +<!--
    84.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    84.7 +
    84.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    84.9 +
   84.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   84.11 +Other names may be trademarks of their respective owners.
   84.12 +
   84.13 +The contents of this file are subject to the terms of either the GNU
   84.14 +General Public License Version 2 only ("GPL") or the Common
   84.15 +Development and Distribution License("CDDL") (collectively, the
   84.16 +"License"). You may not use this file except in compliance with the
   84.17 +License. You can obtain a copy of the License at
   84.18 +http://www.netbeans.org/cddl-gplv2.html
   84.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   84.20 +specific language governing permissions and limitations under the
   84.21 +License.  When distributing the software, include this License Header
   84.22 +Notice in each file and include the License file at
   84.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   84.24 +particular file as subject to the "Classpath" exception as provided
   84.25 +by Oracle in the GPL Version 2 section of the License file that
   84.26 +accompanied this code. If applicable, add the following below the
   84.27 +License Header, with the fields enclosed by brackets [] replaced by
   84.28 +your own identifying information:
   84.29 +"Portions Copyrighted [year] [name of copyright owner]"
   84.30 +
   84.31 +Contributor(s):
   84.32 +
   84.33 +The Original Software is NetBeans. The Initial Developer of the Original
   84.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   84.35 +Microsystems, Inc. All Rights Reserved.
   84.36 +
   84.37 +If you wish your version of this file to be governed by only the CDDL
   84.38 +or only the GPL Version 2, indicate your decision by adding
   84.39 +"[Contributor] elects to include this software in this distribution
   84.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   84.41 +single choice of license, a recipient has the option to distribute
   84.42 +your version of this file under either the CDDL, the GPL Version 2 or
   84.43 +to extend the choice of license to its licensees as provided above.
   84.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   84.45 +Version 2 license, then the option applies only if the new code is
   84.46 +made subject to such option by the copyright holder.
   84.47 +-->
   84.48  <project name="platform" default="download" basedir="..">
   84.49      <condition property="download.required">
   84.50          <and>
    85.1 --- a/duplicates/ide/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
    85.2 +++ b/duplicates/ide/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
    85.3 @@ -1,3 +1,44 @@
    85.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    85.5 +#
    85.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    85.7 +#
    85.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    85.9 +# Other names may be trademarks of their respective owners.
   85.10 +#
   85.11 +# The contents of this file are subject to the terms of either the GNU
   85.12 +# General Public License Version 2 only ("GPL") or the Common
   85.13 +# Development and Distribution License("CDDL") (collectively, the
   85.14 +# "License"). You may not use this file except in compliance with the
   85.15 +# License. You can obtain a copy of the License at
   85.16 +# http://www.netbeans.org/cddl-gplv2.html
   85.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   85.18 +# specific language governing permissions and limitations under the
   85.19 +# License.  When distributing the software, include this License Header
   85.20 +# Notice in each file and include the License file at
   85.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   85.22 +# particular file as subject to the "Classpath" exception as provided
   85.23 +# by Oracle in the GPL Version 2 section of the License file that
   85.24 +# accompanied this code. If applicable, add the following below the
   85.25 +# License Header, with the fields enclosed by brackets [] replaced by
   85.26 +# your own identifying information:
   85.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   85.28 +#
   85.29 +# Contributor(s):
   85.30 +#
   85.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   85.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   85.33 +# Microsystems, Inc. All Rights Reserved.
   85.34 +#
   85.35 +# If you wish your version of this file to be governed by only the CDDL
   85.36 +# or only the GPL Version 2, indicate your decision by adding
   85.37 +# "[Contributor] elects to include this software in this distribution
   85.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   85.39 +# single choice of license, a recipient has the option to distribute
   85.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   85.41 +# to extend the choice of license to its licensees as provided above.
   85.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   85.43 +# Version 2 license, then the option applies only if the new code is
   85.44 +# made subject to such option by the copyright holder.
   85.45  modules=\
   85.46      ${project.org.netbeans.modules.jackpot30.duplicates.impl}
   85.47  project.org.netbeans.modules.jackpot30.duplicates.impl=impl
    86.1 --- a/duplicates/ide/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
    86.2 +++ b/duplicates/ide/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
    86.3 @@ -1,4 +1,47 @@
    86.4  <?xml version="1.0" encoding="UTF-8"?>
    86.5 +<!--
    86.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    86.7 +
    86.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    86.9 +
   86.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   86.11 +Other names may be trademarks of their respective owners.
   86.12 +
   86.13 +The contents of this file are subject to the terms of either the GNU
   86.14 +General Public License Version 2 only ("GPL") or the Common
   86.15 +Development and Distribution License("CDDL") (collectively, the
   86.16 +"License"). You may not use this file except in compliance with the
   86.17 +License. You can obtain a copy of the License at
   86.18 +http://www.netbeans.org/cddl-gplv2.html
   86.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   86.20 +specific language governing permissions and limitations under the
   86.21 +License.  When distributing the software, include this License Header
   86.22 +Notice in each file and include the License file at
   86.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   86.24 +particular file as subject to the "Classpath" exception as provided
   86.25 +by Oracle in the GPL Version 2 section of the License file that
   86.26 +accompanied this code. If applicable, add the following below the
   86.27 +License Header, with the fields enclosed by brackets [] replaced by
   86.28 +your own identifying information:
   86.29 +"Portions Copyrighted [year] [name of copyright owner]"
   86.30 +
   86.31 +Contributor(s):
   86.32 +
   86.33 +The Original Software is NetBeans. The Initial Developer of the Original
   86.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   86.35 +Microsystems, Inc. All Rights Reserved.
   86.36 +
   86.37 +If you wish your version of this file to be governed by only the CDDL
   86.38 +or only the GPL Version 2, indicate your decision by adding
   86.39 +"[Contributor] elects to include this software in this distribution
   86.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   86.41 +single choice of license, a recipient has the option to distribute
   86.42 +your version of this file under either the CDDL, the GPL Version 2 or
   86.43 +to extend the choice of license to its licensees as provided above.
   86.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   86.45 +Version 2 license, then the option applies only if the new code is
   86.46 +made subject to such option by the copyright holder.
   86.47 +-->
   86.48  <project xmlns="http://www.netbeans.org/ns/project/1">
   86.49      <type>org.netbeans.modules.apisupport.project.suite</type>
   86.50      <configuration>
    87.1 --- a/duplicates/server/indexer/build.xml	Mon Dec 19 11:37:36 2016 +0100
    87.2 +++ b/duplicates/server/indexer/build.xml	Mon Feb 27 22:40:44 2017 +0100
    87.3 @@ -1,4 +1,47 @@
    87.4  <?xml version="1.0" encoding="UTF-8"?>
    87.5 +<!--
    87.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    87.7 +
    87.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    87.9 +
   87.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   87.11 +Other names may be trademarks of their respective owners.
   87.12 +
   87.13 +The contents of this file are subject to the terms of either the GNU
   87.14 +General Public License Version 2 only ("GPL") or the Common
   87.15 +Development and Distribution License("CDDL") (collectively, the
   87.16 +"License"). You may not use this file except in compliance with the
   87.17 +License. You can obtain a copy of the License at
   87.18 +http://www.netbeans.org/cddl-gplv2.html
   87.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   87.20 +specific language governing permissions and limitations under the
   87.21 +License.  When distributing the software, include this License Header
   87.22 +Notice in each file and include the License file at
   87.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   87.24 +particular file as subject to the "Classpath" exception as provided
   87.25 +by Oracle in the GPL Version 2 section of the License file that
   87.26 +accompanied this code. If applicable, add the following below the
   87.27 +License Header, with the fields enclosed by brackets [] replaced by
   87.28 +your own identifying information:
   87.29 +"Portions Copyrighted [year] [name of copyright owner]"
   87.30 +
   87.31 +Contributor(s):
   87.32 +
   87.33 +The Original Software is NetBeans. The Initial Developer of the Original
   87.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   87.35 +Microsystems, Inc. All Rights Reserved.
   87.36 +
   87.37 +If you wish your version of this file to be governed by only the CDDL
   87.38 +or only the GPL Version 2, indicate your decision by adding
   87.39 +"[Contributor] elects to include this software in this distribution
   87.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   87.41 +single choice of license, a recipient has the option to distribute
   87.42 +your version of this file under either the CDDL, the GPL Version 2 or
   87.43 +to extend the choice of license to its licensees as provided above.
   87.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   87.45 +Version 2 license, then the option applies only if the new code is
   87.46 +made subject to such option by the copyright holder.
   87.47 +-->
   87.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
   87.49  <!-- for some information on what you could do (e.g. targets to override). -->
   87.50  <!-- If you delete this file and reopen the project it will be recreated. -->
    88.1 --- a/duplicates/server/indexer/impl/build.xml	Mon Dec 19 11:37:36 2016 +0100
    88.2 +++ b/duplicates/server/indexer/impl/build.xml	Mon Feb 27 22:40:44 2017 +0100
    88.3 @@ -1,4 +1,47 @@
    88.4  <?xml version="1.0" encoding="UTF-8"?>
    88.5 +<!--
    88.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    88.7 +
    88.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    88.9 +
   88.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   88.11 +Other names may be trademarks of their respective owners.
   88.12 +
   88.13 +The contents of this file are subject to the terms of either the GNU
   88.14 +General Public License Version 2 only ("GPL") or the Common
   88.15 +Development and Distribution License("CDDL") (collectively, the
   88.16 +"License"). You may not use this file except in compliance with the
   88.17 +License. You can obtain a copy of the License at
   88.18 +http://www.netbeans.org/cddl-gplv2.html
   88.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   88.20 +specific language governing permissions and limitations under the
   88.21 +License.  When distributing the software, include this License Header
   88.22 +Notice in each file and include the License file at
   88.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   88.24 +particular file as subject to the "Classpath" exception as provided
   88.25 +by Oracle in the GPL Version 2 section of the License file that
   88.26 +accompanied this code. If applicable, add the following below the
   88.27 +License Header, with the fields enclosed by brackets [] replaced by
   88.28 +your own identifying information:
   88.29 +"Portions Copyrighted [year] [name of copyright owner]"
   88.30 +
   88.31 +Contributor(s):
   88.32 +
   88.33 +The Original Software is NetBeans. The Initial Developer of the Original
   88.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   88.35 +Microsystems, Inc. All Rights Reserved.
   88.36 +
   88.37 +If you wish your version of this file to be governed by only the CDDL
   88.38 +or only the GPL Version 2, indicate your decision by adding
   88.39 +"[Contributor] elects to include this software in this distribution
   88.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   88.41 +single choice of license, a recipient has the option to distribute
   88.42 +your version of this file under either the CDDL, the GPL Version 2 or
   88.43 +to extend the choice of license to its licensees as provided above.
   88.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   88.45 +Version 2 license, then the option applies only if the new code is
   88.46 +made subject to such option by the copyright holder.
   88.47 +-->
   88.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
   88.49  <!-- for some information on what you could do (e.g. targets to override). -->
   88.50  <!-- If you delete this file and reopen the project it will be recreated. -->
    89.1 --- a/duplicates/server/indexer/impl/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
    89.2 +++ b/duplicates/server/indexer/impl/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
    89.3 @@ -1,5 +1,48 @@
    89.4  <?xml version="1.0" encoding="UTF-8"?>
    89.5  <!--
    89.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    89.7 +
    89.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    89.9 +
   89.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   89.11 +Other names may be trademarks of their respective owners.
   89.12 +
   89.13 +The contents of this file are subject to the terms of either the GNU
   89.14 +General Public License Version 2 only ("GPL") or the Common
   89.15 +Development and Distribution License("CDDL") (collectively, the
   89.16 +"License"). You may not use this file except in compliance with the
   89.17 +License. You can obtain a copy of the License at
   89.18 +http://www.netbeans.org/cddl-gplv2.html
   89.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   89.20 +specific language governing permissions and limitations under the
   89.21 +License.  When distributing the software, include this License Header
   89.22 +Notice in each file and include the License file at
   89.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   89.24 +particular file as subject to the "Classpath" exception as provided
   89.25 +by Oracle in the GPL Version 2 section of the License file that
   89.26 +accompanied this code. If applicable, add the following below the
   89.27 +License Header, with the fields enclosed by brackets [] replaced by
   89.28 +your own identifying information:
   89.29 +"Portions Copyrighted [year] [name of copyright owner]"
   89.30 +
   89.31 +Contributor(s):
   89.32 +
   89.33 +The Original Software is NetBeans. The Initial Developer of the Original
   89.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   89.35 +Microsystems, Inc. All Rights Reserved.
   89.36 +
   89.37 +If you wish your version of this file to be governed by only the CDDL
   89.38 +or only the GPL Version 2, indicate your decision by adding
   89.39 +"[Contributor] elects to include this software in this distribution
   89.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   89.41 +single choice of license, a recipient has the option to distribute
   89.42 +your version of this file under either the CDDL, the GPL Version 2 or
   89.43 +to extend the choice of license to its licensees as provided above.
   89.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   89.45 +Version 2 license, then the option applies only if the new code is
   89.46 +made subject to such option by the copyright holder.
   89.47 +-->
   89.48 +<!--
   89.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
   89.50  ***         EDIT ../build.xml INSTEAD         ***
   89.51  -->
    90.1 --- a/duplicates/server/indexer/impl/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
    90.2 +++ b/duplicates/server/indexer/impl/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
    90.3 @@ -1,3 +1,44 @@
    90.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    90.5 +#
    90.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    90.7 +#
    90.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    90.9 +# Other names may be trademarks of their respective owners.
   90.10 +#
   90.11 +# The contents of this file are subject to the terms of either the GNU
   90.12 +# General Public License Version 2 only ("GPL") or the Common
   90.13 +# Development and Distribution License("CDDL") (collectively, the
   90.14 +# "License"). You may not use this file except in compliance with the
   90.15 +# License. You can obtain a copy of the License at
   90.16 +# http://www.netbeans.org/cddl-gplv2.html
   90.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   90.18 +# specific language governing permissions and limitations under the
   90.19 +# License.  When distributing the software, include this License Header
   90.20 +# Notice in each file and include the License file at
   90.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   90.22 +# particular file as subject to the "Classpath" exception as provided
   90.23 +# by Oracle in the GPL Version 2 section of the License file that
   90.24 +# accompanied this code. If applicable, add the following below the
   90.25 +# License Header, with the fields enclosed by brackets [] replaced by
   90.26 +# your own identifying information:
   90.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   90.28 +#
   90.29 +# Contributor(s):
   90.30 +#
   90.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   90.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   90.33 +# Microsystems, Inc. All Rights Reserved.
   90.34 +#
   90.35 +# If you wish your version of this file to be governed by only the CDDL
   90.36 +# or only the GPL Version 2, indicate your decision by adding
   90.37 +# "[Contributor] elects to include this software in this distribution
   90.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   90.39 +# single choice of license, a recipient has the option to distribute
   90.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   90.41 +# to extend the choice of license to its licensees as provided above.
   90.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   90.43 +# Version 2 license, then the option applies only if the new code is
   90.44 +# made subject to such option by the copyright holder.
   90.45  build.xml.data.CRC32=fc98a110
   90.46  build.xml.script.CRC32=5603d4c2
   90.47  build.xml.stylesheet.CRC32=a56c6a5b@2.70
    91.1 --- a/duplicates/server/indexer/impl/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
    91.2 +++ b/duplicates/server/indexer/impl/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
    91.3 @@ -1,2 +1,43 @@
    91.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    91.5 +#
    91.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    91.7 +#
    91.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    91.9 +# Other names may be trademarks of their respective owners.
   91.10 +#
   91.11 +# The contents of this file are subject to the terms of either the GNU
   91.12 +# General Public License Version 2 only ("GPL") or the Common
   91.13 +# Development and Distribution License("CDDL") (collectively, the
   91.14 +# "License"). You may not use this file except in compliance with the
   91.15 +# License. You can obtain a copy of the License at
   91.16 +# http://www.netbeans.org/cddl-gplv2.html
   91.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   91.18 +# specific language governing permissions and limitations under the
   91.19 +# License.  When distributing the software, include this License Header
   91.20 +# Notice in each file and include the License file at
   91.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   91.22 +# particular file as subject to the "Classpath" exception as provided
   91.23 +# by Oracle in the GPL Version 2 section of the License file that
   91.24 +# accompanied this code. If applicable, add the following below the
   91.25 +# License Header, with the fields enclosed by brackets [] replaced by
   91.26 +# your own identifying information:
   91.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   91.28 +#
   91.29 +# Contributor(s):
   91.30 +#
   91.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   91.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   91.33 +# Microsystems, Inc. All Rights Reserved.
   91.34 +#
   91.35 +# If you wish your version of this file to be governed by only the CDDL
   91.36 +# or only the GPL Version 2, indicate your decision by adding
   91.37 +# "[Contributor] elects to include this software in this distribution
   91.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   91.39 +# single choice of license, a recipient has the option to distribute
   91.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   91.41 +# to extend the choice of license to its licensees as provided above.
   91.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   91.43 +# Version 2 license, then the option applies only if the new code is
   91.44 +# made subject to such option by the copyright holder.
   91.45  javac.source=1.6
   91.46  javac.compilerargs=-Xlint -Xlint:-serial
    92.1 --- a/duplicates/server/indexer/impl/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
    92.2 +++ b/duplicates/server/indexer/impl/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
    92.3 @@ -1,4 +1,47 @@
    92.4  <?xml version="1.0" encoding="UTF-8"?>
    92.5 +<!--
    92.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    92.7 +
    92.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    92.9 +
   92.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   92.11 +Other names may be trademarks of their respective owners.
   92.12 +
   92.13 +The contents of this file are subject to the terms of either the GNU
   92.14 +General Public License Version 2 only ("GPL") or the Common
   92.15 +Development and Distribution License("CDDL") (collectively, the
   92.16 +"License"). You may not use this file except in compliance with the
   92.17 +License. You can obtain a copy of the License at
   92.18 +http://www.netbeans.org/cddl-gplv2.html
   92.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   92.20 +specific language governing permissions and limitations under the
   92.21 +License.  When distributing the software, include this License Header
   92.22 +Notice in each file and include the License file at
   92.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   92.24 +particular file as subject to the "Classpath" exception as provided
   92.25 +by Oracle in the GPL Version 2 section of the License file that
   92.26 +accompanied this code. If applicable, add the following below the
   92.27 +License Header, with the fields enclosed by brackets [] replaced by
   92.28 +your own identifying information:
   92.29 +"Portions Copyrighted [year] [name of copyright owner]"
   92.30 +
   92.31 +Contributor(s):
   92.32 +
   92.33 +The Original Software is NetBeans. The Initial Developer of the Original
   92.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   92.35 +Microsystems, Inc. All Rights Reserved.
   92.36 +
   92.37 +If you wish your version of this file to be governed by only the CDDL
   92.38 +or only the GPL Version 2, indicate your decision by adding
   92.39 +"[Contributor] elects to include this software in this distribution
   92.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   92.41 +single choice of license, a recipient has the option to distribute
   92.42 +your version of this file under either the CDDL, the GPL Version 2 or
   92.43 +to extend the choice of license to its licensees as provided above.
   92.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   92.45 +Version 2 license, then the option applies only if the new code is
   92.46 +made subject to such option by the copyright holder.
   92.47 +-->
   92.48  <project xmlns="http://www.netbeans.org/ns/project/1">
   92.49      <type>org.netbeans.modules.apisupport.project</type>
   92.50      <configuration>
    93.1 --- a/duplicates/server/indexer/impl/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
    93.2 +++ b/duplicates/server/indexer/impl/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
    93.3 @@ -1,1 +1,42 @@
    93.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    93.5 +#
    93.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    93.7 +#
    93.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    93.9 +# Other names may be trademarks of their respective owners.
   93.10 +#
   93.11 +# The contents of this file are subject to the terms of either the GNU
   93.12 +# General Public License Version 2 only ("GPL") or the Common
   93.13 +# Development and Distribution License("CDDL") (collectively, the
   93.14 +# "License"). You may not use this file except in compliance with the
   93.15 +# License. You can obtain a copy of the License at
   93.16 +# http://www.netbeans.org/cddl-gplv2.html
   93.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   93.18 +# specific language governing permissions and limitations under the
   93.19 +# License.  When distributing the software, include this License Header
   93.20 +# Notice in each file and include the License file at
   93.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   93.22 +# particular file as subject to the "Classpath" exception as provided
   93.23 +# by Oracle in the GPL Version 2 section of the License file that
   93.24 +# accompanied this code. If applicable, add the following below the
   93.25 +# License Header, with the fields enclosed by brackets [] replaced by
   93.26 +# your own identifying information:
   93.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   93.28 +#
   93.29 +# Contributor(s):
   93.30 +#
   93.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   93.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   93.33 +# Microsystems, Inc. All Rights Reserved.
   93.34 +#
   93.35 +# If you wish your version of this file to be governed by only the CDDL
   93.36 +# or only the GPL Version 2, indicate your decision by adding
   93.37 +# "[Contributor] elects to include this software in this distribution
   93.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   93.39 +# single choice of license, a recipient has the option to distribute
   93.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   93.41 +# to extend the choice of license to its licensees as provided above.
   93.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   93.43 +# Version 2 license, then the option applies only if the new code is
   93.44 +# made subject to such option by the copyright holder.
   93.45  suite.dir=${basedir}/..
    94.1 --- a/duplicates/server/indexer/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
    94.2 +++ b/duplicates/server/indexer/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
    94.3 @@ -1,5 +1,48 @@
    94.4  <?xml version="1.0" encoding="UTF-8"?>
    94.5  <!--
    94.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    94.7 +
    94.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    94.9 +
   94.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   94.11 +Other names may be trademarks of their respective owners.
   94.12 +
   94.13 +The contents of this file are subject to the terms of either the GNU
   94.14 +General Public License Version 2 only ("GPL") or the Common
   94.15 +Development and Distribution License("CDDL") (collectively, the
   94.16 +"License"). You may not use this file except in compliance with the
   94.17 +License. You can obtain a copy of the License at
   94.18 +http://www.netbeans.org/cddl-gplv2.html
   94.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   94.20 +specific language governing permissions and limitations under the
   94.21 +License.  When distributing the software, include this License Header
   94.22 +Notice in each file and include the License file at
   94.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   94.24 +particular file as subject to the "Classpath" exception as provided
   94.25 +by Oracle in the GPL Version 2 section of the License file that
   94.26 +accompanied this code. If applicable, add the following below the
   94.27 +License Header, with the fields enclosed by brackets [] replaced by
   94.28 +your own identifying information:
   94.29 +"Portions Copyrighted [year] [name of copyright owner]"
   94.30 +
   94.31 +Contributor(s):
   94.32 +
   94.33 +The Original Software is NetBeans. The Initial Developer of the Original
   94.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   94.35 +Microsystems, Inc. All Rights Reserved.
   94.36 +
   94.37 +If you wish your version of this file to be governed by only the CDDL
   94.38 +or only the GPL Version 2, indicate your decision by adding
   94.39 +"[Contributor] elects to include this software in this distribution
   94.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   94.41 +single choice of license, a recipient has the option to distribute
   94.42 +your version of this file under either the CDDL, the GPL Version 2 or
   94.43 +to extend the choice of license to its licensees as provided above.
   94.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   94.45 +Version 2 license, then the option applies only if the new code is
   94.46 +made subject to such option by the copyright holder.
   94.47 +-->
   94.48 +<!--
   94.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
   94.50  ***         EDIT ../build.xml INSTEAD         ***
   94.51  -->
    95.1 --- a/duplicates/server/indexer/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
    95.2 +++ b/duplicates/server/indexer/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
    95.3 @@ -1,3 +1,44 @@
    95.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    95.5 +#
    95.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    95.7 +#
    95.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    95.9 +# Other names may be trademarks of their respective owners.
   95.10 +#
   95.11 +# The contents of this file are subject to the terms of either the GNU
   95.12 +# General Public License Version 2 only ("GPL") or the Common
   95.13 +# Development and Distribution License("CDDL") (collectively, the
   95.14 +# "License"). You may not use this file except in compliance with the
   95.15 +# License. You can obtain a copy of the License at
   95.16 +# http://www.netbeans.org/cddl-gplv2.html
   95.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   95.18 +# specific language governing permissions and limitations under the
   95.19 +# License.  When distributing the software, include this License Header
   95.20 +# Notice in each file and include the License file at
   95.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   95.22 +# particular file as subject to the "Classpath" exception as provided
   95.23 +# by Oracle in the GPL Version 2 section of the License file that
   95.24 +# accompanied this code. If applicable, add the following below the
   95.25 +# License Header, with the fields enclosed by brackets [] replaced by
   95.26 +# your own identifying information:
   95.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   95.28 +#
   95.29 +# Contributor(s):
   95.30 +#
   95.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   95.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   95.33 +# Microsystems, Inc. All Rights Reserved.
   95.34 +#
   95.35 +# If you wish your version of this file to be governed by only the CDDL
   95.36 +# or only the GPL Version 2, indicate your decision by adding
   95.37 +# "[Contributor] elects to include this software in this distribution
   95.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   95.39 +# single choice of license, a recipient has the option to distribute
   95.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   95.41 +# to extend the choice of license to its licensees as provided above.
   95.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   95.43 +# Version 2 license, then the option applies only if the new code is
   95.44 +# made subject to such option by the copyright holder.
   95.45  build.xml.data.CRC32=8121b4f6
   95.46  build.xml.script.CRC32=58124a00
   95.47  build.xml.stylesheet.CRC32=eaf9f76a@2.50
    96.1 --- a/duplicates/server/indexer/nbproject/platform.properties	Mon Dec 19 11:37:36 2016 +0100
    96.2 +++ b/duplicates/server/indexer/nbproject/platform.properties	Mon Feb 27 22:40:44 2017 +0100
    96.3 @@ -1,3 +1,44 @@
    96.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    96.5 +#
    96.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    96.7 +#
    96.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    96.9 +# Other names may be trademarks of their respective owners.
   96.10 +#
   96.11 +# The contents of this file are subject to the terms of either the GNU
   96.12 +# General Public License Version 2 only ("GPL") or the Common
   96.13 +# Development and Distribution License("CDDL") (collectively, the
   96.14 +# "License"). You may not use this file except in compliance with the
   96.15 +# License. You can obtain a copy of the License at
   96.16 +# http://www.netbeans.org/cddl-gplv2.html
   96.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   96.18 +# specific language governing permissions and limitations under the
   96.19 +# License.  When distributing the software, include this License Header
   96.20 +# Notice in each file and include the License file at
   96.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   96.22 +# particular file as subject to the "Classpath" exception as provided
   96.23 +# by Oracle in the GPL Version 2 section of the License file that
   96.24 +# accompanied this code. If applicable, add the following below the
   96.25 +# License Header, with the fields enclosed by brackets [] replaced by
   96.26 +# your own identifying information:
   96.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   96.28 +#
   96.29 +# Contributor(s):
   96.30 +#
   96.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   96.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   96.33 +# Microsystems, Inc. All Rights Reserved.
   96.34 +#
   96.35 +# If you wish your version of this file to be governed by only the CDDL
   96.36 +# or only the GPL Version 2, indicate your decision by adding
   96.37 +# "[Contributor] elects to include this software in this distribution
   96.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   96.39 +# single choice of license, a recipient has the option to distribute
   96.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   96.41 +# to extend the choice of license to its licensees as provided above.
   96.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   96.43 +# Version 2 license, then the option applies only if the new code is
   96.44 +# made subject to such option by the copyright holder.
   96.45  cluster.path=\
   96.46      ${nbplatform.active.dir}/apisupport:\
   96.47      ${nbplatform.active.dir}/cnd:\
    97.1 --- a/duplicates/server/indexer/nbproject/platform.xml	Mon Dec 19 11:37:36 2016 +0100
    97.2 +++ b/duplicates/server/indexer/nbproject/platform.xml	Mon Feb 27 22:40:44 2017 +0100
    97.3 @@ -1,4 +1,47 @@
    97.4  <?xml version="1.0" encoding="UTF-8"?>
    97.5 +<!--
    97.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    97.7 +
    97.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    97.9 +
   97.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   97.11 +Other names may be trademarks of their respective owners.
   97.12 +
   97.13 +The contents of this file are subject to the terms of either the GNU
   97.14 +General Public License Version 2 only ("GPL") or the Common
   97.15 +Development and Distribution License("CDDL") (collectively, the
   97.16 +"License"). You may not use this file except in compliance with the
   97.17 +License. You can obtain a copy of the License at
   97.18 +http://www.netbeans.org/cddl-gplv2.html
   97.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   97.20 +specific language governing permissions and limitations under the
   97.21 +License.  When distributing the software, include this License Header
   97.22 +Notice in each file and include the License file at
   97.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   97.24 +particular file as subject to the "Classpath" exception as provided
   97.25 +by Oracle in the GPL Version 2 section of the License file that
   97.26 +accompanied this code. If applicable, add the following below the
   97.27 +License Header, with the fields enclosed by brackets [] replaced by
   97.28 +your own identifying information:
   97.29 +"Portions Copyrighted [year] [name of copyright owner]"
   97.30 +
   97.31 +Contributor(s):
   97.32 +
   97.33 +The Original Software is NetBeans. The Initial Developer of the Original
   97.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   97.35 +Microsystems, Inc. All Rights Reserved.
   97.36 +
   97.37 +If you wish your version of this file to be governed by only the CDDL
   97.38 +or only the GPL Version 2, indicate your decision by adding
   97.39 +"[Contributor] elects to include this software in this distribution
   97.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   97.41 +single choice of license, a recipient has the option to distribute
   97.42 +your version of this file under either the CDDL, the GPL Version 2 or
   97.43 +to extend the choice of license to its licensees as provided above.
   97.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   97.45 +Version 2 license, then the option applies only if the new code is
   97.46 +made subject to such option by the copyright holder.
   97.47 +-->
   97.48  <project name="platform" default="download" basedir="..">
   97.49      <condition property="download.required">
   97.50          <and>
    98.1 --- a/duplicates/server/indexer/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
    98.2 +++ b/duplicates/server/indexer/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
    98.3 @@ -1,3 +1,44 @@
    98.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    98.5 +#
    98.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    98.7 +#
    98.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    98.9 +# Other names may be trademarks of their respective owners.
   98.10 +#
   98.11 +# The contents of this file are subject to the terms of either the GNU
   98.12 +# General Public License Version 2 only ("GPL") or the Common
   98.13 +# Development and Distribution License("CDDL") (collectively, the
   98.14 +# "License"). You may not use this file except in compliance with the
   98.15 +# License. You can obtain a copy of the License at
   98.16 +# http://www.netbeans.org/cddl-gplv2.html
   98.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   98.18 +# specific language governing permissions and limitations under the
   98.19 +# License.  When distributing the software, include this License Header
   98.20 +# Notice in each file and include the License file at
   98.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   98.22 +# particular file as subject to the "Classpath" exception as provided
   98.23 +# by Oracle in the GPL Version 2 section of the License file that
   98.24 +# accompanied this code. If applicable, add the following below the
   98.25 +# License Header, with the fields enclosed by brackets [] replaced by
   98.26 +# your own identifying information:
   98.27 +# "Portions Copyrighted [year] [name of copyright owner]"
   98.28 +#
   98.29 +# Contributor(s):
   98.30 +#
   98.31 +# The Original Software is NetBeans. The Initial Developer of the Original
   98.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   98.33 +# Microsystems, Inc. All Rights Reserved.
   98.34 +#
   98.35 +# If you wish your version of this file to be governed by only the CDDL
   98.36 +# or only the GPL Version 2, indicate your decision by adding
   98.37 +# "[Contributor] elects to include this software in this distribution
   98.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   98.39 +# single choice of license, a recipient has the option to distribute
   98.40 +# your version of this file under either the CDDL, the GPL Version 2 or
   98.41 +# to extend the choice of license to its licensees as provided above.
   98.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   98.43 +# Version 2 license, then the option applies only if the new code is
   98.44 +# made subject to such option by the copyright holder.
   98.45  modules=\
   98.46      ${project.org.netbeans.modules.jackpot30.duplicates.remoting}
   98.47  project.org.netbeans.modules.jackpot30.duplicates.remoting=impl
    99.1 --- a/duplicates/server/indexer/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
    99.2 +++ b/duplicates/server/indexer/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
    99.3 @@ -1,4 +1,47 @@
    99.4  <?xml version="1.0" encoding="UTF-8"?>
    99.5 +<!--
    99.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    99.7 +
    99.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
    99.9 +
   99.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   99.11 +Other names may be trademarks of their respective owners.
   99.12 +
   99.13 +The contents of this file are subject to the terms of either the GNU
   99.14 +General Public License Version 2 only ("GPL") or the Common
   99.15 +Development and Distribution License("CDDL") (collectively, the
   99.16 +"License"). You may not use this file except in compliance with the
   99.17 +License. You can obtain a copy of the License at
   99.18 +http://www.netbeans.org/cddl-gplv2.html
   99.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   99.20 +specific language governing permissions and limitations under the
   99.21 +License.  When distributing the software, include this License Header
   99.22 +Notice in each file and include the License file at
   99.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   99.24 +particular file as subject to the "Classpath" exception as provided
   99.25 +by Oracle in the GPL Version 2 section of the License file that
   99.26 +accompanied this code. If applicable, add the following below the
   99.27 +License Header, with the fields enclosed by brackets [] replaced by
   99.28 +your own identifying information:
   99.29 +"Portions Copyrighted [year] [name of copyright owner]"
   99.30 +
   99.31 +Contributor(s):
   99.32 +
   99.33 +The Original Software is NetBeans. The Initial Developer of the Original
   99.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
   99.35 +Microsystems, Inc. All Rights Reserved.
   99.36 +
   99.37 +If you wish your version of this file to be governed by only the CDDL
   99.38 +or only the GPL Version 2, indicate your decision by adding
   99.39 +"[Contributor] elects to include this software in this distribution
   99.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
   99.41 +single choice of license, a recipient has the option to distribute
   99.42 +your version of this file under either the CDDL, the GPL Version 2 or
   99.43 +to extend the choice of license to its licensees as provided above.
   99.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
   99.45 +Version 2 license, then the option applies only if the new code is
   99.46 +made subject to such option by the copyright holder.
   99.47 +-->
   99.48  <project xmlns="http://www.netbeans.org/ns/project/1">
   99.49      <type>org.netbeans.modules.apisupport.project.suite</type>
   99.50      <configuration>
   100.1 --- a/duplicates/server/web/duplicates.web.api/build.xml	Mon Dec 19 11:37:36 2016 +0100
   100.2 +++ b/duplicates/server/web/duplicates.web.api/build.xml	Mon Feb 27 22:40:44 2017 +0100
   100.3 @@ -1,4 +1,47 @@
   100.4  <?xml version="1.0" encoding="UTF-8"?>
   100.5 +<!--
   100.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   100.7 +
   100.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   100.9 +
  100.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  100.11 +Other names may be trademarks of their respective owners.
  100.12 +
  100.13 +The contents of this file are subject to the terms of either the GNU
  100.14 +General Public License Version 2 only ("GPL") or the Common
  100.15 +Development and Distribution License("CDDL") (collectively, the
  100.16 +"License"). You may not use this file except in compliance with the
  100.17 +License. You can obtain a copy of the License at
  100.18 +http://www.netbeans.org/cddl-gplv2.html
  100.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  100.20 +specific language governing permissions and limitations under the
  100.21 +License.  When distributing the software, include this License Header
  100.22 +Notice in each file and include the License file at
  100.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  100.24 +particular file as subject to the "Classpath" exception as provided
  100.25 +by Oracle in the GPL Version 2 section of the License file that
  100.26 +accompanied this code. If applicable, add the following below the
  100.27 +License Header, with the fields enclosed by brackets [] replaced by
  100.28 +your own identifying information:
  100.29 +"Portions Copyrighted [year] [name of copyright owner]"
  100.30 +
  100.31 +Contributor(s):
  100.32 +
  100.33 +The Original Software is NetBeans. The Initial Developer of the Original
  100.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  100.35 +Microsystems, Inc. All Rights Reserved.
  100.36 +
  100.37 +If you wish your version of this file to be governed by only the CDDL
  100.38 +or only the GPL Version 2, indicate your decision by adding
  100.39 +"[Contributor] elects to include this software in this distribution
  100.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  100.41 +single choice of license, a recipient has the option to distribute
  100.42 +your version of this file under either the CDDL, the GPL Version 2 or
  100.43 +to extend the choice of license to its licensees as provided above.
  100.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  100.45 +Version 2 license, then the option applies only if the new code is
  100.46 +made subject to such option by the copyright holder.
  100.47 +-->
  100.48  <!-- You may freely edit this file. See commented blocks below for -->
  100.49  <!-- some examples of how to customize the build. -->
  100.50  <!-- (If you delete it and reopen the project it will be recreated.) -->
   101.1 --- a/duplicates/server/web/duplicates.web.api/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   101.2 +++ b/duplicates/server/web/duplicates.web.api/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   101.3 @@ -1,5 +1,48 @@
   101.4  <?xml version="1.0" encoding="UTF-8"?>
   101.5  <!--
   101.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   101.7 +
   101.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   101.9 +
  101.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  101.11 +Other names may be trademarks of their respective owners.
  101.12 +
  101.13 +The contents of this file are subject to the terms of either the GNU
  101.14 +General Public License Version 2 only ("GPL") or the Common
  101.15 +Development and Distribution License("CDDL") (collectively, the
  101.16 +"License"). You may not use this file except in compliance with the
  101.17 +License. You can obtain a copy of the License at
  101.18 +http://www.netbeans.org/cddl-gplv2.html
  101.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  101.20 +specific language governing permissions and limitations under the
  101.21 +License.  When distributing the software, include this License Header
  101.22 +Notice in each file and include the License file at
  101.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  101.24 +particular file as subject to the "Classpath" exception as provided
  101.25 +by Oracle in the GPL Version 2 section of the License file that
  101.26 +accompanied this code. If applicable, add the following below the
  101.27 +License Header, with the fields enclosed by brackets [] replaced by
  101.28 +your own identifying information:
  101.29 +"Portions Copyrighted [year] [name of copyright owner]"
  101.30 +
  101.31 +Contributor(s):
  101.32 +
  101.33 +The Original Software is NetBeans. The Initial Developer of the Original
  101.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  101.35 +Microsystems, Inc. All Rights Reserved.
  101.36 +
  101.37 +If you wish your version of this file to be governed by only the CDDL
  101.38 +or only the GPL Version 2, indicate your decision by adding
  101.39 +"[Contributor] elects to include this software in this distribution
  101.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  101.41 +single choice of license, a recipient has the option to distribute
  101.42 +your version of this file under either the CDDL, the GPL Version 2 or
  101.43 +to extend the choice of license to its licensees as provided above.
  101.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  101.45 +Version 2 license, then the option applies only if the new code is
  101.46 +made subject to such option by the copyright holder.
  101.47 +-->
  101.48 +<!--
  101.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  101.50  ***         EDIT ../build.xml INSTEAD         ***
  101.51  
   102.1 --- a/duplicates/server/web/duplicates.web.api/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   102.2 +++ b/duplicates/server/web/duplicates.web.api/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   102.3 @@ -1,3 +1,44 @@
   102.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   102.5 +#
   102.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   102.7 +#
   102.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   102.9 +# Other names may be trademarks of their respective owners.
  102.10 +#
  102.11 +# The contents of this file are subject to the terms of either the GNU
  102.12 +# General Public License Version 2 only ("GPL") or the Common
  102.13 +# Development and Distribution License("CDDL") (collectively, the
  102.14 +# "License"). You may not use this file except in compliance with the
  102.15 +# License. You can obtain a copy of the License at
  102.16 +# http://www.netbeans.org/cddl-gplv2.html
  102.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  102.18 +# specific language governing permissions and limitations under the
  102.19 +# License.  When distributing the software, include this License Header
  102.20 +# Notice in each file and include the License file at
  102.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  102.22 +# particular file as subject to the "Classpath" exception as provided
  102.23 +# by Oracle in the GPL Version 2 section of the License file that
  102.24 +# accompanied this code. If applicable, add the following below the
  102.25 +# License Header, with the fields enclosed by brackets [] replaced by
  102.26 +# your own identifying information:
  102.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  102.28 +#
  102.29 +# Contributor(s):
  102.30 +#
  102.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  102.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  102.33 +# Microsystems, Inc. All Rights Reserved.
  102.34 +#
  102.35 +# If you wish your version of this file to be governed by only the CDDL
  102.36 +# or only the GPL Version 2, indicate your decision by adding
  102.37 +# "[Contributor] elects to include this software in this distribution
  102.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  102.39 +# single choice of license, a recipient has the option to distribute
  102.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  102.41 +# to extend the choice of license to its licensees as provided above.
  102.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  102.43 +# Version 2 license, then the option applies only if the new code is
  102.44 +# made subject to such option by the copyright holder.
  102.45  build.xml.data.CRC32=56aa19cb
  102.46  build.xml.script.CRC32=35245b8d
  102.47  build.xml.stylesheet.CRC32=8064a381@1.78.0.48
   103.1 --- a/duplicates/server/web/duplicates.web.api/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   103.2 +++ b/duplicates/server/web/duplicates.web.api/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   103.3 @@ -1,3 +1,44 @@
   103.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   103.5 +#
   103.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   103.7 +#
   103.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   103.9 +# Other names may be trademarks of their respective owners.
  103.10 +#
  103.11 +# The contents of this file are subject to the terms of either the GNU
  103.12 +# General Public License Version 2 only ("GPL") or the Common
  103.13 +# Development and Distribution License("CDDL") (collectively, the
  103.14 +# "License"). You may not use this file except in compliance with the
  103.15 +# License. You can obtain a copy of the License at
  103.16 +# http://www.netbeans.org/cddl-gplv2.html
  103.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  103.18 +# specific language governing permissions and limitations under the
  103.19 +# License.  When distributing the software, include this License Header
  103.20 +# Notice in each file and include the License file at
  103.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  103.22 +# particular file as subject to the "Classpath" exception as provided
  103.23 +# by Oracle in the GPL Version 2 section of the License file that
  103.24 +# accompanied this code. If applicable, add the following below the
  103.25 +# License Header, with the fields enclosed by brackets [] replaced by
  103.26 +# your own identifying information:
  103.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  103.28 +#
  103.29 +# Contributor(s):
  103.30 +#
  103.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  103.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  103.33 +# Microsystems, Inc. All Rights Reserved.
  103.34 +#
  103.35 +# If you wish your version of this file to be governed by only the CDDL
  103.36 +# or only the GPL Version 2, indicate your decision by adding
  103.37 +# "[Contributor] elects to include this software in this distribution
  103.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  103.39 +# single choice of license, a recipient has the option to distribute
  103.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  103.41 +# to extend the choice of license to its licensees as provided above.
  103.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  103.43 +# Version 2 license, then the option applies only if the new code is
  103.44 +# made subject to such option by the copyright holder.
  103.45  annotation.processing.enabled=true
  103.46  annotation.processing.enabled.in.editor=false
  103.47  annotation.processing.processors.list=
   104.1 --- a/duplicates/server/web/duplicates.web.api/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   104.2 +++ b/duplicates/server/web/duplicates.web.api/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   104.3 @@ -1,4 +1,47 @@
   104.4  <?xml version="1.0" encoding="UTF-8"?>
   104.5 +<!--
   104.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   104.7 +
   104.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   104.9 +
  104.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  104.11 +Other names may be trademarks of their respective owners.
  104.12 +
  104.13 +The contents of this file are subject to the terms of either the GNU
  104.14 +General Public License Version 2 only ("GPL") or the Common
  104.15 +Development and Distribution License("CDDL") (collectively, the
  104.16 +"License"). You may not use this file except in compliance with the
  104.17 +License. You can obtain a copy of the License at
  104.18 +http://www.netbeans.org/cddl-gplv2.html
  104.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  104.20 +specific language governing permissions and limitations under the
  104.21 +License.  When distributing the software, include this License Header
  104.22 +Notice in each file and include the License file at
  104.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  104.24 +particular file as subject to the "Classpath" exception as provided
  104.25 +by Oracle in the GPL Version 2 section of the License file that
  104.26 +accompanied this code. If applicable, add the following below the
  104.27 +License Header, with the fields enclosed by brackets [] replaced by
  104.28 +your own identifying information:
  104.29 +"Portions Copyrighted [year] [name of copyright owner]"
  104.30 +
  104.31 +Contributor(s):
  104.32 +
  104.33 +The Original Software is NetBeans. The Initial Developer of the Original
  104.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  104.35 +Microsystems, Inc. All Rights Reserved.
  104.36 +
  104.37 +If you wish your version of this file to be governed by only the CDDL
  104.38 +or only the GPL Version 2, indicate your decision by adding
  104.39 +"[Contributor] elects to include this software in this distribution
  104.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  104.41 +single choice of license, a recipient has the option to distribute
  104.42 +your version of this file under either the CDDL, the GPL Version 2 or
  104.43 +to extend the choice of license to its licensees as provided above.
  104.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  104.45 +Version 2 license, then the option applies only if the new code is
  104.46 +made subject to such option by the copyright holder.
  104.47 +-->
  104.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  104.49      <type>org.netbeans.modules.java.j2seproject</type>
  104.50      <configuration>
   105.1 --- a/hudson.indexerinstaller/build.xml	Mon Dec 19 11:37:36 2016 +0100
   105.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   105.3 @@ -1,8 +0,0 @@
   105.4 -<?xml version="1.0" encoding="UTF-8"?>
   105.5 -<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
   105.6 -<!-- for some information on what you could do (e.g. targets to override). -->
   105.7 -<!-- If you delete this file and reopen the project it will be recreated. -->
   105.8 -<project name="org.netbeans.modules.hudson.indexerinstaller" default="netbeans" basedir=".">
   105.9 -    <description>Builds, tests, and runs the project org.netbeans.modules.hudson.indexerinstaller.</description>
  105.10 -    <import file="nbproject/build-impl.xml"/>
  105.11 -</project>
   106.1 --- a/hudson.indexerinstaller/manifest.mf	Mon Dec 19 11:37:36 2016 +0100
   106.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   106.3 @@ -1,5 +0,0 @@
   106.4 -Manifest-Version: 1.0
   106.5 -OpenIDE-Module: org.netbeans.modules.hudson.indexerinstaller
   106.6 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/hudson/indexerinstaller/Bundle.properties
   106.7 -OpenIDE-Module-Specification-Version: 1.0
   106.8 -
   107.1 --- a/hudson.indexerinstaller/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   107.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   107.3 @@ -1,42 +0,0 @@
   107.4 -<?xml version="1.0" encoding="UTF-8"?>
   107.5 -<!--
   107.6 -*** GENERATED FROM project.xml - DO NOT EDIT  ***
   107.7 -***         EDIT ../build.xml INSTEAD         ***
   107.8 --->
   107.9 -<project name="org.netbeans.modules.hudson.indexerinstaller-impl" basedir="..">
  107.10 -    <fail message="Please build using Ant 1.7.1 or higher.">
  107.11 -        <condition>
  107.12 -            <not>
  107.13 -                <antversion atleast="1.7.1"/>
  107.14 -            </not>
  107.15 -        </condition>
  107.16 -    </fail>
  107.17 -    <property file="nbproject/private/platform-private.properties"/>
  107.18 -    <property file="nbproject/platform.properties"/>
  107.19 -    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
  107.20 -        <attribute name="name"/>
  107.21 -        <attribute name="value"/>
  107.22 -        <sequential>
  107.23 -            <property name="@{name}" value="${@{value}}"/>
  107.24 -        </sequential>
  107.25 -    </macrodef>
  107.26 -    <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
  107.27 -        <attribute name="property"/>
  107.28 -        <attribute name="value"/>
  107.29 -        <sequential>
  107.30 -            <property name="@{property}" value="@{value}"/>
  107.31 -        </sequential>
  107.32 -    </macrodef>
  107.33 -    <property file="${user.properties.file}"/>
  107.34 -    <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  107.35 -    <nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  107.36 -    <nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  107.37 -    <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
  107.38 -        <condition>
  107.39 -            <not>
  107.40 -                <contains string="${cluster.path.evaluated}" substring="platform"/>
  107.41 -            </not>
  107.42 -        </condition>
  107.43 -    </fail>
  107.44 -    <import file="${harness.dir}/build.xml"/>
  107.45 -</project>
   108.1 --- a/hudson.indexerinstaller/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   108.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   108.3 @@ -1,8 +0,0 @@
   108.4 -build.xml.data.CRC32=dd261bbc
   108.5 -build.xml.script.CRC32=9653f76d
   108.6 -build.xml.stylesheet.CRC32=a56c6a5b@2.70
   108.7 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   108.8 -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   108.9 -nbproject/build-impl.xml.data.CRC32=dd261bbc
  108.10 -nbproject/build-impl.xml.script.CRC32=4d4ae753
  108.11 -nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.70
   109.1 --- a/hudson.indexerinstaller/nbproject/platform.properties	Mon Dec 19 11:37:36 2016 +0100
   109.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   109.3 @@ -1,11 +0,0 @@
   109.4 -cluster.path=\
   109.5 -    ${nbplatform.active.dir}/apisupport:\
   109.6 -    ${nbplatform.active.dir}/harness:\
   109.7 -    ${nbplatform.active.dir}/ide:\
   109.8 -    ${nbplatform.active.dir}/extide:\
   109.9 -    ${nbplatform.active.dir}/java:\
  109.10 -    ${nbplatform.active.dir}/nb:\
  109.11 -    ${nbplatform.active.dir}/platform:\
  109.12 -    ${nbplatform.active.dir}/profiler:\
  109.13 -    ${nbplatform.active.dir}/websvccommon
  109.14 -nbplatform.active=NetBeans_IDE_Dev_(Build_110104-0651fbe9eaa1)
   110.1 --- a/hudson.indexerinstaller/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   110.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   110.3 @@ -1,2 +0,0 @@
   110.4 -javac.source=1.6
   110.5 -javac.compilerargs=-Xlint -Xlint:-serial
   111.1 --- a/hudson.indexerinstaller/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   111.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   111.3 @@ -1,80 +0,0 @@
   111.4 -<?xml version="1.0" encoding="UTF-8"?>
   111.5 -<project xmlns="http://www.netbeans.org/ns/project/1">
   111.6 -    <type>org.netbeans.modules.apisupport.project</type>
   111.7 -    <configuration>
   111.8 -        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
   111.9 -            <code-name-base>org.netbeans.modules.hudson.indexerinstaller</code-name-base>
  111.10 -            <standalone/>
  111.11 -            <module-dependencies>
  111.12 -                <dependency>
  111.13 -                    <code-name-base>org.netbeans.api.progress</code-name-base>
  111.14 -                    <build-prerequisite/>
  111.15 -                    <compile-dependency/>
  111.16 -                    <run-dependency>
  111.17 -                        <release-version>1</release-version>
  111.18 -                        <specification-version>1.25</specification-version>
  111.19 -                    </run-dependency>
  111.20 -                </dependency>
  111.21 -                <dependency>
  111.22 -                    <code-name-base>org.netbeans.api.progress.nb</code-name-base>
  111.23 -                    <build-prerequisite/>
  111.24 -                    <compile-dependency/>
  111.25 -                    <run-dependency>
  111.26 -                        <specification-version>1.45</specification-version>
  111.27 -                    </run-dependency>
  111.28 -                </dependency>
  111.29 -                <dependency>
  111.30 -                    <code-name-base>org.netbeans.modules.hudson</code-name-base>
  111.31 -                    <build-prerequisite/>
  111.32 -                    <compile-dependency/>
  111.33 -                    <run-dependency>
  111.34 -                        <specification-version>1.12</specification-version>
  111.35 -                    </run-dependency>
  111.36 -                </dependency>
  111.37 -                <dependency>
  111.38 -                    <code-name-base>org.openide.awt</code-name-base>
  111.39 -                    <build-prerequisite/>
  111.40 -                    <compile-dependency/>
  111.41 -                    <run-dependency>
  111.42 -                        <specification-version>7.35</specification-version>
  111.43 -                    </run-dependency>
  111.44 -                </dependency>
  111.45 -                <dependency>
  111.46 -                    <code-name-base>org.openide.util</code-name-base>
  111.47 -                    <build-prerequisite/>
  111.48 -                    <compile-dependency/>
  111.49 -                    <run-dependency>
  111.50 -                        <specification-version>8.16</specification-version>
  111.51 -                    </run-dependency>
  111.52 -                </dependency>
  111.53 -                <dependency>
  111.54 -                    <code-name-base>org.openide.windows</code-name-base>
  111.55 -                    <build-prerequisite/>
  111.56 -                    <compile-dependency/>
  111.57 -                    <run-dependency>
  111.58 -                        <specification-version>6.43</specification-version>
  111.59 -                    </run-dependency>
  111.60 -                </dependency>
  111.61 -            </module-dependencies>
  111.62 -            <test-dependencies>
  111.63 -                <test-type>
  111.64 -                    <name>unit</name>
  111.65 -                    <test-dependency>
  111.66 -                        <code-name-base>org.netbeans.libs.junit4</code-name-base>
  111.67 -                        <compile-dependency/>
  111.68 -                    </test-dependency>
  111.69 -                    <test-dependency>
  111.70 -                        <code-name-base>org.netbeans.modules.nbjunit</code-name-base>
  111.71 -                        <recursive/>
  111.72 -                        <compile-dependency/>
  111.73 -                    </test-dependency>
  111.74 -                </test-type>
  111.75 -            </test-dependencies>
  111.76 -            <public-packages/>
  111.77 -            <class-path-extension>
  111.78 -                <runtime-relative-path>ext/hudson-cli.jar</runtime-relative-path>
  111.79 -                <binary-origin>release/modules/ext/hudson-cli.jar</binary-origin>
  111.80 -            </class-path-extension>
  111.81 -        </data>
  111.82 -    </configuration>
  111.83 -</project>
   112.1 --- a/hudson.indexerinstaller/src/org/netbeans/modules/hudson/indexerinstaller/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   112.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   112.3 @@ -1,1 +0,0 @@
   112.4 -OpenIDE-Module-Name=Hudson NetBeans Plugin Installer
   113.1 --- a/hudson.indexerinstaller/src/org/netbeans/modules/hudson/indexerinstaller/InstallHudsonExtension.java	Mon Dec 19 11:37:36 2016 +0100
   113.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   113.3 @@ -1,119 +0,0 @@
   113.4 -/*
   113.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   113.6 - *
   113.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
   113.8 - *
   113.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  113.10 - * Other names may be trademarks of their respective owners.
  113.11 - *
  113.12 - * The contents of this file are subject to the terms of either the GNU
  113.13 - * General Public License Version 2 only ("GPL") or the Common
  113.14 - * Development and Distribution License("CDDL") (collectively, the
  113.15 - * "License"). You may not use this file except in compliance with the
  113.16 - * License. You can obtain a copy of the License at
  113.17 - * http://www.netbeans.org/cddl-gplv2.html
  113.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  113.19 - * specific language governing permissions and limitations under the
  113.20 - * License.  When distributing the software, include this License Header
  113.21 - * Notice in each file and include the License file at
  113.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  113.23 - * particular file as subject to the "Classpath" exception as provided
  113.24 - * by Oracle in the GPL Version 2 section of the License file that
  113.25 - * accompanied this code. If applicable, add the following below the
  113.26 - * License Header, with the fields enclosed by brackets [] replaced by
  113.27 - * your own identifying information:
  113.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  113.29 - *
  113.30 - * If you wish your version of this file to be governed by only the CDDL
  113.31 - * or only the GPL Version 2, indicate your decision by adding
  113.32 - * "[Contributor] elects to include this software in this distribution
  113.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  113.34 - * single choice of license, a recipient has the option to distribute
  113.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  113.36 - * to extend the choice of license to its licensees as provided above.
  113.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  113.38 - * Version 2 license, then the option applies only if the new code is
  113.39 - * made subject to such option by the copyright holder.
  113.40 - *
  113.41 - * Contributor(s):
  113.42 - *
  113.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
  113.44 - */
  113.45 -
  113.46 -package org.netbeans.modules.hudson.indexerinstaller;
  113.47 -
  113.48 -import java.awt.event.ActionEvent;
  113.49 -import java.awt.event.ActionListener;
  113.50 -import java.io.IOException;
  113.51 -import java.net.URL;
  113.52 -import javax.swing.JOptionPane;
  113.53 -import javax.swing.SwingUtilities;
  113.54 -import org.netbeans.api.progress.ProgressUtils;
  113.55 -import org.netbeans.modules.hudson.api.HudsonInstance;
  113.56 -import org.openide.awt.ActionID;
  113.57 -import org.openide.awt.ActionReference;
  113.58 -import org.openide.awt.ActionRegistration;
  113.59 -import org.openide.util.Exceptions;
  113.60 -import org.openide.util.NbBundle.Messages;
  113.61 -import org.openide.windows.WindowManager;
  113.62 -import hudson.cli.CLI;
  113.63 -
  113.64 -@ActionID(
  113.65 -    category="Team",
  113.66 -    id="org.netbeans.modules.hudson.indexerinstaller.InstallHudsonExtension"
  113.67 -)
  113.68 -@ActionRegistration(
  113.69 -    displayName="#CTL_InstallHudsonExtension"
  113.70 -)
  113.71 -@ActionReference(path=HudsonInstance.ACTION_PATH, position=950)
  113.72 -@Messages({"CTL_InstallHudsonExtension=Install Hudson Extension",
  113.73 -        "CTL_InstallingPlugin=Installing Plugin", 
  113.74 -        "CTL_RestartTitle=Plugin Installed", 
  113.75 -        "CTL_Restart=Restart Hudson?",
  113.76 -        "CTL_Failed=Installation Failed"})
  113.77 -public final class InstallHudsonExtension implements ActionListener {
  113.78 -    private final HudsonInstance context;
  113.79 -
  113.80 -    public InstallHudsonExtension(HudsonInstance context) {
  113.81 -        this.context = context;
  113.82 -    }
  113.83 -
  113.84 -    public void actionPerformed(ActionEvent ev) {
  113.85 -        try {
  113.86 -            final Installer installer = new Installer(context.getUrl());
  113.87 -            URL url = CLI.class.getProtectionDomain().getCodeSource().getLocation();
  113.88 -            String name = url.getPath();
  113.89 -            final String plugin = name.substring(name.indexOf("/"), name.indexOf("ext/hudson-cli.jar")) + "plugin/org.netbeans.modules.jackpot30.hudson.hpi";
  113.90 -            ProgressUtils.showProgressDialogAndRun(new Runnable() {
  113.91 -                @Override
  113.92 -                public void run() {
  113.93 -                    final int exit = installer.installPlugin(plugin);
  113.94 -                    SwingUtilities.invokeLater(new Runnable() {
  113.95 -
  113.96 -                        @Override
  113.97 -                        public void run() {
  113.98 -                            if (exit == -1) {
  113.99 -                                int n = JOptionPane.showConfirmDialog(WindowManager.getDefault().getMainWindow(), Bundle.CTL_Restart(),
 113.100 -                                        Bundle.CTL_RestartTitle(),
 113.101 -                                        JOptionPane.YES_NO_OPTION);
 113.102 -                                if (n==JOptionPane.YES_OPTION) {
 113.103 -                                    installer.restartHudson();
 113.104 -                                }
 113.105 -                            } else {
 113.106 -                                JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), Bundle.CTL_Failed());
 113.107 -                                
 113.108 -                            }
 113.109 -                        }
 113.110 -                        
 113.111 -                    });
 113.112 -                    
 113.113 -                }},Bundle.CTL_InstallingPlugin()
 113.114 -            );
 113.115 -        } catch (IOException ex) {
 113.116 -            Exceptions.printStackTrace(ex);
 113.117 -        } catch (InterruptedException ex) {
 113.118 -            Exceptions.printStackTrace(ex);
 113.119 -        }
 113.120 -        
 113.121 -    }
 113.122 -}
   114.1 --- a/hudson.indexerinstaller/src/org/netbeans/modules/hudson/indexerinstaller/Installer.java	Mon Dec 19 11:37:36 2016 +0100
   114.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   114.3 @@ -1,30 +0,0 @@
   114.4 -/*
   114.5 - * To change this template, choose Tools | Templates
   114.6 - * and open the template in the editor.
   114.7 - */
   114.8 -package org.netbeans.modules.hudson.indexerinstaller;
   114.9 -
  114.10 -import hudson.cli.CLI;
  114.11 -import java.io.IOException;
  114.12 -import java.net.URL;
  114.13 -
  114.14 -/**
  114.15 - *
  114.16 - * @author Jan Becicka
  114.17 - */
  114.18 -public class Installer {
  114.19 -    
  114.20 -    private CLI cli;
  114.21 -    public Installer(String hudson) throws IOException, InterruptedException {
  114.22 -        this.cli = new CLI(new URL(hudson));
  114.23 -    }
  114.24 -    
  114.25 -    public int restartHudson() {
  114.26 -        return this.cli.execute("restart"); //NOI18N
  114.27 -    }
  114.28 -    
  114.29 -    public int installPlugin(String plugin) {
  114.30 -        return this.cli.execute("install-plugin", plugin); //NOI18N
  114.31 -    }
  114.32 -    
  114.33 -}
   115.1 --- a/hudson/download-extra-nbms.xml	Mon Dec 19 11:37:36 2016 +0100
   115.2 +++ b/hudson/download-extra-nbms.xml	Mon Feb 27 22:40:44 2017 +0100
   115.3 @@ -1,4 +1,47 @@
   115.4  <?xml version="1.0" encoding="UTF-8"?>
   115.5 +<!--
   115.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   115.7 +
   115.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   115.9 +
  115.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  115.11 +Other names may be trademarks of their respective owners.
  115.12 +
  115.13 +The contents of this file are subject to the terms of either the GNU
  115.14 +General Public License Version 2 only ("GPL") or the Common
  115.15 +Development and Distribution License("CDDL") (collectively, the
  115.16 +"License"). You may not use this file except in compliance with the
  115.17 +License. You can obtain a copy of the License at
  115.18 +http://www.netbeans.org/cddl-gplv2.html
  115.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  115.20 +specific language governing permissions and limitations under the
  115.21 +License.  When distributing the software, include this License Header
  115.22 +Notice in each file and include the License file at
  115.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  115.24 +particular file as subject to the "Classpath" exception as provided
  115.25 +by Oracle in the GPL Version 2 section of the License file that
  115.26 +accompanied this code. If applicable, add the following below the
  115.27 +License Header, with the fields enclosed by brackets [] replaced by
  115.28 +your own identifying information:
  115.29 +"Portions Copyrighted [year] [name of copyright owner]"
  115.30 +
  115.31 +Contributor(s):
  115.32 +
  115.33 +The Original Software is NetBeans. The Initial Developer of the Original
  115.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  115.35 +Microsystems, Inc. All Rights Reserved.
  115.36 +
  115.37 +If you wish your version of this file to be governed by only the CDDL
  115.38 +or only the GPL Version 2, indicate your decision by adding
  115.39 +"[Contributor] elects to include this software in this distribution
  115.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  115.41 +single choice of license, a recipient has the option to distribute
  115.42 +your version of this file under either the CDDL, the GPL Version 2 or
  115.43 +to extend the choice of license to its licensees as provided above.
  115.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  115.45 +Version 2 license, then the option applies only if the new code is
  115.46 +made subject to such option by the copyright holder.
  115.47 +-->
  115.48  <project name="platform" default="download" basedir="..">
  115.49      <target name="download" unless="no.download">
  115.50          <mkdir dir="${nbplatform.default.netbeans.dest.dir}"/>
   116.1 --- a/hudson/trunk	Mon Dec 19 11:37:36 2016 +0100
   116.2 +++ b/hudson/trunk	Mon Feb 27 22:40:44 2017 +0100
   116.3 @@ -1,4 +1,47 @@
   116.4  #!/bin/bash -x
   116.5 +
   116.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   116.7 +#
   116.8 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   116.9 +#
  116.10 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  116.11 +# Other names may be trademarks of their respective owners.
  116.12 +#
  116.13 +# The contents of this file are subject to the terms of either the GNU
  116.14 +# General Public License Version 2 only ("GPL") or the Common
  116.15 +# Development and Distribution License("CDDL") (collectively, the
  116.16 +# "License"). You may not use this file except in compliance with the
  116.17 +# License. You can obtain a copy of the License at
  116.18 +# http://www.netbeans.org/cddl-gplv2.html
  116.19 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  116.20 +# specific language governing permissions and limitations under the
  116.21 +# License.  When distributing the software, include this License Header
  116.22 +# Notice in each file and include the License file at
  116.23 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  116.24 +# particular file as subject to the "Classpath" exception as provided
  116.25 +# by Oracle in the GPL Version 2 section of the License file that
  116.26 +# accompanied this code. If applicable, add the following below the
  116.27 +# License Header, with the fields enclosed by brackets [] replaced by
  116.28 +# your own identifying information:
  116.29 +# "Portions Copyrighted [year] [name of copyright owner]"
  116.30 +#
  116.31 +# Contributor(s):
  116.32 +#
  116.33 +# The Original Software is NetBeans. The Initial Developer of the Original
  116.34 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  116.35 +# Microsystems, Inc. All Rights Reserved.
  116.36 +#
  116.37 +# If you wish your version of this file to be governed by only the CDDL
  116.38 +# or only the GPL Version 2, indicate your decision by adding
  116.39 +# "[Contributor] elects to include this software in this distribution
  116.40 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  116.41 +# single choice of license, a recipient has the option to distribute
  116.42 +# your version of this file under either the CDDL, the GPL Version 2 or
  116.43 +# to extend the choice of license to its licensees as provided above.
  116.44 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  116.45 +# Version 2 license, then the option applies only if the new code is
  116.46 +# made subject to such option by the copyright holder.
  116.47 +
  116.48  prepare_platform() {
  116.49  if [ "$TRUNK_URL" == "" ] ; then
  116.50      TRUNK_URL="http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc";
   117.1 --- a/language/build.sh	Mon Dec 19 11:37:36 2016 +0100
   117.2 +++ b/language/build.sh	Mon Feb 27 22:40:44 2017 +0100
   117.3 @@ -1,3 +1,46 @@
   117.4  #!/bin/bash
   117.5 +
   117.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   117.7 +#
   117.8 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   117.9 +#
  117.10 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  117.11 +# Other names may be trademarks of their respective owners.
  117.12 +#
  117.13 +# The contents of this file are subject to the terms of either the GNU
  117.14 +# General Public License Version 2 only ("GPL") or the Common
  117.15 +# Development and Distribution License("CDDL") (collectively, the
  117.16 +# "License"). You may not use this file except in compliance with the
  117.17 +# License. You can obtain a copy of the License at
  117.18 +# http://www.netbeans.org/cddl-gplv2.html
  117.19 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  117.20 +# specific language governing permissions and limitations under the
  117.21 +# License.  When distributing the software, include this License Header
  117.22 +# Notice in each file and include the License file at
  117.23 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  117.24 +# particular file as subject to the "Classpath" exception as provided
  117.25 +# by Oracle in the GPL Version 2 section of the License file that
  117.26 +# accompanied this code. If applicable, add the following below the
  117.27 +# License Header, with the fields enclosed by brackets [] replaced by
  117.28 +# your own identifying information:
  117.29 +# "Portions Copyrighted [year] [name of copyright owner]"
  117.30 +#
  117.31 +# Contributor(s):
  117.32 +#
  117.33 +# The Original Software is NetBeans. The Initial Developer of the Original
  117.34 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  117.35 +# Microsystems, Inc. All Rights Reserved.
  117.36 +#
  117.37 +# If you wish your version of this file to be governed by only the CDDL
  117.38 +# or only the GPL Version 2, indicate your decision by adding
  117.39 +# "[Contributor] elects to include this software in this distribution
  117.40 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  117.41 +# single choice of license, a recipient has the option to distribute
  117.42 +# your version of this file under either the CDDL, the GPL Version 2 or
  117.43 +# to extend the choice of license to its licensees as provided above.
  117.44 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  117.45 +# Version 2 license, then the option applies only if the new code is
  117.46 +# made subject to such option by the copyright holder.
  117.47 +
  117.48  (cd ide; ant "$@" clean && ant "$@" nbms && ant "$@" test) || exit 1
  117.49  
   118.1 --- a/language/ide/bridges/apisupport/build.xml	Mon Dec 19 11:37:36 2016 +0100
   118.2 +++ b/language/ide/bridges/apisupport/build.xml	Mon Feb 27 22:40:44 2017 +0100
   118.3 @@ -1,4 +1,47 @@
   118.4  <?xml version="1.0" encoding="UTF-8"?>
   118.5 +<!--
   118.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   118.7 +
   118.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   118.9 +
  118.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  118.11 +Other names may be trademarks of their respective owners.
  118.12 +
  118.13 +The contents of this file are subject to the terms of either the GNU
  118.14 +General Public License Version 2 only ("GPL") or the Common
  118.15 +Development and Distribution License("CDDL") (collectively, the
  118.16 +"License"). You may not use this file except in compliance with the
  118.17 +License. You can obtain a copy of the License at
  118.18 +http://www.netbeans.org/cddl-gplv2.html
  118.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  118.20 +specific language governing permissions and limitations under the
  118.21 +License.  When distributing the software, include this License Header
  118.22 +Notice in each file and include the License file at
  118.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  118.24 +particular file as subject to the "Classpath" exception as provided
  118.25 +by Oracle in the GPL Version 2 section of the License file that
  118.26 +accompanied this code. If applicable, add the following below the
  118.27 +License Header, with the fields enclosed by brackets [] replaced by
  118.28 +your own identifying information:
  118.29 +"Portions Copyrighted [year] [name of copyright owner]"
  118.30 +
  118.31 +Contributor(s):
  118.32 +
  118.33 +The Original Software is NetBeans. The Initial Developer of the Original
  118.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  118.35 +Microsystems, Inc. All Rights Reserved.
  118.36 +
  118.37 +If you wish your version of this file to be governed by only the CDDL
  118.38 +or only the GPL Version 2, indicate your decision by adding
  118.39 +"[Contributor] elects to include this software in this distribution
  118.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  118.41 +single choice of license, a recipient has the option to distribute
  118.42 +your version of this file under either the CDDL, the GPL Version 2 or
  118.43 +to extend the choice of license to its licensees as provided above.
  118.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  118.45 +Version 2 license, then the option applies only if the new code is
  118.46 +made subject to such option by the copyright holder.
  118.47 +-->
  118.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  118.49  <!-- for some information on what you could do (e.g. targets to override). -->
  118.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   119.1 --- a/language/ide/bridges/apisupport/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   119.2 +++ b/language/ide/bridges/apisupport/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   119.3 @@ -1,5 +1,48 @@
   119.4  <?xml version="1.0" encoding="UTF-8"?>
   119.5  <!--
   119.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   119.7 +
   119.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   119.9 +
  119.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  119.11 +Other names may be trademarks of their respective owners.
  119.12 +
  119.13 +The contents of this file are subject to the terms of either the GNU
  119.14 +General Public License Version 2 only ("GPL") or the Common
  119.15 +Development and Distribution License("CDDL") (collectively, the
  119.16 +"License"). You may not use this file except in compliance with the
  119.17 +License. You can obtain a copy of the License at
  119.18 +http://www.netbeans.org/cddl-gplv2.html
  119.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  119.20 +specific language governing permissions and limitations under the
  119.21 +License.  When distributing the software, include this License Header
  119.22 +Notice in each file and include the License file at
  119.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  119.24 +particular file as subject to the "Classpath" exception as provided
  119.25 +by Oracle in the GPL Version 2 section of the License file that
  119.26 +accompanied this code. If applicable, add the following below the
  119.27 +License Header, with the fields enclosed by brackets [] replaced by
  119.28 +your own identifying information:
  119.29 +"Portions Copyrighted [year] [name of copyright owner]"
  119.30 +
  119.31 +Contributor(s):
  119.32 +
  119.33 +The Original Software is NetBeans. The Initial Developer of the Original
  119.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  119.35 +Microsystems, Inc. All Rights Reserved.
  119.36 +
  119.37 +If you wish your version of this file to be governed by only the CDDL
  119.38 +or only the GPL Version 2, indicate your decision by adding
  119.39 +"[Contributor] elects to include this software in this distribution
  119.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  119.41 +single choice of license, a recipient has the option to distribute
  119.42 +your version of this file under either the CDDL, the GPL Version 2 or
  119.43 +to extend the choice of license to its licensees as provided above.
  119.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  119.45 +Version 2 license, then the option applies only if the new code is
  119.46 +made subject to such option by the copyright holder.
  119.47 +-->
  119.48 +<!--
  119.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  119.50  ***         EDIT ../build.xml INSTEAD         ***
  119.51  -->
   120.1 --- a/language/ide/bridges/apisupport/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   120.2 +++ b/language/ide/bridges/apisupport/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   120.3 @@ -1,3 +1,44 @@
   120.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   120.5 +#
   120.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   120.7 +#
   120.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   120.9 +# Other names may be trademarks of their respective owners.
  120.10 +#
  120.11 +# The contents of this file are subject to the terms of either the GNU
  120.12 +# General Public License Version 2 only ("GPL") or the Common
  120.13 +# Development and Distribution License("CDDL") (collectively, the
  120.14 +# "License"). You may not use this file except in compliance with the
  120.15 +# License. You can obtain a copy of the License at
  120.16 +# http://www.netbeans.org/cddl-gplv2.html
  120.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  120.18 +# specific language governing permissions and limitations under the
  120.19 +# License.  When distributing the software, include this License Header
  120.20 +# Notice in each file and include the License file at
  120.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  120.22 +# particular file as subject to the "Classpath" exception as provided
  120.23 +# by Oracle in the GPL Version 2 section of the License file that
  120.24 +# accompanied this code. If applicable, add the following below the
  120.25 +# License Header, with the fields enclosed by brackets [] replaced by
  120.26 +# your own identifying information:
  120.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  120.28 +#
  120.29 +# Contributor(s):
  120.30 +#
  120.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  120.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  120.33 +# Microsystems, Inc. All Rights Reserved.
  120.34 +#
  120.35 +# If you wish your version of this file to be governed by only the CDDL
  120.36 +# or only the GPL Version 2, indicate your decision by adding
  120.37 +# "[Contributor] elects to include this software in this distribution
  120.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  120.39 +# single choice of license, a recipient has the option to distribute
  120.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  120.41 +# to extend the choice of license to its licensees as provided above.
  120.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  120.43 +# Version 2 license, then the option applies only if the new code is
  120.44 +# made subject to such option by the copyright holder.
  120.45  build.xml.data.CRC32=c45369e1
  120.46  build.xml.script.CRC32=a2cc69eb
  120.47  build.xml.stylesheet.CRC32=79c3b980@1.40
   121.1 --- a/language/ide/bridges/apisupport/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   121.2 +++ b/language/ide/bridges/apisupport/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   121.3 @@ -1,3 +1,44 @@
   121.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   121.5 +#
   121.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   121.7 +#
   121.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   121.9 +# Other names may be trademarks of their respective owners.
  121.10 +#
  121.11 +# The contents of this file are subject to the terms of either the GNU
  121.12 +# General Public License Version 2 only ("GPL") or the Common
  121.13 +# Development and Distribution License("CDDL") (collectively, the
  121.14 +# "License"). You may not use this file except in compliance with the
  121.15 +# License. You can obtain a copy of the License at
  121.16 +# http://www.netbeans.org/cddl-gplv2.html
  121.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  121.18 +# specific language governing permissions and limitations under the
  121.19 +# License.  When distributing the software, include this License Header
  121.20 +# Notice in each file and include the License file at
  121.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  121.22 +# particular file as subject to the "Classpath" exception as provided
  121.23 +# by Oracle in the GPL Version 2 section of the License file that
  121.24 +# accompanied this code. If applicable, add the following below the
  121.25 +# License Header, with the fields enclosed by brackets [] replaced by
  121.26 +# your own identifying information:
  121.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  121.28 +#
  121.29 +# Contributor(s):
  121.30 +#
  121.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  121.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  121.33 +# Microsystems, Inc. All Rights Reserved.
  121.34 +#
  121.35 +# If you wish your version of this file to be governed by only the CDDL
  121.36 +# or only the GPL Version 2, indicate your decision by adding
  121.37 +# "[Contributor] elects to include this software in this distribution
  121.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  121.39 +# single choice of license, a recipient has the option to distribute
  121.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  121.41 +# to extend the choice of license to its licensees as provided above.
  121.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  121.43 +# Version 2 license, then the option applies only if the new code is
  121.44 +# made subject to such option by the copyright holder.
  121.45  is.eager=true
  121.46  javac.source=1.5
  121.47  javac.compilerargs=-Xlint -Xlint:-serial
   122.1 --- a/language/ide/bridges/apisupport/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   122.2 +++ b/language/ide/bridges/apisupport/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   122.3 @@ -1,4 +1,47 @@
   122.4  <?xml version="1.0" encoding="UTF-8"?>
   122.5 +<!--
   122.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   122.7 +
   122.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   122.9 +
  122.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  122.11 +Other names may be trademarks of their respective owners.
  122.12 +
  122.13 +The contents of this file are subject to the terms of either the GNU
  122.14 +General Public License Version 2 only ("GPL") or the Common
  122.15 +Development and Distribution License("CDDL") (collectively, the
  122.16 +"License"). You may not use this file except in compliance with the
  122.17 +License. You can obtain a copy of the License at
  122.18 +http://www.netbeans.org/cddl-gplv2.html
  122.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  122.20 +specific language governing permissions and limitations under the
  122.21 +License.  When distributing the software, include this License Header
  122.22 +Notice in each file and include the License file at
  122.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  122.24 +particular file as subject to the "Classpath" exception as provided
  122.25 +by Oracle in the GPL Version 2 section of the License file that
  122.26 +accompanied this code. If applicable, add the following below the
  122.27 +License Header, with the fields enclosed by brackets [] replaced by
  122.28 +your own identifying information:
  122.29 +"Portions Copyrighted [year] [name of copyright owner]"
  122.30 +
  122.31 +Contributor(s):
  122.32 +
  122.33 +The Original Software is NetBeans. The Initial Developer of the Original
  122.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  122.35 +Microsystems, Inc. All Rights Reserved.
  122.36 +
  122.37 +If you wish your version of this file to be governed by only the CDDL
  122.38 +or only the GPL Version 2, indicate your decision by adding
  122.39 +"[Contributor] elects to include this software in this distribution
  122.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  122.41 +single choice of license, a recipient has the option to distribute
  122.42 +your version of this file under either the CDDL, the GPL Version 2 or
  122.43 +to extend the choice of license to its licensees as provided above.
  122.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  122.45 +Version 2 license, then the option applies only if the new code is
  122.46 +made subject to such option by the copyright holder.
  122.47 +-->
  122.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  122.49      <type>org.netbeans.modules.apisupport.project</type>
  122.50      <configuration>
   123.1 --- a/language/ide/bridges/apisupport/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   123.2 +++ b/language/ide/bridges/apisupport/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
   123.3 @@ -1,1 +1,42 @@
   123.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   123.5 +#
   123.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   123.7 +#
   123.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   123.9 +# Other names may be trademarks of their respective owners.
  123.10 +#
  123.11 +# The contents of this file are subject to the terms of either the GNU
  123.12 +# General Public License Version 2 only ("GPL") or the Common
  123.13 +# Development and Distribution License("CDDL") (collectively, the
  123.14 +# "License"). You may not use this file except in compliance with the
  123.15 +# License. You can obtain a copy of the License at
  123.16 +# http://www.netbeans.org/cddl-gplv2.html
  123.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  123.18 +# specific language governing permissions and limitations under the
  123.19 +# License.  When distributing the software, include this License Header
  123.20 +# Notice in each file and include the License file at
  123.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  123.22 +# particular file as subject to the "Classpath" exception as provided
  123.23 +# by Oracle in the GPL Version 2 section of the License file that
  123.24 +# accompanied this code. If applicable, add the following below the
  123.25 +# License Header, with the fields enclosed by brackets [] replaced by
  123.26 +# your own identifying information:
  123.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  123.28 +#
  123.29 +# Contributor(s):
  123.30 +#
  123.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  123.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  123.33 +# Microsystems, Inc. All Rights Reserved.
  123.34 +#
  123.35 +# If you wish your version of this file to be governed by only the CDDL
  123.36 +# or only the GPL Version 2, indicate your decision by adding
  123.37 +# "[Contributor] elects to include this software in this distribution
  123.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  123.39 +# single choice of license, a recipient has the option to distribute
  123.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  123.41 +# to extend the choice of license to its licensees as provided above.
  123.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  123.43 +# Version 2 license, then the option applies only if the new code is
  123.44 +# made subject to such option by the copyright holder.
  123.45  suite.dir=${basedir}/../..
   124.1 --- a/language/ide/bridges/apisupport/src/org/netbeans/modules/jackpot30/apisupport/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   124.2 +++ b/language/ide/bridges/apisupport/src/org/netbeans/modules/jackpot30/apisupport/Bundle.properties	Mon Feb 27 22:40:44 2017 +0100
   124.3 @@ -1,1 +1,42 @@
   124.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   124.5 +#
   124.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   124.7 +#
   124.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   124.9 +# Other names may be trademarks of their respective owners.
  124.10 +#
  124.11 +# The contents of this file are subject to the terms of either the GNU
  124.12 +# General Public License Version 2 only ("GPL") or the Common
  124.13 +# Development and Distribution License("CDDL") (collectively, the
  124.14 +# "License"). You may not use this file except in compliance with the
  124.15 +# License. You can obtain a copy of the License at
  124.16 +# http://www.netbeans.org/cddl-gplv2.html
  124.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  124.18 +# specific language governing permissions and limitations under the
  124.19 +# License.  When distributing the software, include this License Header
  124.20 +# Notice in each file and include the License file at
  124.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  124.22 +# particular file as subject to the "Classpath" exception as provided
  124.23 +# by Oracle in the GPL Version 2 section of the License file that
  124.24 +# accompanied this code. If applicable, add the following below the
  124.25 +# License Header, with the fields enclosed by brackets [] replaced by
  124.26 +# your own identifying information:
  124.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  124.28 +#
  124.29 +# Contributor(s):
  124.30 +#
  124.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  124.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  124.33 +# Microsystems, Inc. All Rights Reserved.
  124.34 +#
  124.35 +# If you wish your version of this file to be governed by only the CDDL
  124.36 +# or only the GPL Version 2, indicate your decision by adding
  124.37 +# "[Contributor] elects to include this software in this distribution
  124.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  124.39 +# single choice of license, a recipient has the option to distribute
  124.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  124.41 +# to extend the choice of license to its licensees as provided above.
  124.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  124.43 +# Version 2 license, then the option applies only if the new code is
  124.44 +# made subject to such option by the copyright holder.
  124.45  OpenIDE-Module-Name=Jackpot 3.0 APISupport Bridge
   125.1 --- a/language/ide/build.xml	Mon Dec 19 11:37:36 2016 +0100
   125.2 +++ b/language/ide/build.xml	Mon Feb 27 22:40:44 2017 +0100
   125.3 @@ -1,4 +1,47 @@
   125.4  <?xml version="1.0" encoding="UTF-8"?>
   125.5 +<!--
   125.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   125.7 +
   125.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   125.9 +
  125.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  125.11 +Other names may be trademarks of their respective owners.
  125.12 +
  125.13 +The contents of this file are subject to the terms of either the GNU
  125.14 +General Public License Version 2 only ("GPL") or the Common
  125.15 +Development and Distribution License("CDDL") (collectively, the
  125.16 +"License"). You may not use this file except in compliance with the
  125.17 +License. You can obtain a copy of the License at
  125.18 +http://www.netbeans.org/cddl-gplv2.html
  125.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  125.20 +specific language governing permissions and limitations under the
  125.21 +License.  When distributing the software, include this License Header
  125.22 +Notice in each file and include the License file at
  125.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  125.24 +particular file as subject to the "Classpath" exception as provided
  125.25 +by Oracle in the GPL Version 2 section of the License file that
  125.26 +accompanied this code. If applicable, add the following below the
  125.27 +License Header, with the fields enclosed by brackets [] replaced by
  125.28 +your own identifying information:
  125.29 +"Portions Copyrighted [year] [name of copyright owner]"
  125.30 +
  125.31 +Contributor(s):
  125.32 +
  125.33 +The Original Software is NetBeans. The Initial Developer of the Original
  125.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  125.35 +Microsystems, Inc. All Rights Reserved.
  125.36 +
  125.37 +If you wish your version of this file to be governed by only the CDDL
  125.38 +or only the GPL Version 2, indicate your decision by adding
  125.39 +"[Contributor] elects to include this software in this distribution
  125.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  125.41 +single choice of license, a recipient has the option to distribute
  125.42 +your version of this file under either the CDDL, the GPL Version 2 or
  125.43 +to extend the choice of license to its licensees as provided above.
  125.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  125.45 +Version 2 license, then the option applies only if the new code is
  125.46 +made subject to such option by the copyright holder.
  125.47 +-->
  125.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  125.49  <!-- for some information on what you could do (e.g. targets to override). -->
  125.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   126.1 --- a/language/ide/indexing/build.xml	Mon Dec 19 11:37:36 2016 +0100
   126.2 +++ b/language/ide/indexing/build.xml	Mon Feb 27 22:40:44 2017 +0100
   126.3 @@ -1,4 +1,47 @@
   126.4  <?xml version="1.0" encoding="UTF-8"?>
   126.5 +<!--
   126.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   126.7 +
   126.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   126.9 +
  126.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  126.11 +Other names may be trademarks of their respective owners.
  126.12 +
  126.13 +The contents of this file are subject to the terms of either the GNU
  126.14 +General Public License Version 2 only ("GPL") or the Common
  126.15 +Development and Distribution License("CDDL") (collectively, the
  126.16 +"License"). You may not use this file except in compliance with the
  126.17 +License. You can obtain a copy of the License at
  126.18 +http://www.netbeans.org/cddl-gplv2.html
  126.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  126.20 +specific language governing permissions and limitations under the
  126.21 +License.  When distributing the software, include this License Header
  126.22 +Notice in each file and include the License file at
  126.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  126.24 +particular file as subject to the "Classpath" exception as provided
  126.25 +by Oracle in the GPL Version 2 section of the License file that
  126.26 +accompanied this code. If applicable, add the following below the
  126.27 +License Header, with the fields enclosed by brackets [] replaced by
  126.28 +your own identifying information:
  126.29 +"Portions Copyrighted [year] [name of copyright owner]"
  126.30 +
  126.31 +Contributor(s):
  126.32 +
  126.33 +The Original Software is NetBeans. The Initial Developer of the Original
  126.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  126.35 +Microsystems, Inc. All Rights Reserved.
  126.36 +
  126.37 +If you wish your version of this file to be governed by only the CDDL
  126.38 +or only the GPL Version 2, indicate your decision by adding
  126.39 +"[Contributor] elects to include this software in this distribution
  126.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  126.41 +single choice of license, a recipient has the option to distribute
  126.42 +your version of this file under either the CDDL, the GPL Version 2 or
  126.43 +to extend the choice of license to its licensees as provided above.
  126.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  126.45 +Version 2 license, then the option applies only if the new code is
  126.46 +made subject to such option by the copyright holder.
  126.47 +-->
  126.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  126.49  <!-- for some information on what you could do (e.g. targets to override). -->
  126.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   127.1 --- a/language/ide/indexing/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   127.2 +++ b/language/ide/indexing/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   127.3 @@ -1,5 +1,48 @@
   127.4  <?xml version="1.0" encoding="UTF-8"?>
   127.5  <!--
   127.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   127.7 +
   127.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   127.9 +
  127.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  127.11 +Other names may be trademarks of their respective owners.
  127.12 +
  127.13 +The contents of this file are subject to the terms of either the GNU
  127.14 +General Public License Version 2 only ("GPL") or the Common
  127.15 +Development and Distribution License("CDDL") (collectively, the
  127.16 +"License"). You may not use this file except in compliance with the
  127.17 +License. You can obtain a copy of the License at
  127.18 +http://www.netbeans.org/cddl-gplv2.html
  127.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  127.20 +specific language governing permissions and limitations under the
  127.21 +License.  When distributing the software, include this License Header
  127.22 +Notice in each file and include the License file at
  127.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  127.24 +particular file as subject to the "Classpath" exception as provided
  127.25 +by Oracle in the GPL Version 2 section of the License file that
  127.26 +accompanied this code. If applicable, add the following below the
  127.27 +License Header, with the fields enclosed by brackets [] replaced by
  127.28 +your own identifying information:
  127.29 +"Portions Copyrighted [year] [name of copyright owner]"
  127.30 +
  127.31 +Contributor(s):
  127.32 +
  127.33 +The Original Software is NetBeans. The Initial Developer of the Original
  127.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  127.35 +Microsystems, Inc. All Rights Reserved.
  127.36 +
  127.37 +If you wish your version of this file to be governed by only the CDDL
  127.38 +or only the GPL Version 2, indicate your decision by adding
  127.39 +"[Contributor] elects to include this software in this distribution
  127.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  127.41 +single choice of license, a recipient has the option to distribute
  127.42 +your version of this file under either the CDDL, the GPL Version 2 or
  127.43 +to extend the choice of license to its licensees as provided above.
  127.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  127.45 +Version 2 license, then the option applies only if the new code is
  127.46 +made subject to such option by the copyright holder.
  127.47 +-->
  127.48 +<!--
  127.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  127.50  ***         EDIT ../build.xml INSTEAD         ***
  127.51  -->
   128.1 --- a/language/ide/indexing/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   128.2 +++ b/language/ide/indexing/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   128.3 @@ -1,3 +1,44 @@
   128.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   128.5 +#
   128.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   128.7 +#
   128.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   128.9 +# Other names may be trademarks of their respective owners.
  128.10 +#
  128.11 +# The contents of this file are subject to the terms of either the GNU
  128.12 +# General Public License Version 2 only ("GPL") or the Common
  128.13 +# Development and Distribution License("CDDL") (collectively, the
  128.14 +# "License"). You may not use this file except in compliance with the
  128.15 +# License. You can obtain a copy of the License at
  128.16 +# http://www.netbeans.org/cddl-gplv2.html
  128.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  128.18 +# specific language governing permissions and limitations under the
  128.19 +# License.  When distributing the software, include this License Header
  128.20 +# Notice in each file and include the License file at
  128.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  128.22 +# particular file as subject to the "Classpath" exception as provided
  128.23 +# by Oracle in the GPL Version 2 section of the License file that
  128.24 +# accompanied this code. If applicable, add the following below the
  128.25 +# License Header, with the fields enclosed by brackets [] replaced by
  128.26 +# your own identifying information:
  128.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  128.28 +#
  128.29 +# Contributor(s):
  128.30 +#
  128.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  128.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  128.33 +# Microsystems, Inc. All Rights Reserved.
  128.34 +#
  128.35 +# If you wish your version of this file to be governed by only the CDDL
  128.36 +# or only the GPL Version 2, indicate your decision by adding
  128.37 +# "[Contributor] elects to include this software in this distribution
  128.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  128.39 +# single choice of license, a recipient has the option to distribute
  128.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  128.41 +# to extend the choice of license to its licensees as provided above.
  128.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  128.43 +# Version 2 license, then the option applies only if the new code is
  128.44 +# made subject to such option by the copyright holder.
  128.45  build.xml.data.CRC32=68c5618a
  128.46  build.xml.script.CRC32=f0946049
  128.47  build.xml.stylesheet.CRC32=a56c6a5b@2.49
   129.1 --- a/language/ide/indexing/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   129.2 +++ b/language/ide/indexing/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   129.3 @@ -1,3 +1,44 @@
   129.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   129.5 +#
   129.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   129.7 +#
   129.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   129.9 +# Other names may be trademarks of their respective owners.
  129.10 +#
  129.11 +# The contents of this file are subject to the terms of either the GNU
  129.12 +# General Public License Version 2 only ("GPL") or the Common
  129.13 +# Development and Distribution License("CDDL") (collectively, the
  129.14 +# "License"). You may not use this file except in compliance with the
  129.15 +# License. You can obtain a copy of the License at
  129.16 +# http://www.netbeans.org/cddl-gplv2.html
  129.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  129.18 +# specific language governing permissions and limitations under the
  129.19 +# License.  When distributing the software, include this License Header
  129.20 +# Notice in each file and include the License file at
  129.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  129.22 +# particular file as subject to the "Classpath" exception as provided
  129.23 +# by Oracle in the GPL Version 2 section of the License file that
  129.24 +# accompanied this code. If applicable, add the following below the
  129.25 +# License Header, with the fields enclosed by brackets [] replaced by
  129.26 +# your own identifying information:
  129.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  129.28 +#
  129.29 +# Contributor(s):
  129.30 +#
  129.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  129.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  129.33 +# Microsystems, Inc. All Rights Reserved.
  129.34 +#
  129.35 +# If you wish your version of this file to be governed by only the CDDL
  129.36 +# or only the GPL Version 2, indicate your decision by adding
  129.37 +# "[Contributor] elects to include this software in this distribution
  129.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  129.39 +# single choice of license, a recipient has the option to distribute
  129.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  129.41 +# to extend the choice of license to its licensees as provided above.
  129.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  129.43 +# Version 2 license, then the option applies only if the new code is
  129.44 +# made subject to such option by the copyright holder.
  129.45  javac.source=1.6
  129.46  javac.compilerargs=-Xlint -Xlint:-serial
  129.47  spec.version.base=1.0
   130.1 --- a/language/ide/indexing/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   130.2 +++ b/language/ide/indexing/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   130.3 @@ -1,4 +1,47 @@
   130.4  <?xml version="1.0" encoding="UTF-8"?>
   130.5 +<!--
   130.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   130.7 +
   130.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   130.9 +
  130.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  130.11 +Other names may be trademarks of their respective owners.
  130.12 +
  130.13 +The contents of this file are subject to the terms of either the GNU
  130.14 +General Public License Version 2 only ("GPL") or the Common
  130.15 +Development and Distribution License("CDDL") (collectively, the
  130.16 +"License"). You may not use this file except in compliance with the
  130.17 +License. You can obtain a copy of the License at
  130.18 +http://www.netbeans.org/cddl-gplv2.html
  130.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  130.20 +specific language governing permissions and limitations under the
  130.21 +License.  When distributing the software, include this License Header
  130.22 +Notice in each file and include the License file at
  130.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  130.24 +particular file as subject to the "Classpath" exception as provided
  130.25 +by Oracle in the GPL Version 2 section of the License file that
  130.26 +accompanied this code. If applicable, add the following below the
  130.27 +License Header, with the fields enclosed by brackets [] replaced by
  130.28 +your own identifying information:
  130.29 +"Portions Copyrighted [year] [name of copyright owner]"
  130.30 +
  130.31 +Contributor(s):
  130.32 +
  130.33 +The Original Software is NetBeans. The Initial Developer of the Original
  130.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  130.35 +Microsystems, Inc. All Rights Reserved.
  130.36 +
  130.37 +If you wish your version of this file to be governed by only the CDDL
  130.38 +or only the GPL Version 2, indicate your decision by adding
  130.39 +"[Contributor] elects to include this software in this distribution
  130.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  130.41 +single choice of license, a recipient has the option to distribute
  130.42 +your version of this file under either the CDDL, the GPL Version 2 or
  130.43 +to extend the choice of license to its licensees as provided above.
  130.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  130.45 +Version 2 license, then the option applies only if the new code is
  130.46 +made subject to such option by the copyright holder.
  130.47 +-->
  130.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  130.49      <type>org.netbeans.modules.apisupport.project</type>
  130.50      <configuration>
   131.1 --- a/language/ide/indexing/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   131.2 +++ b/language/ide/indexing/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
   131.3 @@ -1,1 +1,42 @@
   131.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   131.5 +#
   131.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   131.7 +#
   131.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   131.9 +# Other names may be trademarks of their respective owners.
  131.10 +#
  131.11 +# The contents of this file are subject to the terms of either the GNU
  131.12 +# General Public License Version 2 only ("GPL") or the Common
  131.13 +# Development and Distribution License("CDDL") (collectively, the
  131.14 +# "License"). You may not use this file except in compliance with the
  131.15 +# License. You can obtain a copy of the License at
  131.16 +# http://www.netbeans.org/cddl-gplv2.html
  131.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  131.18 +# specific language governing permissions and limitations under the
  131.19 +# License.  When distributing the software, include this License Header
  131.20 +# Notice in each file and include the License file at
  131.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  131.22 +# particular file as subject to the "Classpath" exception as provided
  131.23 +# by Oracle in the GPL Version 2 section of the License file that
  131.24 +# accompanied this code. If applicable, add the following below the
  131.25 +# License Header, with the fields enclosed by brackets [] replaced by
  131.26 +# your own identifying information:
  131.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  131.28 +#
  131.29 +# Contributor(s):
  131.30 +#
  131.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  131.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  131.33 +# Microsystems, Inc. All Rights Reserved.
  131.34 +#
  131.35 +# If you wish your version of this file to be governed by only the CDDL
  131.36 +# or only the GPL Version 2, indicate your decision by adding
  131.37 +# "[Contributor] elects to include this software in this distribution
  131.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  131.39 +# single choice of license, a recipient has the option to distribute
  131.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  131.41 +# to extend the choice of license to its licensees as provided above.
  131.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  131.43 +# Version 2 license, then the option applies only if the new code is
  131.44 +# made subject to such option by the copyright holder.
  131.45  suite.dir=${basedir}/..
   132.1 --- a/language/ide/indexing/src/org/netbeans/modules/jackpot30/indexing/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   132.2 +++ b/language/ide/indexing/src/org/netbeans/modules/jackpot30/indexing/Bundle.properties	Mon Feb 27 22:40:44 2017 +0100
   132.3 @@ -1,1 +1,42 @@
   132.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   132.5 +#
   132.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   132.7 +#
   132.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   132.9 +# Other names may be trademarks of their respective owners.
  132.10 +#
  132.11 +# The contents of this file are subject to the terms of either the GNU
  132.12 +# General Public License Version 2 only ("GPL") or the Common
  132.13 +# Development and Distribution License("CDDL") (collectively, the
  132.14 +# "License"). You may not use this file except in compliance with the
  132.15 +# License. You can obtain a copy of the License at
  132.16 +# http://www.netbeans.org/cddl-gplv2.html
  132.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  132.18 +# specific language governing permissions and limitations under the
  132.19 +# License.  When distributing the software, include this License Header
  132.20 +# Notice in each file and include the License file at
  132.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  132.22 +# particular file as subject to the "Classpath" exception as provided
  132.23 +# by Oracle in the GPL Version 2 section of the License file that
  132.24 +# accompanied this code. If applicable, add the following below the
  132.25 +# License Header, with the fields enclosed by brackets [] replaced by
  132.26 +# your own identifying information:
  132.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  132.28 +#
  132.29 +# Contributor(s):
  132.30 +#
  132.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  132.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  132.33 +# Microsystems, Inc. All Rights Reserved.
  132.34 +#
  132.35 +# If you wish your version of this file to be governed by only the CDDL
  132.36 +# or only the GPL Version 2, indicate your decision by adding
  132.37 +# "[Contributor] elects to include this software in this distribution
  132.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  132.39 +# single choice of license, a recipient has the option to distribute
  132.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  132.41 +# to extend the choice of license to its licensees as provided above.
  132.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  132.43 +# Version 2 license, then the option applies only if the new code is
  132.44 +# made subject to such option by the copyright holder.
  132.45  OpenIDE-Module-Name=Jackpot 3.0 Indexing
   133.1 --- a/language/ide/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   133.2 +++ b/language/ide/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   133.3 @@ -1,5 +1,48 @@
   133.4  <?xml version="1.0" encoding="UTF-8"?>
   133.5  <!--
   133.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   133.7 +
   133.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   133.9 +
  133.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  133.11 +Other names may be trademarks of their respective owners.
  133.12 +
  133.13 +The contents of this file are subject to the terms of either the GNU
  133.14 +General Public License Version 2 only ("GPL") or the Common
  133.15 +Development and Distribution License("CDDL") (collectively, the
  133.16 +"License"). You may not use this file except in compliance with the
  133.17 +License. You can obtain a copy of the License at
  133.18 +http://www.netbeans.org/cddl-gplv2.html
  133.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  133.20 +specific language governing permissions and limitations under the
  133.21 +License.  When distributing the software, include this License Header
  133.22 +Notice in each file and include the License file at
  133.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  133.24 +particular file as subject to the "Classpath" exception as provided
  133.25 +by Oracle in the GPL Version 2 section of the License file that
  133.26 +accompanied this code. If applicable, add the following below the
  133.27 +License Header, with the fields enclosed by brackets [] replaced by
  133.28 +your own identifying information:
  133.29 +"Portions Copyrighted [year] [name of copyright owner]"
  133.30 +
  133.31 +Contributor(s):
  133.32 +
  133.33 +The Original Software is NetBeans. The Initial Developer of the Original
  133.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  133.35 +Microsystems, Inc. All Rights Reserved.
  133.36 +
  133.37 +If you wish your version of this file to be governed by only the CDDL
  133.38 +or only the GPL Version 2, indicate your decision by adding
  133.39 +"[Contributor] elects to include this software in this distribution
  133.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  133.41 +single choice of license, a recipient has the option to distribute
  133.42 +your version of this file under either the CDDL, the GPL Version 2 or
  133.43 +to extend the choice of license to its licensees as provided above.
  133.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  133.45 +Version 2 license, then the option applies only if the new code is
  133.46 +made subject to such option by the copyright holder.
  133.47 +-->
  133.48 +<!--
  133.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  133.50  ***         EDIT ../build.xml INSTEAD         ***
  133.51  -->
   134.1 --- a/language/ide/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   134.2 +++ b/language/ide/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   134.3 @@ -1,3 +1,44 @@
   134.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   134.5 +#
   134.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   134.7 +#
   134.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   134.9 +# Other names may be trademarks of their respective owners.
  134.10 +#
  134.11 +# The contents of this file are subject to the terms of either the GNU
  134.12 +# General Public License Version 2 only ("GPL") or the Common
  134.13 +# Development and Distribution License("CDDL") (collectively, the
  134.14 +# "License"). You may not use this file except in compliance with the
  134.15 +# License. You can obtain a copy of the License at
  134.16 +# http://www.netbeans.org/cddl-gplv2.html
  134.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  134.18 +# specific language governing permissions and limitations under the
  134.19 +# License.  When distributing the software, include this License Header
  134.20 +# Notice in each file and include the License file at
  134.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  134.22 +# particular file as subject to the "Classpath" exception as provided
  134.23 +# by Oracle in the GPL Version 2 section of the License file that
  134.24 +# accompanied this code. If applicable, add the following below the
  134.25 +# License Header, with the fields enclosed by brackets [] replaced by
  134.26 +# your own identifying information:
  134.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  134.28 +#
  134.29 +# Contributor(s):
  134.30 +#
  134.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  134.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  134.33 +# Microsystems, Inc. All Rights Reserved.
  134.34 +#
  134.35 +# If you wish your version of this file to be governed by only the CDDL
  134.36 +# or only the GPL Version 2, indicate your decision by adding
  134.37 +# "[Contributor] elects to include this software in this distribution
  134.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  134.39 +# single choice of license, a recipient has the option to distribute
  134.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  134.41 +# to extend the choice of license to its licensees as provided above.
  134.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  134.43 +# Version 2 license, then the option applies only if the new code is
  134.44 +# made subject to such option by the copyright holder.
  134.45  build.xml.data.CRC32=d27fe1de
  134.46  build.xml.script.CRC32=466d9285
  134.47  build.xml.stylesheet.CRC32=eaf9f76a@2.49
   135.1 --- a/language/ide/nbproject/platform.properties	Mon Dec 19 11:37:36 2016 +0100
   135.2 +++ b/language/ide/nbproject/platform.properties	Mon Feb 27 22:40:44 2017 +0100
   135.3 @@ -1,3 +1,44 @@
   135.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   135.5 +#
   135.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   135.7 +#
   135.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   135.9 +# Other names may be trademarks of their respective owners.
  135.10 +#
  135.11 +# The contents of this file are subject to the terms of either the GNU
  135.12 +# General Public License Version 2 only ("GPL") or the Common
  135.13 +# Development and Distribution License("CDDL") (collectively, the
  135.14 +# "License"). You may not use this file except in compliance with the
  135.15 +# License. You can obtain a copy of the License at
  135.16 +# http://www.netbeans.org/cddl-gplv2.html
  135.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  135.18 +# specific language governing permissions and limitations under the
  135.19 +# License.  When distributing the software, include this License Header
  135.20 +# Notice in each file and include the License file at
  135.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  135.22 +# particular file as subject to the "Classpath" exception as provided
  135.23 +# by Oracle in the GPL Version 2 section of the License file that
  135.24 +# accompanied this code. If applicable, add the following below the
  135.25 +# License Header, with the fields enclosed by brackets [] replaced by
  135.26 +# your own identifying information:
  135.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  135.28 +#
  135.29 +# Contributor(s):
  135.30 +#
  135.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  135.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  135.33 +# Microsystems, Inc. All Rights Reserved.
  135.34 +#
  135.35 +# If you wish your version of this file to be governed by only the CDDL
  135.36 +# or only the GPL Version 2, indicate your decision by adding
  135.37 +# "[Contributor] elects to include this software in this distribution
  135.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  135.39 +# single choice of license, a recipient has the option to distribute
  135.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  135.41 +# to extend the choice of license to its licensees as provided above.
  135.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  135.43 +# Version 2 license, then the option applies only if the new code is
  135.44 +# made subject to such option by the copyright holder.
  135.45  cluster.path=\
  135.46      ${nbplatform.active.dir}/apisupport:\
  135.47      ${nbplatform.active.dir}/harness:\
   136.1 --- a/language/ide/nbproject/platform.xml	Mon Dec 19 11:37:36 2016 +0100
   136.2 +++ b/language/ide/nbproject/platform.xml	Mon Feb 27 22:40:44 2017 +0100
   136.3 @@ -1,4 +1,47 @@
   136.4  <?xml version="1.0" encoding="UTF-8"?>
   136.5 +<!--
   136.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   136.7 +
   136.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   136.9 +
  136.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  136.11 +Other names may be trademarks of their respective owners.
  136.12 +
  136.13 +The contents of this file are subject to the terms of either the GNU
  136.14 +General Public License Version 2 only ("GPL") or the Common
  136.15 +Development and Distribution License("CDDL") (collectively, the
  136.16 +"License"). You may not use this file except in compliance with the
  136.17 +License. You can obtain a copy of the License at
  136.18 +http://www.netbeans.org/cddl-gplv2.html
  136.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  136.20 +specific language governing permissions and limitations under the
  136.21 +License.  When distributing the software, include this License Header
  136.22 +Notice in each file and include the License file at
  136.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  136.24 +particular file as subject to the "Classpath" exception as provided
  136.25 +by Oracle in the GPL Version 2 section of the License file that
  136.26 +accompanied this code. If applicable, add the following below the
  136.27 +License Header, with the fields enclosed by brackets [] replaced by
  136.28 +your own identifying information:
  136.29 +"Portions Copyrighted [year] [name of copyright owner]"
  136.30 +
  136.31 +Contributor(s):
  136.32 +
  136.33 +The Original Software is NetBeans. The Initial Developer of the Original
  136.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  136.35 +Microsystems, Inc. All Rights Reserved.
  136.36 +
  136.37 +If you wish your version of this file to be governed by only the CDDL
  136.38 +or only the GPL Version 2, indicate your decision by adding
  136.39 +"[Contributor] elects to include this software in this distribution
  136.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  136.41 +single choice of license, a recipient has the option to distribute
  136.42 +your version of this file under either the CDDL, the GPL Version 2 or
  136.43 +to extend the choice of license to its licensees as provided above.
  136.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  136.45 +Version 2 license, then the option applies only if the new code is
  136.46 +made subject to such option by the copyright holder.
  136.47 +-->
  136.48  <project name="platform" default="download" basedir="..">
  136.49      <condition property="download.required">
  136.50          <and>
   137.1 --- a/language/ide/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   137.2 +++ b/language/ide/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   137.3 @@ -1,3 +1,44 @@
   137.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   137.5 +#
   137.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   137.7 +#
   137.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   137.9 +# Other names may be trademarks of their respective owners.
  137.10 +#
  137.11 +# The contents of this file are subject to the terms of either the GNU
  137.12 +# General Public License Version 2 only ("GPL") or the Common
  137.13 +# Development and Distribution License("CDDL") (collectively, the
  137.14 +# "License"). You may not use this file except in compliance with the
  137.15 +# License. You can obtain a copy of the License at
  137.16 +# http://www.netbeans.org/cddl-gplv2.html
  137.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  137.18 +# specific language governing permissions and limitations under the
  137.19 +# License.  When distributing the software, include this License Header
  137.20 +# Notice in each file and include the License file at
  137.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  137.22 +# particular file as subject to the "Classpath" exception as provided
  137.23 +# by Oracle in the GPL Version 2 section of the License file that
  137.24 +# accompanied this code. If applicable, add the following below the
  137.25 +# License Header, with the fields enclosed by brackets [] replaced by
  137.26 +# your own identifying information:
  137.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  137.28 +#
  137.29 +# Contributor(s):
  137.30 +#
  137.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  137.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  137.33 +# Microsystems, Inc. All Rights Reserved.
  137.34 +#
  137.35 +# If you wish your version of this file to be governed by only the CDDL
  137.36 +# or only the GPL Version 2, indicate your decision by adding
  137.37 +# "[Contributor] elects to include this software in this distribution
  137.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  137.39 +# single choice of license, a recipient has the option to distribute
  137.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  137.41 +# to extend the choice of license to its licensees as provided above.
  137.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  137.43 +# Version 2 license, then the option applies only if the new code is
  137.44 +# made subject to such option by the copyright holder.
  137.45  modules=\
  137.46      ${project.org.netbeans.modules.jackpot30.indexing}:\
  137.47      ${project.org.netbeans.modules.jackpot30.ui}:\
   138.1 --- a/language/ide/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   138.2 +++ b/language/ide/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   138.3 @@ -1,4 +1,47 @@
   138.4  <?xml version="1.0" encoding="UTF-8"?>
   138.5 +<!--
   138.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   138.7 +
   138.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   138.9 +
  138.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  138.11 +Other names may be trademarks of their respective owners.
  138.12 +
  138.13 +The contents of this file are subject to the terms of either the GNU
  138.14 +General Public License Version 2 only ("GPL") or the Common
  138.15 +Development and Distribution License("CDDL") (collectively, the
  138.16 +"License"). You may not use this file except in compliance with the
  138.17 +License. You can obtain a copy of the License at
  138.18 +http://www.netbeans.org/cddl-gplv2.html
  138.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  138.20 +specific language governing permissions and limitations under the
  138.21 +License.  When distributing the software, include this License Header
  138.22 +Notice in each file and include the License file at
  138.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  138.24 +particular file as subject to the "Classpath" exception as provided
  138.25 +by Oracle in the GPL Version 2 section of the License file that
  138.26 +accompanied this code. If applicable, add the following below the
  138.27 +License Header, with the fields enclosed by brackets [] replaced by
  138.28 +your own identifying information:
  138.29 +"Portions Copyrighted [year] [name of copyright owner]"
  138.30 +
  138.31 +Contributor(s):
  138.32 +
  138.33 +The Original Software is NetBeans. The Initial Developer of the Original
  138.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  138.35 +Microsystems, Inc. All Rights Reserved.
  138.36 +
  138.37 +If you wish your version of this file to be governed by only the CDDL
  138.38 +or only the GPL Version 2, indicate your decision by adding
  138.39 +"[Contributor] elects to include this software in this distribution
  138.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  138.41 +single choice of license, a recipient has the option to distribute
  138.42 +your version of this file under either the CDDL, the GPL Version 2 or
  138.43 +to extend the choice of license to its licensees as provided above.
  138.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  138.45 +Version 2 license, then the option applies only if the new code is
  138.46 +made subject to such option by the copyright holder.
  138.47 +-->
  138.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  138.49      <type>org.netbeans.modules.apisupport.project.suite</type>
  138.50      <configuration>
   139.1 --- a/language/ide/ui/build.xml	Mon Dec 19 11:37:36 2016 +0100
   139.2 +++ b/language/ide/ui/build.xml	Mon Feb 27 22:40:44 2017 +0100
   139.3 @@ -1,4 +1,47 @@
   139.4  <?xml version="1.0" encoding="UTF-8"?>
   139.5 +<!--
   139.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   139.7 +
   139.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   139.9 +
  139.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  139.11 +Other names may be trademarks of their respective owners.
  139.12 +
  139.13 +The contents of this file are subject to the terms of either the GNU
  139.14 +General Public License Version 2 only ("GPL") or the Common
  139.15 +Development and Distribution License("CDDL") (collectively, the
  139.16 +"License"). You may not use this file except in compliance with the
  139.17 +License. You can obtain a copy of the License at
  139.18 +http://www.netbeans.org/cddl-gplv2.html
  139.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  139.20 +specific language governing permissions and limitations under the
  139.21 +License.  When distributing the software, include this License Header
  139.22 +Notice in each file and include the License file at
  139.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  139.24 +particular file as subject to the "Classpath" exception as provided
  139.25 +by Oracle in the GPL Version 2 section of the License file that
  139.26 +accompanied this code. If applicable, add the following below the
  139.27 +License Header, with the fields enclosed by brackets [] replaced by
  139.28 +your own identifying information:
  139.29 +"Portions Copyrighted [year] [name of copyright owner]"
  139.30 +
  139.31 +Contributor(s):
  139.32 +
  139.33 +The Original Software is NetBeans. The Initial Developer of the Original
  139.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  139.35 +Microsystems, Inc. All Rights Reserved.
  139.36 +
  139.37 +If you wish your version of this file to be governed by only the CDDL
  139.38 +or only the GPL Version 2, indicate your decision by adding
  139.39 +"[Contributor] elects to include this software in this distribution
  139.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  139.41 +single choice of license, a recipient has the option to distribute
  139.42 +your version of this file under either the CDDL, the GPL Version 2 or
  139.43 +to extend the choice of license to its licensees as provided above.
  139.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  139.45 +Version 2 license, then the option applies only if the new code is
  139.46 +made subject to such option by the copyright holder.
  139.47 +-->
  139.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  139.49  <!-- for some information on what you could do (e.g. targets to override). -->
  139.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   140.1 --- a/language/ide/ui/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   140.2 +++ b/language/ide/ui/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   140.3 @@ -1,5 +1,48 @@
   140.4  <?xml version="1.0" encoding="UTF-8"?>
   140.5  <!--
   140.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   140.7 +
   140.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   140.9 +
  140.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  140.11 +Other names may be trademarks of their respective owners.
  140.12 +
  140.13 +The contents of this file are subject to the terms of either the GNU
  140.14 +General Public License Version 2 only ("GPL") or the Common
  140.15 +Development and Distribution License("CDDL") (collectively, the
  140.16 +"License"). You may not use this file except in compliance with the
  140.17 +License. You can obtain a copy of the License at
  140.18 +http://www.netbeans.org/cddl-gplv2.html
  140.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  140.20 +specific language governing permissions and limitations under the
  140.21 +License.  When distributing the software, include this License Header
  140.22 +Notice in each file and include the License file at
  140.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  140.24 +particular file as subject to the "Classpath" exception as provided
  140.25 +by Oracle in the GPL Version 2 section of the License file that
  140.26 +accompanied this code. If applicable, add the following below the
  140.27 +License Header, with the fields enclosed by brackets [] replaced by
  140.28 +your own identifying information:
  140.29 +"Portions Copyrighted [year] [name of copyright owner]"
  140.30 +
  140.31 +Contributor(s):
  140.32 +
  140.33 +The Original Software is NetBeans. The Initial Developer of the Original
  140.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  140.35 +Microsystems, Inc. All Rights Reserved.
  140.36 +
  140.37 +If you wish your version of this file to be governed by only the CDDL
  140.38 +or only the GPL Version 2, indicate your decision by adding
  140.39 +"[Contributor] elects to include this software in this distribution
  140.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  140.41 +single choice of license, a recipient has the option to distribute
  140.42 +your version of this file under either the CDDL, the GPL Version 2 or
  140.43 +to extend the choice of license to its licensees as provided above.
  140.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  140.45 +Version 2 license, then the option applies only if the new code is
  140.46 +made subject to such option by the copyright holder.
  140.47 +-->
  140.48 +<!--
  140.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  140.50  ***         EDIT ../build.xml INSTEAD         ***
  140.51  -->
   141.1 --- a/language/ide/ui/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   141.2 +++ b/language/ide/ui/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   141.3 @@ -1,3 +1,44 @@
   141.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   141.5 +#
   141.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   141.7 +#
   141.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   141.9 +# Other names may be trademarks of their respective owners.
  141.10 +#
  141.11 +# The contents of this file are subject to the terms of either the GNU
  141.12 +# General Public License Version 2 only ("GPL") or the Common
  141.13 +# Development and Distribution License("CDDL") (collectively, the
  141.14 +# "License"). You may not use this file except in compliance with the
  141.15 +# License. You can obtain a copy of the License at
  141.16 +# http://www.netbeans.org/cddl-gplv2.html
  141.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  141.18 +# specific language governing permissions and limitations under the
  141.19 +# License.  When distributing the software, include this License Header
  141.20 +# Notice in each file and include the License file at
  141.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  141.22 +# particular file as subject to the "Classpath" exception as provided
  141.23 +# by Oracle in the GPL Version 2 section of the License file that
  141.24 +# accompanied this code. If applicable, add the following below the
  141.25 +# License Header, with the fields enclosed by brackets [] replaced by
  141.26 +# your own identifying information:
  141.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  141.28 +#
  141.29 +# Contributor(s):
  141.30 +#
  141.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  141.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  141.33 +# Microsystems, Inc. All Rights Reserved.
  141.34 +#
  141.35 +# If you wish your version of this file to be governed by only the CDDL
  141.36 +# or only the GPL Version 2, indicate your decision by adding
  141.37 +# "[Contributor] elects to include this software in this distribution
  141.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  141.39 +# single choice of license, a recipient has the option to distribute
  141.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  141.41 +# to extend the choice of license to its licensees as provided above.
  141.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  141.43 +# Version 2 license, then the option applies only if the new code is
  141.44 +# made subject to such option by the copyright holder.
  141.45  build.xml.data.CRC32=8268870d
  141.46  build.xml.script.CRC32=4ac38acd
  141.47  build.xml.stylesheet.CRC32=a56c6a5b@2.49
   142.1 --- a/language/ide/ui/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   142.2 +++ b/language/ide/ui/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   142.3 @@ -1,3 +1,44 @@
   142.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   142.5 +#
   142.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   142.7 +#
   142.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   142.9 +# Other names may be trademarks of their respective owners.
  142.10 +#
  142.11 +# The contents of this file are subject to the terms of either the GNU
  142.12 +# General Public License Version 2 only ("GPL") or the Common
  142.13 +# Development and Distribution License("CDDL") (collectively, the
  142.14 +# "License"). You may not use this file except in compliance with the
  142.15 +# License. You can obtain a copy of the License at
  142.16 +# http://www.netbeans.org/cddl-gplv2.html
  142.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  142.18 +# specific language governing permissions and limitations under the
  142.19 +# License.  When distributing the software, include this License Header
  142.20 +# Notice in each file and include the License file at
  142.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  142.22 +# particular file as subject to the "Classpath" exception as provided
  142.23 +# by Oracle in the GPL Version 2 section of the License file that
  142.24 +# accompanied this code. If applicable, add the following below the
  142.25 +# License Header, with the fields enclosed by brackets [] replaced by
  142.26 +# your own identifying information:
  142.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  142.28 +#
  142.29 +# Contributor(s):
  142.30 +#
  142.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  142.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  142.33 +# Microsystems, Inc. All Rights Reserved.
  142.34 +#
  142.35 +# If you wish your version of this file to be governed by only the CDDL
  142.36 +# or only the GPL Version 2, indicate your decision by adding
  142.37 +# "[Contributor] elects to include this software in this distribution
  142.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  142.39 +# single choice of license, a recipient has the option to distribute
  142.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  142.41 +# to extend the choice of license to its licensees as provided above.
  142.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  142.43 +# Version 2 license, then the option applies only if the new code is
  142.44 +# made subject to such option by the copyright holder.
  142.45  javac.source=1.6
  142.46  javac.compilerargs=-Xlint -Xlint:-serial
  142.47  requires.nb.javac=true
   143.1 --- a/language/ide/ui/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   143.2 +++ b/language/ide/ui/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   143.3 @@ -1,4 +1,47 @@
   143.4  <?xml version="1.0" encoding="UTF-8"?>
   143.5 +<!--
   143.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   143.7 +
   143.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   143.9 +
  143.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  143.11 +Other names may be trademarks of their respective owners.
  143.12 +
  143.13 +The contents of this file are subject to the terms of either the GNU
  143.14 +General Public License Version 2 only ("GPL") or the Common
  143.15 +Development and Distribution License("CDDL") (collectively, the
  143.16 +"License"). You may not use this file except in compliance with the
  143.17 +License. You can obtain a copy of the License at
  143.18 +http://www.netbeans.org/cddl-gplv2.html
  143.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  143.20 +specific language governing permissions and limitations under the
  143.21 +License.  When distributing the software, include this License Header
  143.22 +Notice in each file and include the License file at
  143.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  143.24 +particular file as subject to the "Classpath" exception as provided
  143.25 +by Oracle in the GPL Version 2 section of the License file that
  143.26 +accompanied this code. If applicable, add the following below the
  143.27 +License Header, with the fields enclosed by brackets [] replaced by
  143.28 +your own identifying information:
  143.29 +"Portions Copyrighted [year] [name of copyright owner]"
  143.30 +
  143.31 +Contributor(s):
  143.32 +
  143.33 +The Original Software is NetBeans. The Initial Developer of the Original
  143.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  143.35 +Microsystems, Inc. All Rights Reserved.
  143.36 +
  143.37 +If you wish your version of this file to be governed by only the CDDL
  143.38 +or only the GPL Version 2, indicate your decision by adding
  143.39 +"[Contributor] elects to include this software in this distribution
  143.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  143.41 +single choice of license, a recipient has the option to distribute
  143.42 +your version of this file under either the CDDL, the GPL Version 2 or
  143.43 +to extend the choice of license to its licensees as provided above.
  143.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  143.45 +Version 2 license, then the option applies only if the new code is
  143.46 +made subject to such option by the copyright holder.
  143.47 +-->
  143.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  143.49      <type>org.netbeans.modules.apisupport.project</type>
  143.50      <configuration>
   144.1 --- a/language/ide/ui/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   144.2 +++ b/language/ide/ui/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
   144.3 @@ -1,1 +1,42 @@
   144.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   144.5 +#
   144.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   144.7 +#
   144.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   144.9 +# Other names may be trademarks of their respective owners.
  144.10 +#
  144.11 +# The contents of this file are subject to the terms of either the GNU
  144.12 +# General Public License Version 2 only ("GPL") or the Common
  144.13 +# Development and Distribution License("CDDL") (collectively, the
  144.14 +# "License"). You may not use this file except in compliance with the
  144.15 +# License. You can obtain a copy of the License at
  144.16 +# http://www.netbeans.org/cddl-gplv2.html
  144.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  144.18 +# specific language governing permissions and limitations under the
  144.19 +# License.  When distributing the software, include this License Header
  144.20 +# Notice in each file and include the License file at
  144.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  144.22 +# particular file as subject to the "Classpath" exception as provided
  144.23 +# by Oracle in the GPL Version 2 section of the License file that
  144.24 +# accompanied this code. If applicable, add the following below the
  144.25 +# License Header, with the fields enclosed by brackets [] replaced by
  144.26 +# your own identifying information:
  144.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  144.28 +#
  144.29 +# Contributor(s):
  144.30 +#
  144.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  144.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  144.33 +# Microsystems, Inc. All Rights Reserved.
  144.34 +#
  144.35 +# If you wish your version of this file to be governed by only the CDDL
  144.36 +# or only the GPL Version 2, indicate your decision by adding
  144.37 +# "[Contributor] elects to include this software in this distribution
  144.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  144.39 +# single choice of license, a recipient has the option to distribute
  144.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  144.41 +# to extend the choice of license to its licensees as provided above.
  144.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  144.43 +# Version 2 license, then the option applies only if the new code is
  144.44 +# made subject to such option by the copyright holder.
  144.45  suite.dir=${basedir}/..
   145.1 --- a/language/ide/ui/src/org/netbeans/modules/jackpot30/ui/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   145.2 +++ b/language/ide/ui/src/org/netbeans/modules/jackpot30/ui/Bundle.properties	Mon Feb 27 22:40:44 2017 +0100
   145.3 @@ -1,1 +1,42 @@
   145.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   145.5 +#
   145.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   145.7 +#
   145.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   145.9 +# Other names may be trademarks of their respective owners.
  145.10 +#
  145.11 +# The contents of this file are subject to the terms of either the GNU
  145.12 +# General Public License Version 2 only ("GPL") or the Common
  145.13 +# Development and Distribution License("CDDL") (collectively, the
  145.14 +# "License"). You may not use this file except in compliance with the
  145.15 +# License. You can obtain a copy of the License at
  145.16 +# http://www.netbeans.org/cddl-gplv2.html
  145.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  145.18 +# specific language governing permissions and limitations under the
  145.19 +# License.  When distributing the software, include this License Header
  145.20 +# Notice in each file and include the License file at
  145.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  145.22 +# particular file as subject to the "Classpath" exception as provided
  145.23 +# by Oracle in the GPL Version 2 section of the License file that
  145.24 +# accompanied this code. If applicable, add the following below the
  145.25 +# License Header, with the fields enclosed by brackets [] replaced by
  145.26 +# your own identifying information:
  145.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  145.28 +#
  145.29 +# Contributor(s):
  145.30 +#
  145.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  145.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  145.33 +# Microsystems, Inc. All Rights Reserved.
  145.34 +#
  145.35 +# If you wish your version of this file to be governed by only the CDDL
  145.36 +# or only the GPL Version 2, indicate your decision by adding
  145.37 +# "[Contributor] elects to include this software in this distribution
  145.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  145.39 +# single choice of license, a recipient has the option to distribute
  145.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  145.41 +# to extend the choice of license to its licensees as provided above.
  145.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  145.43 +# Version 2 license, then the option applies only if the new code is
  145.44 +# made subject to such option by the copyright holder.
  145.45  OpenIDE-Module-Name=Jackpot 3.0 Extra UI
   146.1 --- a/language/ide/ui/src/org/netbeans/modules/jackpot30/ui/layer.xml	Mon Dec 19 11:37:36 2016 +0100
   146.2 +++ b/language/ide/ui/src/org/netbeans/modules/jackpot30/ui/layer.xml	Mon Feb 27 22:40:44 2017 +0100
   146.3 @@ -1,4 +1,47 @@
   146.4  <?xml version="1.0" encoding="UTF-8"?>
   146.5 +<!--
   146.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   146.7 +
   146.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   146.9 +
  146.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  146.11 +Other names may be trademarks of their respective owners.
  146.12 +
  146.13 +The contents of this file are subject to the terms of either the GNU
  146.14 +General Public License Version 2 only ("GPL") or the Common
  146.15 +Development and Distribution License("CDDL") (collectively, the
  146.16 +"License"). You may not use this file except in compliance with the
  146.17 +License. You can obtain a copy of the License at
  146.18 +http://www.netbeans.org/cddl-gplv2.html
  146.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  146.20 +specific language governing permissions and limitations under the
  146.21 +License.  When distributing the software, include this License Header
  146.22 +Notice in each file and include the License file at
  146.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  146.24 +particular file as subject to the "Classpath" exception as provided
  146.25 +by Oracle in the GPL Version 2 section of the License file that
  146.26 +accompanied this code. If applicable, add the following below the
  146.27 +License Header, with the fields enclosed by brackets [] replaced by
  146.28 +your own identifying information:
  146.29 +"Portions Copyrighted [year] [name of copyright owner]"
  146.30 +
  146.31 +Contributor(s):
  146.32 +
  146.33 +The Original Software is NetBeans. The Initial Developer of the Original
  146.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  146.35 +Microsystems, Inc. All Rights Reserved.
  146.36 +
  146.37 +If you wish your version of this file to be governed by only the CDDL
  146.38 +or only the GPL Version 2, indicate your decision by adding
  146.39 +"[Contributor] elects to include this software in this distribution
  146.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  146.41 +single choice of license, a recipient has the option to distribute
  146.42 +your version of this file under either the CDDL, the GPL Version 2 or
  146.43 +to extend the choice of license to its licensees as provided above.
  146.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  146.45 +Version 2 license, then the option applies only if the new code is
  146.46 +made subject to such option by the copyright holder.
  146.47 +-->
  146.48  <!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
  146.49  <filesystem>
  146.50      <folder name="Editors">
   147.1 --- a/language/post-build.sh	Mon Dec 19 11:37:36 2016 +0100
   147.2 +++ b/language/post-build.sh	Mon Feb 27 22:40:44 2017 +0100
   147.3 @@ -1,2 +1,45 @@
   147.4  #!/bin/bash
   147.5 +
   147.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   147.7 +#
   147.8 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   147.9 +#
  147.10 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  147.11 +# Other names may be trademarks of their respective owners.
  147.12 +#
  147.13 +# The contents of this file are subject to the terms of either the GNU
  147.14 +# General Public License Version 2 only ("GPL") or the Common
  147.15 +# Development and Distribution License("CDDL") (collectively, the
  147.16 +# "License"). You may not use this file except in compliance with the
  147.17 +# License. You can obtain a copy of the License at
  147.18 +# http://www.netbeans.org/cddl-gplv2.html
  147.19 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  147.20 +# specific language governing permissions and limitations under the
  147.21 +# License.  When distributing the software, include this License Header
  147.22 +# Notice in each file and include the License file at
  147.23 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  147.24 +# particular file as subject to the "Classpath" exception as provided
  147.25 +# by Oracle in the GPL Version 2 section of the License file that
  147.26 +# accompanied this code. If applicable, add the following below the
  147.27 +# License Header, with the fields enclosed by brackets [] replaced by
  147.28 +# your own identifying information:
  147.29 +# "Portions Copyrighted [year] [name of copyright owner]"
  147.30 +#
  147.31 +# Contributor(s):
  147.32 +#
  147.33 +# The Original Software is NetBeans. The Initial Developer of the Original
  147.34 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  147.35 +# Microsystems, Inc. All Rights Reserved.
  147.36 +#
  147.37 +# If you wish your version of this file to be governed by only the CDDL
  147.38 +# or only the GPL Version 2, indicate your decision by adding
  147.39 +# "[Contributor] elects to include this software in this distribution
  147.40 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  147.41 +# single choice of license, a recipient has the option to distribute
  147.42 +# your version of this file under either the CDDL, the GPL Version 2 or
  147.43 +# to extend the choice of license to its licensees as provided above.
  147.44 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  147.45 +# Version 2 license, then the option applies only if the new code is
  147.46 +# made subject to such option by the copyright holder.
  147.47 +
  147.48  (cd server/web/language.web.api; ant "$@" clean && ant "$@") || exit 1
   148.1 --- a/language/server/web/language.web.api/build.xml	Mon Dec 19 11:37:36 2016 +0100
   148.2 +++ b/language/server/web/language.web.api/build.xml	Mon Feb 27 22:40:44 2017 +0100
   148.3 @@ -1,4 +1,47 @@
   148.4  <?xml version="1.0" encoding="UTF-8"?>
   148.5 +<!--
   148.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   148.7 +
   148.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   148.9 +
  148.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  148.11 +Other names may be trademarks of their respective owners.
  148.12 +
  148.13 +The contents of this file are subject to the terms of either the GNU
  148.14 +General Public License Version 2 only ("GPL") or the Common
  148.15 +Development and Distribution License("CDDL") (collectively, the
  148.16 +"License"). You may not use this file except in compliance with the
  148.17 +License. You can obtain a copy of the License at
  148.18 +http://www.netbeans.org/cddl-gplv2.html
  148.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  148.20 +specific language governing permissions and limitations under the
  148.21 +License.  When distributing the software, include this License Header
  148.22 +Notice in each file and include the License file at
  148.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  148.24 +particular file as subject to the "Classpath" exception as provided
  148.25 +by Oracle in the GPL Version 2 section of the License file that
  148.26 +accompanied this code. If applicable, add the following below the
  148.27 +License Header, with the fields enclosed by brackets [] replaced by
  148.28 +your own identifying information:
  148.29 +"Portions Copyrighted [year] [name of copyright owner]"
  148.30 +
  148.31 +Contributor(s):
  148.32 +
  148.33 +The Original Software is NetBeans. The Initial Developer of the Original
  148.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  148.35 +Microsystems, Inc. All Rights Reserved.
  148.36 +
  148.37 +If you wish your version of this file to be governed by only the CDDL
  148.38 +or only the GPL Version 2, indicate your decision by adding
  148.39 +"[Contributor] elects to include this software in this distribution
  148.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  148.41 +single choice of license, a recipient has the option to distribute
  148.42 +your version of this file under either the CDDL, the GPL Version 2 or
  148.43 +to extend the choice of license to its licensees as provided above.
  148.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  148.45 +Version 2 license, then the option applies only if the new code is
  148.46 +made subject to such option by the copyright holder.
  148.47 +-->
  148.48  <!-- You may freely edit this file. See commented blocks below for -->
  148.49  <!-- some examples of how to customize the build. -->
  148.50  <!-- (If you delete it and reopen the project it will be recreated.) -->
   149.1 --- a/language/server/web/language.web.api/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   149.2 +++ b/language/server/web/language.web.api/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   149.3 @@ -1,5 +1,48 @@
   149.4  <?xml version="1.0" encoding="UTF-8"?>
   149.5  <!--
   149.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   149.7 +
   149.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   149.9 +
  149.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  149.11 +Other names may be trademarks of their respective owners.
  149.12 +
  149.13 +The contents of this file are subject to the terms of either the GNU
  149.14 +General Public License Version 2 only ("GPL") or the Common
  149.15 +Development and Distribution License("CDDL") (collectively, the
  149.16 +"License"). You may not use this file except in compliance with the
  149.17 +License. You can obtain a copy of the License at
  149.18 +http://www.netbeans.org/cddl-gplv2.html
  149.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  149.20 +specific language governing permissions and limitations under the
  149.21 +License.  When distributing the software, include this License Header
  149.22 +Notice in each file and include the License file at
  149.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  149.24 +particular file as subject to the "Classpath" exception as provided
  149.25 +by Oracle in the GPL Version 2 section of the License file that
  149.26 +accompanied this code. If applicable, add the following below the
  149.27 +License Header, with the fields enclosed by brackets [] replaced by
  149.28 +your own identifying information:
  149.29 +"Portions Copyrighted [year] [name of copyright owner]"
  149.30 +
  149.31 +Contributor(s):
  149.32 +
  149.33 +The Original Software is NetBeans. The Initial Developer of the Original
  149.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  149.35 +Microsystems, Inc. All Rights Reserved.
  149.36 +
  149.37 +If you wish your version of this file to be governed by only the CDDL
  149.38 +or only the GPL Version 2, indicate your decision by adding
  149.39 +"[Contributor] elects to include this software in this distribution
  149.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  149.41 +single choice of license, a recipient has the option to distribute
  149.42 +your version of this file under either the CDDL, the GPL Version 2 or
  149.43 +to extend the choice of license to its licensees as provided above.
  149.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  149.45 +Version 2 license, then the option applies only if the new code is
  149.46 +made subject to such option by the copyright holder.
  149.47 +-->
  149.48 +<!--
  149.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  149.50  ***         EDIT ../build.xml INSTEAD         ***
  149.51  
   150.1 --- a/language/server/web/language.web.api/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   150.2 +++ b/language/server/web/language.web.api/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   150.3 @@ -1,3 +1,44 @@
   150.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   150.5 +#
   150.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   150.7 +#
   150.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   150.9 +# Other names may be trademarks of their respective owners.
  150.10 +#
  150.11 +# The contents of this file are subject to the terms of either the GNU
  150.12 +# General Public License Version 2 only ("GPL") or the Common
  150.13 +# Development and Distribution License("CDDL") (collectively, the
  150.14 +# "License"). You may not use this file except in compliance with the
  150.15 +# License. You can obtain a copy of the License at
  150.16 +# http://www.netbeans.org/cddl-gplv2.html
  150.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  150.18 +# specific language governing permissions and limitations under the
  150.19 +# License.  When distributing the software, include this License Header
  150.20 +# Notice in each file and include the License file at
  150.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  150.22 +# particular file as subject to the "Classpath" exception as provided
  150.23 +# by Oracle in the GPL Version 2 section of the License file that
  150.24 +# accompanied this code. If applicable, add the following below the
  150.25 +# License Header, with the fields enclosed by brackets [] replaced by
  150.26 +# your own identifying information:
  150.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  150.28 +#
  150.29 +# Contributor(s):
  150.30 +#
  150.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  150.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  150.33 +# Microsystems, Inc. All Rights Reserved.
  150.34 +#
  150.35 +# If you wish your version of this file to be governed by only the CDDL
  150.36 +# or only the GPL Version 2, indicate your decision by adding
  150.37 +# "[Contributor] elects to include this software in this distribution
  150.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  150.39 +# single choice of license, a recipient has the option to distribute
  150.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  150.41 +# to extend the choice of license to its licensees as provided above.
  150.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  150.43 +# Version 2 license, then the option applies only if the new code is
  150.44 +# made subject to such option by the copyright holder.
  150.45  build.xml.data.CRC32=4be6b9c7
  150.46  build.xml.script.CRC32=ba5ea644
  150.47  build.xml.stylesheet.CRC32=8064a381@1.78.0.48
   151.1 --- a/language/server/web/language.web.api/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   151.2 +++ b/language/server/web/language.web.api/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   151.3 @@ -1,3 +1,44 @@
   151.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   151.5 +#
   151.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   151.7 +#
   151.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   151.9 +# Other names may be trademarks of their respective owners.
  151.10 +#
  151.11 +# The contents of this file are subject to the terms of either the GNU
  151.12 +# General Public License Version 2 only ("GPL") or the Common
  151.13 +# Development and Distribution License("CDDL") (collectively, the
  151.14 +# "License"). You may not use this file except in compliance with the
  151.15 +# License. You can obtain a copy of the License at
  151.16 +# http://www.netbeans.org/cddl-gplv2.html
  151.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  151.18 +# specific language governing permissions and limitations under the
  151.19 +# License.  When distributing the software, include this License Header
  151.20 +# Notice in each file and include the License file at
  151.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  151.22 +# particular file as subject to the "Classpath" exception as provided
  151.23 +# by Oracle in the GPL Version 2 section of the License file that
  151.24 +# accompanied this code. If applicable, add the following below the
  151.25 +# License Header, with the fields enclosed by brackets [] replaced by
  151.26 +# your own identifying information:
  151.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  151.28 +#
  151.29 +# Contributor(s):
  151.30 +#
  151.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  151.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  151.33 +# Microsystems, Inc. All Rights Reserved.
  151.34 +#
  151.35 +# If you wish your version of this file to be governed by only the CDDL
  151.36 +# or only the GPL Version 2, indicate your decision by adding
  151.37 +# "[Contributor] elects to include this software in this distribution
  151.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  151.39 +# single choice of license, a recipient has the option to distribute
  151.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  151.41 +# to extend the choice of license to its licensees as provided above.
  151.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  151.43 +# Version 2 license, then the option applies only if the new code is
  151.44 +# made subject to such option by the copyright holder.
  151.45  annotation.processing.enabled=true
  151.46  annotation.processing.enabled.in.editor=false
  151.47  annotation.processing.processors.list=
   152.1 --- a/language/server/web/language.web.api/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   152.2 +++ b/language/server/web/language.web.api/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   152.3 @@ -1,4 +1,47 @@
   152.4  <?xml version="1.0" encoding="UTF-8"?>
   152.5 +<!--
   152.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   152.7 +
   152.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   152.9 +
  152.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  152.11 +Other names may be trademarks of their respective owners.
  152.12 +
  152.13 +The contents of this file are subject to the terms of either the GNU
  152.14 +General Public License Version 2 only ("GPL") or the Common
  152.15 +Development and Distribution License("CDDL") (collectively, the
  152.16 +"License"). You may not use this file except in compliance with the
  152.17 +License. You can obtain a copy of the License at
  152.18 +http://www.netbeans.org/cddl-gplv2.html
  152.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  152.20 +specific language governing permissions and limitations under the
  152.21 +License.  When distributing the software, include this License Header
  152.22 +Notice in each file and include the License file at
  152.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  152.24 +particular file as subject to the "Classpath" exception as provided
  152.25 +by Oracle in the GPL Version 2 section of the License file that
  152.26 +accompanied this code. If applicable, add the following below the
  152.27 +License Header, with the fields enclosed by brackets [] replaced by
  152.28 +your own identifying information:
  152.29 +"Portions Copyrighted [year] [name of copyright owner]"
  152.30 +
  152.31 +Contributor(s):
  152.32 +
  152.33 +The Original Software is NetBeans. The Initial Developer of the Original
  152.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  152.35 +Microsystems, Inc. All Rights Reserved.
  152.36 +
  152.37 +If you wish your version of this file to be governed by only the CDDL
  152.38 +or only the GPL Version 2, indicate your decision by adding
  152.39 +"[Contributor] elects to include this software in this distribution
  152.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  152.41 +single choice of license, a recipient has the option to distribute
  152.42 +your version of this file under either the CDDL, the GPL Version 2 or
  152.43 +to extend the choice of license to its licensees as provided above.
  152.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  152.45 +Version 2 license, then the option applies only if the new code is
  152.46 +made subject to such option by the copyright holder.
  152.47 +-->
  152.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  152.49      <type>org.netbeans.modules.java.j2seproject</type>
  152.50      <configuration>
   153.1 --- a/language/server/web/language.web.api/src/org/netbeans/modules/jackpot30/backend/language/api/ui-search.html	Mon Dec 19 11:37:36 2016 +0100
   153.2 +++ b/language/server/web/language.web.api/src/org/netbeans/modules/jackpot30/backend/language/api/ui-search.html	Mon Feb 27 22:40:44 2017 +0100
   153.3 @@ -1,3 +1,46 @@
   153.4 +<!--
   153.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   153.6 +
   153.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   153.8 +
   153.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  153.10 +Other names may be trademarks of their respective owners.
  153.11 +
  153.12 +The contents of this file are subject to the terms of either the GNU
  153.13 +General Public License Version 2 only ("GPL") or the Common
  153.14 +Development and Distribution License("CDDL") (collectively, the
  153.15 +"License"). You may not use this file except in compliance with the
  153.16 +License. You can obtain a copy of the License at
  153.17 +http://www.netbeans.org/cddl-gplv2.html
  153.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  153.19 +specific language governing permissions and limitations under the
  153.20 +License.  When distributing the software, include this License Header
  153.21 +Notice in each file and include the License file at
  153.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  153.23 +particular file as subject to the "Classpath" exception as provided
  153.24 +by Oracle in the GPL Version 2 section of the License file that
  153.25 +accompanied this code. If applicable, add the following below the
  153.26 +License Header, with the fields enclosed by brackets [] replaced by
  153.27 +your own identifying information:
  153.28 +"Portions Copyrighted [year] [name of copyright owner]"
  153.29 +
  153.30 +Contributor(s):
  153.31 +
  153.32 +The Original Software is NetBeans. The Initial Developer of the Original
  153.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  153.34 +Microsystems, Inc. All Rights Reserved.
  153.35 +
  153.36 +If you wish your version of this file to be governed by only the CDDL
  153.37 +or only the GPL Version 2, indicate your decision by adding
  153.38 +"[Contributor] elects to include this software in this distribution
  153.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  153.40 +single choice of license, a recipient has the option to distribute
  153.41 +your version of this file under either the CDDL, the GPL Version 2 or
  153.42 +to extend the choice of license to its licensees as provided above.
  153.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
  153.44 +Version 2 license, then the option applies only if the new code is
  153.45 +made subject to such option by the copyright holder.
  153.46 +-->
  153.47  <html>
  153.48  <head>
  153.49      <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
   154.1 --- a/language/server/web/language.web.api/src/org/netbeans/modules/jackpot30/backend/language/api/ui-snippet.html	Mon Dec 19 11:37:36 2016 +0100
   154.2 +++ b/language/server/web/language.web.api/src/org/netbeans/modules/jackpot30/backend/language/api/ui-snippet.html	Mon Feb 27 22:40:44 2017 +0100
   154.3 @@ -1,3 +1,47 @@
   154.4 +<!--
   154.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   154.6 +
   154.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   154.8 +
   154.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  154.10 +Other names may be trademarks of their respective owners.
  154.11 +
  154.12 +The contents of this file are subject to the terms of either the GNU
  154.13 +General Public License Version 2 only ("GPL") or the Common
  154.14 +Development and Distribution License("CDDL") (collectively, the
  154.15 +"License"). You may not use this file except in compliance with the
  154.16 +License. You can obtain a copy of the License at
  154.17 +http://www.netbeans.org/cddl-gplv2.html
  154.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  154.19 +specific language governing permissions and limitations under the
  154.20 +License.  When distributing the software, include this License Header
  154.21 +Notice in each file and include the License file at
  154.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  154.23 +particular file as subject to the "Classpath" exception as provided
  154.24 +by Oracle in the GPL Version 2 section of the License file that
  154.25 +accompanied this code. If applicable, add the following below the
  154.26 +License Header, with the fields enclosed by brackets [] replaced by
  154.27 +your own identifying information:
  154.28 +"Portions Copyrighted [year] [name of copyright owner]"
  154.29 +
  154.30 +Contributor(s):
  154.31 +
  154.32 +The Original Software is NetBeans. The Initial Developer of the Original
  154.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  154.34 +Microsystems, Inc. All Rights Reserved.
  154.35 +
  154.36 +If you wish your version of this file to be governed by only the CDDL
  154.37 +or only the GPL Version 2, indicate your decision by adding
  154.38 +"[Contributor] elects to include this software in this distribution
  154.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  154.40 +single choice of license, a recipient has the option to distribute
  154.41 +your version of this file under either the CDDL, the GPL Version 2 or
  154.42 +to extend the choice of license to its licensees as provided above.
  154.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
  154.44 +Version 2 license, then the option applies only if the new code is
  154.45 +made subject to such option by the copyright holder.
  154.46 +-->
  154.47 +
  154.48  <#if snippets??>
  154.49      <#list snippets as snippet>
  154.50          <pre>${snippet.prefix}<span class="occurrence">${snippet.occurrence}</span>${snippet.suffix}</pre><br>
   155.1 --- a/lib/download.xml	Mon Dec 19 11:37:36 2016 +0100
   155.2 +++ b/lib/download.xml	Mon Feb 27 22:40:44 2017 +0100
   155.3 @@ -1,3 +1,46 @@
   155.4 +<!--
   155.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   155.6 +
   155.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   155.8 +
   155.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  155.10 +Other names may be trademarks of their respective owners.
  155.11 +
  155.12 +The contents of this file are subject to the terms of either the GNU
  155.13 +General Public License Version 2 only ("GPL") or the Common
  155.14 +Development and Distribution License("CDDL") (collectively, the
  155.15 +"License"). You may not use this file except in compliance with the
  155.16 +License. You can obtain a copy of the License at
  155.17 +http://www.netbeans.org/cddl-gplv2.html
  155.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  155.19 +specific language governing permissions and limitations under the
  155.20 +License.  When distributing the software, include this License Header
  155.21 +Notice in each file and include the License file at
  155.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  155.23 +particular file as subject to the "Classpath" exception as provided
  155.24 +by Oracle in the GPL Version 2 section of the License file that
  155.25 +accompanied this code. If applicable, add the following below the
  155.26 +License Header, with the fields enclosed by brackets [] replaced by
  155.27 +your own identifying information:
  155.28 +"Portions Copyrighted [year] [name of copyright owner]"
  155.29 +
  155.30 +Contributor(s):
  155.31 +
  155.32 +The Original Software is NetBeans. The Initial Developer of the Original
  155.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  155.34 +Microsystems, Inc. All Rights Reserved.
  155.35 +
  155.36 +If you wish your version of this file to be governed by only the CDDL
  155.37 +or only the GPL Version 2, indicate your decision by adding
  155.38 +"[Contributor] elects to include this software in this distribution
  155.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  155.40 +single choice of license, a recipient has the option to distribute
  155.41 +your version of this file under either the CDDL, the GPL Version 2 or
  155.42 +to extend the choice of license to its licensees as provided above.
  155.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
  155.44 +Version 2 license, then the option applies only if the new code is
  155.45 +made subject to such option by the copyright holder.
  155.46 +-->
  155.47  <project name="download" default="download">
  155.48      <target name="download" depends="copy-from-platform">
  155.49          <property name="imported.basedir" value="${basedir}"/>
   156.1 --- a/lib/nblibraries.properties	Mon Dec 19 11:37:36 2016 +0100
   156.2 +++ b/lib/nblibraries.properties	Mon Feb 27 22:40:44 2017 +0100
   156.3 @@ -1,3 +1,44 @@
   156.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   156.5 +#
   156.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   156.7 +#
   156.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   156.9 +# Other names may be trademarks of their respective owners.
  156.10 +#
  156.11 +# The contents of this file are subject to the terms of either the GNU
  156.12 +# General Public License Version 2 only ("GPL") or the Common
  156.13 +# Development and Distribution License("CDDL") (collectively, the
  156.14 +# "License"). You may not use this file except in compliance with the
  156.15 +# License. You can obtain a copy of the License at
  156.16 +# http://www.netbeans.org/cddl-gplv2.html
  156.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  156.18 +# specific language governing permissions and limitations under the
  156.19 +# License.  When distributing the software, include this License Header
  156.20 +# Notice in each file and include the License file at
  156.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  156.22 +# particular file as subject to the "Classpath" exception as provided
  156.23 +# by Oracle in the GPL Version 2 section of the License file that
  156.24 +# accompanied this code. If applicable, add the following below the
  156.25 +# License Header, with the fields enclosed by brackets [] replaced by
  156.26 +# your own identifying information:
  156.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  156.28 +#
  156.29 +# Contributor(s):
  156.30 +#
  156.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  156.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  156.33 +# Microsystems, Inc. All Rights Reserved.
  156.34 +#
  156.35 +# If you wish your version of this file to be governed by only the CDDL
  156.36 +# or only the GPL Version 2, indicate your decision by adding
  156.37 +# "[Contributor] elects to include this software in this distribution
  156.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  156.39 +# single choice of license, a recipient has the option to distribute
  156.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  156.41 +# to extend the choice of license to its licensees as provided above.
  156.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  156.43 +# Version 2 license, then the option applies only if the new code is
  156.44 +# made subject to such option by the copyright holder.
  156.45  libs.CopyLibs.classpath=\
  156.46      ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
  156.47  libs.CopyLibs.displayName=CopyLibs Task
   157.1 --- a/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   157.2 +++ b/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   157.3 @@ -1,4 +1,47 @@
   157.4  <?xml version="1.0" encoding="UTF-8"?>
   157.5 +<!--
   157.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   157.7 +
   157.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   157.9 +
  157.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  157.11 +Other names may be trademarks of their respective owners.
  157.12 +
  157.13 +The contents of this file are subject to the terms of either the GNU
  157.14 +General Public License Version 2 only ("GPL") or the Common
  157.15 +Development and Distribution License("CDDL") (collectively, the
  157.16 +"License"). You may not use this file except in compliance with the
  157.17 +License. You can obtain a copy of the License at
  157.18 +http://www.netbeans.org/cddl-gplv2.html
  157.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  157.20 +specific language governing permissions and limitations under the
  157.21 +License.  When distributing the software, include this License Header
  157.22 +Notice in each file and include the License file at
  157.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  157.24 +particular file as subject to the "Classpath" exception as provided
  157.25 +by Oracle in the GPL Version 2 section of the License file that
  157.26 +accompanied this code. If applicable, add the following below the
  157.27 +License Header, with the fields enclosed by brackets [] replaced by
  157.28 +your own identifying information:
  157.29 +"Portions Copyrighted [year] [name of copyright owner]"
  157.30 +
  157.31 +Contributor(s):
  157.32 +
  157.33 +The Original Software is NetBeans. The Initial Developer of the Original
  157.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  157.35 +Microsystems, Inc. All Rights Reserved.
  157.36 +
  157.37 +If you wish your version of this file to be governed by only the CDDL
  157.38 +or only the GPL Version 2, indicate your decision by adding
  157.39 +"[Contributor] elects to include this software in this distribution
  157.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  157.41 +single choice of license, a recipient has the option to distribute
  157.42 +your version of this file under either the CDDL, the GPL Version 2 or
  157.43 +to extend the choice of license to its licensees as provided above.
  157.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  157.45 +Version 2 license, then the option applies only if the new code is
  157.46 +made subject to such option by the copyright holder.
  157.47 +-->
  157.48  <project xmlns="http://www.netbeans.org/ns/project/1" xmlns:ns1="null" xmlns:ns2="null">
  157.49      <type>org.netbeans.modules.ant.freeform</type>
  157.50      <configuration>
   158.1 --- a/remoting/build.sh	Mon Dec 19 11:37:36 2016 +0100
   158.2 +++ b/remoting/build.sh	Mon Feb 27 22:40:44 2017 +0100
   158.3 @@ -1,4 +1,47 @@
   158.4  #!/bin/bash
   158.5 +
   158.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   158.7 +#
   158.8 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   158.9 +#
  158.10 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  158.11 +# Other names may be trademarks of their respective owners.
  158.12 +#
  158.13 +# The contents of this file are subject to the terms of either the GNU
  158.14 +# General Public License Version 2 only ("GPL") or the Common
  158.15 +# Development and Distribution License("CDDL") (collectively, the
  158.16 +# "License"). You may not use this file except in compliance with the
  158.17 +# License. You can obtain a copy of the License at
  158.18 +# http://www.netbeans.org/cddl-gplv2.html
  158.19 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  158.20 +# specific language governing permissions and limitations under the
  158.21 +# License.  When distributing the software, include this License Header
  158.22 +# Notice in each file and include the License file at
  158.23 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  158.24 +# particular file as subject to the "Classpath" exception as provided
  158.25 +# by Oracle in the GPL Version 2 section of the License file that
  158.26 +# accompanied this code. If applicable, add the following below the
  158.27 +# License Header, with the fields enclosed by brackets [] replaced by
  158.28 +# your own identifying information:
  158.29 +# "Portions Copyrighted [year] [name of copyright owner]"
  158.30 +#
  158.31 +# Contributor(s):
  158.32 +#
  158.33 +# The Original Software is NetBeans. The Initial Developer of the Original
  158.34 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  158.35 +# Microsystems, Inc. All Rights Reserved.
  158.36 +#
  158.37 +# If you wish your version of this file to be governed by only the CDDL
  158.38 +# or only the GPL Version 2, indicate your decision by adding
  158.39 +# "[Contributor] elects to include this software in this distribution
  158.40 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  158.41 +# single choice of license, a recipient has the option to distribute
  158.42 +# your version of this file under either the CDDL, the GPL Version 2 or
  158.43 +# to extend the choice of license to its licensees as provided above.
  158.44 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  158.45 +# Version 2 license, then the option applies only if the new code is
  158.46 +# made subject to such option by the copyright holder.
  158.47 +
  158.48  (cd common; ant "$@" clean && ant "$@" build) || exit 1
  158.49  (cd ide; ant "$@" clean && (cd ../common; ant "$@" -Dbuild.updates.dir=../ide/build/updates nbms) && ant "$@" nbms) || exit 1
  158.50  rm -rf build
   159.1 --- a/remoting/common/api/build.xml	Mon Dec 19 11:37:36 2016 +0100
   159.2 +++ b/remoting/common/api/build.xml	Mon Feb 27 22:40:44 2017 +0100
   159.3 @@ -1,4 +1,47 @@
   159.4  <?xml version="1.0" encoding="UTF-8"?>
   159.5 +<!--
   159.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   159.7 +
   159.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   159.9 +
  159.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  159.11 +Other names may be trademarks of their respective owners.
  159.12 +
  159.13 +The contents of this file are subject to the terms of either the GNU
  159.14 +General Public License Version 2 only ("GPL") or the Common
  159.15 +Development and Distribution License("CDDL") (collectively, the
  159.16 +"License"). You may not use this file except in compliance with the
  159.17 +License. You can obtain a copy of the License at
  159.18 +http://www.netbeans.org/cddl-gplv2.html
  159.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  159.20 +specific language governing permissions and limitations under the
  159.21 +License.  When distributing the software, include this License Header
  159.22 +Notice in each file and include the License file at
  159.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  159.24 +particular file as subject to the "Classpath" exception as provided
  159.25 +by Oracle in the GPL Version 2 section of the License file that
  159.26 +accompanied this code. If applicable, add the following below the
  159.27 +License Header, with the fields enclosed by brackets [] replaced by
  159.28 +your own identifying information:
  159.29 +"Portions Copyrighted [year] [name of copyright owner]"
  159.30 +
  159.31 +Contributor(s):
  159.32 +
  159.33 +The Original Software is NetBeans. The Initial Developer of the Original
  159.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  159.35 +Microsystems, Inc. All Rights Reserved.
  159.36 +
  159.37 +If you wish your version of this file to be governed by only the CDDL
  159.38 +or only the GPL Version 2, indicate your decision by adding
  159.39 +"[Contributor] elects to include this software in this distribution
  159.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  159.41 +single choice of license, a recipient has the option to distribute
  159.42 +your version of this file under either the CDDL, the GPL Version 2 or
  159.43 +to extend the choice of license to its licensees as provided above.
  159.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  159.45 +Version 2 license, then the option applies only if the new code is
  159.46 +made subject to such option by the copyright holder.
  159.47 +-->
  159.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  159.49  <!-- for some information on what you could do (e.g. targets to override). -->
  159.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   160.1 --- a/remoting/common/api/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   160.2 +++ b/remoting/common/api/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   160.3 @@ -1,5 +1,48 @@
   160.4  <?xml version="1.0" encoding="UTF-8"?>
   160.5  <!--
   160.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   160.7 +
   160.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   160.9 +
  160.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  160.11 +Other names may be trademarks of their respective owners.
  160.12 +
  160.13 +The contents of this file are subject to the terms of either the GNU
  160.14 +General Public License Version 2 only ("GPL") or the Common
  160.15 +Development and Distribution License("CDDL") (collectively, the
  160.16 +"License"). You may not use this file except in compliance with the
  160.17 +License. You can obtain a copy of the License at
  160.18 +http://www.netbeans.org/cddl-gplv2.html
  160.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  160.20 +specific language governing permissions and limitations under the
  160.21 +License.  When distributing the software, include this License Header
  160.22 +Notice in each file and include the License file at
  160.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  160.24 +particular file as subject to the "Classpath" exception as provided
  160.25 +by Oracle in the GPL Version 2 section of the License file that
  160.26 +accompanied this code. If applicable, add the following below the
  160.27 +License Header, with the fields enclosed by brackets [] replaced by
  160.28 +your own identifying information:
  160.29 +"Portions Copyrighted [year] [name of copyright owner]"
  160.30 +
  160.31 +Contributor(s):
  160.32 +
  160.33 +The Original Software is NetBeans. The Initial Developer of the Original
  160.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  160.35 +Microsystems, Inc. All Rights Reserved.
  160.36 +
  160.37 +If you wish your version of this file to be governed by only the CDDL
  160.38 +or only the GPL Version 2, indicate your decision by adding
  160.39 +"[Contributor] elects to include this software in this distribution
  160.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  160.41 +single choice of license, a recipient has the option to distribute
  160.42 +your version of this file under either the CDDL, the GPL Version 2 or
  160.43 +to extend the choice of license to its licensees as provided above.
  160.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  160.45 +Version 2 license, then the option applies only if the new code is
  160.46 +made subject to such option by the copyright holder.
  160.47 +-->
  160.48 +<!--
  160.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  160.50  ***         EDIT ../build.xml INSTEAD         ***
  160.51  -->
   161.1 --- a/remoting/common/api/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   161.2 +++ b/remoting/common/api/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   161.3 @@ -1,3 +1,44 @@
   161.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   161.5 +#
   161.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   161.7 +#
   161.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   161.9 +# Other names may be trademarks of their respective owners.
  161.10 +#
  161.11 +# The contents of this file are subject to the terms of either the GNU
  161.12 +# General Public License Version 2 only ("GPL") or the Common
  161.13 +# Development and Distribution License("CDDL") (collectively, the
  161.14 +# "License"). You may not use this file except in compliance with the
  161.15 +# License. You can obtain a copy of the License at
  161.16 +# http://www.netbeans.org/cddl-gplv2.html
  161.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  161.18 +# specific language governing permissions and limitations under the
  161.19 +# License.  When distributing the software, include this License Header
  161.20 +# Notice in each file and include the License file at
  161.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  161.22 +# particular file as subject to the "Classpath" exception as provided
  161.23 +# by Oracle in the GPL Version 2 section of the License file that
  161.24 +# accompanied this code. If applicable, add the following below the
  161.25 +# License Header, with the fields enclosed by brackets [] replaced by
  161.26 +# your own identifying information:
  161.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  161.28 +#
  161.29 +# Contributor(s):
  161.30 +#
  161.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  161.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  161.33 +# Microsystems, Inc. All Rights Reserved.
  161.34 +#
  161.35 +# If you wish your version of this file to be governed by only the CDDL
  161.36 +# or only the GPL Version 2, indicate your decision by adding
  161.37 +# "[Contributor] elects to include this software in this distribution
  161.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  161.39 +# single choice of license, a recipient has the option to distribute
  161.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  161.41 +# to extend the choice of license to its licensees as provided above.
  161.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  161.43 +# Version 2 license, then the option applies only if the new code is
  161.44 +# made subject to such option by the copyright holder.
  161.45  build.xml.data.CRC32=11046abd
  161.46  build.xml.script.CRC32=22857ef0
  161.47  build.xml.stylesheet.CRC32=a56c6a5b@2.49
   162.1 --- a/remoting/common/api/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   162.2 +++ b/remoting/common/api/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   162.3 @@ -1,3 +1,44 @@
   162.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   162.5 +#
   162.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   162.7 +#
   162.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   162.9 +# Other names may be trademarks of their respective owners.
  162.10 +#
  162.11 +# The contents of this file are subject to the terms of either the GNU
  162.12 +# General Public License Version 2 only ("GPL") or the Common
  162.13 +# Development and Distribution License("CDDL") (collectively, the
  162.14 +# "License"). You may not use this file except in compliance with the
  162.15 +# License. You can obtain a copy of the License at
  162.16 +# http://www.netbeans.org/cddl-gplv2.html
  162.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  162.18 +# specific language governing permissions and limitations under the
  162.19 +# License.  When distributing the software, include this License Header
  162.20 +# Notice in each file and include the License file at
  162.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  162.22 +# particular file as subject to the "Classpath" exception as provided
  162.23 +# by Oracle in the GPL Version 2 section of the License file that
  162.24 +# accompanied this code. If applicable, add the following below the
  162.25 +# License Header, with the fields enclosed by brackets [] replaced by
  162.26 +# your own identifying information:
  162.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  162.28 +#
  162.29 +# Contributor(s):
  162.30 +#
  162.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  162.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  162.33 +# Microsystems, Inc. All Rights Reserved.
  162.34 +#
  162.35 +# If you wish your version of this file to be governed by only the CDDL
  162.36 +# or only the GPL Version 2, indicate your decision by adding
  162.37 +# "[Contributor] elects to include this software in this distribution
  162.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  162.39 +# single choice of license, a recipient has the option to distribute
  162.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  162.41 +# to extend the choice of license to its licensees as provided above.
  162.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  162.43 +# Version 2 license, then the option applies only if the new code is
  162.44 +# made subject to such option by the copyright holder.
  162.45  is.autoload=true
  162.46  javac.source=1.6
  162.47  javac.compilerargs=-Xlint -Xlint:-serial
   163.1 --- a/remoting/common/api/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   163.2 +++ b/remoting/common/api/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   163.3 @@ -1,4 +1,47 @@
   163.4  <?xml version="1.0" encoding="UTF-8"?>
   163.5 +<!--
   163.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   163.7 +
   163.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   163.9 +
  163.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  163.11 +Other names may be trademarks of their respective owners.
  163.12 +
  163.13 +The contents of this file are subject to the terms of either the GNU
  163.14 +General Public License Version 2 only ("GPL") or the Common
  163.15 +Development and Distribution License("CDDL") (collectively, the
  163.16 +"License"). You may not use this file except in compliance with the
  163.17 +License. You can obtain a copy of the License at
  163.18 +http://www.netbeans.org/cddl-gplv2.html
  163.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  163.20 +specific language governing permissions and limitations under the
  163.21 +License.  When distributing the software, include this License Header
  163.22 +Notice in each file and include the License file at
  163.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  163.24 +particular file as subject to the "Classpath" exception as provided
  163.25 +by Oracle in the GPL Version 2 section of the License file that
  163.26 +accompanied this code. If applicable, add the following below the
  163.27 +License Header, with the fields enclosed by brackets [] replaced by
  163.28 +your own identifying information:
  163.29 +"Portions Copyrighted [year] [name of copyright owner]"
  163.30 +
  163.31 +Contributor(s):
  163.32 +
  163.33 +The Original Software is NetBeans. The Initial Developer of the Original
  163.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  163.35 +Microsystems, Inc. All Rights Reserved.
  163.36 +
  163.37 +If you wish your version of this file to be governed by only the CDDL
  163.38 +or only the GPL Version 2, indicate your decision by adding
  163.39 +"[Contributor] elects to include this software in this distribution
  163.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  163.41 +single choice of license, a recipient has the option to distribute
  163.42 +your version of this file under either the CDDL, the GPL Version 2 or
  163.43 +to extend the choice of license to its licensees as provided above.
  163.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  163.45 +Version 2 license, then the option applies only if the new code is
  163.46 +made subject to such option by the copyright holder.
  163.47 +-->
  163.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  163.49      <type>org.netbeans.modules.apisupport.project</type>
  163.50      <configuration>
   164.1 --- a/remoting/common/api/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   164.2 +++ b/remoting/common/api/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
   164.3 @@ -1,1 +1,42 @@
   164.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   164.5 +#
   164.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   164.7 +#
   164.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   164.9 +# Other names may be trademarks of their respective owners.
  164.10 +#
  164.11 +# The contents of this file are subject to the terms of either the GNU
  164.12 +# General Public License Version 2 only ("GPL") or the Common
  164.13 +# Development and Distribution License("CDDL") (collectively, the
  164.14 +# "License"). You may not use this file except in compliance with the
  164.15 +# License. You can obtain a copy of the License at
  164.16 +# http://www.netbeans.org/cddl-gplv2.html
  164.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  164.18 +# specific language governing permissions and limitations under the
  164.19 +# License.  When distributing the software, include this License Header
  164.20 +# Notice in each file and include the License file at
  164.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  164.22 +# particular file as subject to the "Classpath" exception as provided
  164.23 +# by Oracle in the GPL Version 2 section of the License file that
  164.24 +# accompanied this code. If applicable, add the following below the
  164.25 +# License Header, with the fields enclosed by brackets [] replaced by
  164.26 +# your own identifying information:
  164.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  164.28 +#
  164.29 +# Contributor(s):
  164.30 +#
  164.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  164.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  164.33 +# Microsystems, Inc. All Rights Reserved.
  164.34 +#
  164.35 +# If you wish your version of this file to be governed by only the CDDL
  164.36 +# or only the GPL Version 2, indicate your decision by adding
  164.37 +# "[Contributor] elects to include this software in this distribution
  164.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  164.39 +# single choice of license, a recipient has the option to distribute
  164.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  164.41 +# to extend the choice of license to its licensees as provided above.
  164.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  164.43 +# Version 2 license, then the option applies only if the new code is
  164.44 +# made subject to such option by the copyright holder.
  164.45  suite.dir=${basedir}/..
   165.1 --- a/remoting/common/api/src/org/netbeans/modules/jackpot30/common/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   165.2 +++ b/remoting/common/api/src/org/netbeans/modules/jackpot30/common/Bundle.properties	Mon Feb 27 22:40:44 2017 +0100
   165.3 @@ -1,1 +1,42 @@
   165.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   165.5 +#
   165.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   165.7 +#
   165.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   165.9 +# Other names may be trademarks of their respective owners.
  165.10 +#
  165.11 +# The contents of this file are subject to the terms of either the GNU
  165.12 +# General Public License Version 2 only ("GPL") or the Common
  165.13 +# Development and Distribution License("CDDL") (collectively, the
  165.14 +# "License"). You may not use this file except in compliance with the
  165.15 +# License. You can obtain a copy of the License at
  165.16 +# http://www.netbeans.org/cddl-gplv2.html
  165.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  165.18 +# specific language governing permissions and limitations under the
  165.19 +# License.  When distributing the software, include this License Header
  165.20 +# Notice in each file and include the License file at
  165.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  165.22 +# particular file as subject to the "Classpath" exception as provided
  165.23 +# by Oracle in the GPL Version 2 section of the License file that
  165.24 +# accompanied this code. If applicable, add the following below the
  165.25 +# License Header, with the fields enclosed by brackets [] replaced by
  165.26 +# your own identifying information:
  165.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  165.28 +#
  165.29 +# Contributor(s):
  165.30 +#
  165.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  165.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  165.33 +# Microsystems, Inc. All Rights Reserved.
  165.34 +#
  165.35 +# If you wish your version of this file to be governed by only the CDDL
  165.36 +# or only the GPL Version 2, indicate your decision by adding
  165.37 +# "[Contributor] elects to include this software in this distribution
  165.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  165.39 +# single choice of license, a recipient has the option to distribute
  165.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  165.41 +# to extend the choice of license to its licensees as provided above.
  165.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  165.43 +# Version 2 license, then the option applies only if the new code is
  165.44 +# made subject to such option by the copyright holder.
  165.45  OpenIDE-Module-Name=Jackpot 3.0 Common APIs
   166.1 --- a/remoting/common/borrowedtests/build.xml	Mon Dec 19 11:37:36 2016 +0100
   166.2 +++ b/remoting/common/borrowedtests/build.xml	Mon Feb 27 22:40:44 2017 +0100
   166.3 @@ -1,4 +1,47 @@
   166.4  <?xml version="1.0" encoding="UTF-8"?>
   166.5 +<!--
   166.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   166.7 +
   166.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   166.9 +
  166.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  166.11 +Other names may be trademarks of their respective owners.
  166.12 +
  166.13 +The contents of this file are subject to the terms of either the GNU
  166.14 +General Public License Version 2 only ("GPL") or the Common
  166.15 +Development and Distribution License("CDDL") (collectively, the
  166.16 +"License"). You may not use this file except in compliance with the
  166.17 +License. You can obtain a copy of the License at
  166.18 +http://www.netbeans.org/cddl-gplv2.html
  166.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  166.20 +specific language governing permissions and limitations under the
  166.21 +License.  When distributing the software, include this License Header
  166.22 +Notice in each file and include the License file at
  166.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  166.24 +particular file as subject to the "Classpath" exception as provided
  166.25 +by Oracle in the GPL Version 2 section of the License file that
  166.26 +accompanied this code. If applicable, add the following below the
  166.27 +License Header, with the fields enclosed by brackets [] replaced by
  166.28 +your own identifying information:
  166.29 +"Portions Copyrighted [year] [name of copyright owner]"
  166.30 +
  166.31 +Contributor(s):
  166.32 +
  166.33 +The Original Software is NetBeans. The Initial Developer of the Original
  166.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  166.35 +Microsystems, Inc. All Rights Reserved.
  166.36 +
  166.37 +If you wish your version of this file to be governed by only the CDDL
  166.38 +or only the GPL Version 2, indicate your decision by adding
  166.39 +"[Contributor] elects to include this software in this distribution
  166.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  166.41 +single choice of license, a recipient has the option to distribute
  166.42 +your version of this file under either the CDDL, the GPL Version 2 or
  166.43 +to extend the choice of license to its licensees as provided above.
  166.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  166.45 +Version 2 license, then the option applies only if the new code is
  166.46 +made subject to such option by the copyright holder.
  166.47 +-->
  166.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  166.49  <!-- for some information on what you could do (e.g. targets to override). -->
  166.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   167.1 --- a/remoting/common/borrowedtests/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   167.2 +++ b/remoting/common/borrowedtests/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   167.3 @@ -1,5 +1,48 @@
   167.4  <?xml version="1.0" encoding="UTF-8"?>
   167.5  <!--
   167.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   167.7 +
   167.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   167.9 +
  167.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  167.11 +Other names may be trademarks of their respective owners.
  167.12 +
  167.13 +The contents of this file are subject to the terms of either the GNU
  167.14 +General Public License Version 2 only ("GPL") or the Common
  167.15 +Development and Distribution License("CDDL") (collectively, the
  167.16 +"License"). You may not use this file except in compliance with the
  167.17 +License. You can obtain a copy of the License at
  167.18 +http://www.netbeans.org/cddl-gplv2.html
  167.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  167.20 +specific language governing permissions and limitations under the
  167.21 +License.  When distributing the software, include this License Header
  167.22 +Notice in each file and include the License file at
  167.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  167.24 +particular file as subject to the "Classpath" exception as provided
  167.25 +by Oracle in the GPL Version 2 section of the License file that
  167.26 +accompanied this code. If applicable, add the following below the
  167.27 +License Header, with the fields enclosed by brackets [] replaced by
  167.28 +your own identifying information:
  167.29 +"Portions Copyrighted [year] [name of copyright owner]"
  167.30 +
  167.31 +Contributor(s):
  167.32 +
  167.33 +The Original Software is NetBeans. The Initial Developer of the Original
  167.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  167.35 +Microsystems, Inc. All Rights Reserved.
  167.36 +
  167.37 +If you wish your version of this file to be governed by only the CDDL
  167.38 +or only the GPL Version 2, indicate your decision by adding
  167.39 +"[Contributor] elects to include this software in this distribution
  167.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  167.41 +single choice of license, a recipient has the option to distribute
  167.42 +your version of this file under either the CDDL, the GPL Version 2 or
  167.43 +to extend the choice of license to its licensees as provided above.
  167.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  167.45 +Version 2 license, then the option applies only if the new code is
  167.46 +made subject to such option by the copyright holder.
  167.47 +-->
  167.48 +<!--
  167.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  167.50  ***         EDIT ../build.xml INSTEAD         ***
  167.51  -->
   168.1 --- a/remoting/common/borrowedtests/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   168.2 +++ b/remoting/common/borrowedtests/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   168.3 @@ -1,3 +1,44 @@
   168.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   168.5 +#
   168.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   168.7 +#
   168.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   168.9 +# Other names may be trademarks of their respective owners.
  168.10 +#
  168.11 +# The contents of this file are subject to the terms of either the GNU
  168.12 +# General Public License Version 2 only ("GPL") or the Common
  168.13 +# Development and Distribution License("CDDL") (collectively, the
  168.14 +# "License"). You may not use this file except in compliance with the
  168.15 +# License. You can obtain a copy of the License at
  168.16 +# http://www.netbeans.org/cddl-gplv2.html
  168.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  168.18 +# specific language governing permissions and limitations under the
  168.19 +# License.  When distributing the software, include this License Header
  168.20 +# Notice in each file and include the License file at
  168.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  168.22 +# particular file as subject to the "Classpath" exception as provided
  168.23 +# by Oracle in the GPL Version 2 section of the License file that
  168.24 +# accompanied this code. If applicable, add the following below the
  168.25 +# License Header, with the fields enclosed by brackets [] replaced by
  168.26 +# your own identifying information:
  168.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  168.28 +#
  168.29 +# Contributor(s):
  168.30 +#
  168.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  168.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  168.33 +# Microsystems, Inc. All Rights Reserved.
  168.34 +#
  168.35 +# If you wish your version of this file to be governed by only the CDDL
  168.36 +# or only the GPL Version 2, indicate your decision by adding
  168.37 +# "[Contributor] elects to include this software in this distribution
  168.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  168.39 +# single choice of license, a recipient has the option to distribute
  168.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  168.41 +# to extend the choice of license to its licensees as provided above.
  168.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  168.43 +# Version 2 license, then the option applies only if the new code is
  168.44 +# made subject to such option by the copyright holder.
  168.45  build.xml.data.CRC32=a4393221
  168.46  build.xml.script.CRC32=3cb17d2d
  168.47  build.xml.stylesheet.CRC32=79c3b980@1.28.0.7
   169.1 --- a/remoting/common/borrowedtests/nbproject/platform.properties	Mon Dec 19 11:37:36 2016 +0100
   169.2 +++ b/remoting/common/borrowedtests/nbproject/platform.properties	Mon Feb 27 22:40:44 2017 +0100
   169.3 @@ -1,3 +1,44 @@
   169.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   169.5 +#
   169.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   169.7 +#
   169.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   169.9 +# Other names may be trademarks of their respective owners.
  169.10 +#
  169.11 +# The contents of this file are subject to the terms of either the GNU
  169.12 +# General Public License Version 2 only ("GPL") or the Common
  169.13 +# Development and Distribution License("CDDL") (collectively, the
  169.14 +# "License"). You may not use this file except in compliance with the
  169.15 +# License. You can obtain a copy of the License at
  169.16 +# http://www.netbeans.org/cddl-gplv2.html
  169.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  169.18 +# specific language governing permissions and limitations under the
  169.19 +# License.  When distributing the software, include this License Header
  169.20 +# Notice in each file and include the License file at
  169.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  169.22 +# particular file as subject to the "Classpath" exception as provided
  169.23 +# by Oracle in the GPL Version 2 section of the License file that
  169.24 +# accompanied this code. If applicable, add the following below the
  169.25 +# License Header, with the fields enclosed by brackets [] replaced by
  169.26 +# your own identifying information:
  169.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  169.28 +#
  169.29 +# Contributor(s):
  169.30 +#
  169.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  169.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  169.33 +# Microsystems, Inc. All Rights Reserved.
  169.34 +#
  169.35 +# If you wish your version of this file to be governed by only the CDDL
  169.36 +# or only the GPL Version 2, indicate your decision by adding
  169.37 +# "[Contributor] elects to include this software in this distribution
  169.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  169.39 +# single choice of license, a recipient has the option to distribute
  169.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  169.41 +# to extend the choice of license to its licensees as provided above.
  169.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  169.43 +# Version 2 license, then the option applies only if the new code is
  169.44 +# made subject to such option by the copyright holder.
  169.45  cluster.path=\
  169.46      ${nbplatform.active.dir}/identity:\
  169.47      ${nbplatform.active.dir}/enterprise:\
   170.1 --- a/remoting/common/borrowedtests/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   170.2 +++ b/remoting/common/borrowedtests/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   170.3 @@ -1,3 +1,44 @@
   170.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   170.5 +#
   170.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   170.7 +#
   170.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   170.9 +# Other names may be trademarks of their respective owners.
  170.10 +#
  170.11 +# The contents of this file are subject to the terms of either the GNU
  170.12 +# General Public License Version 2 only ("GPL") or the Common
  170.13 +# Development and Distribution License("CDDL") (collectively, the
  170.14 +# "License"). You may not use this file except in compliance with the
  170.15 +# License. You can obtain a copy of the License at
  170.16 +# http://www.netbeans.org/cddl-gplv2.html
  170.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  170.18 +# specific language governing permissions and limitations under the
  170.19 +# License.  When distributing the software, include this License Header
  170.20 +# Notice in each file and include the License file at
  170.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  170.22 +# particular file as subject to the "Classpath" exception as provided
  170.23 +# by Oracle in the GPL Version 2 section of the License file that
  170.24 +# accompanied this code. If applicable, add the following below the
  170.25 +# License Header, with the fields enclosed by brackets [] replaced by
  170.26 +# your own identifying information:
  170.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  170.28 +#
  170.29 +# Contributor(s):
  170.30 +#
  170.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  170.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  170.33 +# Microsystems, Inc. All Rights Reserved.
  170.34 +#
  170.35 +# If you wish your version of this file to be governed by only the CDDL
  170.36 +# or only the GPL Version 2, indicate your decision by adding
  170.37 +# "[Contributor] elects to include this software in this distribution
  170.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  170.39 +# single choice of license, a recipient has the option to distribute
  170.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  170.41 +# to extend the choice of license to its licensees as provided above.
  170.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  170.43 +# Version 2 license, then the option applies only if the new code is
  170.44 +# made subject to such option by the copyright holder.
  170.45  is.autoload=true
  170.46  javac.source=1.5
  170.47  javac.compilerargs=-Xlint -Xlint:-serial
   171.1 --- a/remoting/common/borrowedtests/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   171.2 +++ b/remoting/common/borrowedtests/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   171.3 @@ -1,4 +1,47 @@
   171.4  <?xml version="1.0" encoding="UTF-8"?>
   171.5 +<!--
   171.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   171.7 +
   171.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   171.9 +
  171.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  171.11 +Other names may be trademarks of their respective owners.
  171.12 +
  171.13 +The contents of this file are subject to the terms of either the GNU
  171.14 +General Public License Version 2 only ("GPL") or the Common
  171.15 +Development and Distribution License("CDDL") (collectively, the
  171.16 +"License"). You may not use this file except in compliance with the
  171.17 +License. You can obtain a copy of the License at
  171.18 +http://www.netbeans.org/cddl-gplv2.html
  171.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  171.20 +specific language governing permissions and limitations under the
  171.21 +License.  When distributing the software, include this License Header
  171.22 +Notice in each file and include the License file at
  171.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  171.24 +particular file as subject to the "Classpath" exception as provided
  171.25 +by Oracle in the GPL Version 2 section of the License file that
  171.26 +accompanied this code. If applicable, add the following below the
  171.27 +License Header, with the fields enclosed by brackets [] replaced by
  171.28 +your own identifying information:
  171.29 +"Portions Copyrighted [year] [name of copyright owner]"
  171.30 +
  171.31 +Contributor(s):
  171.32 +
  171.33 +The Original Software is NetBeans. The Initial Developer of the Original
  171.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  171.35 +Microsystems, Inc. All Rights Reserved.
  171.36 +
  171.37 +If you wish your version of this file to be governed by only the CDDL
  171.38 +or only the GPL Version 2, indicate your decision by adding
  171.39 +"[Contributor] elects to include this software in this distribution
  171.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  171.41 +single choice of license, a recipient has the option to distribute
  171.42 +your version of this file under either the CDDL, the GPL Version 2 or
  171.43 +to extend the choice of license to its licensees as provided above.
  171.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  171.45 +Version 2 license, then the option applies only if the new code is
  171.46 +made subject to such option by the copyright holder.
  171.47 +-->
  171.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  171.49      <type>org.netbeans.modules.apisupport.project</type>
  171.50      <configuration>
   172.1 --- a/remoting/common/borrowedtests/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   172.2 +++ b/remoting/common/borrowedtests/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
   172.3 @@ -1,1 +1,42 @@
   172.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   172.5 +#
   172.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   172.7 +#
   172.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   172.9 +# Other names may be trademarks of their respective owners.
  172.10 +#
  172.11 +# The contents of this file are subject to the terms of either the GNU
  172.12 +# General Public License Version 2 only ("GPL") or the Common
  172.13 +# Development and Distribution License("CDDL") (collectively, the
  172.14 +# "License"). You may not use this file except in compliance with the
  172.15 +# License. You can obtain a copy of the License at
  172.16 +# http://www.netbeans.org/cddl-gplv2.html
  172.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  172.18 +# specific language governing permissions and limitations under the
  172.19 +# License.  When distributing the software, include this License Header
  172.20 +# Notice in each file and include the License file at
  172.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  172.22 +# particular file as subject to the "Classpath" exception as provided
  172.23 +# by Oracle in the GPL Version 2 section of the License file that
  172.24 +# accompanied this code. If applicable, add the following below the
  172.25 +# License Header, with the fields enclosed by brackets [] replaced by
  172.26 +# your own identifying information:
  172.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  172.28 +#
  172.29 +# Contributor(s):
  172.30 +#
  172.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  172.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  172.33 +# Microsystems, Inc. All Rights Reserved.
  172.34 +#
  172.35 +# If you wish your version of this file to be governed by only the CDDL
  172.36 +# or only the GPL Version 2, indicate your decision by adding
  172.37 +# "[Contributor] elects to include this software in this distribution
  172.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  172.39 +# single choice of license, a recipient has the option to distribute
  172.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  172.41 +# to extend the choice of license to its licensees as provided above.
  172.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  172.43 +# Version 2 license, then the option applies only if the new code is
  172.44 +# made subject to such option by the copyright holder.
  172.45  suite.dir=${basedir}/..
   173.1 --- a/remoting/common/build.xml	Mon Dec 19 11:37:36 2016 +0100
   173.2 +++ b/remoting/common/build.xml	Mon Feb 27 22:40:44 2017 +0100
   173.3 @@ -1,4 +1,47 @@
   173.4  <?xml version="1.0" encoding="UTF-8"?>
   173.5 +<!--
   173.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   173.7 +
   173.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   173.9 +
  173.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  173.11 +Other names may be trademarks of their respective owners.
  173.12 +
  173.13 +The contents of this file are subject to the terms of either the GNU
  173.14 +General Public License Version 2 only ("GPL") or the Common
  173.15 +Development and Distribution License("CDDL") (collectively, the
  173.16 +"License"). You may not use this file except in compliance with the
  173.17 +License. You can obtain a copy of the License at
  173.18 +http://www.netbeans.org/cddl-gplv2.html
  173.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  173.20 +specific language governing permissions and limitations under the
  173.21 +License.  When distributing the software, include this License Header
  173.22 +Notice in each file and include the License file at
  173.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  173.24 +particular file as subject to the "Classpath" exception as provided
  173.25 +by Oracle in the GPL Version 2 section of the License file that
  173.26 +accompanied this code. If applicable, add the following below the
  173.27 +License Header, with the fields enclosed by brackets [] replaced by
  173.28 +your own identifying information:
  173.29 +"Portions Copyrighted [year] [name of copyright owner]"
  173.30 +
  173.31 +Contributor(s):
  173.32 +
  173.33 +The Original Software is NetBeans. The Initial Developer of the Original
  173.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  173.35 +Microsystems, Inc. All Rights Reserved.
  173.36 +
  173.37 +If you wish your version of this file to be governed by only the CDDL
  173.38 +or only the GPL Version 2, indicate your decision by adding
  173.39 +"[Contributor] elects to include this software in this distribution
  173.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  173.41 +single choice of license, a recipient has the option to distribute
  173.42 +your version of this file under either the CDDL, the GPL Version 2 or
  173.43 +to extend the choice of license to its licensees as provided above.
  173.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  173.45 +Version 2 license, then the option applies only if the new code is
  173.46 +made subject to such option by the copyright holder.
  173.47 +-->
  173.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  173.49  <!-- for some information on what you could do (e.g. targets to override). -->
  173.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   174.1 --- a/remoting/common/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   174.2 +++ b/remoting/common/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   174.3 @@ -1,5 +1,48 @@
   174.4  <?xml version="1.0" encoding="UTF-8"?>
   174.5  <!--
   174.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   174.7 +
   174.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   174.9 +
  174.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  174.11 +Other names may be trademarks of their respective owners.
  174.12 +
  174.13 +The contents of this file are subject to the terms of either the GNU
  174.14 +General Public License Version 2 only ("GPL") or the Common
  174.15 +Development and Distribution License("CDDL") (collectively, the
  174.16 +"License"). You may not use this file except in compliance with the
  174.17 +License. You can obtain a copy of the License at
  174.18 +http://www.netbeans.org/cddl-gplv2.html
  174.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  174.20 +specific language governing permissions and limitations under the
  174.21 +License.  When distributing the software, include this License Header
  174.22 +Notice in each file and include the License file at
  174.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  174.24 +particular file as subject to the "Classpath" exception as provided
  174.25 +by Oracle in the GPL Version 2 section of the License file that
  174.26 +accompanied this code. If applicable, add the following below the
  174.27 +License Header, with the fields enclosed by brackets [] replaced by
  174.28 +your own identifying information:
  174.29 +"Portions Copyrighted [year] [name of copyright owner]"
  174.30 +
  174.31 +Contributor(s):
  174.32 +
  174.33 +The Original Software is NetBeans. The Initial Developer of the Original
  174.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  174.35 +Microsystems, Inc. All Rights Reserved.
  174.36 +
  174.37 +If you wish your version of this file to be governed by only the CDDL
  174.38 +or only the GPL Version 2, indicate your decision by adding
  174.39 +"[Contributor] elects to include this software in this distribution
  174.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  174.41 +single choice of license, a recipient has the option to distribute
  174.42 +your version of this file under either the CDDL, the GPL Version 2 or
  174.43 +to extend the choice of license to its licensees as provided above.
  174.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  174.45 +Version 2 license, then the option applies only if the new code is
  174.46 +made subject to such option by the copyright holder.
  174.47 +-->
  174.48 +<!--
  174.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  174.50  ***         EDIT ../build.xml INSTEAD         ***
  174.51  -->
   175.1 --- a/remoting/common/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   175.2 +++ b/remoting/common/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   175.3 @@ -1,3 +1,44 @@
   175.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   175.5 +#
   175.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   175.7 +#
   175.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   175.9 +# Other names may be trademarks of their respective owners.
  175.10 +#
  175.11 +# The contents of this file are subject to the terms of either the GNU
  175.12 +# General Public License Version 2 only ("GPL") or the Common
  175.13 +# Development and Distribution License("CDDL") (collectively, the
  175.14 +# "License"). You may not use this file except in compliance with the
  175.15 +# License. You can obtain a copy of the License at
  175.16 +# http://www.netbeans.org/cddl-gplv2.html
  175.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  175.18 +# specific language governing permissions and limitations under the
  175.19 +# License.  When distributing the software, include this License Header
  175.20 +# Notice in each file and include the License file at
  175.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  175.22 +# particular file as subject to the "Classpath" exception as provided
  175.23 +# by Oracle in the GPL Version 2 section of the License file that
  175.24 +# accompanied this code. If applicable, add the following below the
  175.25 +# License Header, with the fields enclosed by brackets [] replaced by
  175.26 +# your own identifying information:
  175.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  175.28 +#
  175.29 +# Contributor(s):
  175.30 +#
  175.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  175.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  175.33 +# Microsystems, Inc. All Rights Reserved.
  175.34 +#
  175.35 +# If you wish your version of this file to be governed by only the CDDL
  175.36 +# or only the GPL Version 2, indicate your decision by adding
  175.37 +# "[Contributor] elects to include this software in this distribution
  175.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  175.39 +# single choice of license, a recipient has the option to distribute
  175.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  175.41 +# to extend the choice of license to its licensees as provided above.
  175.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  175.43 +# Version 2 license, then the option applies only if the new code is
  175.44 +# made subject to such option by the copyright holder.
  175.45  build.xml.data.CRC32=8c462dad
  175.46  build.xml.script.CRC32=263c4f10
  175.47  build.xml.stylesheet.CRC32=eaf9f76a@2.49
   176.1 --- a/remoting/common/nbproject/platform.properties	Mon Dec 19 11:37:36 2016 +0100
   176.2 +++ b/remoting/common/nbproject/platform.properties	Mon Feb 27 22:40:44 2017 +0100
   176.3 @@ -1,3 +1,44 @@
   176.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   176.5 +#
   176.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   176.7 +#
   176.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   176.9 +# Other names may be trademarks of their respective owners.
  176.10 +#
  176.11 +# The contents of this file are subject to the terms of either the GNU
  176.12 +# General Public License Version 2 only ("GPL") or the Common
  176.13 +# Development and Distribution License("CDDL") (collectively, the
  176.14 +# "License"). You may not use this file except in compliance with the
  176.15 +# License. You can obtain a copy of the License at
  176.16 +# http://www.netbeans.org/cddl-gplv2.html
  176.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  176.18 +# specific language governing permissions and limitations under the
  176.19 +# License.  When distributing the software, include this License Header
  176.20 +# Notice in each file and include the License file at
  176.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  176.22 +# particular file as subject to the "Classpath" exception as provided
  176.23 +# by Oracle in the GPL Version 2 section of the License file that
  176.24 +# accompanied this code. If applicable, add the following below the
  176.25 +# License Header, with the fields enclosed by brackets [] replaced by
  176.26 +# your own identifying information:
  176.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  176.28 +#
  176.29 +# Contributor(s):
  176.30 +#
  176.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  176.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  176.33 +# Microsystems, Inc. All Rights Reserved.
  176.34 +#
  176.35 +# If you wish your version of this file to be governed by only the CDDL
  176.36 +# or only the GPL Version 2, indicate your decision by adding
  176.37 +# "[Contributor] elects to include this software in this distribution
  176.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  176.39 +# single choice of license, a recipient has the option to distribute
  176.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  176.41 +# to extend the choice of license to its licensees as provided above.
  176.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  176.43 +# Version 2 license, then the option applies only if the new code is
  176.44 +# made subject to such option by the copyright holder.
  176.45  cluster.path=\
  176.46      ${nbplatform.active.dir}/apisupport:\
  176.47      ${nbplatform.active.dir}/profiler:\
   177.1 --- a/remoting/common/nbproject/platform.xml	Mon Dec 19 11:37:36 2016 +0100
   177.2 +++ b/remoting/common/nbproject/platform.xml	Mon Feb 27 22:40:44 2017 +0100
   177.3 @@ -1,4 +1,47 @@
   177.4  <?xml version="1.0" encoding="UTF-8"?>
   177.5 +<!--
   177.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   177.7 +
   177.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   177.9 +
  177.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  177.11 +Other names may be trademarks of their respective owners.
  177.12 +
  177.13 +The contents of this file are subject to the terms of either the GNU
  177.14 +General Public License Version 2 only ("GPL") or the Common
  177.15 +Development and Distribution License("CDDL") (collectively, the
  177.16 +"License"). You may not use this file except in compliance with the
  177.17 +License. You can obtain a copy of the License at
  177.18 +http://www.netbeans.org/cddl-gplv2.html
  177.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  177.20 +specific language governing permissions and limitations under the
  177.21 +License.  When distributing the software, include this License Header
  177.22 +Notice in each file and include the License file at
  177.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  177.24 +particular file as subject to the "Classpath" exception as provided
  177.25 +by Oracle in the GPL Version 2 section of the License file that
  177.26 +accompanied this code. If applicable, add the following below the
  177.27 +License Header, with the fields enclosed by brackets [] replaced by
  177.28 +your own identifying information:
  177.29 +"Portions Copyrighted [year] [name of copyright owner]"
  177.30 +
  177.31 +Contributor(s):
  177.32 +
  177.33 +The Original Software is NetBeans. The Initial Developer of the Original
  177.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  177.35 +Microsystems, Inc. All Rights Reserved.
  177.36 +
  177.37 +If you wish your version of this file to be governed by only the CDDL
  177.38 +or only the GPL Version 2, indicate your decision by adding
  177.39 +"[Contributor] elects to include this software in this distribution
  177.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  177.41 +single choice of license, a recipient has the option to distribute
  177.42 +your version of this file under either the CDDL, the GPL Version 2 or
  177.43 +to extend the choice of license to its licensees as provided above.
  177.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  177.45 +Version 2 license, then the option applies only if the new code is
  177.46 +made subject to such option by the copyright holder.
  177.47 +-->
  177.48  <project name="platform" default="download" basedir="..">
  177.49      <condition property="download.required">
  177.50          <and>
   178.1 --- a/remoting/common/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   178.2 +++ b/remoting/common/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   178.3 @@ -1,3 +1,44 @@
   178.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   178.5 +#
   178.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   178.7 +#
   178.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   178.9 +# Other names may be trademarks of their respective owners.
  178.10 +#
  178.11 +# The contents of this file are subject to the terms of either the GNU
  178.12 +# General Public License Version 2 only ("GPL") or the Common
  178.13 +# Development and Distribution License("CDDL") (collectively, the
  178.14 +# "License"). You may not use this file except in compliance with the
  178.15 +# License. You can obtain a copy of the License at
  178.16 +# http://www.netbeans.org/cddl-gplv2.html
  178.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  178.18 +# specific language governing permissions and limitations under the
  178.19 +# License.  When distributing the software, include this License Header
  178.20 +# Notice in each file and include the License file at
  178.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  178.22 +# particular file as subject to the "Classpath" exception as provided
  178.23 +# by Oracle in the GPL Version 2 section of the License file that
  178.24 +# accompanied this code. If applicable, add the following below the
  178.25 +# License Header, with the fields enclosed by brackets [] replaced by
  178.26 +# your own identifying information:
  178.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  178.28 +#
  178.29 +# Contributor(s):
  178.30 +#
  178.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  178.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  178.33 +# Microsystems, Inc. All Rights Reserved.
  178.34 +#
  178.35 +# If you wish your version of this file to be governed by only the CDDL
  178.36 +# or only the GPL Version 2, indicate your decision by adding
  178.37 +# "[Contributor] elects to include this software in this distribution
  178.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  178.39 +# single choice of license, a recipient has the option to distribute
  178.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  178.41 +# to extend the choice of license to its licensees as provided above.
  178.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  178.43 +# Version 2 license, then the option applies only if the new code is
  178.44 +# made subject to such option by the copyright holder.
  178.45  app.title=common
  178.46  modules=\
  178.47      ${project.org.netbeans.modules.jackpot30.common}:\
   179.1 --- a/remoting/common/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   179.2 +++ b/remoting/common/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   179.3 @@ -1,4 +1,47 @@
   179.4  <?xml version="1.0" encoding="UTF-8"?>
   179.5 +<!--
   179.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   179.7 +
   179.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   179.9 +
  179.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  179.11 +Other names may be trademarks of their respective owners.
  179.12 +
  179.13 +The contents of this file are subject to the terms of either the GNU
  179.14 +General Public License Version 2 only ("GPL") or the Common
  179.15 +Development and Distribution License("CDDL") (collectively, the
  179.16 +"License"). You may not use this file except in compliance with the
  179.17 +License. You can obtain a copy of the License at
  179.18 +http://www.netbeans.org/cddl-gplv2.html
  179.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  179.20 +specific language governing permissions and limitations under the
  179.21 +License.  When distributing the software, include this License Header
  179.22 +Notice in each file and include the License file at
  179.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  179.24 +particular file as subject to the "Classpath" exception as provided
  179.25 +by Oracle in the GPL Version 2 section of the License file that
  179.26 +accompanied this code. If applicable, add the following below the
  179.27 +License Header, with the fields enclosed by brackets [] replaced by
  179.28 +your own identifying information:
  179.29 +"Portions Copyrighted [year] [name of copyright owner]"
  179.30 +
  179.31 +Contributor(s):
  179.32 +
  179.33 +The Original Software is NetBeans. The Initial Developer of the Original
  179.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  179.35 +Microsystems, Inc. All Rights Reserved.
  179.36 +
  179.37 +If you wish your version of this file to be governed by only the CDDL
  179.38 +or only the GPL Version 2, indicate your decision by adding
  179.39 +"[Contributor] elects to include this software in this distribution
  179.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  179.41 +single choice of license, a recipient has the option to distribute
  179.42 +your version of this file under either the CDDL, the GPL Version 2 or
  179.43 +to extend the choice of license to its licensees as provided above.
  179.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  179.45 +Version 2 license, then the option applies only if the new code is
  179.46 +made subject to such option by the copyright holder.
  179.47 +-->
  179.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  179.49      <type>org.netbeans.modules.apisupport.project.suite</type>
  179.50      <configuration>
   180.1 --- a/remoting/common/test/build.xml	Mon Dec 19 11:37:36 2016 +0100
   180.2 +++ b/remoting/common/test/build.xml	Mon Feb 27 22:40:44 2017 +0100
   180.3 @@ -1,4 +1,47 @@
   180.4  <?xml version="1.0" encoding="UTF-8"?>
   180.5 +<!--
   180.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   180.7 +
   180.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   180.9 +
  180.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  180.11 +Other names may be trademarks of their respective owners.
  180.12 +
  180.13 +The contents of this file are subject to the terms of either the GNU
  180.14 +General Public License Version 2 only ("GPL") or the Common
  180.15 +Development and Distribution License("CDDL") (collectively, the
  180.16 +"License"). You may not use this file except in compliance with the
  180.17 +License. You can obtain a copy of the License at
  180.18 +http://www.netbeans.org/cddl-gplv2.html
  180.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  180.20 +specific language governing permissions and limitations under the
  180.21 +License.  When distributing the software, include this License Header
  180.22 +Notice in each file and include the License file at
  180.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  180.24 +particular file as subject to the "Classpath" exception as provided
  180.25 +by Oracle in the GPL Version 2 section of the License file that
  180.26 +accompanied this code. If applicable, add the following below the
  180.27 +License Header, with the fields enclosed by brackets [] replaced by
  180.28 +your own identifying information:
  180.29 +"Portions Copyrighted [year] [name of copyright owner]"
  180.30 +
  180.31 +Contributor(s):
  180.32 +
  180.33 +The Original Software is NetBeans. The Initial Developer of the Original
  180.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  180.35 +Microsystems, Inc. All Rights Reserved.
  180.36 +
  180.37 +If you wish your version of this file to be governed by only the CDDL
  180.38 +or only the GPL Version 2, indicate your decision by adding
  180.39 +"[Contributor] elects to include this software in this distribution
  180.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  180.41 +single choice of license, a recipient has the option to distribute
  180.42 +your version of this file under either the CDDL, the GPL Version 2 or
  180.43 +to extend the choice of license to its licensees as provided above.
  180.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  180.45 +Version 2 license, then the option applies only if the new code is
  180.46 +made subject to such option by the copyright holder.
  180.47 +-->
  180.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  180.49  <!-- for some information on what you could do (e.g. targets to override). -->
  180.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   181.1 --- a/remoting/common/test/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   181.2 +++ b/remoting/common/test/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   181.3 @@ -1,5 +1,48 @@
   181.4  <?xml version="1.0" encoding="UTF-8"?>
   181.5  <!--
   181.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   181.7 +
   181.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   181.9 +
  181.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  181.11 +Other names may be trademarks of their respective owners.
  181.12 +
  181.13 +The contents of this file are subject to the terms of either the GNU
  181.14 +General Public License Version 2 only ("GPL") or the Common
  181.15 +Development and Distribution License("CDDL") (collectively, the
  181.16 +"License"). You may not use this file except in compliance with the
  181.17 +License. You can obtain a copy of the License at
  181.18 +http://www.netbeans.org/cddl-gplv2.html
  181.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  181.20 +specific language governing permissions and limitations under the
  181.21 +License.  When distributing the software, include this License Header
  181.22 +Notice in each file and include the License file at
  181.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  181.24 +particular file as subject to the "Classpath" exception as provided
  181.25 +by Oracle in the GPL Version 2 section of the License file that
  181.26 +accompanied this code. If applicable, add the following below the
  181.27 +License Header, with the fields enclosed by brackets [] replaced by
  181.28 +your own identifying information:
  181.29 +"Portions Copyrighted [year] [name of copyright owner]"
  181.30 +
  181.31 +Contributor(s):
  181.32 +
  181.33 +The Original Software is NetBeans. The Initial Developer of the Original
  181.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  181.35 +Microsystems, Inc. All Rights Reserved.
  181.36 +
  181.37 +If you wish your version of this file to be governed by only the CDDL
  181.38 +or only the GPL Version 2, indicate your decision by adding
  181.39 +"[Contributor] elects to include this software in this distribution
  181.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  181.41 +single choice of license, a recipient has the option to distribute
  181.42 +your version of this file under either the CDDL, the GPL Version 2 or
  181.43 +to extend the choice of license to its licensees as provided above.
  181.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  181.45 +Version 2 license, then the option applies only if the new code is
  181.46 +made subject to such option by the copyright holder.
  181.47 +-->
  181.48 +<!--
  181.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  181.50  ***         EDIT ../build.xml INSTEAD         ***
  181.51  -->
   182.1 --- a/remoting/common/test/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   182.2 +++ b/remoting/common/test/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   182.3 @@ -1,3 +1,44 @@
   182.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   182.5 +#
   182.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   182.7 +#
   182.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   182.9 +# Other names may be trademarks of their respective owners.
  182.10 +#
  182.11 +# The contents of this file are subject to the terms of either the GNU
  182.12 +# General Public License Version 2 only ("GPL") or the Common
  182.13 +# Development and Distribution License("CDDL") (collectively, the
  182.14 +# "License"). You may not use this file except in compliance with the
  182.15 +# License. You can obtain a copy of the License at
  182.16 +# http://www.netbeans.org/cddl-gplv2.html
  182.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  182.18 +# specific language governing permissions and limitations under the
  182.19 +# License.  When distributing the software, include this License Header
  182.20 +# Notice in each file and include the License file at
  182.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  182.22 +# particular file as subject to the "Classpath" exception as provided
  182.23 +# by Oracle in the GPL Version 2 section of the License file that
  182.24 +# accompanied this code. If applicable, add the following below the
  182.25 +# License Header, with the fields enclosed by brackets [] replaced by
  182.26 +# your own identifying information:
  182.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  182.28 +#
  182.29 +# Contributor(s):
  182.30 +#
  182.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  182.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  182.33 +# Microsystems, Inc. All Rights Reserved.
  182.34 +#
  182.35 +# If you wish your version of this file to be governed by only the CDDL
  182.36 +# or only the GPL Version 2, indicate your decision by adding
  182.37 +# "[Contributor] elects to include this software in this distribution
  182.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  182.39 +# single choice of license, a recipient has the option to distribute
  182.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  182.41 +# to extend the choice of license to its licensees as provided above.
  182.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  182.43 +# Version 2 license, then the option applies only if the new code is
  182.44 +# made subject to such option by the copyright holder.
  182.45  build.xml.data.CRC32=4735325c
  182.46  build.xml.script.CRC32=b3a2b248
  182.47  build.xml.stylesheet.CRC32=a56c6a5b@2.49
   183.1 --- a/remoting/common/test/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   183.2 +++ b/remoting/common/test/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   183.3 @@ -1,3 +1,44 @@
   183.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   183.5 +#
   183.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   183.7 +#
   183.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   183.9 +# Other names may be trademarks of their respective owners.
  183.10 +#
  183.11 +# The contents of this file are subject to the terms of either the GNU
  183.12 +# General Public License Version 2 only ("GPL") or the Common
  183.13 +# Development and Distribution License("CDDL") (collectively, the
  183.14 +# "License"). You may not use this file except in compliance with the
  183.15 +# License. You can obtain a copy of the License at
  183.16 +# http://www.netbeans.org/cddl-gplv2.html
  183.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  183.18 +# specific language governing permissions and limitations under the
  183.19 +# License.  When distributing the software, include this License Header
  183.20 +# Notice in each file and include the License file at
  183.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  183.22 +# particular file as subject to the "Classpath" exception as provided
  183.23 +# by Oracle in the GPL Version 2 section of the License file that
  183.24 +# accompanied this code. If applicable, add the following below the
  183.25 +# License Header, with the fields enclosed by brackets [] replaced by
  183.26 +# your own identifying information:
  183.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  183.28 +#
  183.29 +# Contributor(s):
  183.30 +#
  183.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  183.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  183.33 +# Microsystems, Inc. All Rights Reserved.
  183.34 +#
  183.35 +# If you wish your version of this file to be governed by only the CDDL
  183.36 +# or only the GPL Version 2, indicate your decision by adding
  183.37 +# "[Contributor] elects to include this software in this distribution
  183.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  183.39 +# single choice of license, a recipient has the option to distribute
  183.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  183.41 +# to extend the choice of license to its licensees as provided above.
  183.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  183.43 +# Version 2 license, then the option applies only if the new code is
  183.44 +# made subject to such option by the copyright holder.
  183.45  is.autoload=true
  183.46  javac.source=1.6
  183.47  javac.compilerargs=-Xlint -Xlint:-serial
   184.1 --- a/remoting/common/test/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   184.2 +++ b/remoting/common/test/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   184.3 @@ -1,4 +1,47 @@
   184.4  <?xml version="1.0" encoding="UTF-8"?>
   184.5 +<!--
   184.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   184.7 +
   184.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   184.9 +
  184.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  184.11 +Other names may be trademarks of their respective owners.
  184.12 +
  184.13 +The contents of this file are subject to the terms of either the GNU
  184.14 +General Public License Version 2 only ("GPL") or the Common
  184.15 +Development and Distribution License("CDDL") (collectively, the
  184.16 +"License"). You may not use this file except in compliance with the
  184.17 +License. You can obtain a copy of the License at
  184.18 +http://www.netbeans.org/cddl-gplv2.html
  184.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  184.20 +specific language governing permissions and limitations under the
  184.21 +License.  When distributing the software, include this License Header
  184.22 +Notice in each file and include the License file at
  184.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  184.24 +particular file as subject to the "Classpath" exception as provided
  184.25 +by Oracle in the GPL Version 2 section of the License file that
  184.26 +accompanied this code. If applicable, add the following below the
  184.27 +License Header, with the fields enclosed by brackets [] replaced by
  184.28 +your own identifying information:
  184.29 +"Portions Copyrighted [year] [name of copyright owner]"
  184.30 +
  184.31 +Contributor(s):
  184.32 +
  184.33 +The Original Software is NetBeans. The Initial Developer of the Original
  184.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  184.35 +Microsystems, Inc. All Rights Reserved.
  184.36 +
  184.37 +If you wish your version of this file to be governed by only the CDDL
  184.38 +or only the GPL Version 2, indicate your decision by adding
  184.39 +"[Contributor] elects to include this software in this distribution
  184.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  184.41 +single choice of license, a recipient has the option to distribute
  184.42 +your version of this file under either the CDDL, the GPL Version 2 or
  184.43 +to extend the choice of license to its licensees as provided above.
  184.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  184.45 +Version 2 license, then the option applies only if the new code is
  184.46 +made subject to such option by the copyright holder.
  184.47 +-->
  184.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  184.49      <type>org.netbeans.modules.apisupport.project</type>
  184.50      <configuration>
   185.1 --- a/remoting/common/test/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   185.2 +++ b/remoting/common/test/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
   185.3 @@ -1,1 +1,42 @@
   185.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   185.5 +#
   185.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   185.7 +#
   185.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   185.9 +# Other names may be trademarks of their respective owners.
  185.10 +#
  185.11 +# The contents of this file are subject to the terms of either the GNU
  185.12 +# General Public License Version 2 only ("GPL") or the Common
  185.13 +# Development and Distribution License("CDDL") (collectively, the
  185.14 +# "License"). You may not use this file except in compliance with the
  185.15 +# License. You can obtain a copy of the License at
  185.16 +# http://www.netbeans.org/cddl-gplv2.html
  185.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  185.18 +# specific language governing permissions and limitations under the
  185.19 +# License.  When distributing the software, include this License Header
  185.20 +# Notice in each file and include the License file at
  185.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  185.22 +# particular file as subject to the "Classpath" exception as provided
  185.23 +# by Oracle in the GPL Version 2 section of the License file that
  185.24 +# accompanied this code. If applicable, add the following below the
  185.25 +# License Header, with the fields enclosed by brackets [] replaced by
  185.26 +# your own identifying information:
  185.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  185.28 +#
  185.29 +# Contributor(s):
  185.30 +#
  185.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  185.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  185.33 +# Microsystems, Inc. All Rights Reserved.
  185.34 +#
  185.35 +# If you wish your version of this file to be governed by only the CDDL
  185.36 +# or only the GPL Version 2, indicate your decision by adding
  185.37 +# "[Contributor] elects to include this software in this distribution
  185.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  185.39 +# single choice of license, a recipient has the option to distribute
  185.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  185.41 +# to extend the choice of license to its licensees as provided above.
  185.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  185.43 +# Version 2 license, then the option applies only if the new code is
  185.44 +# made subject to such option by the copyright holder.
  185.45  suite.dir=${basedir}/..
   186.1 --- a/remoting/common/test/src/org/netbeans/modules/jackpot30/common/test/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   186.2 +++ b/remoting/common/test/src/org/netbeans/modules/jackpot30/common/test/Bundle.properties	Mon Feb 27 22:40:44 2017 +0100
   186.3 @@ -1,1 +1,42 @@
   186.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   186.5 +#
   186.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   186.7 +#
   186.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   186.9 +# Other names may be trademarks of their respective owners.
  186.10 +#
  186.11 +# The contents of this file are subject to the terms of either the GNU
  186.12 +# General Public License Version 2 only ("GPL") or the Common
  186.13 +# Development and Distribution License("CDDL") (collectively, the
  186.14 +# "License"). You may not use this file except in compliance with the
  186.15 +# License. You can obtain a copy of the License at
  186.16 +# http://www.netbeans.org/cddl-gplv2.html
  186.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  186.18 +# specific language governing permissions and limitations under the
  186.19 +# License.  When distributing the software, include this License Header
  186.20 +# Notice in each file and include the License file at
  186.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  186.22 +# particular file as subject to the "Classpath" exception as provided
  186.23 +# by Oracle in the GPL Version 2 section of the License file that
  186.24 +# accompanied this code. If applicable, add the following below the
  186.25 +# License Header, with the fields enclosed by brackets [] replaced by
  186.26 +# your own identifying information:
  186.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  186.28 +#
  186.29 +# Contributor(s):
  186.30 +#
  186.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  186.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  186.33 +# Microsystems, Inc. All Rights Reserved.
  186.34 +#
  186.35 +# If you wish your version of this file to be governed by only the CDDL
  186.36 +# or only the GPL Version 2, indicate your decision by adding
  186.37 +# "[Contributor] elects to include this software in this distribution
  186.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  186.39 +# single choice of license, a recipient has the option to distribute
  186.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  186.41 +# to extend the choice of license to its licensees as provided above.
  186.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  186.43 +# Version 2 license, then the option applies only if the new code is
  186.44 +# made subject to such option by the copyright holder.
  186.45  OpenIDE-Module-Name=Jackpot 3.0 Common Test APIs
   187.1 --- a/remoting/ide/api/build.xml	Mon Dec 19 11:37:36 2016 +0100
   187.2 +++ b/remoting/ide/api/build.xml	Mon Feb 27 22:40:44 2017 +0100
   187.3 @@ -1,4 +1,47 @@
   187.4  <?xml version="1.0" encoding="UTF-8"?>
   187.5 +<!--
   187.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   187.7 +
   187.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   187.9 +
  187.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  187.11 +Other names may be trademarks of their respective owners.
  187.12 +
  187.13 +The contents of this file are subject to the terms of either the GNU
  187.14 +General Public License Version 2 only ("GPL") or the Common
  187.15 +Development and Distribution License("CDDL") (collectively, the
  187.16 +"License"). You may not use this file except in compliance with the
  187.17 +License. You can obtain a copy of the License at
  187.18 +http://www.netbeans.org/cddl-gplv2.html
  187.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  187.20 +specific language governing permissions and limitations under the
  187.21 +License.  When distributing the software, include this License Header
  187.22 +Notice in each file and include the License file at
  187.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  187.24 +particular file as subject to the "Classpath" exception as provided
  187.25 +by Oracle in the GPL Version 2 section of the License file that
  187.26 +accompanied this code. If applicable, add the following below the
  187.27 +License Header, with the fields enclosed by brackets [] replaced by
  187.28 +your own identifying information:
  187.29 +"Portions Copyrighted [year] [name of copyright owner]"
  187.30 +
  187.31 +Contributor(s):
  187.32 +
  187.33 +The Original Software is NetBeans. The Initial Developer of the Original
  187.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  187.35 +Microsystems, Inc. All Rights Reserved.
  187.36 +
  187.37 +If you wish your version of this file to be governed by only the CDDL
  187.38 +or only the GPL Version 2, indicate your decision by adding
  187.39 +"[Contributor] elects to include this software in this distribution
  187.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  187.41 +single choice of license, a recipient has the option to distribute
  187.42 +your version of this file under either the CDDL, the GPL Version 2 or
  187.43 +to extend the choice of license to its licensees as provided above.
  187.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  187.45 +Version 2 license, then the option applies only if the new code is
  187.46 +made subject to such option by the copyright holder.
  187.47 +-->
  187.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  187.49  <!-- for some information on what you could do (e.g. targets to override). -->
  187.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   188.1 --- a/remoting/ide/api/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   188.2 +++ b/remoting/ide/api/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   188.3 @@ -1,5 +1,48 @@
   188.4  <?xml version="1.0" encoding="UTF-8"?>
   188.5  <!--
   188.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   188.7 +
   188.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   188.9 +
  188.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  188.11 +Other names may be trademarks of their respective owners.
  188.12 +
  188.13 +The contents of this file are subject to the terms of either the GNU
  188.14 +General Public License Version 2 only ("GPL") or the Common
  188.15 +Development and Distribution License("CDDL") (collectively, the
  188.16 +"License"). You may not use this file except in compliance with the
  188.17 +License. You can obtain a copy of the License at
  188.18 +http://www.netbeans.org/cddl-gplv2.html
  188.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  188.20 +specific language governing permissions and limitations under the
  188.21 +License.  When distributing the software, include this License Header
  188.22 +Notice in each file and include the License file at
  188.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  188.24 +particular file as subject to the "Classpath" exception as provided
  188.25 +by Oracle in the GPL Version 2 section of the License file that
  188.26 +accompanied this code. If applicable, add the following below the
  188.27 +License Header, with the fields enclosed by brackets [] replaced by
  188.28 +your own identifying information:
  188.29 +"Portions Copyrighted [year] [name of copyright owner]"
  188.30 +
  188.31 +Contributor(s):
  188.32 +
  188.33 +The Original Software is NetBeans. The Initial Developer of the Original
  188.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  188.35 +Microsystems, Inc. All Rights Reserved.
  188.36 +
  188.37 +If you wish your version of this file to be governed by only the CDDL
  188.38 +or only the GPL Version 2, indicate your decision by adding
  188.39 +"[Contributor] elects to include this software in this distribution
  188.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  188.41 +single choice of license, a recipient has the option to distribute
  188.42 +your version of this file under either the CDDL, the GPL Version 2 or
  188.43 +to extend the choice of license to its licensees as provided above.
  188.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  188.45 +Version 2 license, then the option applies only if the new code is
  188.46 +made subject to such option by the copyright holder.
  188.47 +-->
  188.48 +<!--
  188.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  188.50  ***         EDIT ../build.xml INSTEAD         ***
  188.51  -->
   189.1 --- a/remoting/ide/api/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   189.2 +++ b/remoting/ide/api/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   189.3 @@ -1,3 +1,44 @@
   189.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   189.5 +#
   189.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   189.7 +#
   189.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   189.9 +# Other names may be trademarks of their respective owners.
  189.10 +#
  189.11 +# The contents of this file are subject to the terms of either the GNU
  189.12 +# General Public License Version 2 only ("GPL") or the Common
  189.13 +# Development and Distribution License("CDDL") (collectively, the
  189.14 +# "License"). You may not use this file except in compliance with the
  189.15 +# License. You can obtain a copy of the License at
  189.16 +# http://www.netbeans.org/cddl-gplv2.html
  189.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  189.18 +# specific language governing permissions and limitations under the
  189.19 +# License.  When distributing the software, include this License Header
  189.20 +# Notice in each file and include the License file at
  189.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  189.22 +# particular file as subject to the "Classpath" exception as provided
  189.23 +# by Oracle in the GPL Version 2 section of the License file that
  189.24 +# accompanied this code. If applicable, add the following below the
  189.25 +# License Header, with the fields enclosed by brackets [] replaced by
  189.26 +# your own identifying information:
  189.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  189.28 +#
  189.29 +# Contributor(s):
  189.30 +#
  189.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  189.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  189.33 +# Microsystems, Inc. All Rights Reserved.
  189.34 +#
  189.35 +# If you wish your version of this file to be governed by only the CDDL
  189.36 +# or only the GPL Version 2, indicate your decision by adding
  189.37 +# "[Contributor] elects to include this software in this distribution
  189.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  189.39 +# single choice of license, a recipient has the option to distribute
  189.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  189.41 +# to extend the choice of license to its licensees as provided above.
  189.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  189.43 +# Version 2 license, then the option applies only if the new code is
  189.44 +# made subject to such option by the copyright holder.
  189.45  build.xml.data.CRC32=83c779aa
  189.46  build.xml.script.CRC32=4e65cd58
  189.47  build.xml.stylesheet.CRC32=a56c6a5b@1.47
   190.1 --- a/remoting/ide/api/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   190.2 +++ b/remoting/ide/api/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   190.3 @@ -1,3 +1,44 @@
   190.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   190.5 +#
   190.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   190.7 +#
   190.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   190.9 +# Other names may be trademarks of their respective owners.
  190.10 +#
  190.11 +# The contents of this file are subject to the terms of either the GNU
  190.12 +# General Public License Version 2 only ("GPL") or the Common
  190.13 +# Development and Distribution License("CDDL") (collectively, the
  190.14 +# "License"). You may not use this file except in compliance with the
  190.15 +# License. You can obtain a copy of the License at
  190.16 +# http://www.netbeans.org/cddl-gplv2.html
  190.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  190.18 +# specific language governing permissions and limitations under the
  190.19 +# License.  When distributing the software, include this License Header
  190.20 +# Notice in each file and include the License file at
  190.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  190.22 +# particular file as subject to the "Classpath" exception as provided
  190.23 +# by Oracle in the GPL Version 2 section of the License file that
  190.24 +# accompanied this code. If applicable, add the following below the
  190.25 +# License Header, with the fields enclosed by brackets [] replaced by
  190.26 +# your own identifying information:
  190.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  190.28 +#
  190.29 +# Contributor(s):
  190.30 +#
  190.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  190.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  190.33 +# Microsystems, Inc. All Rights Reserved.
  190.34 +#
  190.35 +# If you wish your version of this file to be governed by only the CDDL
  190.36 +# or only the GPL Version 2, indicate your decision by adding
  190.37 +# "[Contributor] elects to include this software in this distribution
  190.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  190.39 +# single choice of license, a recipient has the option to distribute
  190.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  190.41 +# to extend the choice of license to its licensees as provided above.
  190.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  190.43 +# Version 2 license, then the option applies only if the new code is
  190.44 +# made subject to such option by the copyright holder.
  190.45  javac.source=1.6
  190.46  javac.compilerargs=-Xlint -Xlint:-serial
  190.47  extra.module.files=modules/ext/util-commons.jar,modules/ext/util-pojson.jar
   191.1 --- a/remoting/ide/api/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   191.2 +++ b/remoting/ide/api/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   191.3 @@ -1,4 +1,47 @@
   191.4  <?xml version="1.0" encoding="UTF-8"?>
   191.5 +<!--
   191.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   191.7 +
   191.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   191.9 +
  191.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  191.11 +Other names may be trademarks of their respective owners.
  191.12 +
  191.13 +The contents of this file are subject to the terms of either the GNU
  191.14 +General Public License Version 2 only ("GPL") or the Common
  191.15 +Development and Distribution License("CDDL") (collectively, the
  191.16 +"License"). You may not use this file except in compliance with the
  191.17 +License. You can obtain a copy of the License at
  191.18 +http://www.netbeans.org/cddl-gplv2.html
  191.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  191.20 +specific language governing permissions and limitations under the
  191.21 +License.  When distributing the software, include this License Header
  191.22 +Notice in each file and include the License file at
  191.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  191.24 +particular file as subject to the "Classpath" exception as provided
  191.25 +by Oracle in the GPL Version 2 section of the License file that
  191.26 +accompanied this code. If applicable, add the following below the
  191.27 +License Header, with the fields enclosed by brackets [] replaced by
  191.28 +your own identifying information:
  191.29 +"Portions Copyrighted [year] [name of copyright owner]"
  191.30 +
  191.31 +Contributor(s):
  191.32 +
  191.33 +The Original Software is NetBeans. The Initial Developer of the Original
  191.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  191.35 +Microsystems, Inc. All Rights Reserved.
  191.36 +
  191.37 +If you wish your version of this file to be governed by only the CDDL
  191.38 +or only the GPL Version 2, indicate your decision by adding
  191.39 +"[Contributor] elects to include this software in this distribution
  191.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  191.41 +single choice of license, a recipient has the option to distribute
  191.42 +your version of this file under either the CDDL, the GPL Version 2 or
  191.43 +to extend the choice of license to its licensees as provided above.
  191.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  191.45 +Version 2 license, then the option applies only if the new code is
  191.46 +made subject to such option by the copyright holder.
  191.47 +-->
  191.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  191.49      <type>org.netbeans.modules.apisupport.project</type>
  191.50      <configuration>
   192.1 --- a/remoting/ide/api/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   192.2 +++ b/remoting/ide/api/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
   192.3 @@ -1,1 +1,42 @@
   192.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   192.5 +#
   192.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   192.7 +#
   192.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   192.9 +# Other names may be trademarks of their respective owners.
  192.10 +#
  192.11 +# The contents of this file are subject to the terms of either the GNU
  192.12 +# General Public License Version 2 only ("GPL") or the Common
  192.13 +# Development and Distribution License("CDDL") (collectively, the
  192.14 +# "License"). You may not use this file except in compliance with the
  192.15 +# License. You can obtain a copy of the License at
  192.16 +# http://www.netbeans.org/cddl-gplv2.html
  192.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  192.18 +# specific language governing permissions and limitations under the
  192.19 +# License.  When distributing the software, include this License Header
  192.20 +# Notice in each file and include the License file at
  192.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  192.22 +# particular file as subject to the "Classpath" exception as provided
  192.23 +# by Oracle in the GPL Version 2 section of the License file that
  192.24 +# accompanied this code. If applicable, add the following below the
  192.25 +# License Header, with the fields enclosed by brackets [] replaced by
  192.26 +# your own identifying information:
  192.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  192.28 +#
  192.29 +# Contributor(s):
  192.30 +#
  192.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  192.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  192.33 +# Microsystems, Inc. All Rights Reserved.
  192.34 +#
  192.35 +# If you wish your version of this file to be governed by only the CDDL
  192.36 +# or only the GPL Version 2, indicate your decision by adding
  192.37 +# "[Contributor] elects to include this software in this distribution
  192.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  192.39 +# single choice of license, a recipient has the option to distribute
  192.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  192.41 +# to extend the choice of license to its licensees as provided above.
  192.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  192.43 +# Version 2 license, then the option applies only if the new code is
  192.44 +# made subject to such option by the copyright holder.
  192.45  suite.dir=${basedir}/..
   193.1 --- a/remoting/ide/api/src/org/netbeans/modules/jackpot30/remotingapi/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   193.2 +++ b/remoting/ide/api/src/org/netbeans/modules/jackpot30/remotingapi/Bundle.properties	Mon Feb 27 22:40:44 2017 +0100
   193.3 @@ -1,1 +1,42 @@
   193.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   193.5 +#
   193.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   193.7 +#
   193.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   193.9 +# Other names may be trademarks of their respective owners.
  193.10 +#
  193.11 +# The contents of this file are subject to the terms of either the GNU
  193.12 +# General Public License Version 2 only ("GPL") or the Common
  193.13 +# Development and Distribution License("CDDL") (collectively, the
  193.14 +# "License"). You may not use this file except in compliance with the
  193.15 +# License. You can obtain a copy of the License at
  193.16 +# http://www.netbeans.org/cddl-gplv2.html
  193.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  193.18 +# specific language governing permissions and limitations under the
  193.19 +# License.  When distributing the software, include this License Header
  193.20 +# Notice in each file and include the License file at
  193.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  193.22 +# particular file as subject to the "Classpath" exception as provided
  193.23 +# by Oracle in the GPL Version 2 section of the License file that
  193.24 +# accompanied this code. If applicable, add the following below the
  193.25 +# License Header, with the fields enclosed by brackets [] replaced by
  193.26 +# your own identifying information:
  193.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  193.28 +#
  193.29 +# Contributor(s):
  193.30 +#
  193.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  193.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  193.33 +# Microsystems, Inc. All Rights Reserved.
  193.34 +#
  193.35 +# If you wish your version of this file to be governed by only the CDDL
  193.36 +# or only the GPL Version 2, indicate your decision by adding
  193.37 +# "[Contributor] elects to include this software in this distribution
  193.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  193.39 +# single choice of license, a recipient has the option to distribute
  193.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  193.41 +# to extend the choice of license to its licensees as provided above.
  193.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  193.43 +# Version 2 license, then the option applies only if the new code is
  193.44 +# made subject to such option by the copyright holder.
  193.45  OpenIDE-Module-Name=Remoting API
   194.1 --- a/remoting/ide/api/src/org/netbeans/modules/jackpot30/remotingapi/options/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   194.2 +++ b/remoting/ide/api/src/org/netbeans/modules/jackpot30/remotingapi/options/Bundle.properties	Mon Feb 27 22:40:44 2017 +0100
   194.3 @@ -1,3 +1,44 @@
   194.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   194.5 +#
   194.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   194.7 +#
   194.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   194.9 +# Other names may be trademarks of their respective owners.
  194.10 +#
  194.11 +# The contents of this file are subject to the terms of either the GNU
  194.12 +# General Public License Version 2 only ("GPL") or the Common
  194.13 +# Development and Distribution License("CDDL") (collectively, the
  194.14 +# "License"). You may not use this file except in compliance with the
  194.15 +# License. You can obtain a copy of the License at
  194.16 +# http://www.netbeans.org/cddl-gplv2.html
  194.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  194.18 +# specific language governing permissions and limitations under the
  194.19 +# License.  When distributing the software, include this License Header
  194.20 +# Notice in each file and include the License file at
  194.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  194.22 +# particular file as subject to the "Classpath" exception as provided
  194.23 +# by Oracle in the GPL Version 2 section of the License file that
  194.24 +# accompanied this code. If applicable, add the following below the
  194.25 +# License Header, with the fields enclosed by brackets [] replaced by
  194.26 +# your own identifying information:
  194.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  194.28 +#
  194.29 +# Contributor(s):
  194.30 +#
  194.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  194.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  194.33 +# Microsystems, Inc. All Rights Reserved.
  194.34 +#
  194.35 +# If you wish your version of this file to be governed by only the CDDL
  194.36 +# or only the GPL Version 2, indicate your decision by adding
  194.37 +# "[Contributor] elects to include this software in this distribution
  194.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  194.39 +# single choice of license, a recipient has the option to distribute
  194.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  194.41 +# to extend the choice of license to its licensees as provided above.
  194.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  194.43 +# Version 2 license, then the option applies only if the new code is
  194.44 +# made subject to such option by the copyright holder.
  194.45  AdvancedOption_DisplayName_Index=Jackpot 3.0 Indices
  194.46  AdvancedOption_Keywords_Index=index indices jackpot
  194.47  CustomizeRemoteIndex.indexURLLabel.text=Index URL:
   195.1 --- a/remoting/ide/browsing/build.xml	Mon Dec 19 11:37:36 2016 +0100
   195.2 +++ b/remoting/ide/browsing/build.xml	Mon Feb 27 22:40:44 2017 +0100
   195.3 @@ -1,4 +1,47 @@
   195.4  <?xml version="1.0" encoding="UTF-8"?>
   195.5 +<!--
   195.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   195.7 +
   195.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   195.9 +
  195.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  195.11 +Other names may be trademarks of their respective owners.
  195.12 +
  195.13 +The contents of this file are subject to the terms of either the GNU
  195.14 +General Public License Version 2 only ("GPL") or the Common
  195.15 +Development and Distribution License("CDDL") (collectively, the
  195.16 +"License"). You may not use this file except in compliance with the
  195.17 +License. You can obtain a copy of the License at
  195.18 +http://www.netbeans.org/cddl-gplv2.html
  195.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  195.20 +specific language governing permissions and limitations under the
  195.21 +License.  When distributing the software, include this License Header
  195.22 +Notice in each file and include the License file at
  195.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  195.24 +particular file as subject to the "Classpath" exception as provided
  195.25 +by Oracle in the GPL Version 2 section of the License file that
  195.26 +accompanied this code. If applicable, add the following below the
  195.27 +License Header, with the fields enclosed by brackets [] replaced by
  195.28 +your own identifying information:
  195.29 +"Portions Copyrighted [year] [name of copyright owner]"
  195.30 +
  195.31 +Contributor(s):
  195.32 +
  195.33 +The Original Software is NetBeans. The Initial Developer of the Original
  195.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  195.35 +Microsystems, Inc. All Rights Reserved.
  195.36 +
  195.37 +If you wish your version of this file to be governed by only the CDDL
  195.38 +or only the GPL Version 2, indicate your decision by adding
  195.39 +"[Contributor] elects to include this software in this distribution
  195.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  195.41 +single choice of license, a recipient has the option to distribute
  195.42 +your version of this file under either the CDDL, the GPL Version 2 or
  195.43 +to extend the choice of license to its licensees as provided above.
  195.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  195.45 +Version 2 license, then the option applies only if the new code is
  195.46 +made subject to such option by the copyright holder.
  195.47 +-->
  195.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  195.49  <!-- for some information on what you could do (e.g. targets to override). -->
  195.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   196.1 --- a/remoting/ide/browsing/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   196.2 +++ b/remoting/ide/browsing/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   196.3 @@ -1,5 +1,48 @@
   196.4  <?xml version="1.0" encoding="UTF-8"?>
   196.5  <!--
   196.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   196.7 +
   196.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   196.9 +
  196.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  196.11 +Other names may be trademarks of their respective owners.
  196.12 +
  196.13 +The contents of this file are subject to the terms of either the GNU
  196.14 +General Public License Version 2 only ("GPL") or the Common
  196.15 +Development and Distribution License("CDDL") (collectively, the
  196.16 +"License"). You may not use this file except in compliance with the
  196.17 +License. You can obtain a copy of the License at
  196.18 +http://www.netbeans.org/cddl-gplv2.html
  196.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  196.20 +specific language governing permissions and limitations under the
  196.21 +License.  When distributing the software, include this License Header
  196.22 +Notice in each file and include the License file at
  196.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  196.24 +particular file as subject to the "Classpath" exception as provided
  196.25 +by Oracle in the GPL Version 2 section of the License file that
  196.26 +accompanied this code. If applicable, add the following below the
  196.27 +License Header, with the fields enclosed by brackets [] replaced by
  196.28 +your own identifying information:
  196.29 +"Portions Copyrighted [year] [name of copyright owner]"
  196.30 +
  196.31 +Contributor(s):
  196.32 +
  196.33 +The Original Software is NetBeans. The Initial Developer of the Original
  196.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  196.35 +Microsystems, Inc. All Rights Reserved.
  196.36 +
  196.37 +If you wish your version of this file to be governed by only the CDDL
  196.38 +or only the GPL Version 2, indicate your decision by adding
  196.39 +"[Contributor] elects to include this software in this distribution
  196.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  196.41 +single choice of license, a recipient has the option to distribute
  196.42 +your version of this file under either the CDDL, the GPL Version 2 or
  196.43 +to extend the choice of license to its licensees as provided above.
  196.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  196.45 +Version 2 license, then the option applies only if the new code is
  196.46 +made subject to such option by the copyright holder.
  196.47 +-->
  196.48 +<!--
  196.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  196.50  ***         EDIT ../build.xml INSTEAD         ***
  196.51  -->
   197.1 --- a/remoting/ide/browsing/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   197.2 +++ b/remoting/ide/browsing/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   197.3 @@ -1,3 +1,44 @@
   197.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   197.5 +#
   197.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   197.7 +#
   197.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   197.9 +# Other names may be trademarks of their respective owners.
  197.10 +#
  197.11 +# The contents of this file are subject to the terms of either the GNU
  197.12 +# General Public License Version 2 only ("GPL") or the Common
  197.13 +# Development and Distribution License("CDDL") (collectively, the
  197.14 +# "License"). You may not use this file except in compliance with the
  197.15 +# License. You can obtain a copy of the License at
  197.16 +# http://www.netbeans.org/cddl-gplv2.html
  197.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  197.18 +# specific language governing permissions and limitations under the
  197.19 +# License.  When distributing the software, include this License Header
  197.20 +# Notice in each file and include the License file at
  197.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  197.22 +# particular file as subject to the "Classpath" exception as provided
  197.23 +# by Oracle in the GPL Version 2 section of the License file that
  197.24 +# accompanied this code. If applicable, add the following below the
  197.25 +# License Header, with the fields enclosed by brackets [] replaced by
  197.26 +# your own identifying information:
  197.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  197.28 +#
  197.29 +# Contributor(s):
  197.30 +#
  197.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  197.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  197.33 +# Microsystems, Inc. All Rights Reserved.
  197.34 +#
  197.35 +# If you wish your version of this file to be governed by only the CDDL
  197.36 +# or only the GPL Version 2, indicate your decision by adding
  197.37 +# "[Contributor] elects to include this software in this distribution
  197.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  197.39 +# single choice of license, a recipient has the option to distribute
  197.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  197.41 +# to extend the choice of license to its licensees as provided above.
  197.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  197.43 +# Version 2 license, then the option applies only if the new code is
  197.44 +# made subject to such option by the copyright holder.
  197.45  build.xml.data.CRC32=d895a237
  197.46  build.xml.script.CRC32=461c092a
  197.47  build.xml.stylesheet.CRC32=a56c6a5b@2.61
   198.1 --- a/remoting/ide/browsing/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   198.2 +++ b/remoting/ide/browsing/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   198.3 @@ -1,2 +1,43 @@
   198.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   198.5 +#
   198.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   198.7 +#
   198.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   198.9 +# Other names may be trademarks of their respective owners.
  198.10 +#
  198.11 +# The contents of this file are subject to the terms of either the GNU
  198.12 +# General Public License Version 2 only ("GPL") or the Common
  198.13 +# Development and Distribution License("CDDL") (collectively, the
  198.14 +# "License"). You may not use this file except in compliance with the
  198.15 +# License. You can obtain a copy of the License at
  198.16 +# http://www.netbeans.org/cddl-gplv2.html
  198.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  198.18 +# specific language governing permissions and limitations under the
  198.19 +# License.  When distributing the software, include this License Header
  198.20 +# Notice in each file and include the License file at
  198.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  198.22 +# particular file as subject to the "Classpath" exception as provided
  198.23 +# by Oracle in the GPL Version 2 section of the License file that
  198.24 +# accompanied this code. If applicable, add the following below the
  198.25 +# License Header, with the fields enclosed by brackets [] replaced by
  198.26 +# your own identifying information:
  198.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  198.28 +#
  198.29 +# Contributor(s):
  198.30 +#
  198.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  198.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  198.33 +# Microsystems, Inc. All Rights Reserved.
  198.34 +#
  198.35 +# If you wish your version of this file to be governed by only the CDDL
  198.36 +# or only the GPL Version 2, indicate your decision by adding
  198.37 +# "[Contributor] elects to include this software in this distribution
  198.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  198.39 +# single choice of license, a recipient has the option to distribute
  198.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  198.41 +# to extend the choice of license to its licensees as provided above.
  198.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  198.43 +# Version 2 license, then the option applies only if the new code is
  198.44 +# made subject to such option by the copyright holder.
  198.45  javac.source=1.6
  198.46  javac.compilerargs=-Xlint -Xlint:-serial
   199.1 --- a/remoting/ide/browsing/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   199.2 +++ b/remoting/ide/browsing/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   199.3 @@ -1,4 +1,47 @@
   199.4  <?xml version="1.0" encoding="UTF-8"?>
   199.5 +<!--
   199.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   199.7 +
   199.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   199.9 +
  199.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  199.11 +Other names may be trademarks of their respective owners.
  199.12 +
  199.13 +The contents of this file are subject to the terms of either the GNU
  199.14 +General Public License Version 2 only ("GPL") or the Common
  199.15 +Development and Distribution License("CDDL") (collectively, the
  199.16 +"License"). You may not use this file except in compliance with the
  199.17 +License. You can obtain a copy of the License at
  199.18 +http://www.netbeans.org/cddl-gplv2.html
  199.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  199.20 +specific language governing permissions and limitations under the
  199.21 +License.  When distributing the software, include this License Header
  199.22 +Notice in each file and include the License file at
  199.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  199.24 +particular file as subject to the "Classpath" exception as provided
  199.25 +by Oracle in the GPL Version 2 section of the License file that
  199.26 +accompanied this code. If applicable, add the following below the
  199.27 +License Header, with the fields enclosed by brackets [] replaced by
  199.28 +your own identifying information:
  199.29 +"Portions Copyrighted [year] [name of copyright owner]"
  199.30 +
  199.31 +Contributor(s):
  199.32 +
  199.33 +The Original Software is NetBeans. The Initial Developer of the Original
  199.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  199.35 +Microsystems, Inc. All Rights Reserved.
  199.36 +
  199.37 +If you wish your version of this file to be governed by only the CDDL
  199.38 +or only the GPL Version 2, indicate your decision by adding
  199.39 +"[Contributor] elects to include this software in this distribution
  199.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  199.41 +single choice of license, a recipient has the option to distribute
  199.42 +your version of this file under either the CDDL, the GPL Version 2 or
  199.43 +to extend the choice of license to its licensees as provided above.
  199.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  199.45 +Version 2 license, then the option applies only if the new code is
  199.46 +made subject to such option by the copyright holder.
  199.47 +-->
  199.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  199.49      <type>org.netbeans.modules.apisupport.project</type>
  199.50      <configuration>
   200.1 --- a/remoting/ide/browsing/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   200.2 +++ b/remoting/ide/browsing/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
   200.3 @@ -1,1 +1,42 @@
   200.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   200.5 +#
   200.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   200.7 +#
   200.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   200.9 +# Other names may be trademarks of their respective owners.
  200.10 +#
  200.11 +# The contents of this file are subject to the terms of either the GNU
  200.12 +# General Public License Version 2 only ("GPL") or the Common
  200.13 +# Development and Distribution License("CDDL") (collectively, the
  200.14 +# "License"). You may not use this file except in compliance with the
  200.15 +# License. You can obtain a copy of the License at
  200.16 +# http://www.netbeans.org/cddl-gplv2.html
  200.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  200.18 +# specific language governing permissions and limitations under the
  200.19 +# License.  When distributing the software, include this License Header
  200.20 +# Notice in each file and include the License file at
  200.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  200.22 +# particular file as subject to the "Classpath" exception as provided
  200.23 +# by Oracle in the GPL Version 2 section of the License file that
  200.24 +# accompanied this code. If applicable, add the following below the
  200.25 +# License Header, with the fields enclosed by brackets [] replaced by
  200.26 +# your own identifying information:
  200.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  200.28 +#
  200.29 +# Contributor(s):
  200.30 +#
  200.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  200.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  200.33 +# Microsystems, Inc. All Rights Reserved.
  200.34 +#
  200.35 +# If you wish your version of this file to be governed by only the CDDL
  200.36 +# or only the GPL Version 2, indicate your decision by adding
  200.37 +# "[Contributor] elects to include this software in this distribution
  200.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  200.39 +# single choice of license, a recipient has the option to distribute
  200.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  200.41 +# to extend the choice of license to its licensees as provided above.
  200.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  200.43 +# Version 2 license, then the option applies only if the new code is
  200.44 +# made subject to such option by the copyright holder.
  200.45  suite.dir=${basedir}/..
   201.1 --- a/remoting/ide/browsing/src/org/netbeans/modules/jackpot30/ide/browsing/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   201.2 +++ b/remoting/ide/browsing/src/org/netbeans/modules/jackpot30/ide/browsing/Bundle.properties	Mon Feb 27 22:40:44 2017 +0100
   201.3 @@ -1,1 +1,42 @@
   201.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   201.5 +#
   201.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   201.7 +#
   201.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   201.9 +# Other names may be trademarks of their respective owners.
  201.10 +#
  201.11 +# The contents of this file are subject to the terms of either the GNU
  201.12 +# General Public License Version 2 only ("GPL") or the Common
  201.13 +# Development and Distribution License("CDDL") (collectively, the
  201.14 +# "License"). You may not use this file except in compliance with the
  201.15 +# License. You can obtain a copy of the License at
  201.16 +# http://www.netbeans.org/cddl-gplv2.html
  201.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  201.18 +# specific language governing permissions and limitations under the
  201.19 +# License.  When distributing the software, include this License Header
  201.20 +# Notice in each file and include the License file at
  201.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  201.22 +# particular file as subject to the "Classpath" exception as provided
  201.23 +# by Oracle in the GPL Version 2 section of the License file that
  201.24 +# accompanied this code. If applicable, add the following below the
  201.25 +# License Header, with the fields enclosed by brackets [] replaced by
  201.26 +# your own identifying information:
  201.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  201.28 +#
  201.29 +# Contributor(s):
  201.30 +#
  201.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  201.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  201.33 +# Microsystems, Inc. All Rights Reserved.
  201.34 +#
  201.35 +# If you wish your version of this file to be governed by only the CDDL
  201.36 +# or only the GPL Version 2, indicate your decision by adding
  201.37 +# "[Contributor] elects to include this software in this distribution
  201.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  201.39 +# single choice of license, a recipient has the option to distribute
  201.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  201.41 +# to extend the choice of license to its licensees as provided above.
  201.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  201.43 +# Version 2 license, then the option applies only if the new code is
  201.44 +# made subject to such option by the copyright holder.
  201.45  OpenIDE-Module-Name=Jackpot 3.0 Remote Browsing
   202.1 --- a/remoting/ide/build.xml	Mon Dec 19 11:37:36 2016 +0100
   202.2 +++ b/remoting/ide/build.xml	Mon Feb 27 22:40:44 2017 +0100
   202.3 @@ -1,4 +1,47 @@
   202.4  <?xml version="1.0" encoding="UTF-8"?>
   202.5 +<!--
   202.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   202.7 +
   202.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   202.9 +
  202.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  202.11 +Other names may be trademarks of their respective owners.
  202.12 +
  202.13 +The contents of this file are subject to the terms of either the GNU
  202.14 +General Public License Version 2 only ("GPL") or the Common
  202.15 +Development and Distribution License("CDDL") (collectively, the
  202.16 +"License"). You may not use this file except in compliance with the
  202.17 +License. You can obtain a copy of the License at
  202.18 +http://www.netbeans.org/cddl-gplv2.html
  202.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  202.20 +specific language governing permissions and limitations under the
  202.21 +License.  When distributing the software, include this License Header
  202.22 +Notice in each file and include the License file at
  202.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  202.24 +particular file as subject to the "Classpath" exception as provided
  202.25 +by Oracle in the GPL Version 2 section of the License file that
  202.26 +accompanied this code. If applicable, add the following below the
  202.27 +License Header, with the fields enclosed by brackets [] replaced by
  202.28 +your own identifying information:
  202.29 +"Portions Copyrighted [year] [name of copyright owner]"
  202.30 +
  202.31 +Contributor(s):
  202.32 +
  202.33 +The Original Software is NetBeans. The Initial Developer of the Original
  202.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  202.35 +Microsystems, Inc. All Rights Reserved.
  202.36 +
  202.37 +If you wish your version of this file to be governed by only the CDDL
  202.38 +or only the GPL Version 2, indicate your decision by adding
  202.39 +"[Contributor] elects to include this software in this distribution
  202.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  202.41 +single choice of license, a recipient has the option to distribute
  202.42 +your version of this file under either the CDDL, the GPL Version 2 or
  202.43 +to extend the choice of license to its licensees as provided above.
  202.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  202.45 +Version 2 license, then the option applies only if the new code is
  202.46 +made subject to such option by the copyright holder.
  202.47 +-->
  202.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  202.49  <!-- for some information on what you could do (e.g. targets to override). -->
  202.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   203.1 --- a/remoting/ide/cnd.remote.bridge/build.xml	Mon Dec 19 11:37:36 2016 +0100
   203.2 +++ b/remoting/ide/cnd.remote.bridge/build.xml	Mon Feb 27 22:40:44 2017 +0100
   203.3 @@ -1,4 +1,47 @@
   203.4  <?xml version="1.0" encoding="UTF-8"?>
   203.5 +<!--
   203.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   203.7 +
   203.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   203.9 +
  203.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  203.11 +Other names may be trademarks of their respective owners.
  203.12 +
  203.13 +The contents of this file are subject to the terms of either the GNU
  203.14 +General Public License Version 2 only ("GPL") or the Common
  203.15 +Development and Distribution License("CDDL") (collectively, the
  203.16 +"License"). You may not use this file except in compliance with the
  203.17 +License. You can obtain a copy of the License at
  203.18 +http://www.netbeans.org/cddl-gplv2.html
  203.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  203.20 +specific language governing permissions and limitations under the
  203.21 +License.  When distributing the software, include this License Header
  203.22 +Notice in each file and include the License file at
  203.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  203.24 +particular file as subject to the "Classpath" exception as provided
  203.25 +by Oracle in the GPL Version 2 section of the License file that
  203.26 +accompanied this code. If applicable, add the following below the
  203.27 +License Header, with the fields enclosed by brackets [] replaced by
  203.28 +your own identifying information:
  203.29 +"Portions Copyrighted [year] [name of copyright owner]"
  203.30 +
  203.31 +Contributor(s):
  203.32 +
  203.33 +The Original Software is NetBeans. The Initial Developer of the Original
  203.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  203.35 +Microsystems, Inc. All Rights Reserved.
  203.36 +
  203.37 +If you wish your version of this file to be governed by only the CDDL
  203.38 +or only the GPL Version 2, indicate your decision by adding
  203.39 +"[Contributor] elects to include this software in this distribution
  203.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  203.41 +single choice of license, a recipient has the option to distribute
  203.42 +your version of this file under either the CDDL, the GPL Version 2 or
  203.43 +to extend the choice of license to its licensees as provided above.
  203.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  203.45 +Version 2 license, then the option applies only if the new code is
  203.46 +made subject to such option by the copyright holder.
  203.47 +-->
  203.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  203.49  <!-- for some information on what you could do (e.g. targets to override). -->
  203.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   204.1 --- a/remoting/ide/cnd.remote.bridge/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   204.2 +++ b/remoting/ide/cnd.remote.bridge/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   204.3 @@ -1,5 +1,48 @@
   204.4  <?xml version="1.0" encoding="UTF-8"?>
   204.5  <!--
   204.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   204.7 +
   204.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   204.9 +
  204.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  204.11 +Other names may be trademarks of their respective owners.
  204.12 +
  204.13 +The contents of this file are subject to the terms of either the GNU
  204.14 +General Public License Version 2 only ("GPL") or the Common
  204.15 +Development and Distribution License("CDDL") (collectively, the
  204.16 +"License"). You may not use this file except in compliance with the
  204.17 +License. You can obtain a copy of the License at
  204.18 +http://www.netbeans.org/cddl-gplv2.html
  204.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  204.20 +specific language governing permissions and limitations under the
  204.21 +License.  When distributing the software, include this License Header
  204.22 +Notice in each file and include the License file at
  204.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  204.24 +particular file as subject to the "Classpath" exception as provided
  204.25 +by Oracle in the GPL Version 2 section of the License file that
  204.26 +accompanied this code. If applicable, add the following below the
  204.27 +License Header, with the fields enclosed by brackets [] replaced by
  204.28 +your own identifying information:
  204.29 +"Portions Copyrighted [year] [name of copyright owner]"
  204.30 +
  204.31 +Contributor(s):
  204.32 +
  204.33 +The Original Software is NetBeans. The Initial Developer of the Original
  204.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  204.35 +Microsystems, Inc. All Rights Reserved.
  204.36 +
  204.37 +If you wish your version of this file to be governed by only the CDDL
  204.38 +or only the GPL Version 2, indicate your decision by adding
  204.39 +"[Contributor] elects to include this software in this distribution
  204.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  204.41 +single choice of license, a recipient has the option to distribute
  204.42 +your version of this file under either the CDDL, the GPL Version 2 or
  204.43 +to extend the choice of license to its licensees as provided above.
  204.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  204.45 +Version 2 license, then the option applies only if the new code is
  204.46 +made subject to such option by the copyright holder.
  204.47 +-->
  204.48 +<!--
  204.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  204.50  ***         EDIT ../build.xml INSTEAD         ***
  204.51  -->
   205.1 --- a/remoting/ide/cnd.remote.bridge/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   205.2 +++ b/remoting/ide/cnd.remote.bridge/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   205.3 @@ -1,3 +1,44 @@
   205.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   205.5 +#
   205.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   205.7 +#
   205.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   205.9 +# Other names may be trademarks of their respective owners.
  205.10 +#
  205.11 +# The contents of this file are subject to the terms of either the GNU
  205.12 +# General Public License Version 2 only ("GPL") or the Common
  205.13 +# Development and Distribution License("CDDL") (collectively, the
  205.14 +# "License"). You may not use this file except in compliance with the
  205.15 +# License. You can obtain a copy of the License at
  205.16 +# http://www.netbeans.org/cddl-gplv2.html
  205.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  205.18 +# specific language governing permissions and limitations under the
  205.19 +# License.  When distributing the software, include this License Header
  205.20 +# Notice in each file and include the License file at
  205.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  205.22 +# particular file as subject to the "Classpath" exception as provided
  205.23 +# by Oracle in the GPL Version 2 section of the License file that
  205.24 +# accompanied this code. If applicable, add the following below the
  205.25 +# License Header, with the fields enclosed by brackets [] replaced by
  205.26 +# your own identifying information:
  205.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  205.28 +#
  205.29 +# Contributor(s):
  205.30 +#
  205.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  205.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  205.33 +# Microsystems, Inc. All Rights Reserved.
  205.34 +#
  205.35 +# If you wish your version of this file to be governed by only the CDDL
  205.36 +# or only the GPL Version 2, indicate your decision by adding
  205.37 +# "[Contributor] elects to include this software in this distribution
  205.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  205.39 +# single choice of license, a recipient has the option to distribute
  205.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  205.41 +# to extend the choice of license to its licensees as provided above.
  205.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  205.43 +# Version 2 license, then the option applies only if the new code is
  205.44 +# made subject to such option by the copyright holder.
  205.45  build.xml.data.CRC32=629cf149
  205.46  build.xml.script.CRC32=28461e36
  205.47  build.xml.stylesheet.CRC32=a56c6a5b@2.45
   206.1 --- a/remoting/ide/cnd.remote.bridge/nbproject/platform.properties	Mon Dec 19 11:37:36 2016 +0100
   206.2 +++ b/remoting/ide/cnd.remote.bridge/nbproject/platform.properties	Mon Feb 27 22:40:44 2017 +0100
   206.3 @@ -1,3 +1,44 @@
   206.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   206.5 +#
   206.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   206.7 +#
   206.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   206.9 +# Other names may be trademarks of their respective owners.
  206.10 +#
  206.11 +# The contents of this file are subject to the terms of either the GNU
  206.12 +# General Public License Version 2 only ("GPL") or the Common
  206.13 +# Development and Distribution License("CDDL") (collectively, the
  206.14 +# "License"). You may not use this file except in compliance with the
  206.15 +# License. You can obtain a copy of the License at
  206.16 +# http://www.netbeans.org/cddl-gplv2.html
  206.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  206.18 +# specific language governing permissions and limitations under the
  206.19 +# License.  When distributing the software, include this License Header
  206.20 +# Notice in each file and include the License file at
  206.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  206.22 +# particular file as subject to the "Classpath" exception as provided
  206.23 +# by Oracle in the GPL Version 2 section of the License file that
  206.24 +# accompanied this code. If applicable, add the following below the
  206.25 +# License Header, with the fields enclosed by brackets [] replaced by
  206.26 +# your own identifying information:
  206.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  206.28 +#
  206.29 +# Contributor(s):
  206.30 +#
  206.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  206.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  206.33 +# Microsystems, Inc. All Rights Reserved.
  206.34 +#
  206.35 +# If you wish your version of this file to be governed by only the CDDL
  206.36 +# or only the GPL Version 2, indicate your decision by adding
  206.37 +# "[Contributor] elects to include this software in this distribution
  206.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  206.39 +# single choice of license, a recipient has the option to distribute
  206.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  206.41 +# to extend the choice of license to its licensees as provided above.
  206.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  206.43 +# Version 2 license, then the option applies only if the new code is
  206.44 +# made subject to such option by the copyright holder.
  206.45  cluster.path=\
  206.46      ${nbplatform.active.dir}/apisupport:\
  206.47      ${nbplatform.active.dir}/cnd:\
   207.1 --- a/remoting/ide/cnd.remote.bridge/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   207.2 +++ b/remoting/ide/cnd.remote.bridge/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   207.3 @@ -1,3 +1,44 @@
   207.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   207.5 +#
   207.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   207.7 +#
   207.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   207.9 +# Other names may be trademarks of their respective owners.
  207.10 +#
  207.11 +# The contents of this file are subject to the terms of either the GNU
  207.12 +# General Public License Version 2 only ("GPL") or the Common
  207.13 +# Development and Distribution License("CDDL") (collectively, the
  207.14 +# "License"). You may not use this file except in compliance with the
  207.15 +# License. You can obtain a copy of the License at
  207.16 +# http://www.netbeans.org/cddl-gplv2.html
  207.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  207.18 +# specific language governing permissions and limitations under the
  207.19 +# License.  When distributing the software, include this License Header
  207.20 +# Notice in each file and include the License file at
  207.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  207.22 +# particular file as subject to the "Classpath" exception as provided
  207.23 +# by Oracle in the GPL Version 2 section of the License file that
  207.24 +# accompanied this code. If applicable, add the following below the
  207.25 +# License Header, with the fields enclosed by brackets [] replaced by
  207.26 +# your own identifying information:
  207.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  207.28 +#
  207.29 +# Contributor(s):
  207.30 +#
  207.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  207.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  207.33 +# Microsystems, Inc. All Rights Reserved.
  207.34 +#
  207.35 +# If you wish your version of this file to be governed by only the CDDL
  207.36 +# or only the GPL Version 2, indicate your decision by adding
  207.37 +# "[Contributor] elects to include this software in this distribution
  207.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  207.39 +# single choice of license, a recipient has the option to distribute
  207.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  207.41 +# to extend the choice of license to its licensees as provided above.
  207.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  207.43 +# Version 2 license, then the option applies only if the new code is
  207.44 +# made subject to such option by the copyright holder.
  207.45  is.eager=true
  207.46  javac.source=1.6
  207.47  javac.compilerargs=-Xlint -Xlint:-serial
   208.1 --- a/remoting/ide/cnd.remote.bridge/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   208.2 +++ b/remoting/ide/cnd.remote.bridge/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   208.3 @@ -1,4 +1,47 @@
   208.4  <?xml version="1.0" encoding="UTF-8"?>
   208.5 +<!--
   208.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   208.7 +
   208.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   208.9 +
  208.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  208.11 +Other names may be trademarks of their respective owners.
  208.12 +
  208.13 +The contents of this file are subject to the terms of either the GNU
  208.14 +General Public License Version 2 only ("GPL") or the Common
  208.15 +Development and Distribution License("CDDL") (collectively, the
  208.16 +"License"). You may not use this file except in compliance with the
  208.17 +License. You can obtain a copy of the License at
  208.18 +http://www.netbeans.org/cddl-gplv2.html
  208.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  208.20 +specific language governing permissions and limitations under the
  208.21 +License.  When distributing the software, include this License Header
  208.22 +Notice in each file and include the License file at
  208.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  208.24 +particular file as subject to the "Classpath" exception as provided
  208.25 +by Oracle in the GPL Version 2 section of the License file that
  208.26 +accompanied this code. If applicable, add the following below the
  208.27 +License Header, with the fields enclosed by brackets [] replaced by
  208.28 +your own identifying information:
  208.29 +"Portions Copyrighted [year] [name of copyright owner]"
  208.30 +
  208.31 +Contributor(s):
  208.32 +
  208.33 +The Original Software is NetBeans. The Initial Developer of the Original
  208.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  208.35 +Microsystems, Inc. All Rights Reserved.
  208.36 +
  208.37 +If you wish your version of this file to be governed by only the CDDL
  208.38 +or only the GPL Version 2, indicate your decision by adding
  208.39 +"[Contributor] elects to include this software in this distribution
  208.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  208.41 +single choice of license, a recipient has the option to distribute
  208.42 +your version of this file under either the CDDL, the GPL Version 2 or
  208.43 +to extend the choice of license to its licensees as provided above.
  208.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  208.45 +Version 2 license, then the option applies only if the new code is
  208.46 +made subject to such option by the copyright holder.
  208.47 +-->
  208.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  208.49      <type>org.netbeans.modules.apisupport.project</type>
  208.50      <configuration>
   209.1 --- a/remoting/ide/cnd.remote.bridge/src/org/netbeans/modules/jackpot30/cnd/remote/bridge/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   209.2 +++ b/remoting/ide/cnd.remote.bridge/src/org/netbeans/modules/jackpot30/cnd/remote/bridge/Bundle.properties	Mon Feb 27 22:40:44 2017 +0100
   209.3 @@ -1,1 +1,42 @@
   209.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   209.5 +#
   209.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   209.7 +#
   209.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   209.9 +# Other names may be trademarks of their respective owners.
  209.10 +#
  209.11 +# The contents of this file are subject to the terms of either the GNU
  209.12 +# General Public License Version 2 only ("GPL") or the Common
  209.13 +# Development and Distribution License("CDDL") (collectively, the
  209.14 +# "License"). You may not use this file except in compliance with the
  209.15 +# License. You can obtain a copy of the License at
  209.16 +# http://www.netbeans.org/cddl-gplv2.html
  209.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  209.18 +# specific language governing permissions and limitations under the
  209.19 +# License.  When distributing the software, include this License Header
  209.20 +# Notice in each file and include the License file at
  209.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  209.22 +# particular file as subject to the "Classpath" exception as provided
  209.23 +# by Oracle in the GPL Version 2 section of the License file that
  209.24 +# accompanied this code. If applicable, add the following below the
  209.25 +# License Header, with the fields enclosed by brackets [] replaced by
  209.26 +# your own identifying information:
  209.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  209.28 +#
  209.29 +# Contributor(s):
  209.30 +#
  209.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  209.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  209.33 +# Microsystems, Inc. All Rights Reserved.
  209.34 +#
  209.35 +# If you wish your version of this file to be governed by only the CDDL
  209.36 +# or only the GPL Version 2, indicate your decision by adding
  209.37 +# "[Contributor] elects to include this software in this distribution
  209.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  209.39 +# single choice of license, a recipient has the option to distribute
  209.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  209.41 +# to extend the choice of license to its licensees as provided above.
  209.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  209.43 +# Version 2 license, then the option applies only if the new code is
  209.44 +# made subject to such option by the copyright holder.
  209.45  OpenIDE-Module-Name=Jackpot 3.0 C/C++ Remote FS Bridge
   210.1 --- a/remoting/ide/cnd.remote.bridge/src/org/netbeans/modules/jackpot30/cnd/remote/bridge/FileSystemListerImpl.java	Mon Dec 19 11:37:36 2016 +0100
   210.2 +++ b/remoting/ide/cnd.remote.bridge/src/org/netbeans/modules/jackpot30/cnd/remote/bridge/FileSystemListerImpl.java	Mon Feb 27 22:40:44 2017 +0100
   210.3 @@ -1,6 +1,45 @@
   210.4  /*
   210.5 - * To change this template, choose Tools | Templates and open the template in
   210.6 - * the editor.
   210.7 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   210.8 + *
   210.9 + * Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
  210.10 + *
  210.11 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  210.12 + * Other names may be trademarks of their respective owners.
  210.13 + *
  210.14 + * The contents of this file are subject to the terms of either the GNU
  210.15 + * General Public License Version 2 only ("GPL") or the Common
  210.16 + * Development and Distribution License("CDDL") (collectively, the
  210.17 + * "License"). You may not use this file except in compliance with the
  210.18 + * License. You can obtain a copy of the License at
  210.19 + * http://www.netbeans.org/cddl-gplv2.html
  210.20 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  210.21 + * specific language governing permissions and limitations under the
  210.22 + * License.  When distributing the software, include this License Header
  210.23 + * Notice in each file and include the License file at
  210.24 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  210.25 + * particular file as subject to the "Classpath" exception as provided
  210.26 + * by Oracle in the GPL Version 2 section of the License file that
  210.27 + * accompanied this code. If applicable, add the following below the
  210.28 + * License Header, with the fields enclosed by brackets [] replaced by
  210.29 + * your own identifying information:
  210.30 + * "Portions Copyrighted [year] [name of copyright owner]"
  210.31 + *
  210.32 + * Contributor(s):
  210.33 + *
  210.34 + * The Original Software is NetBeans. The Initial Developer of the Original
  210.35 + * Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  210.36 + * Microsystems, Inc. All Rights Reserved.
  210.37 + *
  210.38 + * If you wish your version of this file to be governed by only the CDDL
  210.39 + * or only the GPL Version 2, indicate your decision by adding
  210.40 + * "[Contributor] elects to include this software in this distribution
  210.41 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  210.42 + * single choice of license, a recipient has the option to distribute
  210.43 + * your version of this file under either the CDDL, the GPL Version 2 or
  210.44 + * to extend the choice of license to its licensees as provided above.
  210.45 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  210.46 + * Version 2 license, then the option applies only if the new code is
  210.47 + * made subject to such option by the copyright holder.
  210.48   */
  210.49  package org.netbeans.modules.jackpot30.cnd.remote.bridge;
  210.50  
   211.1 --- a/remoting/ide/downloadable/build.xml	Mon Dec 19 11:37:36 2016 +0100
   211.2 +++ b/remoting/ide/downloadable/build.xml	Mon Feb 27 22:40:44 2017 +0100
   211.3 @@ -1,4 +1,47 @@
   211.4  <?xml version="1.0" encoding="UTF-8"?>
   211.5 +<!--
   211.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   211.7 +
   211.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   211.9 +
  211.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  211.11 +Other names may be trademarks of their respective owners.
  211.12 +
  211.13 +The contents of this file are subject to the terms of either the GNU
  211.14 +General Public License Version 2 only ("GPL") or the Common
  211.15 +Development and Distribution License("CDDL") (collectively, the
  211.16 +"License"). You may not use this file except in compliance with the
  211.17 +License. You can obtain a copy of the License at
  211.18 +http://www.netbeans.org/cddl-gplv2.html
  211.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  211.20 +specific language governing permissions and limitations under the
  211.21 +License.  When distributing the software, include this License Header
  211.22 +Notice in each file and include the License file at
  211.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  211.24 +particular file as subject to the "Classpath" exception as provided
  211.25 +by Oracle in the GPL Version 2 section of the License file that
  211.26 +accompanied this code. If applicable, add the following below the
  211.27 +License Header, with the fields enclosed by brackets [] replaced by
  211.28 +your own identifying information:
  211.29 +"Portions Copyrighted [year] [name of copyright owner]"
  211.30 +
  211.31 +Contributor(s):
  211.32 +
  211.33 +The Original Software is NetBeans. The Initial Developer of the Original
  211.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  211.35 +Microsystems, Inc. All Rights Reserved.
  211.36 +
  211.37 +If you wish your version of this file to be governed by only the CDDL
  211.38 +or only the GPL Version 2, indicate your decision by adding
  211.39 +"[Contributor] elects to include this software in this distribution
  211.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  211.41 +single choice of license, a recipient has the option to distribute
  211.42 +your version of this file under either the CDDL, the GPL Version 2 or
  211.43 +to extend the choice of license to its licensees as provided above.
  211.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  211.45 +Version 2 license, then the option applies only if the new code is
  211.46 +made subject to such option by the copyright holder.
  211.47 +-->
  211.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  211.49  <!-- for some information on what you could do (e.g. targets to override). -->
  211.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   212.1 --- a/remoting/ide/downloadable/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   212.2 +++ b/remoting/ide/downloadable/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   212.3 @@ -1,5 +1,48 @@
   212.4  <?xml version="1.0" encoding="UTF-8"?>
   212.5  <!--
   212.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   212.7 +
   212.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   212.9 +
  212.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  212.11 +Other names may be trademarks of their respective owners.
  212.12 +
  212.13 +The contents of this file are subject to the terms of either the GNU
  212.14 +General Public License Version 2 only ("GPL") or the Common
  212.15 +Development and Distribution License("CDDL") (collectively, the
  212.16 +"License"). You may not use this file except in compliance with the
  212.17 +License. You can obtain a copy of the License at
  212.18 +http://www.netbeans.org/cddl-gplv2.html
  212.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  212.20 +specific language governing permissions and limitations under the
  212.21 +License.  When distributing the software, include this License Header
  212.22 +Notice in each file and include the License file at
  212.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  212.24 +particular file as subject to the "Classpath" exception as provided
  212.25 +by Oracle in the GPL Version 2 section of the License file that
  212.26 +accompanied this code. If applicable, add the following below the
  212.27 +License Header, with the fields enclosed by brackets [] replaced by
  212.28 +your own identifying information:
  212.29 +"Portions Copyrighted [year] [name of copyright owner]"
  212.30 +
  212.31 +Contributor(s):
  212.32 +
  212.33 +The Original Software is NetBeans. The Initial Developer of the Original
  212.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  212.35 +Microsystems, Inc. All Rights Reserved.
  212.36 +
  212.37 +If you wish your version of this file to be governed by only the CDDL
  212.38 +or only the GPL Version 2, indicate your decision by adding
  212.39 +"[Contributor] elects to include this software in this distribution
  212.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  212.41 +single choice of license, a recipient has the option to distribute
  212.42 +your version of this file under either the CDDL, the GPL Version 2 or
  212.43 +to extend the choice of license to its licensees as provided above.
  212.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  212.45 +Version 2 license, then the option applies only if the new code is
  212.46 +made subject to such option by the copyright holder.
  212.47 +-->
  212.48 +<!--
  212.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  212.50  ***         EDIT ../build.xml INSTEAD         ***
  212.51  -->
   213.1 --- a/remoting/ide/downloadable/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   213.2 +++ b/remoting/ide/downloadable/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   213.3 @@ -1,3 +1,44 @@
   213.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   213.5 +#
   213.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   213.7 +#
   213.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   213.9 +# Other names may be trademarks of their respective owners.
  213.10 +#
  213.11 +# The contents of this file are subject to the terms of either the GNU
  213.12 +# General Public License Version 2 only ("GPL") or the Common
  213.13 +# Development and Distribution License("CDDL") (collectively, the
  213.14 +# "License"). You may not use this file except in compliance with the
  213.15 +# License. You can obtain a copy of the License at
  213.16 +# http://www.netbeans.org/cddl-gplv2.html
  213.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  213.18 +# specific language governing permissions and limitations under the
  213.19 +# License.  When distributing the software, include this License Header
  213.20 +# Notice in each file and include the License file at
  213.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  213.22 +# particular file as subject to the "Classpath" exception as provided
  213.23 +# by Oracle in the GPL Version 2 section of the License file that
  213.24 +# accompanied this code. If applicable, add the following below the
  213.25 +# License Header, with the fields enclosed by brackets [] replaced by
  213.26 +# your own identifying information:
  213.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  213.28 +#
  213.29 +# Contributor(s):
  213.30 +#
  213.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  213.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  213.33 +# Microsystems, Inc. All Rights Reserved.
  213.34 +#
  213.35 +# If you wish your version of this file to be governed by only the CDDL
  213.36 +# or only the GPL Version 2, indicate your decision by adding
  213.37 +# "[Contributor] elects to include this software in this distribution
  213.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  213.39 +# single choice of license, a recipient has the option to distribute
  213.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  213.41 +# to extend the choice of license to its licensees as provided above.
  213.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  213.43 +# Version 2 license, then the option applies only if the new code is
  213.44 +# made subject to such option by the copyright holder.
  213.45  build.xml.data.CRC32=c2cda89c
  213.46  build.xml.script.CRC32=14841d35
  213.47  build.xml.stylesheet.CRC32=a56c6a5b@2.46
   214.1 --- a/remoting/ide/downloadable/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   214.2 +++ b/remoting/ide/downloadable/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   214.3 @@ -1,3 +1,44 @@
   214.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   214.5 +#
   214.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   214.7 +#
   214.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   214.9 +# Other names may be trademarks of their respective owners.
  214.10 +#
  214.11 +# The contents of this file are subject to the terms of either the GNU
  214.12 +# General Public License Version 2 only ("GPL") or the Common
  214.13 +# Development and Distribution License("CDDL") (collectively, the
  214.14 +# "License"). You may not use this file except in compliance with the
  214.15 +# License. You can obtain a copy of the License at
  214.16 +# http://www.netbeans.org/cddl-gplv2.html
  214.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  214.18 +# specific language governing permissions and limitations under the
  214.19 +# License.  When distributing the software, include this License Header
  214.20 +# Notice in each file and include the License file at
  214.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  214.22 +# particular file as subject to the "Classpath" exception as provided
  214.23 +# by Oracle in the GPL Version 2 section of the License file that
  214.24 +# accompanied this code. If applicable, add the following below the
  214.25 +# License Header, with the fields enclosed by brackets [] replaced by
  214.26 +# your own identifying information:
  214.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  214.28 +#
  214.29 +# Contributor(s):
  214.30 +#
  214.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  214.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  214.33 +# Microsystems, Inc. All Rights Reserved.
  214.34 +#
  214.35 +# If you wish your version of this file to be governed by only the CDDL
  214.36 +# or only the GPL Version 2, indicate your decision by adding
  214.37 +# "[Contributor] elects to include this software in this distribution
  214.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  214.39 +# single choice of license, a recipient has the option to distribute
  214.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  214.41 +# to extend the choice of license to its licensees as provided above.
  214.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  214.43 +# Version 2 license, then the option applies only if the new code is
  214.44 +# made subject to such option by the copyright holder.
  214.45  javac.source=1.6
  214.46  javac.compilerargs=-Xlint -Xlint:-serial
  214.47  spec.version.base=1.1
   215.1 --- a/remoting/ide/downloadable/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   215.2 +++ b/remoting/ide/downloadable/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   215.3 @@ -1,4 +1,47 @@
   215.4  <?xml version="1.0" encoding="UTF-8"?>
   215.5 +<!--
   215.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   215.7 +
   215.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   215.9 +
  215.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  215.11 +Other names may be trademarks of their respective owners.
  215.12 +
  215.13 +The contents of this file are subject to the terms of either the GNU
  215.14 +General Public License Version 2 only ("GPL") or the Common
  215.15 +Development and Distribution License("CDDL") (collectively, the
  215.16 +"License"). You may not use this file except in compliance with the
  215.17 +License. You can obtain a copy of the License at
  215.18 +http://www.netbeans.org/cddl-gplv2.html
  215.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  215.20 +specific language governing permissions and limitations under the
  215.21 +License.  When distributing the software, include this License Header
  215.22 +Notice in each file and include the License file at
  215.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  215.24 +particular file as subject to the "Classpath" exception as provided
  215.25 +by Oracle in the GPL Version 2 section of the License file that
  215.26 +accompanied this code. If applicable, add the following below the
  215.27 +License Header, with the fields enclosed by brackets [] replaced by
  215.28 +your own identifying information:
  215.29 +"Portions Copyrighted [year] [name of copyright owner]"
  215.30 +
  215.31 +Contributor(s):
  215.32 +
  215.33 +The Original Software is NetBeans. The Initial Developer of the Original
  215.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  215.35 +Microsystems, Inc. All Rights Reserved.
  215.36 +
  215.37 +If you wish your version of this file to be governed by only the CDDL
  215.38 +or only the GPL Version 2, indicate your decision by adding
  215.39 +"[Contributor] elects to include this software in this distribution
  215.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  215.41 +single choice of license, a recipient has the option to distribute
  215.42 +your version of this file under either the CDDL, the GPL Version 2 or
  215.43 +to extend the choice of license to its licensees as provided above.
  215.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  215.45 +Version 2 license, then the option applies only if the new code is
  215.46 +made subject to such option by the copyright holder.
  215.47 +-->
  215.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  215.49      <type>org.netbeans.modules.apisupport.project</type>
  215.50      <configuration>
   216.1 --- a/remoting/ide/downloadable/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   216.2 +++ b/remoting/ide/downloadable/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
   216.3 @@ -1,1 +1,42 @@
   216.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   216.5 +#
   216.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   216.7 +#
   216.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   216.9 +# Other names may be trademarks of their respective owners.
  216.10 +#
  216.11 +# The contents of this file are subject to the terms of either the GNU
  216.12 +# General Public License Version 2 only ("GPL") or the Common
  216.13 +# Development and Distribution License("CDDL") (collectively, the
  216.14 +# "License"). You may not use this file except in compliance with the
  216.15 +# License. You can obtain a copy of the License at
  216.16 +# http://www.netbeans.org/cddl-gplv2.html
  216.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  216.18 +# specific language governing permissions and limitations under the
  216.19 +# License.  When distributing the software, include this License Header
  216.20 +# Notice in each file and include the License file at
  216.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  216.22 +# particular file as subject to the "Classpath" exception as provided
  216.23 +# by Oracle in the GPL Version 2 section of the License file that
  216.24 +# accompanied this code. If applicable, add the following below the
  216.25 +# License Header, with the fields enclosed by brackets [] replaced by
  216.26 +# your own identifying information:
  216.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  216.28 +#
  216.29 +# Contributor(s):
  216.30 +#
  216.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  216.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  216.33 +# Microsystems, Inc. All Rights Reserved.
  216.34 +#
  216.35 +# If you wish your version of this file to be governed by only the CDDL
  216.36 +# or only the GPL Version 2, indicate your decision by adding
  216.37 +# "[Contributor] elects to include this software in this distribution
  216.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  216.39 +# single choice of license, a recipient has the option to distribute
  216.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  216.41 +# to extend the choice of license to its licensees as provided above.
  216.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  216.43 +# Version 2 license, then the option applies only if the new code is
  216.44 +# made subject to such option by the copyright holder.
  216.45  suite.dir=${basedir}/..
   217.1 --- a/remoting/ide/downloadable/src/org/netbeans/modules/jackpot30/remoting/downloadable/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   217.2 +++ b/remoting/ide/downloadable/src/org/netbeans/modules/jackpot30/remoting/downloadable/Bundle.properties	Mon Feb 27 22:40:44 2017 +0100
   217.3 @@ -1,2 +1,43 @@
   217.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   217.5 +#
   217.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   217.7 +#
   217.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   217.9 +# Other names may be trademarks of their respective owners.
  217.10 +#
  217.11 +# The contents of this file are subject to the terms of either the GNU
  217.12 +# General Public License Version 2 only ("GPL") or the Common
  217.13 +# Development and Distribution License("CDDL") (collectively, the
  217.14 +# "License"). You may not use this file except in compliance with the
  217.15 +# License. You can obtain a copy of the License at
  217.16 +# http://www.netbeans.org/cddl-gplv2.html
  217.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  217.18 +# specific language governing permissions and limitations under the
  217.19 +# License.  When distributing the software, include this License Header
  217.20 +# Notice in each file and include the License file at
  217.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  217.22 +# particular file as subject to the "Classpath" exception as provided
  217.23 +# by Oracle in the GPL Version 2 section of the License file that
  217.24 +# accompanied this code. If applicable, add the following below the
  217.25 +# License Header, with the fields enclosed by brackets [] replaced by
  217.26 +# your own identifying information:
  217.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  217.28 +#
  217.29 +# Contributor(s):
  217.30 +#
  217.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  217.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  217.33 +# Microsystems, Inc. All Rights Reserved.
  217.34 +#
  217.35 +# If you wish your version of this file to be governed by only the CDDL
  217.36 +# or only the GPL Version 2, indicate your decision by adding
  217.37 +# "[Contributor] elects to include this software in this distribution
  217.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  217.39 +# single choice of license, a recipient has the option to distribute
  217.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  217.41 +# to extend the choice of license to its licensees as provided above.
  217.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  217.43 +# Version 2 license, then the option applies only if the new code is
  217.44 +# made subject to such option by the copyright holder.
  217.45  OpenIDE-Module-Display-Category=Java
  217.46  OpenIDE-Module-Name=Remoting - Downloadable Index HIGHLY EXPERIMENTAL
   218.1 --- a/remoting/ide/downloadable/src/org/netbeans/modules/jackpot30/remoting/downloadable/DownloadedIndexPatcherImpl.java	Mon Dec 19 11:37:36 2016 +0100
   218.2 +++ b/remoting/ide/downloadable/src/org/netbeans/modules/jackpot30/remoting/downloadable/DownloadedIndexPatcherImpl.java	Mon Feb 27 22:40:44 2017 +0100
   218.3 @@ -1,6 +1,45 @@
   218.4  /*
   218.5 - * To change this template, choose Tools | Templates and open the template in
   218.6 - * the editor.
   218.7 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   218.8 + *
   218.9 + * Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
  218.10 + *
  218.11 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  218.12 + * Other names may be trademarks of their respective owners.
  218.13 + *
  218.14 + * The contents of this file are subject to the terms of either the GNU
  218.15 + * General Public License Version 2 only ("GPL") or the Common
  218.16 + * Development and Distribution License("CDDL") (collectively, the
  218.17 + * "License"). You may not use this file except in compliance with the
  218.18 + * License. You can obtain a copy of the License at
  218.19 + * http://www.netbeans.org/cddl-gplv2.html
  218.20 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  218.21 + * specific language governing permissions and limitations under the
  218.22 + * License.  When distributing the software, include this License Header
  218.23 + * Notice in each file and include the License file at
  218.24 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  218.25 + * particular file as subject to the "Classpath" exception as provided
  218.26 + * by Oracle in the GPL Version 2 section of the License file that
  218.27 + * accompanied this code. If applicable, add the following below the
  218.28 + * License Header, with the fields enclosed by brackets [] replaced by
  218.29 + * your own identifying information:
  218.30 + * "Portions Copyrighted [year] [name of copyright owner]"
  218.31 + *
  218.32 + * Contributor(s):
  218.33 + *
  218.34 + * The Original Software is NetBeans. The Initial Developer of the Original
  218.35 + * Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  218.36 + * Microsystems, Inc. All Rights Reserved.
  218.37 + *
  218.38 + * If you wish your version of this file to be governed by only the CDDL
  218.39 + * or only the GPL Version 2, indicate your decision by adding
  218.40 + * "[Contributor] elects to include this software in this distribution
  218.41 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  218.42 + * single choice of license, a recipient has the option to distribute
  218.43 + * your version of this file under either the CDDL, the GPL Version 2 or
  218.44 + * to extend the choice of license to its licensees as provided above.
  218.45 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  218.46 + * Version 2 license, then the option applies only if the new code is
  218.47 + * made subject to such option by the copyright holder.
  218.48   */
  218.49  package org.netbeans.modules.jackpot30.remoting.downloadable;
  218.50  
   219.1 --- a/remoting/ide/jumpto/build.xml	Mon Dec 19 11:37:36 2016 +0100
   219.2 +++ b/remoting/ide/jumpto/build.xml	Mon Feb 27 22:40:44 2017 +0100
   219.3 @@ -1,4 +1,47 @@
   219.4  <?xml version="1.0" encoding="UTF-8"?>
   219.5 +<!--
   219.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   219.7 +
   219.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   219.9 +
  219.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  219.11 +Other names may be trademarks of their respective owners.
  219.12 +
  219.13 +The contents of this file are subject to the terms of either the GNU
  219.14 +General Public License Version 2 only ("GPL") or the Common
  219.15 +Development and Distribution License("CDDL") (collectively, the
  219.16 +"License"). You may not use this file except in compliance with the
  219.17 +License. You can obtain a copy of the License at
  219.18 +http://www.netbeans.org/cddl-gplv2.html
  219.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  219.20 +specific language governing permissions and limitations under the
  219.21 +License.  When distributing the software, include this License Header
  219.22 +Notice in each file and include the License file at
  219.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  219.24 +particular file as subject to the "Classpath" exception as provided
  219.25 +by Oracle in the GPL Version 2 section of the License file that
  219.26 +accompanied this code. If applicable, add the following below the
  219.27 +License Header, with the fields enclosed by brackets [] replaced by
  219.28 +your own identifying information:
  219.29 +"Portions Copyrighted [year] [name of copyright owner]"
  219.30 +
  219.31 +Contributor(s):
  219.32 +
  219.33 +The Original Software is NetBeans. The Initial Developer of the Original
  219.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  219.35 +Microsystems, Inc. All Rights Reserved.
  219.36 +
  219.37 +If you wish your version of this file to be governed by only the CDDL
  219.38 +or only the GPL Version 2, indicate your decision by adding
  219.39 +"[Contributor] elects to include this software in this distribution
  219.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  219.41 +single choice of license, a recipient has the option to distribute
  219.42 +your version of this file under either the CDDL, the GPL Version 2 or
  219.43 +to extend the choice of license to its licensees as provided above.
  219.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  219.45 +Version 2 license, then the option applies only if the new code is
  219.46 +made subject to such option by the copyright holder.
  219.47 +-->
  219.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  219.49  <!-- for some information on what you could do (e.g. targets to override). -->
  219.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   220.1 --- a/remoting/ide/jumpto/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   220.2 +++ b/remoting/ide/jumpto/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   220.3 @@ -1,5 +1,48 @@
   220.4  <?xml version="1.0" encoding="UTF-8"?>
   220.5  <!--
   220.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   220.7 +
   220.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   220.9 +
  220.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  220.11 +Other names may be trademarks of their respective owners.
  220.12 +
  220.13 +The contents of this file are subject to the terms of either the GNU
  220.14 +General Public License Version 2 only ("GPL") or the Common
  220.15 +Development and Distribution License("CDDL") (collectively, the
  220.16 +"License"). You may not use this file except in compliance with the
  220.17 +License. You can obtain a copy of the License at
  220.18 +http://www.netbeans.org/cddl-gplv2.html
  220.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  220.20 +specific language governing permissions and limitations under the
  220.21 +License.  When distributing the software, include this License Header
  220.22 +Notice in each file and include the License file at
  220.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  220.24 +particular file as subject to the "Classpath" exception as provided
  220.25 +by Oracle in the GPL Version 2 section of the License file that
  220.26 +accompanied this code. If applicable, add the following below the
  220.27 +License Header, with the fields enclosed by brackets [] replaced by
  220.28 +your own identifying information:
  220.29 +"Portions Copyrighted [year] [name of copyright owner]"
  220.30 +
  220.31 +Contributor(s):
  220.32 +
  220.33 +The Original Software is NetBeans. The Initial Developer of the Original
  220.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  220.35 +Microsystems, Inc. All Rights Reserved.
  220.36 +
  220.37 +If you wish your version of this file to be governed by only the CDDL
  220.38 +or only the GPL Version 2, indicate your decision by adding
  220.39 +"[Contributor] elects to include this software in this distribution
  220.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  220.41 +single choice of license, a recipient has the option to distribute
  220.42 +your version of this file under either the CDDL, the GPL Version 2 or
  220.43 +to extend the choice of license to its licensees as provided above.
  220.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  220.45 +Version 2 license, then the option applies only if the new code is
  220.46 +made subject to such option by the copyright holder.
  220.47 +-->
  220.48 +<!--
  220.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  220.50  ***         EDIT ../build.xml INSTEAD         ***
  220.51  -->
   221.1 --- a/remoting/ide/jumpto/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   221.2 +++ b/remoting/ide/jumpto/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   221.3 @@ -1,3 +1,44 @@
   221.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   221.5 +#
   221.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   221.7 +#
   221.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   221.9 +# Other names may be trademarks of their respective owners.
  221.10 +#
  221.11 +# The contents of this file are subject to the terms of either the GNU
  221.12 +# General Public License Version 2 only ("GPL") or the Common
  221.13 +# Development and Distribution License("CDDL") (collectively, the
  221.14 +# "License"). You may not use this file except in compliance with the
  221.15 +# License. You can obtain a copy of the License at
  221.16 +# http://www.netbeans.org/cddl-gplv2.html
  221.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  221.18 +# specific language governing permissions and limitations under the
  221.19 +# License.  When distributing the software, include this License Header
  221.20 +# Notice in each file and include the License file at
  221.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  221.22 +# particular file as subject to the "Classpath" exception as provided
  221.23 +# by Oracle in the GPL Version 2 section of the License file that
  221.24 +# accompanied this code. If applicable, add the following below the
  221.25 +# License Header, with the fields enclosed by brackets [] replaced by
  221.26 +# your own identifying information:
  221.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  221.28 +#
  221.29 +# Contributor(s):
  221.30 +#
  221.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  221.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  221.33 +# Microsystems, Inc. All Rights Reserved.
  221.34 +#
  221.35 +# If you wish your version of this file to be governed by only the CDDL
  221.36 +# or only the GPL Version 2, indicate your decision by adding
  221.37 +# "[Contributor] elects to include this software in this distribution
  221.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  221.39 +# single choice of license, a recipient has the option to distribute
  221.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  221.41 +# to extend the choice of license to its licensees as provided above.
  221.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  221.43 +# Version 2 license, then the option applies only if the new code is
  221.44 +# made subject to such option by the copyright holder.
  221.45  build.xml.data.CRC32=14c2e29c
  221.46  build.xml.script.CRC32=c7b5d9b7
  221.47  build.xml.stylesheet.CRC32=a56c6a5b@1.45
   222.1 --- a/remoting/ide/jumpto/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   222.2 +++ b/remoting/ide/jumpto/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   222.3 @@ -1,3 +1,44 @@
   222.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   222.5 +#
   222.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   222.7 +#
   222.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   222.9 +# Other names may be trademarks of their respective owners.
  222.10 +#
  222.11 +# The contents of this file are subject to the terms of either the GNU
  222.12 +# General Public License Version 2 only ("GPL") or the Common
  222.13 +# Development and Distribution License("CDDL") (collectively, the
  222.14 +# "License"). You may not use this file except in compliance with the
  222.15 +# License. You can obtain a copy of the License at
  222.16 +# http://www.netbeans.org/cddl-gplv2.html
  222.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  222.18 +# specific language governing permissions and limitations under the
  222.19 +# License.  When distributing the software, include this License Header
  222.20 +# Notice in each file and include the License file at
  222.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  222.22 +# particular file as subject to the "Classpath" exception as provided
  222.23 +# by Oracle in the GPL Version 2 section of the License file that
  222.24 +# accompanied this code. If applicable, add the following below the
  222.25 +# License Header, with the fields enclosed by brackets [] replaced by
  222.26 +# your own identifying information:
  222.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  222.28 +#
  222.29 +# Contributor(s):
  222.30 +#
  222.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  222.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  222.33 +# Microsystems, Inc. All Rights Reserved.
  222.34 +#
  222.35 +# If you wish your version of this file to be governed by only the CDDL
  222.36 +# or only the GPL Version 2, indicate your decision by adding
  222.37 +# "[Contributor] elects to include this software in this distribution
  222.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  222.39 +# single choice of license, a recipient has the option to distribute
  222.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  222.41 +# to extend the choice of license to its licensees as provided above.
  222.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  222.43 +# Version 2 license, then the option applies only if the new code is
  222.44 +# made subject to such option by the copyright holder.
  222.45  javac.source=1.6
  222.46  javac.compilerargs=-Xlint -Xlint:-serial
  222.47  spec.version.base=1.6
   223.1 --- a/remoting/ide/jumpto/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   223.2 +++ b/remoting/ide/jumpto/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   223.3 @@ -1,4 +1,47 @@
   223.4  <?xml version="1.0" encoding="UTF-8"?>
   223.5 +<!--
   223.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   223.7 +
   223.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   223.9 +
  223.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  223.11 +Other names may be trademarks of their respective owners.
  223.12 +
  223.13 +The contents of this file are subject to the terms of either the GNU
  223.14 +General Public License Version 2 only ("GPL") or the Common
  223.15 +Development and Distribution License("CDDL") (collectively, the
  223.16 +"License"). You may not use this file except in compliance with the
  223.17 +License. You can obtain a copy of the License at
  223.18 +http://www.netbeans.org/cddl-gplv2.html
  223.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  223.20 +specific language governing permissions and limitations under the
  223.21 +License.  When distributing the software, include this License Header
  223.22 +Notice in each file and include the License file at
  223.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  223.24 +particular file as subject to the "Classpath" exception as provided
  223.25 +by Oracle in the GPL Version 2 section of the License file that
  223.26 +accompanied this code. If applicable, add the following below the
  223.27 +License Header, with the fields enclosed by brackets [] replaced by
  223.28 +your own identifying information:
  223.29 +"Portions Copyrighted [year] [name of copyright owner]"
  223.30 +
  223.31 +Contributor(s):
  223.32 +
  223.33 +The Original Software is NetBeans. The Initial Developer of the Original
  223.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  223.35 +Microsystems, Inc. All Rights Reserved.
  223.36 +
  223.37 +If you wish your version of this file to be governed by only the CDDL
  223.38 +or only the GPL Version 2, indicate your decision by adding
  223.39 +"[Contributor] elects to include this software in this distribution
  223.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  223.41 +single choice of license, a recipient has the option to distribute
  223.42 +your version of this file under either the CDDL, the GPL Version 2 or
  223.43 +to extend the choice of license to its licensees as provided above.
  223.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  223.45 +Version 2 license, then the option applies only if the new code is
  223.46 +made subject to such option by the copyright holder.
  223.47 +-->
  223.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  223.49      <type>org.netbeans.modules.apisupport.project</type>
  223.50      <configuration>
   224.1 --- a/remoting/ide/jumpto/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   224.2 +++ b/remoting/ide/jumpto/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
   224.3 @@ -1,1 +1,42 @@
   224.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   224.5 +#
   224.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   224.7 +#
   224.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   224.9 +# Other names may be trademarks of their respective owners.
  224.10 +#
  224.11 +# The contents of this file are subject to the terms of either the GNU
  224.12 +# General Public License Version 2 only ("GPL") or the Common
  224.13 +# Development and Distribution License("CDDL") (collectively, the
  224.14 +# "License"). You may not use this file except in compliance with the
  224.15 +# License. You can obtain a copy of the License at
  224.16 +# http://www.netbeans.org/cddl-gplv2.html
  224.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  224.18 +# specific language governing permissions and limitations under the
  224.19 +# License.  When distributing the software, include this License Header
  224.20 +# Notice in each file and include the License file at
  224.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  224.22 +# particular file as subject to the "Classpath" exception as provided
  224.23 +# by Oracle in the GPL Version 2 section of the License file that
  224.24 +# accompanied this code. If applicable, add the following below the
  224.25 +# License Header, with the fields enclosed by brackets [] replaced by
  224.26 +# your own identifying information:
  224.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  224.28 +#
  224.29 +# Contributor(s):
  224.30 +#
  224.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  224.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  224.33 +# Microsystems, Inc. All Rights Reserved.
  224.34 +#
  224.35 +# If you wish your version of this file to be governed by only the CDDL
  224.36 +# or only the GPL Version 2, indicate your decision by adding
  224.37 +# "[Contributor] elects to include this software in this distribution
  224.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  224.39 +# single choice of license, a recipient has the option to distribute
  224.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  224.41 +# to extend the choice of license to its licensees as provided above.
  224.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  224.43 +# Version 2 license, then the option applies only if the new code is
  224.44 +# made subject to such option by the copyright holder.
  224.45  suite.dir=${basedir}/..
   225.1 --- a/remoting/ide/jumpto/src/org/netbeans/modules/jackpot30/jumpto/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   225.2 +++ b/remoting/ide/jumpto/src/org/netbeans/modules/jackpot30/jumpto/Bundle.properties	Mon Feb 27 22:40:44 2017 +0100
   225.3 @@ -1,1 +1,42 @@
   225.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   225.5 +#
   225.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   225.7 +#
   225.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   225.9 +# Other names may be trademarks of their respective owners.
  225.10 +#
  225.11 +# The contents of this file are subject to the terms of either the GNU
  225.12 +# General Public License Version 2 only ("GPL") or the Common
  225.13 +# Development and Distribution License("CDDL") (collectively, the
  225.14 +# "License"). You may not use this file except in compliance with the
  225.15 +# License. You can obtain a copy of the License at
  225.16 +# http://www.netbeans.org/cddl-gplv2.html
  225.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  225.18 +# specific language governing permissions and limitations under the
  225.19 +# License.  When distributing the software, include this License Header
  225.20 +# Notice in each file and include the License file at
  225.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  225.22 +# particular file as subject to the "Classpath" exception as provided
  225.23 +# by Oracle in the GPL Version 2 section of the License file that
  225.24 +# accompanied this code. If applicable, add the following below the
  225.25 +# License Header, with the fields enclosed by brackets [] replaced by
  225.26 +# your own identifying information:
  225.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  225.28 +#
  225.29 +# Contributor(s):
  225.30 +#
  225.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  225.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  225.33 +# Microsystems, Inc. All Rights Reserved.
  225.34 +#
  225.35 +# If you wish your version of this file to be governed by only the CDDL
  225.36 +# or only the GPL Version 2, indicate your decision by adding
  225.37 +# "[Contributor] elects to include this software in this distribution
  225.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  225.39 +# single choice of license, a recipient has the option to distribute
  225.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  225.41 +# to extend the choice of license to its licensees as provided above.
  225.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  225.43 +# Version 2 license, then the option applies only if the new code is
  225.44 +# made subject to such option by the copyright holder.
  225.45  OpenIDE-Module-Name=jackpot 3.0 Jumpto Bridge
   226.1 --- a/remoting/ide/kit/build.xml	Mon Dec 19 11:37:36 2016 +0100
   226.2 +++ b/remoting/ide/kit/build.xml	Mon Feb 27 22:40:44 2017 +0100
   226.3 @@ -1,4 +1,47 @@
   226.4  <?xml version="1.0" encoding="UTF-8"?>
   226.5 +<!--
   226.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   226.7 +
   226.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   226.9 +
  226.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  226.11 +Other names may be trademarks of their respective owners.
  226.12 +
  226.13 +The contents of this file are subject to the terms of either the GNU
  226.14 +General Public License Version 2 only ("GPL") or the Common
  226.15 +Development and Distribution License("CDDL") (collectively, the
  226.16 +"License"). You may not use this file except in compliance with the
  226.17 +License. You can obtain a copy of the License at
  226.18 +http://www.netbeans.org/cddl-gplv2.html
  226.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  226.20 +specific language governing permissions and limitations under the
  226.21 +License.  When distributing the software, include this License Header
  226.22 +Notice in each file and include the License file at
  226.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  226.24 +particular file as subject to the "Classpath" exception as provided
  226.25 +by Oracle in the GPL Version 2 section of the License file that
  226.26 +accompanied this code. If applicable, add the following below the
  226.27 +License Header, with the fields enclosed by brackets [] replaced by
  226.28 +your own identifying information:
  226.29 +"Portions Copyrighted [year] [name of copyright owner]"
  226.30 +
  226.31 +Contributor(s):
  226.32 +
  226.33 +The Original Software is NetBeans. The Initial Developer of the Original
  226.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  226.35 +Microsystems, Inc. All Rights Reserved.
  226.36 +
  226.37 +If you wish your version of this file to be governed by only the CDDL
  226.38 +or only the GPL Version 2, indicate your decision by adding
  226.39 +"[Contributor] elects to include this software in this distribution
  226.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  226.41 +single choice of license, a recipient has the option to distribute
  226.42 +your version of this file under either the CDDL, the GPL Version 2 or
  226.43 +to extend the choice of license to its licensees as provided above.
  226.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  226.45 +Version 2 license, then the option applies only if the new code is
  226.46 +made subject to such option by the copyright holder.
  226.47 +-->
  226.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  226.49  <!-- for some information on what you could do (e.g. targets to override). -->
  226.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   227.1 --- a/remoting/ide/kit/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   227.2 +++ b/remoting/ide/kit/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   227.3 @@ -1,5 +1,48 @@
   227.4  <?xml version="1.0" encoding="UTF-8"?>
   227.5  <!--
   227.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   227.7 +
   227.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   227.9 +
  227.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  227.11 +Other names may be trademarks of their respective owners.
  227.12 +
  227.13 +The contents of this file are subject to the terms of either the GNU
  227.14 +General Public License Version 2 only ("GPL") or the Common
  227.15 +Development and Distribution License("CDDL") (collectively, the
  227.16 +"License"). You may not use this file except in compliance with the
  227.17 +License. You can obtain a copy of the License at
  227.18 +http://www.netbeans.org/cddl-gplv2.html
  227.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  227.20 +specific language governing permissions and limitations under the
  227.21 +License.  When distributing the software, include this License Header
  227.22 +Notice in each file and include the License file at
  227.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  227.24 +particular file as subject to the "Classpath" exception as provided
  227.25 +by Oracle in the GPL Version 2 section of the License file that
  227.26 +accompanied this code. If applicable, add the following below the
  227.27 +License Header, with the fields enclosed by brackets [] replaced by
  227.28 +your own identifying information:
  227.29 +"Portions Copyrighted [year] [name of copyright owner]"
  227.30 +
  227.31 +Contributor(s):
  227.32 +
  227.33 +The Original Software is NetBeans. The Initial Developer of the Original
  227.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  227.35 +Microsystems, Inc. All Rights Reserved.
  227.36 +
  227.37 +If you wish your version of this file to be governed by only the CDDL
  227.38 +or only the GPL Version 2, indicate your decision by adding
  227.39 +"[Contributor] elects to include this software in this distribution
  227.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  227.41 +single choice of license, a recipient has the option to distribute
  227.42 +your version of this file under either the CDDL, the GPL Version 2 or
  227.43 +to extend the choice of license to its licensees as provided above.
  227.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  227.45 +Version 2 license, then the option applies only if the new code is
  227.46 +made subject to such option by the copyright holder.
  227.47 +-->
  227.48 +<!--
  227.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  227.50  ***         EDIT ../build.xml INSTEAD         ***
  227.51  -->
   228.1 --- a/remoting/ide/kit/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   228.2 +++ b/remoting/ide/kit/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   228.3 @@ -1,3 +1,44 @@
   228.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   228.5 +#
   228.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   228.7 +#
   228.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   228.9 +# Other names may be trademarks of their respective owners.
  228.10 +#
  228.11 +# The contents of this file are subject to the terms of either the GNU
  228.12 +# General Public License Version 2 only ("GPL") or the Common
  228.13 +# Development and Distribution License("CDDL") (collectively, the
  228.14 +# "License"). You may not use this file except in compliance with the
  228.15 +# License. You can obtain a copy of the License at
  228.16 +# http://www.netbeans.org/cddl-gplv2.html
  228.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  228.18 +# specific language governing permissions and limitations under the
  228.19 +# License.  When distributing the software, include this License Header
  228.20 +# Notice in each file and include the License file at
  228.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  228.22 +# particular file as subject to the "Classpath" exception as provided
  228.23 +# by Oracle in the GPL Version 2 section of the License file that
  228.24 +# accompanied this code. If applicable, add the following below the
  228.25 +# License Header, with the fields enclosed by brackets [] replaced by
  228.26 +# your own identifying information:
  228.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  228.28 +#
  228.29 +# Contributor(s):
  228.30 +#
  228.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  228.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  228.33 +# Microsystems, Inc. All Rights Reserved.
  228.34 +#
  228.35 +# If you wish your version of this file to be governed by only the CDDL
  228.36 +# or only the GPL Version 2, indicate your decision by adding
  228.37 +# "[Contributor] elects to include this software in this distribution
  228.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  228.39 +# single choice of license, a recipient has the option to distribute
  228.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  228.41 +# to extend the choice of license to its licensees as provided above.
  228.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  228.43 +# Version 2 license, then the option applies only if the new code is
  228.44 +# made subject to such option by the copyright holder.
  228.45  build.xml.data.CRC32=fb399e54
  228.46  build.xml.script.CRC32=14f758ae
  228.47  build.xml.stylesheet.CRC32=a56c6a5b@2.49
   229.1 --- a/remoting/ide/kit/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   229.2 +++ b/remoting/ide/kit/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   229.3 @@ -1,2 +1,43 @@
   229.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   229.5 +#
   229.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   229.7 +#
   229.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   229.9 +# Other names may be trademarks of their respective owners.
  229.10 +#
  229.11 +# The contents of this file are subject to the terms of either the GNU
  229.12 +# General Public License Version 2 only ("GPL") or the Common
  229.13 +# Development and Distribution License("CDDL") (collectively, the
  229.14 +# "License"). You may not use this file except in compliance with the
  229.15 +# License. You can obtain a copy of the License at
  229.16 +# http://www.netbeans.org/cddl-gplv2.html
  229.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  229.18 +# specific language governing permissions and limitations under the
  229.19 +# License.  When distributing the software, include this License Header
  229.20 +# Notice in each file and include the License file at
  229.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  229.22 +# particular file as subject to the "Classpath" exception as provided
  229.23 +# by Oracle in the GPL Version 2 section of the License file that
  229.24 +# accompanied this code. If applicable, add the following below the
  229.25 +# License Header, with the fields enclosed by brackets [] replaced by
  229.26 +# your own identifying information:
  229.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  229.28 +#
  229.29 +# Contributor(s):
  229.30 +#
  229.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  229.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  229.33 +# Microsystems, Inc. All Rights Reserved.
  229.34 +#
  229.35 +# If you wish your version of this file to be governed by only the CDDL
  229.36 +# or only the GPL Version 2, indicate your decision by adding
  229.37 +# "[Contributor] elects to include this software in this distribution
  229.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  229.39 +# single choice of license, a recipient has the option to distribute
  229.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  229.41 +# to extend the choice of license to its licensees as provided above.
  229.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  229.43 +# Version 2 license, then the option applies only if the new code is
  229.44 +# made subject to such option by the copyright holder.
  229.45  javac.source=1.6
  229.46  javac.compilerargs=-Xlint -Xlint:-serial
   230.1 --- a/remoting/ide/kit/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   230.2 +++ b/remoting/ide/kit/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   230.3 @@ -1,4 +1,47 @@
   230.4  <?xml version="1.0" encoding="UTF-8"?>
   230.5 +<!--
   230.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   230.7 +
   230.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   230.9 +
  230.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  230.11 +Other names may be trademarks of their respective owners.
  230.12 +
  230.13 +The contents of this file are subject to the terms of either the GNU
  230.14 +General Public License Version 2 only ("GPL") or the Common
  230.15 +Development and Distribution License("CDDL") (collectively, the
  230.16 +"License"). You may not use this file except in compliance with the
  230.17 +License. You can obtain a copy of the License at
  230.18 +http://www.netbeans.org/cddl-gplv2.html
  230.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  230.20 +specific language governing permissions and limitations under the
  230.21 +License.  When distributing the software, include this License Header
  230.22 +Notice in each file and include the License file at
  230.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  230.24 +particular file as subject to the "Classpath" exception as provided
  230.25 +by Oracle in the GPL Version 2 section of the License file that
  230.26 +accompanied this code. If applicable, add the following below the
  230.27 +License Header, with the fields enclosed by brackets [] replaced by
  230.28 +your own identifying information:
  230.29 +"Portions Copyrighted [year] [name of copyright owner]"
  230.30 +
  230.31 +Contributor(s):
  230.32 +
  230.33 +The Original Software is NetBeans. The Initial Developer of the Original
  230.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  230.35 +Microsystems, Inc. All Rights Reserved.
  230.36 +
  230.37 +If you wish your version of this file to be governed by only the CDDL
  230.38 +or only the GPL Version 2, indicate your decision by adding
  230.39 +"[Contributor] elects to include this software in this distribution
  230.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  230.41 +single choice of license, a recipient has the option to distribute
  230.42 +your version of this file under either the CDDL, the GPL Version 2 or
  230.43 +to extend the choice of license to its licensees as provided above.
  230.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  230.45 +Version 2 license, then the option applies only if the new code is
  230.46 +made subject to such option by the copyright holder.
  230.47 +-->
  230.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  230.49      <type>org.netbeans.modules.apisupport.project</type>
  230.50      <configuration>
   231.1 --- a/remoting/ide/kit/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   231.2 +++ b/remoting/ide/kit/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
   231.3 @@ -1,1 +1,42 @@
   231.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   231.5 +#
   231.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   231.7 +#
   231.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   231.9 +# Other names may be trademarks of their respective owners.
  231.10 +#
  231.11 +# The contents of this file are subject to the terms of either the GNU
  231.12 +# General Public License Version 2 only ("GPL") or the Common
  231.13 +# Development and Distribution License("CDDL") (collectively, the
  231.14 +# "License"). You may not use this file except in compliance with the
  231.15 +# License. You can obtain a copy of the License at
  231.16 +# http://www.netbeans.org/cddl-gplv2.html
  231.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  231.18 +# specific language governing permissions and limitations under the
  231.19 +# License.  When distributing the software, include this License Header
  231.20 +# Notice in each file and include the License file at
  231.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  231.22 +# particular file as subject to the "Classpath" exception as provided
  231.23 +# by Oracle in the GPL Version 2 section of the License file that
  231.24 +# accompanied this code. If applicable, add the following below the
  231.25 +# License Header, with the fields enclosed by brackets [] replaced by
  231.26 +# your own identifying information:
  231.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  231.28 +#
  231.29 +# Contributor(s):
  231.30 +#
  231.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  231.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  231.33 +# Microsystems, Inc. All Rights Reserved.
  231.34 +#
  231.35 +# If you wish your version of this file to be governed by only the CDDL
  231.36 +# or only the GPL Version 2, indicate your decision by adding
  231.37 +# "[Contributor] elects to include this software in this distribution
  231.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  231.39 +# single choice of license, a recipient has the option to distribute
  231.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  231.41 +# to extend the choice of license to its licensees as provided above.
  231.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  231.43 +# Version 2 license, then the option applies only if the new code is
  231.44 +# made subject to such option by the copyright holder.
  231.45  suite.dir=${basedir}/..
   232.1 --- a/remoting/ide/kit/src/org/netbeans/modules/jackpot30/remoting/kit/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   232.2 +++ b/remoting/ide/kit/src/org/netbeans/modules/jackpot30/remoting/kit/Bundle.properties	Mon Feb 27 22:40:44 2017 +0100
   232.3 @@ -1,2 +1,43 @@
   232.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   232.5 +#
   232.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   232.7 +#
   232.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   232.9 +# Other names may be trademarks of their respective owners.
  232.10 +#
  232.11 +# The contents of this file are subject to the terms of either the GNU
  232.12 +# General Public License Version 2 only ("GPL") or the Common
  232.13 +# Development and Distribution License("CDDL") (collectively, the
  232.14 +# "License"). You may not use this file except in compliance with the
  232.15 +# License. You can obtain a copy of the License at
  232.16 +# http://www.netbeans.org/cddl-gplv2.html
  232.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  232.18 +# specific language governing permissions and limitations under the
  232.19 +# License.  When distributing the software, include this License Header
  232.20 +# Notice in each file and include the License file at
  232.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  232.22 +# particular file as subject to the "Classpath" exception as provided
  232.23 +# by Oracle in the GPL Version 2 section of the License file that
  232.24 +# accompanied this code. If applicable, add the following below the
  232.25 +# License Header, with the fields enclosed by brackets [] replaced by
  232.26 +# your own identifying information:
  232.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  232.28 +#
  232.29 +# Contributor(s):
  232.30 +#
  232.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  232.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  232.33 +# Microsystems, Inc. All Rights Reserved.
  232.34 +#
  232.35 +# If you wish your version of this file to be governed by only the CDDL
  232.36 +# or only the GPL Version 2, indicate your decision by adding
  232.37 +# "[Contributor] elects to include this software in this distribution
  232.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  232.39 +# single choice of license, a recipient has the option to distribute
  232.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  232.41 +# to extend the choice of license to its licensees as provided above.
  232.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  232.43 +# Version 2 license, then the option applies only if the new code is
  232.44 +# made subject to such option by the copyright holder.
  232.45  OpenIDE-Module-Display-Category=Java
  232.46  OpenIDE-Module-Name=Jackpot 3.0 Remoting Kit
   233.1 --- a/remoting/ide/local/build.xml	Mon Dec 19 11:37:36 2016 +0100
   233.2 +++ b/remoting/ide/local/build.xml	Mon Feb 27 22:40:44 2017 +0100
   233.3 @@ -1,4 +1,47 @@
   233.4  <?xml version="1.0" encoding="UTF-8"?>
   233.5 +<!--
   233.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   233.7 +
   233.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   233.9 +
  233.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  233.11 +Other names may be trademarks of their respective owners.
  233.12 +
  233.13 +The contents of this file are subject to the terms of either the GNU
  233.14 +General Public License Version 2 only ("GPL") or the Common
  233.15 +Development and Distribution License("CDDL") (collectively, the
  233.16 +"License"). You may not use this file except in compliance with the
  233.17 +License. You can obtain a copy of the License at
  233.18 +http://www.netbeans.org/cddl-gplv2.html
  233.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  233.20 +specific language governing permissions and limitations under the
  233.21 +License.  When distributing the software, include this License Header
  233.22 +Notice in each file and include the License file at
  233.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  233.24 +particular file as subject to the "Classpath" exception as provided
  233.25 +by Oracle in the GPL Version 2 section of the License file that
  233.26 +accompanied this code. If applicable, add the following below the
  233.27 +License Header, with the fields enclosed by brackets [] replaced by
  233.28 +your own identifying information:
  233.29 +"Portions Copyrighted [year] [name of copyright owner]"
  233.30 +
  233.31 +Contributor(s):
  233.32 +
  233.33 +The Original Software is NetBeans. The Initial Developer of the Original
  233.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  233.35 +Microsystems, Inc. All Rights Reserved.
  233.36 +
  233.37 +If you wish your version of this file to be governed by only the CDDL
  233.38 +or only the GPL Version 2, indicate your decision by adding
  233.39 +"[Contributor] elects to include this software in this distribution
  233.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  233.41 +single choice of license, a recipient has the option to distribute
  233.42 +your version of this file under either the CDDL, the GPL Version 2 or
  233.43 +to extend the choice of license to its licensees as provided above.
  233.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  233.45 +Version 2 license, then the option applies only if the new code is
  233.46 +made subject to such option by the copyright holder.
  233.47 +-->
  233.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  233.49  <!-- for some information on what you could do (e.g. targets to override). -->
  233.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   234.1 --- a/remoting/ide/local/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   234.2 +++ b/remoting/ide/local/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   234.3 @@ -1,5 +1,48 @@
   234.4  <?xml version="1.0" encoding="UTF-8"?>
   234.5  <!--
   234.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   234.7 +
   234.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   234.9 +
  234.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  234.11 +Other names may be trademarks of their respective owners.
  234.12 +
  234.13 +The contents of this file are subject to the terms of either the GNU
  234.14 +General Public License Version 2 only ("GPL") or the Common
  234.15 +Development and Distribution License("CDDL") (collectively, the
  234.16 +"License"). You may not use this file except in compliance with the
  234.17 +License. You can obtain a copy of the License at
  234.18 +http://www.netbeans.org/cddl-gplv2.html
  234.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  234.20 +specific language governing permissions and limitations under the
  234.21 +License.  When distributing the software, include this License Header
  234.22 +Notice in each file and include the License file at
  234.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  234.24 +particular file as subject to the "Classpath" exception as provided
  234.25 +by Oracle in the GPL Version 2 section of the License file that
  234.26 +accompanied this code. If applicable, add the following below the
  234.27 +License Header, with the fields enclosed by brackets [] replaced by
  234.28 +your own identifying information:
  234.29 +"Portions Copyrighted [year] [name of copyright owner]"
  234.30 +
  234.31 +Contributor(s):
  234.32 +
  234.33 +The Original Software is NetBeans. The Initial Developer of the Original
  234.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  234.35 +Microsystems, Inc. All Rights Reserved.
  234.36 +
  234.37 +If you wish your version of this file to be governed by only the CDDL
  234.38 +or only the GPL Version 2, indicate your decision by adding
  234.39 +"[Contributor] elects to include this software in this distribution
  234.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  234.41 +single choice of license, a recipient has the option to distribute
  234.42 +your version of this file under either the CDDL, the GPL Version 2 or
  234.43 +to extend the choice of license to its licensees as provided above.
  234.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  234.45 +Version 2 license, then the option applies only if the new code is
  234.46 +made subject to such option by the copyright holder.
  234.47 +-->
  234.48 +<!--
  234.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  234.50  ***         EDIT ../build.xml INSTEAD         ***
  234.51  -->
   235.1 --- a/remoting/ide/local/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   235.2 +++ b/remoting/ide/local/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   235.3 @@ -1,3 +1,44 @@
   235.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   235.5 +#
   235.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   235.7 +#
   235.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   235.9 +# Other names may be trademarks of their respective owners.
  235.10 +#
  235.11 +# The contents of this file are subject to the terms of either the GNU
  235.12 +# General Public License Version 2 only ("GPL") or the Common
  235.13 +# Development and Distribution License("CDDL") (collectively, the
  235.14 +# "License"). You may not use this file except in compliance with the
  235.15 +# License. You can obtain a copy of the License at
  235.16 +# http://www.netbeans.org/cddl-gplv2.html
  235.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  235.18 +# specific language governing permissions and limitations under the
  235.19 +# License.  When distributing the software, include this License Header
  235.20 +# Notice in each file and include the License file at
  235.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  235.22 +# particular file as subject to the "Classpath" exception as provided
  235.23 +# by Oracle in the GPL Version 2 section of the License file that
  235.24 +# accompanied this code. If applicable, add the following below the
  235.25 +# License Header, with the fields enclosed by brackets [] replaced by
  235.26 +# your own identifying information:
  235.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  235.28 +#
  235.29 +# Contributor(s):
  235.30 +#
  235.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  235.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  235.33 +# Microsystems, Inc. All Rights Reserved.
  235.34 +#
  235.35 +# If you wish your version of this file to be governed by only the CDDL
  235.36 +# or only the GPL Version 2, indicate your decision by adding
  235.37 +# "[Contributor] elects to include this software in this distribution
  235.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  235.39 +# single choice of license, a recipient has the option to distribute
  235.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  235.41 +# to extend the choice of license to its licensees as provided above.
  235.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  235.43 +# Version 2 license, then the option applies only if the new code is
  235.44 +# made subject to such option by the copyright holder.
  235.45  build.xml.data.CRC32=c99d6905
  235.46  build.xml.script.CRC32=cee246cf
  235.47  build.xml.stylesheet.CRC32=a56c6a5b@2.49
   236.1 --- a/remoting/ide/local/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   236.2 +++ b/remoting/ide/local/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   236.3 @@ -1,2 +1,43 @@
   236.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   236.5 +#
   236.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   236.7 +#
   236.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   236.9 +# Other names may be trademarks of their respective owners.
  236.10 +#
  236.11 +# The contents of this file are subject to the terms of either the GNU
  236.12 +# General Public License Version 2 only ("GPL") or the Common
  236.13 +# Development and Distribution License("CDDL") (collectively, the
  236.14 +# "License"). You may not use this file except in compliance with the
  236.15 +# License. You can obtain a copy of the License at
  236.16 +# http://www.netbeans.org/cddl-gplv2.html
  236.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  236.18 +# specific language governing permissions and limitations under the
  236.19 +# License.  When distributing the software, include this License Header
  236.20 +# Notice in each file and include the License file at
  236.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  236.22 +# particular file as subject to the "Classpath" exception as provided
  236.23 +# by Oracle in the GPL Version 2 section of the License file that
  236.24 +# accompanied this code. If applicable, add the following below the
  236.25 +# License Header, with the fields enclosed by brackets [] replaced by
  236.26 +# your own identifying information:
  236.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  236.28 +#
  236.29 +# Contributor(s):
  236.30 +#
  236.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  236.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  236.33 +# Microsystems, Inc. All Rights Reserved.
  236.34 +#
  236.35 +# If you wish your version of this file to be governed by only the CDDL
  236.36 +# or only the GPL Version 2, indicate your decision by adding
  236.37 +# "[Contributor] elects to include this software in this distribution
  236.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  236.39 +# single choice of license, a recipient has the option to distribute
  236.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  236.41 +# to extend the choice of license to its licensees as provided above.
  236.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  236.43 +# Version 2 license, then the option applies only if the new code is
  236.44 +# made subject to such option by the copyright holder.
  236.45  javac.source=1.6
  236.46  javac.compilerargs=-Xlint -Xlint:-serial
   237.1 --- a/remoting/ide/local/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   237.2 +++ b/remoting/ide/local/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   237.3 @@ -1,4 +1,47 @@
   237.4  <?xml version="1.0" encoding="UTF-8"?>
   237.5 +<!--
   237.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   237.7 +
   237.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   237.9 +
  237.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  237.11 +Other names may be trademarks of their respective owners.
  237.12 +
  237.13 +The contents of this file are subject to the terms of either the GNU
  237.14 +General Public License Version 2 only ("GPL") or the Common
  237.15 +Development and Distribution License("CDDL") (collectively, the
  237.16 +"License"). You may not use this file except in compliance with the
  237.17 +License. You can obtain a copy of the License at
  237.18 +http://www.netbeans.org/cddl-gplv2.html
  237.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  237.20 +specific language governing permissions and limitations under the
  237.21 +License.  When distributing the software, include this License Header
  237.22 +Notice in each file and include the License file at
  237.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  237.24 +particular file as subject to the "Classpath" exception as provided
  237.25 +by Oracle in the GPL Version 2 section of the License file that
  237.26 +accompanied this code. If applicable, add the following below the
  237.27 +License Header, with the fields enclosed by brackets [] replaced by
  237.28 +your own identifying information:
  237.29 +"Portions Copyrighted [year] [name of copyright owner]"
  237.30 +
  237.31 +Contributor(s):
  237.32 +
  237.33 +The Original Software is NetBeans. The Initial Developer of the Original
  237.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  237.35 +Microsystems, Inc. All Rights Reserved.
  237.36 +
  237.37 +If you wish your version of this file to be governed by only the CDDL
  237.38 +or only the GPL Version 2, indicate your decision by adding
  237.39 +"[Contributor] elects to include this software in this distribution
  237.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  237.41 +single choice of license, a recipient has the option to distribute
  237.42 +your version of this file under either the CDDL, the GPL Version 2 or
  237.43 +to extend the choice of license to its licensees as provided above.
  237.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  237.45 +Version 2 license, then the option applies only if the new code is
  237.46 +made subject to such option by the copyright holder.
  237.47 +-->
  237.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  237.49      <type>org.netbeans.modules.apisupport.project</type>
  237.50      <configuration>
   238.1 --- a/remoting/ide/local/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   238.2 +++ b/remoting/ide/local/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
   238.3 @@ -1,1 +1,42 @@
   238.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   238.5 +#
   238.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   238.7 +#
   238.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   238.9 +# Other names may be trademarks of their respective owners.
  238.10 +#
  238.11 +# The contents of this file are subject to the terms of either the GNU
  238.12 +# General Public License Version 2 only ("GPL") or the Common
  238.13 +# Development and Distribution License("CDDL") (collectively, the
  238.14 +# "License"). You may not use this file except in compliance with the
  238.15 +# License. You can obtain a copy of the License at
  238.16 +# http://www.netbeans.org/cddl-gplv2.html
  238.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  238.18 +# specific language governing permissions and limitations under the
  238.19 +# License.  When distributing the software, include this License Header
  238.20 +# Notice in each file and include the License file at
  238.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  238.22 +# particular file as subject to the "Classpath" exception as provided
  238.23 +# by Oracle in the GPL Version 2 section of the License file that
  238.24 +# accompanied this code. If applicable, add the following below the
  238.25 +# License Header, with the fields enclosed by brackets [] replaced by
  238.26 +# your own identifying information:
  238.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  238.28 +#
  238.29 +# Contributor(s):
  238.30 +#
  238.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  238.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  238.33 +# Microsystems, Inc. All Rights Reserved.
  238.34 +#
  238.35 +# If you wish your version of this file to be governed by only the CDDL
  238.36 +# or only the GPL Version 2, indicate your decision by adding
  238.37 +# "[Contributor] elects to include this software in this distribution
  238.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  238.39 +# single choice of license, a recipient has the option to distribute
  238.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  238.41 +# to extend the choice of license to its licensees as provided above.
  238.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  238.43 +# Version 2 license, then the option applies only if the new code is
  238.44 +# made subject to such option by the copyright holder.
  238.45  suite.dir=${basedir}/..
   239.1 --- a/remoting/ide/local/src/org/netbeans/modules/jackpot30/remoting/local/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   239.2 +++ b/remoting/ide/local/src/org/netbeans/modules/jackpot30/remoting/local/Bundle.properties	Mon Feb 27 22:40:44 2017 +0100
   239.3 @@ -1,1 +1,42 @@
   239.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   239.5 +#
   239.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   239.7 +#
   239.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   239.9 +# Other names may be trademarks of their respective owners.
  239.10 +#
  239.11 +# The contents of this file are subject to the terms of either the GNU
  239.12 +# General Public License Version 2 only ("GPL") or the Common
  239.13 +# Development and Distribution License("CDDL") (collectively, the
  239.14 +# "License"). You may not use this file except in compliance with the
  239.15 +# License. You can obtain a copy of the License at
  239.16 +# http://www.netbeans.org/cddl-gplv2.html
  239.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  239.18 +# specific language governing permissions and limitations under the
  239.19 +# License.  When distributing the software, include this License Header
  239.20 +# Notice in each file and include the License file at
  239.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  239.22 +# particular file as subject to the "Classpath" exception as provided
  239.23 +# by Oracle in the GPL Version 2 section of the License file that
  239.24 +# accompanied this code. If applicable, add the following below the
  239.25 +# License Header, with the fields enclosed by brackets [] replaced by
  239.26 +# your own identifying information:
  239.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  239.28 +#
  239.29 +# Contributor(s):
  239.30 +#
  239.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  239.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  239.33 +# Microsystems, Inc. All Rights Reserved.
  239.34 +#
  239.35 +# If you wish your version of this file to be governed by only the CDDL
  239.36 +# or only the GPL Version 2, indicate your decision by adding
  239.37 +# "[Contributor] elects to include this software in this distribution
  239.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  239.39 +# single choice of license, a recipient has the option to distribute
  239.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  239.41 +# to extend the choice of license to its licensees as provided above.
  239.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  239.43 +# Version 2 license, then the option applies only if the new code is
  239.44 +# made subject to such option by the copyright holder.
  239.45  OpenIDE-Module-Name=Jackpot 3.0 Remoting - Local Server
   240.1 --- a/remoting/ide/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   240.2 +++ b/remoting/ide/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   240.3 @@ -1,5 +1,48 @@
   240.4  <?xml version="1.0" encoding="UTF-8"?>
   240.5  <!--
   240.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   240.7 +
   240.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   240.9 +
  240.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  240.11 +Other names may be trademarks of their respective owners.
  240.12 +
  240.13 +The contents of this file are subject to the terms of either the GNU
  240.14 +General Public License Version 2 only ("GPL") or the Common
  240.15 +Development and Distribution License("CDDL") (collectively, the
  240.16 +"License"). You may not use this file except in compliance with the
  240.17 +License. You can obtain a copy of the License at
  240.18 +http://www.netbeans.org/cddl-gplv2.html
  240.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  240.20 +specific language governing permissions and limitations under the
  240.21 +License.  When distributing the software, include this License Header
  240.22 +Notice in each file and include the License file at
  240.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  240.24 +particular file as subject to the "Classpath" exception as provided
  240.25 +by Oracle in the GPL Version 2 section of the License file that
  240.26 +accompanied this code. If applicable, add the following below the
  240.27 +License Header, with the fields enclosed by brackets [] replaced by
  240.28 +your own identifying information:
  240.29 +"Portions Copyrighted [year] [name of copyright owner]"
  240.30 +
  240.31 +Contributor(s):
  240.32 +
  240.33 +The Original Software is NetBeans. The Initial Developer of the Original
  240.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  240.35 +Microsystems, Inc. All Rights Reserved.
  240.36 +
  240.37 +If you wish your version of this file to be governed by only the CDDL
  240.38 +or only the GPL Version 2, indicate your decision by adding
  240.39 +"[Contributor] elects to include this software in this distribution
  240.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  240.41 +single choice of license, a recipient has the option to distribute
  240.42 +your version of this file under either the CDDL, the GPL Version 2 or
  240.43 +to extend the choice of license to its licensees as provided above.
  240.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  240.45 +Version 2 license, then the option applies only if the new code is
  240.46 +made subject to such option by the copyright holder.
  240.47 +-->
  240.48 +<!--
  240.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  240.50  ***         EDIT ../build.xml INSTEAD         ***
  240.51  -->
   241.1 --- a/remoting/ide/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   241.2 +++ b/remoting/ide/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   241.3 @@ -1,3 +1,44 @@
   241.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   241.5 +#
   241.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   241.7 +#
   241.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   241.9 +# Other names may be trademarks of their respective owners.
  241.10 +#
  241.11 +# The contents of this file are subject to the terms of either the GNU
  241.12 +# General Public License Version 2 only ("GPL") or the Common
  241.13 +# Development and Distribution License("CDDL") (collectively, the
  241.14 +# "License"). You may not use this file except in compliance with the
  241.15 +# License. You can obtain a copy of the License at
  241.16 +# http://www.netbeans.org/cddl-gplv2.html
  241.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  241.18 +# specific language governing permissions and limitations under the
  241.19 +# License.  When distributing the software, include this License Header
  241.20 +# Notice in each file and include the License file at
  241.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  241.22 +# particular file as subject to the "Classpath" exception as provided
  241.23 +# by Oracle in the GPL Version 2 section of the License file that
  241.24 +# accompanied this code. If applicable, add the following below the
  241.25 +# License Header, with the fields enclosed by brackets [] replaced by
  241.26 +# your own identifying information:
  241.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  241.28 +#
  241.29 +# Contributor(s):
  241.30 +#
  241.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  241.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  241.33 +# Microsystems, Inc. All Rights Reserved.
  241.34 +#
  241.35 +# If you wish your version of this file to be governed by only the CDDL
  241.36 +# or only the GPL Version 2, indicate your decision by adding
  241.37 +# "[Contributor] elects to include this software in this distribution
  241.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  241.39 +# single choice of license, a recipient has the option to distribute
  241.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  241.41 +# to extend the choice of license to its licensees as provided above.
  241.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  241.43 +# Version 2 license, then the option applies only if the new code is
  241.44 +# made subject to such option by the copyright holder.
  241.45  build.xml.data.CRC32=891734f5
  241.46  build.xml.script.CRC32=82b74f72
  241.47  build.xml.stylesheet.CRC32=eaf9f76a@1.47
   242.1 --- a/remoting/ide/nbproject/platform.properties	Mon Dec 19 11:37:36 2016 +0100
   242.2 +++ b/remoting/ide/nbproject/platform.properties	Mon Feb 27 22:40:44 2017 +0100
   242.3 @@ -1,3 +1,44 @@
   242.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   242.5 +#
   242.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   242.7 +#
   242.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   242.9 +# Other names may be trademarks of their respective owners.
  242.10 +#
  242.11 +# The contents of this file are subject to the terms of either the GNU
  242.12 +# General Public License Version 2 only ("GPL") or the Common
  242.13 +# Development and Distribution License("CDDL") (collectively, the
  242.14 +# "License"). You may not use this file except in compliance with the
  242.15 +# License. You can obtain a copy of the License at
  242.16 +# http://www.netbeans.org/cddl-gplv2.html
  242.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  242.18 +# specific language governing permissions and limitations under the
  242.19 +# License.  When distributing the software, include this License Header
  242.20 +# Notice in each file and include the License file at
  242.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  242.22 +# particular file as subject to the "Classpath" exception as provided
  242.23 +# by Oracle in the GPL Version 2 section of the License file that
  242.24 +# accompanied this code. If applicable, add the following below the
  242.25 +# License Header, with the fields enclosed by brackets [] replaced by
  242.26 +# your own identifying information:
  242.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  242.28 +#
  242.29 +# Contributor(s):
  242.30 +#
  242.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  242.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  242.33 +# Microsystems, Inc. All Rights Reserved.
  242.34 +#
  242.35 +# If you wish your version of this file to be governed by only the CDDL
  242.36 +# or only the GPL Version 2, indicate your decision by adding
  242.37 +# "[Contributor] elects to include this software in this distribution
  242.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  242.39 +# single choice of license, a recipient has the option to distribute
  242.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  242.41 +# to extend the choice of license to its licensees as provided above.
  242.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  242.43 +# Version 2 license, then the option applies only if the new code is
  242.44 +# made subject to such option by the copyright holder.
  242.45  cluster.path=\
  242.46      ${nbplatform.active.dir}/apisupport:\
  242.47      ${nbplatform.active.dir}/cnd:\
   243.1 --- a/remoting/ide/nbproject/platform.xml	Mon Dec 19 11:37:36 2016 +0100
   243.2 +++ b/remoting/ide/nbproject/platform.xml	Mon Feb 27 22:40:44 2017 +0100
   243.3 @@ -1,4 +1,47 @@
   243.4  <?xml version="1.0" encoding="UTF-8"?>
   243.5 +<!--
   243.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   243.7 +
   243.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   243.9 +
  243.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  243.11 +Other names may be trademarks of their respective owners.
  243.12 +
  243.13 +The contents of this file are subject to the terms of either the GNU
  243.14 +General Public License Version 2 only ("GPL") or the Common
  243.15 +Development and Distribution License("CDDL") (collectively, the
  243.16 +"License"). You may not use this file except in compliance with the
  243.17 +License. You can obtain a copy of the License at
  243.18 +http://www.netbeans.org/cddl-gplv2.html
  243.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  243.20 +specific language governing permissions and limitations under the
  243.21 +License.  When distributing the software, include this License Header
  243.22 +Notice in each file and include the License file at
  243.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  243.24 +particular file as subject to the "Classpath" exception as provided
  243.25 +by Oracle in the GPL Version 2 section of the License file that
  243.26 +accompanied this code. If applicable, add the following below the
  243.27 +License Header, with the fields enclosed by brackets [] replaced by
  243.28 +your own identifying information:
  243.29 +"Portions Copyrighted [year] [name of copyright owner]"
  243.30 +
  243.31 +Contributor(s):
  243.32 +
  243.33 +The Original Software is NetBeans. The Initial Developer of the Original
  243.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  243.35 +Microsystems, Inc. All Rights Reserved.
  243.36 +
  243.37 +If you wish your version of this file to be governed by only the CDDL
  243.38 +or only the GPL Version 2, indicate your decision by adding
  243.39 +"[Contributor] elects to include this software in this distribution
  243.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  243.41 +single choice of license, a recipient has the option to distribute
  243.42 +your version of this file under either the CDDL, the GPL Version 2 or
  243.43 +to extend the choice of license to its licensees as provided above.
  243.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  243.45 +Version 2 license, then the option applies only if the new code is
  243.46 +made subject to such option by the copyright holder.
  243.47 +-->
  243.48  <project name="platform" default="download" basedir="..">
  243.49      <condition property="download.required">
  243.50          <and>
   244.1 --- a/remoting/ide/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   244.2 +++ b/remoting/ide/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   244.3 @@ -1,3 +1,44 @@
   244.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   244.5 +#
   244.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   244.7 +#
   244.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   244.9 +# Other names may be trademarks of their respective owners.
  244.10 +#
  244.11 +# The contents of this file are subject to the terms of either the GNU
  244.12 +# General Public License Version 2 only ("GPL") or the Common
  244.13 +# Development and Distribution License("CDDL") (collectively, the
  244.14 +# "License"). You may not use this file except in compliance with the
  244.15 +# License. You can obtain a copy of the License at
  244.16 +# http://www.netbeans.org/cddl-gplv2.html
  244.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  244.18 +# specific language governing permissions and limitations under the
  244.19 +# License.  When distributing the software, include this License Header
  244.20 +# Notice in each file and include the License file at
  244.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  244.22 +# particular file as subject to the "Classpath" exception as provided
  244.23 +# by Oracle in the GPL Version 2 section of the License file that
  244.24 +# accompanied this code. If applicable, add the following below the
  244.25 +# License Header, with the fields enclosed by brackets [] replaced by
  244.26 +# your own identifying information:
  244.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  244.28 +#
  244.29 +# Contributor(s):
  244.30 +#
  244.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  244.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  244.33 +# Microsystems, Inc. All Rights Reserved.
  244.34 +#
  244.35 +# If you wish your version of this file to be governed by only the CDDL
  244.36 +# or only the GPL Version 2, indicate your decision by adding
  244.37 +# "[Contributor] elects to include this software in this distribution
  244.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  244.39 +# single choice of license, a recipient has the option to distribute
  244.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  244.41 +# to extend the choice of license to its licensees as provided above.
  244.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  244.43 +# Version 2 license, then the option applies only if the new code is
  244.44 +# made subject to such option by the copyright holder.
  244.45  modules=\
  244.46      ${project.org.netbeans.modules.jackpot30.jumpto}:\
  244.47      ${project.org.netbeans.modules.jackpot30.remoting.api}:\
   245.1 --- a/remoting/ide/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   245.2 +++ b/remoting/ide/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   245.3 @@ -1,4 +1,47 @@
   245.4  <?xml version="1.0" encoding="UTF-8"?>
   245.5 +<!--
   245.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   245.7 +
   245.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   245.9 +
  245.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  245.11 +Other names may be trademarks of their respective owners.
  245.12 +
  245.13 +The contents of this file are subject to the terms of either the GNU
  245.14 +General Public License Version 2 only ("GPL") or the Common
  245.15 +Development and Distribution License("CDDL") (collectively, the
  245.16 +"License"). You may not use this file except in compliance with the
  245.17 +License. You can obtain a copy of the License at
  245.18 +http://www.netbeans.org/cddl-gplv2.html
  245.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  245.20 +specific language governing permissions and limitations under the
  245.21 +License.  When distributing the software, include this License Header
  245.22 +Notice in each file and include the License file at
  245.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  245.24 +particular file as subject to the "Classpath" exception as provided
  245.25 +by Oracle in the GPL Version 2 section of the License file that
  245.26 +accompanied this code. If applicable, add the following below the
  245.27 +License Header, with the fields enclosed by brackets [] replaced by
  245.28 +your own identifying information:
  245.29 +"Portions Copyrighted [year] [name of copyright owner]"
  245.30 +
  245.31 +Contributor(s):
  245.32 +
  245.33 +The Original Software is NetBeans. The Initial Developer of the Original
  245.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  245.35 +Microsystems, Inc. All Rights Reserved.
  245.36 +
  245.37 +If you wish your version of this file to be governed by only the CDDL
  245.38 +or only the GPL Version 2, indicate your decision by adding
  245.39 +"[Contributor] elects to include this software in this distribution
  245.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  245.41 +single choice of license, a recipient has the option to distribute
  245.42 +your version of this file under either the CDDL, the GPL Version 2 or
  245.43 +to extend the choice of license to its licensees as provided above.
  245.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  245.45 +Version 2 license, then the option applies only if the new code is
  245.46 +made subject to such option by the copyright holder.
  245.47 +-->
  245.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  245.49      <type>org.netbeans.modules.apisupport.project.suite</type>
  245.50      <configuration>
   246.1 --- a/remoting/ide/usages/build.xml	Mon Dec 19 11:37:36 2016 +0100
   246.2 +++ b/remoting/ide/usages/build.xml	Mon Feb 27 22:40:44 2017 +0100
   246.3 @@ -1,4 +1,47 @@
   246.4  <?xml version="1.0" encoding="UTF-8"?>
   246.5 +<!--
   246.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   246.7 +
   246.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   246.9 +
  246.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  246.11 +Other names may be trademarks of their respective owners.
  246.12 +
  246.13 +The contents of this file are subject to the terms of either the GNU
  246.14 +General Public License Version 2 only ("GPL") or the Common
  246.15 +Development and Distribution License("CDDL") (collectively, the
  246.16 +"License"). You may not use this file except in compliance with the
  246.17 +License. You can obtain a copy of the License at
  246.18 +http://www.netbeans.org/cddl-gplv2.html
  246.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  246.20 +specific language governing permissions and limitations under the
  246.21 +License.  When distributing the software, include this License Header
  246.22 +Notice in each file and include the License file at
  246.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  246.24 +particular file as subject to the "Classpath" exception as provided
  246.25 +by Oracle in the GPL Version 2 section of the License file that
  246.26 +accompanied this code. If applicable, add the following below the
  246.27 +License Header, with the fields enclosed by brackets [] replaced by
  246.28 +your own identifying information:
  246.29 +"Portions Copyrighted [year] [name of copyright owner]"
  246.30 +
  246.31 +Contributor(s):
  246.32 +
  246.33 +The Original Software is NetBeans. The Initial Developer of the Original
  246.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  246.35 +Microsystems, Inc. All Rights Reserved.
  246.36 +
  246.37 +If you wish your version of this file to be governed by only the CDDL
  246.38 +or only the GPL Version 2, indicate your decision by adding
  246.39 +"[Contributor] elects to include this software in this distribution
  246.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  246.41 +single choice of license, a recipient has the option to distribute
  246.42 +your version of this file under either the CDDL, the GPL Version 2 or
  246.43 +to extend the choice of license to its licensees as provided above.
  246.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  246.45 +Version 2 license, then the option applies only if the new code is
  246.46 +made subject to such option by the copyright holder.
  246.47 +-->
  246.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  246.49  <!-- for some information on what you could do (e.g. targets to override). -->
  246.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   247.1 --- a/remoting/ide/usages/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   247.2 +++ b/remoting/ide/usages/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   247.3 @@ -1,5 +1,48 @@
   247.4  <?xml version="1.0" encoding="UTF-8"?>
   247.5  <!--
   247.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   247.7 +
   247.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   247.9 +
  247.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  247.11 +Other names may be trademarks of their respective owners.
  247.12 +
  247.13 +The contents of this file are subject to the terms of either the GNU
  247.14 +General Public License Version 2 only ("GPL") or the Common
  247.15 +Development and Distribution License("CDDL") (collectively, the
  247.16 +"License"). You may not use this file except in compliance with the
  247.17 +License. You can obtain a copy of the License at
  247.18 +http://www.netbeans.org/cddl-gplv2.html
  247.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  247.20 +specific language governing permissions and limitations under the
  247.21 +License.  When distributing the software, include this License Header
  247.22 +Notice in each file and include the License file at
  247.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  247.24 +particular file as subject to the "Classpath" exception as provided
  247.25 +by Oracle in the GPL Version 2 section of the License file that
  247.26 +accompanied this code. If applicable, add the following below the
  247.27 +License Header, with the fields enclosed by brackets [] replaced by
  247.28 +your own identifying information:
  247.29 +"Portions Copyrighted [year] [name of copyright owner]"
  247.30 +
  247.31 +Contributor(s):
  247.32 +
  247.33 +The Original Software is NetBeans. The Initial Developer of the Original
  247.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  247.35 +Microsystems, Inc. All Rights Reserved.
  247.36 +
  247.37 +If you wish your version of this file to be governed by only the CDDL
  247.38 +or only the GPL Version 2, indicate your decision by adding
  247.39 +"[Contributor] elects to include this software in this distribution
  247.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  247.41 +single choice of license, a recipient has the option to distribute
  247.42 +your version of this file under either the CDDL, the GPL Version 2 or
  247.43 +to extend the choice of license to its licensees as provided above.
  247.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  247.45 +Version 2 license, then the option applies only if the new code is
  247.46 +made subject to such option by the copyright holder.
  247.47 +-->
  247.48 +<!--
  247.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  247.50  ***         EDIT ../build.xml INSTEAD         ***
  247.51  -->
   248.1 --- a/remoting/ide/usages/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   248.2 +++ b/remoting/ide/usages/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   248.3 @@ -1,3 +1,44 @@
   248.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   248.5 +#
   248.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   248.7 +#
   248.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   248.9 +# Other names may be trademarks of their respective owners.
  248.10 +#
  248.11 +# The contents of this file are subject to the terms of either the GNU
  248.12 +# General Public License Version 2 only ("GPL") or the Common
  248.13 +# Development and Distribution License("CDDL") (collectively, the
  248.14 +# "License"). You may not use this file except in compliance with the
  248.15 +# License. You can obtain a copy of the License at
  248.16 +# http://www.netbeans.org/cddl-gplv2.html
  248.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  248.18 +# specific language governing permissions and limitations under the
  248.19 +# License.  When distributing the software, include this License Header
  248.20 +# Notice in each file and include the License file at
  248.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  248.22 +# particular file as subject to the "Classpath" exception as provided
  248.23 +# by Oracle in the GPL Version 2 section of the License file that
  248.24 +# accompanied this code. If applicable, add the following below the
  248.25 +# License Header, with the fields enclosed by brackets [] replaced by
  248.26 +# your own identifying information:
  248.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  248.28 +#
  248.29 +# Contributor(s):
  248.30 +#
  248.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  248.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  248.33 +# Microsystems, Inc. All Rights Reserved.
  248.34 +#
  248.35 +# If you wish your version of this file to be governed by only the CDDL
  248.36 +# or only the GPL Version 2, indicate your decision by adding
  248.37 +# "[Contributor] elects to include this software in this distribution
  248.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  248.39 +# single choice of license, a recipient has the option to distribute
  248.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  248.41 +# to extend the choice of license to its licensees as provided above.
  248.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  248.43 +# Version 2 license, then the option applies only if the new code is
  248.44 +# made subject to such option by the copyright holder.
  248.45  build.xml.data.CRC32=e216ee19
  248.46  build.xml.script.CRC32=58a6b47a
  248.47  build.xml.stylesheet.CRC32=a56c6a5b@2.49
   249.1 --- a/remoting/ide/usages/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   249.2 +++ b/remoting/ide/usages/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   249.3 @@ -1,2 +1,43 @@
   249.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   249.5 +#
   249.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   249.7 +#
   249.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   249.9 +# Other names may be trademarks of their respective owners.
  249.10 +#
  249.11 +# The contents of this file are subject to the terms of either the GNU
  249.12 +# General Public License Version 2 only ("GPL") or the Common
  249.13 +# Development and Distribution License("CDDL") (collectively, the
  249.14 +# "License"). You may not use this file except in compliance with the
  249.15 +# License. You can obtain a copy of the License at
  249.16 +# http://www.netbeans.org/cddl-gplv2.html
  249.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  249.18 +# specific language governing permissions and limitations under the
  249.19 +# License.  When distributing the software, include this License Header
  249.20 +# Notice in each file and include the License file at
  249.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  249.22 +# particular file as subject to the "Classpath" exception as provided
  249.23 +# by Oracle in the GPL Version 2 section of the License file that
  249.24 +# accompanied this code. If applicable, add the following below the
  249.25 +# License Header, with the fields enclosed by brackets [] replaced by
  249.26 +# your own identifying information:
  249.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  249.28 +#
  249.29 +# Contributor(s):
  249.30 +#
  249.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  249.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  249.33 +# Microsystems, Inc. All Rights Reserved.
  249.34 +#
  249.35 +# If you wish your version of this file to be governed by only the CDDL
  249.36 +# or only the GPL Version 2, indicate your decision by adding
  249.37 +# "[Contributor] elects to include this software in this distribution
  249.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  249.39 +# single choice of license, a recipient has the option to distribute
  249.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  249.41 +# to extend the choice of license to its licensees as provided above.
  249.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  249.43 +# Version 2 license, then the option applies only if the new code is
  249.44 +# made subject to such option by the copyright holder.
  249.45  javac.source=1.6
  249.46  javac.compilerargs=-Xlint -Xlint:-serial
   250.1 --- a/remoting/ide/usages/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   250.2 +++ b/remoting/ide/usages/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   250.3 @@ -1,4 +1,47 @@
   250.4  <?xml version="1.0" encoding="UTF-8"?>
   250.5 +<!--
   250.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   250.7 +
   250.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   250.9 +
  250.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  250.11 +Other names may be trademarks of their respective owners.
  250.12 +
  250.13 +The contents of this file are subject to the terms of either the GNU
  250.14 +General Public License Version 2 only ("GPL") or the Common
  250.15 +Development and Distribution License("CDDL") (collectively, the
  250.16 +"License"). You may not use this file except in compliance with the
  250.17 +License. You can obtain a copy of the License at
  250.18 +http://www.netbeans.org/cddl-gplv2.html
  250.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  250.20 +specific language governing permissions and limitations under the
  250.21 +License.  When distributing the software, include this License Header
  250.22 +Notice in each file and include the License file at
  250.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  250.24 +particular file as subject to the "Classpath" exception as provided
  250.25 +by Oracle in the GPL Version 2 section of the License file that
  250.26 +accompanied this code. If applicable, add the following below the
  250.27 +License Header, with the fields enclosed by brackets [] replaced by
  250.28 +your own identifying information:
  250.29 +"Portions Copyrighted [year] [name of copyright owner]"
  250.30 +
  250.31 +Contributor(s):
  250.32 +
  250.33 +The Original Software is NetBeans. The Initial Developer of the Original
  250.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  250.35 +Microsystems, Inc. All Rights Reserved.
  250.36 +
  250.37 +If you wish your version of this file to be governed by only the CDDL
  250.38 +or only the GPL Version 2, indicate your decision by adding
  250.39 +"[Contributor] elects to include this software in this distribution
  250.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  250.41 +single choice of license, a recipient has the option to distribute
  250.42 +your version of this file under either the CDDL, the GPL Version 2 or
  250.43 +to extend the choice of license to its licensees as provided above.
  250.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  250.45 +Version 2 license, then the option applies only if the new code is
  250.46 +made subject to such option by the copyright holder.
  250.47 +-->
  250.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  250.49      <type>org.netbeans.modules.apisupport.project</type>
  250.50      <configuration>
   251.1 --- a/remoting/ide/usages/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   251.2 +++ b/remoting/ide/usages/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
   251.3 @@ -1,1 +1,42 @@
   251.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   251.5 +#
   251.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   251.7 +#
   251.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   251.9 +# Other names may be trademarks of their respective owners.
  251.10 +#
  251.11 +# The contents of this file are subject to the terms of either the GNU
  251.12 +# General Public License Version 2 only ("GPL") or the Common
  251.13 +# Development and Distribution License("CDDL") (collectively, the
  251.14 +# "License"). You may not use this file except in compliance with the
  251.15 +# License. You can obtain a copy of the License at
  251.16 +# http://www.netbeans.org/cddl-gplv2.html
  251.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  251.18 +# specific language governing permissions and limitations under the
  251.19 +# License.  When distributing the software, include this License Header
  251.20 +# Notice in each file and include the License file at
  251.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  251.22 +# particular file as subject to the "Classpath" exception as provided
  251.23 +# by Oracle in the GPL Version 2 section of the License file that
  251.24 +# accompanied this code. If applicable, add the following below the
  251.25 +# License Header, with the fields enclosed by brackets [] replaced by
  251.26 +# your own identifying information:
  251.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  251.28 +#
  251.29 +# Contributor(s):
  251.30 +#
  251.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  251.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  251.33 +# Microsystems, Inc. All Rights Reserved.
  251.34 +#
  251.35 +# If you wish your version of this file to be governed by only the CDDL
  251.36 +# or only the GPL Version 2, indicate your decision by adding
  251.37 +# "[Contributor] elects to include this software in this distribution
  251.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  251.39 +# single choice of license, a recipient has the option to distribute
  251.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  251.41 +# to extend the choice of license to its licensees as provided above.
  251.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  251.43 +# Version 2 license, then the option applies only if the new code is
  251.44 +# made subject to such option by the copyright holder.
  251.45  suite.dir=${basedir}/..
   252.1 --- a/remoting/post-build.sh	Mon Dec 19 11:37:36 2016 +0100
   252.2 +++ b/remoting/post-build.sh	Mon Feb 27 22:40:44 2017 +0100
   252.3 @@ -1,4 +1,47 @@
   252.4  #!/bin/bash
   252.5 +
   252.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   252.7 +#
   252.8 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   252.9 +#
  252.10 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  252.11 +# Other names may be trademarks of their respective owners.
  252.12 +#
  252.13 +# The contents of this file are subject to the terms of either the GNU
  252.14 +# General Public License Version 2 only ("GPL") or the Common
  252.15 +# Development and Distribution License("CDDL") (collectively, the
  252.16 +# "License"). You may not use this file except in compliance with the
  252.17 +# License. You can obtain a copy of the License at
  252.18 +# http://www.netbeans.org/cddl-gplv2.html
  252.19 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  252.20 +# specific language governing permissions and limitations under the
  252.21 +# License.  When distributing the software, include this License Header
  252.22 +# Notice in each file and include the License file at
  252.23 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  252.24 +# particular file as subject to the "Classpath" exception as provided
  252.25 +# by Oracle in the GPL Version 2 section of the License file that
  252.26 +# accompanied this code. If applicable, add the following below the
  252.27 +# License Header, with the fields enclosed by brackets [] replaced by
  252.28 +# your own identifying information:
  252.29 +# "Portions Copyrighted [year] [name of copyright owner]"
  252.30 +#
  252.31 +# Contributor(s):
  252.32 +#
  252.33 +# The Original Software is NetBeans. The Initial Developer of the Original
  252.34 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  252.35 +# Microsystems, Inc. All Rights Reserved.
  252.36 +#
  252.37 +# If you wish your version of this file to be governed by only the CDDL
  252.38 +# or only the GPL Version 2, indicate your decision by adding
  252.39 +# "[Contributor] elects to include this software in this distribution
  252.40 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  252.41 +# single choice of license, a recipient has the option to distribute
  252.42 +# your version of this file under either the CDDL, the GPL Version 2 or
  252.43 +# to extend the choice of license to its licensees as provided above.
  252.44 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  252.45 +# Version 2 license, then the option applies only if the new code is
  252.46 +# made subject to such option by the copyright holder.
  252.47 +
  252.48  cp -r ../duplicates/server/indexer/build/cluster/* build/indexing-backend/indexer/indexer
  252.49  cp -r ../duplicates/ide/build/cluster/* build/indexing-backend/indexer/indexer
  252.50  cp -r ../remoting/ide/build/cluster/* build/indexing-backend/indexer/indexer
   253.1 --- a/remoting/server/hudson/pom.xml	Mon Dec 19 11:37:36 2016 +0100
   253.2 +++ b/remoting/server/hudson/pom.xml	Mon Feb 27 22:40:44 2017 +0100
   253.3 @@ -1,3 +1,46 @@
   253.4 +<!--
   253.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   253.6 +
   253.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   253.8 +
   253.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  253.10 +Other names may be trademarks of their respective owners.
  253.11 +
  253.12 +The contents of this file are subject to the terms of either the GNU
  253.13 +General Public License Version 2 only ("GPL") or the Common
  253.14 +Development and Distribution License("CDDL") (collectively, the
  253.15 +"License"). You may not use this file except in compliance with the
  253.16 +License. You can obtain a copy of the License at
  253.17 +http://www.netbeans.org/cddl-gplv2.html
  253.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  253.19 +specific language governing permissions and limitations under the
  253.20 +License.  When distributing the software, include this License Header
  253.21 +Notice in each file and include the License file at
  253.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  253.23 +particular file as subject to the "Classpath" exception as provided
  253.24 +by Oracle in the GPL Version 2 section of the License file that
  253.25 +accompanied this code. If applicable, add the following below the
  253.26 +License Header, with the fields enclosed by brackets [] replaced by
  253.27 +your own identifying information:
  253.28 +"Portions Copyrighted [year] [name of copyright owner]"
  253.29 +
  253.30 +Contributor(s):
  253.31 +
  253.32 +The Original Software is NetBeans. The Initial Developer of the Original
  253.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  253.34 +Microsystems, Inc. All Rights Reserved.
  253.35 +
  253.36 +If you wish your version of this file to be governed by only the CDDL
  253.37 +or only the GPL Version 2, indicate your decision by adding
  253.38 +"[Contributor] elects to include this software in this distribution
  253.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  253.40 +single choice of license, a recipient has the option to distribute
  253.41 +your version of this file under either the CDDL, the GPL Version 2 or
  253.42 +to extend the choice of license to its licensees as provided above.
  253.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
  253.44 +Version 2 license, then the option applies only if the new code is
  253.45 +made subject to such option by the copyright holder.
  253.46 +-->
  253.47  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  253.48    <modelVersion>4.0.0</modelVersion>
  253.49    <name>Jackpot 3.0 Hudson Plugin</name>
   254.1 --- a/remoting/server/hudson/src/main/java/org/netbeans/modules/jackpot30/hudson/InstallIndexingTool.java	Mon Dec 19 11:37:36 2016 +0100
   254.2 +++ b/remoting/server/hudson/src/main/java/org/netbeans/modules/jackpot30/hudson/InstallIndexingTool.java	Mon Feb 27 22:40:44 2017 +0100
   254.3 @@ -49,7 +49,9 @@
   254.4  import hudson.tools.InstallSourceProperty;
   254.5  import hudson.tools.ToolInstallation;
   254.6  import hudson.tools.ToolProperty;
   254.7 +import java.io.ByteArrayInputStream;
   254.8  import java.io.IOException;
   254.9 +import java.io.InputStream;
  254.10  import java.util.Arrays;
  254.11  import org.kohsuke.stapler.DataBoundConstructor;
  254.12  
  254.13 @@ -84,12 +86,21 @@
  254.14  
  254.15      }
  254.16  
  254.17 +    private static final String INSTALLER_DESCRIPTION =
  254.18 +            "{\"list\": [{\"id\": \"main\", \"name\": \"main\", \"url\": \"http://deadlock.netbeans.org/hudson/job/jackpot30/lastSuccessfulBuild/artifact/remoting/build/indexing-backend.zip\"}]}";
  254.19 +
  254.20      //XXX:
  254.21      @Initializer(after=InitMilestone.JOB_LOADED)
  254.22      public static void prepareUpdates() throws IOException, InterruptedException {
  254.23          FilePath update = new FilePath(new FilePath(Hudson.getInstance().getRootPath(), "updates"), "org.netbeans.modules.jackpot30.hudson.InstallIndexingTool");
  254.24  
  254.25 -        update.copyFrom(InstallIndexingTool.class.getResource("org.netbeans.modules.jackpot30.hudson.InstallIndexingTool"));
  254.26 +        InputStream in = new ByteArrayInputStream(INSTALLER_DESCRIPTION.getBytes());
  254.27 +
  254.28 +        try {
  254.29 +            update.copyFrom(in);
  254.30 +        } finally {
  254.31 +            in.close();
  254.32 +        }
  254.33  
  254.34          //preinstall main tool if it does not exist:
  254.35          IndexingTool[] tools = Hudson.getInstance().getDescriptorByType(IndexingTool.DescriptorImpl.class).getInstallations();
   255.1 --- a/remoting/server/hudson/src/main/resources/index.jelly	Mon Dec 19 11:37:36 2016 +0100
   255.2 +++ b/remoting/server/hudson/src/main/resources/index.jelly	Mon Feb 27 22:40:44 2017 +0100
   255.3 @@ -1,7 +1,45 @@
   255.4  <!--
   255.5 -  This view is used to render the plugin list page.
   255.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   255.7  
   255.8 -  Since we don't really have anything dynamic here, let's just use static HTML. 
   255.9 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
  255.10 +
  255.11 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  255.12 +Other names may be trademarks of their respective owners.
  255.13 +
  255.14 +The contents of this file are subject to the terms of either the GNU
  255.15 +General Public License Version 2 only ("GPL") or the Common
  255.16 +Development and Distribution License("CDDL") (collectively, the
  255.17 +"License"). You may not use this file except in compliance with the
  255.18 +License. You can obtain a copy of the License at
  255.19 +http://www.netbeans.org/cddl-gplv2.html
  255.20 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  255.21 +specific language governing permissions and limitations under the
  255.22 +License.  When distributing the software, include this License Header
  255.23 +Notice in each file and include the License file at
  255.24 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  255.25 +particular file as subject to the "Classpath" exception as provided
  255.26 +by Oracle in the GPL Version 2 section of the License file that
  255.27 +accompanied this code. If applicable, add the following below the
  255.28 +License Header, with the fields enclosed by brackets [] replaced by
  255.29 +your own identifying information:
  255.30 +"Portions Copyrighted [year] [name of copyright owner]"
  255.31 +
  255.32 +Contributor(s):
  255.33 +
  255.34 +The Original Software is NetBeans. The Initial Developer of the Original
  255.35 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  255.36 +Microsystems, Inc. All Rights Reserved.
  255.37 +
  255.38 +If you wish your version of this file to be governed by only the CDDL
  255.39 +or only the GPL Version 2, indicate your decision by adding
  255.40 +"[Contributor] elects to include this software in this distribution
  255.41 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  255.42 +single choice of license, a recipient has the option to distribute
  255.43 +your version of this file under either the CDDL, the GPL Version 2 or
  255.44 +to extend the choice of license to its licensees as provided above.
  255.45 +However, if you add GPL Version 2 code and therefore, elected the GPL
  255.46 +Version 2 license, then the option applies only if the new code is
  255.47 +made subject to such option by the copyright holder.
  255.48  -->
  255.49  <div>
  255.50    Jackpot 3.0 Hudson plugin.
   256.1 --- a/remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/BuildWrapperImpl/config.jelly	Mon Dec 19 11:37:36 2016 +0100
   256.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   256.3 @@ -1,79 +0,0 @@
   256.4 -<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
   256.5 -  <!--
   256.6 -    This jelly script is used for per-project configuration.
   256.7 -
   256.8 -    See global.jelly for a general discussion about jelly script.
   256.9 -  -->
  256.10 -
  256.11 -  <!--
  256.12 -    Creates a text field that shows the value of the "name" property.
  256.13 -    When submitted, it will be passed to the corresponding constructor parameter.
  256.14 -  -->
  256.15 -
  256.16 -<!--  <j:forEach var="category" items="${descriptor.getCategories()}" varStatus="loop">
  256.17 -    <f:block>
  256.18 -      <table>
  256.19 -        <f:optionalBlock title="${category}">
  256.20 -          <j:forEach var="hint" items="${descriptor.getHintsInCategory(category)}" varStatus="loop">
  256.21 -            <f:entry description="${descriptor.getHintDescription(hint)}">
  256.22 -              <f:checkbox name="${hint}" checked="${instance.isHintEnabled(hint)}"/>
  256.23 -              <label class="attach-previous">${descriptor.getHintDisplayName(hint)}</label>
  256.24 -            </f:entry>
  256.25 -          </j:forEach>
  256.26 -        </f:optionalBlock>
  256.27 -      </table>
  256.28 -    </f:block>
  256.29 -  </j:forEach>-->
  256.30 -
  256.31 -  <f:block>
  256.32 -    <table>
  256.33 -      <f:optionalBlock name="classpathBasedHintsEnabled" title="Run hints found on classpath" checked="${instance != null ? instance.isClasspathBasedHintsEnabled() : true}">
  256.34 -            <f:entry>
  256.35 -              <f:checkbox field="classpathBasedHintFixesEnabled" checked="${instance != null ? instance.isClasspathBasedHintFixesEnabled() : false}"/>
  256.36 -              <label class="attach-previous">Apply the primary fix</label>
  256.37 -            </f:entry>
  256.38 -      </f:optionalBlock>
  256.39 -    </table>
  256.40 -  </f:block>
  256.41 -  
  256.42 -  <f:block>
  256.43 -    <table>
  256.44 -      <f:optionalBlock name="hardcodedHintsEnabled" title="Run NetBeans hints" checked="${instance != null ? instance.isHardcodedHintsEnabled() : true}">
  256.45 -  <j:forEach var="category" items="${descriptor.getCategories()}" varStatus="loop">
  256.46 -        <f:section title="${descriptor.getCategoryDisplayName(category)}">
  256.47 -          <j:forEach var="hint" items="${descriptor.getHintsInCategory(category)}" varStatus="loop">
  256.48 -            <f:entry>
  256.49 -    <table>
  256.50 -      <f:optionalBlock name="${hint}" title="${descriptor.getHintDisplayName(hint)}" tooltip="${descriptor.getHintDescription(hint)}" checked="${instance != null ? instance.isHintEnabled(hint) : descriptor.isHintEnabledByDefault(hint)}">
  256.51 -<!--              <f:checkbox name="${hint}" checked="${instance != null ? instance.isHintEnabled(hint) : descriptor.isHintEnabledByDefault(hint)}"/>
  256.52 -              <label class="attach-previous" tooltip="${descriptor.getHintDescription(hint)}">${descriptor.getHintDisplayName(hint)}</label>-->
  256.53 -<!--              <f:nested>-->
  256.54 -            <f:entry>
  256.55 -                <f:checkbox name="${hint}.apply" checked="${instance != null ? instance.isHintApplyEnabled(hint) : descriptor.isHintApplyEnabledByDefault(hint)}"/>
  256.56 -                <label class="attach-previous">Apply the primary fix.</label>
  256.57 -            </f:entry>
  256.58 -<!--              </f:nested>-->
  256.59 -      </f:optionalBlock>
  256.60 -    </table>
  256.61 -            </f:entry>
  256.62 -          </j:forEach>
  256.63 -        </f:section>
  256.64 -  </j:forEach>
  256.65 -      </f:optionalBlock>
  256.66 -    </table>
  256.67 -  </f:block>
  256.68 -
  256.69 -  <f:block>
  256.70 -    <table>
  256.71 -        <f:checkbox name="indexingEnabled" checked="${instance != null ? instance.isIndexingEnabled() : true}"/>
  256.72 -        <label class="attach-previous">Run Indexing</label>
  256.73 -    </table>
  256.74 -  </f:block>
  256.75 -<!--  <j:forEach var="d" items="${descriptor.getHints()}" varStatus="loop">
  256.76 -  <f:entry description="${descriptor.getHintDescription(d)}">
  256.77 -    <f:checkbox name="${d}" checked="${instance.isHintEnabled(d)}"/>
  256.78 -    <label class="attach-previous">${descriptor.getHintDisplayName(d)}</label>
  256.79 -  </f:entry>
  256.80 -  </j:forEach>-->
  256.81 -
  256.82 -</j:jelly>
   257.1 --- a/remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/BuildWrapperImpl/help-hardcodedHintsEnabled.html	Mon Dec 19 11:37:36 2016 +0100
   257.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   257.3 @@ -1,3 +0,0 @@
   257.4 -<div>
   257.5 -    Whether the standard NetBeans hints should be run during the build.
   257.6 -</div>
   257.7 \ No newline at end of file
   258.1 --- a/remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/IndexingBuilder/config.jelly	Mon Dec 19 11:37:36 2016 +0100
   258.2 +++ b/remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/IndexingBuilder/config.jelly	Mon Feb 27 22:40:44 2017 +0100
   258.3 @@ -1,3 +1,47 @@
   258.4 +<!--
   258.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   258.6 +
   258.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   258.8 +
   258.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  258.10 +Other names may be trademarks of their respective owners.
  258.11 +
  258.12 +The contents of this file are subject to the terms of either the GNU
  258.13 +General Public License Version 2 only ("GPL") or the Common
  258.14 +Development and Distribution License("CDDL") (collectively, the
  258.15 +"License"). You may not use this file except in compliance with the
  258.16 +License. You can obtain a copy of the License at
  258.17 +http://www.netbeans.org/cddl-gplv2.html
  258.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  258.19 +specific language governing permissions and limitations under the
  258.20 +License.  When distributing the software, include this License Header
  258.21 +Notice in each file and include the License file at
  258.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  258.23 +particular file as subject to the "Classpath" exception as provided
  258.24 +by Oracle in the GPL Version 2 section of the License file that
  258.25 +accompanied this code. If applicable, add the following below the
  258.26 +License Header, with the fields enclosed by brackets [] replaced by
  258.27 +your own identifying information:
  258.28 +"Portions Copyrighted [year] [name of copyright owner]"
  258.29 +
  258.30 +Contributor(s):
  258.31 +
  258.32 +The Original Software is NetBeans. The Initial Developer of the Original
  258.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  258.34 +Microsystems, Inc. All Rights Reserved.
  258.35 +
  258.36 +If you wish your version of this file to be governed by only the CDDL
  258.37 +or only the GPL Version 2, indicate your decision by adding
  258.38 +"[Contributor] elects to include this software in this distribution
  258.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  258.40 +single choice of license, a recipient has the option to distribute
  258.41 +your version of this file under either the CDDL, the GPL Version 2 or
  258.42 +to extend the choice of license to its licensees as provided above.
  258.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
  258.44 +Version 2 license, then the option applies only if the new code is
  258.45 +made subject to such option by the copyright holder.
  258.46 +-->
  258.47 +
  258.48  <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
  258.49  
  258.50      <f:entry title="Project Name:" field="projectName">
   259.1 --- a/remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/IndexingBuilder/global.jelly	Mon Dec 19 11:37:36 2016 +0100
   259.2 +++ b/remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/IndexingBuilder/global.jelly	Mon Feb 27 22:40:44 2017 +0100
   259.3 @@ -1,3 +1,47 @@
   259.4 +<!--
   259.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   259.6 +
   259.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   259.8 +
   259.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  259.10 +Other names may be trademarks of their respective owners.
  259.11 +
  259.12 +The contents of this file are subject to the terms of either the GNU
  259.13 +General Public License Version 2 only ("GPL") or the Common
  259.14 +Development and Distribution License("CDDL") (collectively, the
  259.15 +"License"). You may not use this file except in compliance with the
  259.16 +License. You can obtain a copy of the License at
  259.17 +http://www.netbeans.org/cddl-gplv2.html
  259.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  259.19 +specific language governing permissions and limitations under the
  259.20 +License.  When distributing the software, include this License Header
  259.21 +Notice in each file and include the License file at
  259.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  259.23 +particular file as subject to the "Classpath" exception as provided
  259.24 +by Oracle in the GPL Version 2 section of the License file that
  259.25 +accompanied this code. If applicable, add the following below the
  259.26 +License Header, with the fields enclosed by brackets [] replaced by
  259.27 +your own identifying information:
  259.28 +"Portions Copyrighted [year] [name of copyright owner]"
  259.29 +
  259.30 +Contributor(s):
  259.31 +
  259.32 +The Original Software is NetBeans. The Initial Developer of the Original
  259.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  259.34 +Microsystems, Inc. All Rights Reserved.
  259.35 +
  259.36 +If you wish your version of this file to be governed by only the CDDL
  259.37 +or only the GPL Version 2, indicate your decision by adding
  259.38 +"[Contributor] elects to include this software in this distribution
  259.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  259.40 +single choice of license, a recipient has the option to distribute
  259.41 +your version of this file under either the CDDL, the GPL Version 2 or
  259.42 +to extend the choice of license to its licensees as provided above.
  259.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
  259.44 +Version 2 license, then the option applies only if the new code is
  259.45 +made subject to such option by the copyright holder.
  259.46 +-->
  259.47 +
  259.48  <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
  259.49  
  259.50      <f:section title="Indexers">
   260.1 --- a/remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/IndexingBuilder/help-cacheDir.html	Mon Dec 19 11:37:36 2016 +0100
   260.2 +++ b/remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/IndexingBuilder/help-cacheDir.html	Mon Feb 27 22:40:44 2017 +0100
   260.3 @@ -1,3 +1,46 @@
   260.4 +<!--
   260.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   260.6 +
   260.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   260.8 +
   260.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  260.10 +Other names may be trademarks of their respective owners.
  260.11 +
  260.12 +The contents of this file are subject to the terms of either the GNU
  260.13 +General Public License Version 2 only ("GPL") or the Common
  260.14 +Development and Distribution License("CDDL") (collectively, the
  260.15 +"License"). You may not use this file except in compliance with the
  260.16 +License. You can obtain a copy of the License at
  260.17 +http://www.netbeans.org/cddl-gplv2.html
  260.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  260.19 +specific language governing permissions and limitations under the
  260.20 +License.  When distributing the software, include this License Header
  260.21 +Notice in each file and include the License file at
  260.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  260.23 +particular file as subject to the "Classpath" exception as provided
  260.24 +by Oracle in the GPL Version 2 section of the License file that
  260.25 +accompanied this code. If applicable, add the following below the
  260.26 +License Header, with the fields enclosed by brackets [] replaced by
  260.27 +your own identifying information:
  260.28 +"Portions Copyrighted [year] [name of copyright owner]"
  260.29 +
  260.30 +Contributor(s):
  260.31 +
  260.32 +The Original Software is NetBeans. The Initial Developer of the Original
  260.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  260.34 +Microsystems, Inc. All Rights Reserved.
  260.35 +
  260.36 +If you wish your version of this file to be governed by only the CDDL
  260.37 +or only the GPL Version 2, indicate your decision by adding
  260.38 +"[Contributor] elects to include this software in this distribution
  260.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  260.40 +single choice of license, a recipient has the option to distribute
  260.41 +your version of this file under either the CDDL, the GPL Version 2 or
  260.42 +to extend the choice of license to its licensees as provided above.
  260.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
  260.44 +Version 2 license, then the option applies only if the new code is
  260.45 +made subject to such option by the copyright holder.
  260.46 +-->
  260.47  <div>
  260.48      Target cache directory.
  260.49  </div>
  260.50 \ No newline at end of file
   261.1 --- a/remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/IndexingBuilder/help-ignorePatterns.html	Mon Dec 19 11:37:36 2016 +0100
   261.2 +++ b/remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/IndexingBuilder/help-ignorePatterns.html	Mon Feb 27 22:40:44 2017 +0100
   261.3 @@ -1,3 +1,46 @@
   261.4 +<!--
   261.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   261.6 +
   261.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   261.8 +
   261.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  261.10 +Other names may be trademarks of their respective owners.
  261.11 +
  261.12 +The contents of this file are subject to the terms of either the GNU
  261.13 +General Public License Version 2 only ("GPL") or the Common
  261.14 +Development and Distribution License("CDDL") (collectively, the
  261.15 +"License"). You may not use this file except in compliance with the
  261.16 +License. You can obtain a copy of the License at
  261.17 +http://www.netbeans.org/cddl-gplv2.html
  261.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  261.19 +specific language governing permissions and limitations under the
  261.20 +License.  When distributing the software, include this License Header
  261.21 +Notice in each file and include the License file at
  261.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  261.23 +particular file as subject to the "Classpath" exception as provided
  261.24 +by Oracle in the GPL Version 2 section of the License file that
  261.25 +accompanied this code. If applicable, add the following below the
  261.26 +License Header, with the fields enclosed by brackets [] replaced by
  261.27 +your own identifying information:
  261.28 +"Portions Copyrighted [year] [name of copyright owner]"
  261.29 +
  261.30 +Contributor(s):
  261.31 +
  261.32 +The Original Software is NetBeans. The Initial Developer of the Original
  261.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  261.34 +Microsystems, Inc. All Rights Reserved.
  261.35 +
  261.36 +If you wish your version of this file to be governed by only the CDDL
  261.37 +or only the GPL Version 2, indicate your decision by adding
  261.38 +"[Contributor] elects to include this software in this distribution
  261.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  261.40 +single choice of license, a recipient has the option to distribute
  261.41 +your version of this file under either the CDDL, the GPL Version 2 or
  261.42 +to extend the choice of license to its licensees as provided above.
  261.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
  261.44 +Version 2 license, then the option applies only if the new code is
  261.45 +made subject to such option by the copyright holder.
  261.46 +-->
  261.47  <div>
  261.48      Regular expression pattern for projects that should not be indexed.
  261.49  </div>
  261.50 \ No newline at end of file
   262.1 --- a/remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/IndexingBuilder/help-indexSubDirectory.html	Mon Dec 19 11:37:36 2016 +0100
   262.2 +++ b/remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/IndexingBuilder/help-indexSubDirectory.html	Mon Feb 27 22:40:44 2017 +0100
   262.3 @@ -1,3 +1,46 @@
   262.4 +<!--
   262.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   262.6 +
   262.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   262.8 +
   262.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  262.10 +Other names may be trademarks of their respective owners.
  262.11 +
  262.12 +The contents of this file are subject to the terms of either the GNU
  262.13 +General Public License Version 2 only ("GPL") or the Common
  262.14 +Development and Distribution License("CDDL") (collectively, the
  262.15 +"License"). You may not use this file except in compliance with the
  262.16 +License. You can obtain a copy of the License at
  262.17 +http://www.netbeans.org/cddl-gplv2.html
  262.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  262.19 +specific language governing permissions and limitations under the
  262.20 +License.  When distributing the software, include this License Header
  262.21 +Notice in each file and include the License file at
  262.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  262.23 +particular file as subject to the "Classpath" exception as provided
  262.24 +by Oracle in the GPL Version 2 section of the License file that
  262.25 +accompanied this code. If applicable, add the following below the
  262.26 +License Header, with the fields enclosed by brackets [] replaced by
  262.27 +your own identifying information:
  262.28 +"Portions Copyrighted [year] [name of copyright owner]"
  262.29 +
  262.30 +Contributor(s):
  262.31 +
  262.32 +The Original Software is NetBeans. The Initial Developer of the Original
  262.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  262.34 +Microsystems, Inc. All Rights Reserved.
  262.35 +
  262.36 +If you wish your version of this file to be governed by only the CDDL
  262.37 +or only the GPL Version 2, indicate your decision by adding
  262.38 +"[Contributor] elects to include this software in this distribution
  262.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  262.40 +single choice of license, a recipient has the option to distribute
  262.41 +your version of this file under either the CDDL, the GPL Version 2 or
  262.42 +to extend the choice of license to its licensees as provided above.
  262.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
  262.44 +Version 2 license, then the option applies only if the new code is
  262.45 +made subject to such option by the copyright holder.
  262.46 +-->
  262.47  <div>
  262.48      When non-empty, interpreted as a relative path to a directory inside workspace that should be indexed.
  262.49  </div>
  262.50 \ No newline at end of file
   263.1 --- a/remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/IndexingBuilder/help-projectName.html	Mon Dec 19 11:37:36 2016 +0100
   263.2 +++ b/remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/IndexingBuilder/help-projectName.html	Mon Feb 27 22:40:44 2017 +0100
   263.3 @@ -1,3 +1,46 @@
   263.4 +<!--
   263.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   263.6 +
   263.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   263.8 +
   263.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  263.10 +Other names may be trademarks of their respective owners.
  263.11 +
  263.12 +The contents of this file are subject to the terms of either the GNU
  263.13 +General Public License Version 2 only ("GPL") or the Common
  263.14 +Development and Distribution License("CDDL") (collectively, the
  263.15 +"License"). You may not use this file except in compliance with the
  263.16 +License. You can obtain a copy of the License at
  263.17 +http://www.netbeans.org/cddl-gplv2.html
  263.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  263.19 +specific language governing permissions and limitations under the
  263.20 +License.  When distributing the software, include this License Header
  263.21 +Notice in each file and include the License file at
  263.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  263.23 +particular file as subject to the "Classpath" exception as provided
  263.24 +by Oracle in the GPL Version 2 section of the License file that
  263.25 +accompanied this code. If applicable, add the following below the
  263.26 +License Header, with the fields enclosed by brackets [] replaced by
  263.27 +your own identifying information:
  263.28 +"Portions Copyrighted [year] [name of copyright owner]"
  263.29 +
  263.30 +Contributor(s):
  263.31 +
  263.32 +The Original Software is NetBeans. The Initial Developer of the Original
  263.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  263.34 +Microsystems, Inc. All Rights Reserved.
  263.35 +
  263.36 +If you wish your version of this file to be governed by only the CDDL
  263.37 +or only the GPL Version 2, indicate your decision by adding
  263.38 +"[Contributor] elects to include this software in this distribution
  263.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  263.40 +single choice of license, a recipient has the option to distribute
  263.41 +your version of this file under either the CDDL, the GPL Version 2 or
  263.42 +to extend the choice of license to its licensees as provided above.
  263.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
  263.44 +Version 2 license, then the option applies only if the new code is
  263.45 +made subject to such option by the copyright holder.
  263.46 +-->
  263.47  <div>
  263.48      A name of the index. Will be shown to the user when selecting indexes to operate on.
  263.49  </div>
  263.50 \ No newline at end of file
   264.1 --- a/remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/IndexingBuilder/help.html	Mon Dec 19 11:37:36 2016 +0100
   264.2 +++ b/remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/IndexingBuilder/help.html	Mon Feb 27 22:40:44 2017 +0100
   264.3 @@ -1,3 +1,46 @@
   264.4 +<!--
   264.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   264.6 +
   264.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   264.8 +
   264.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  264.10 +Other names may be trademarks of their respective owners.
  264.11 +
  264.12 +The contents of this file are subject to the terms of either the GNU
  264.13 +General Public License Version 2 only ("GPL") or the Common
  264.14 +Development and Distribution License("CDDL") (collectively, the
  264.15 +"License"). You may not use this file except in compliance with the
  264.16 +License. You can obtain a copy of the License at
  264.17 +http://www.netbeans.org/cddl-gplv2.html
  264.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  264.19 +specific language governing permissions and limitations under the
  264.20 +License.  When distributing the software, include this License Header
  264.21 +Notice in each file and include the License file at
  264.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  264.23 +particular file as subject to the "Classpath" exception as provided
  264.24 +by Oracle in the GPL Version 2 section of the License file that
  264.25 +accompanied this code. If applicable, add the following below the
  264.26 +License Header, with the fields enclosed by brackets [] replaced by
  264.27 +your own identifying information:
  264.28 +"Portions Copyrighted [year] [name of copyright owner]"
  264.29 +
  264.30 +Contributor(s):
  264.31 +
  264.32 +The Original Software is NetBeans. The Initial Developer of the Original
  264.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  264.34 +Microsystems, Inc. All Rights Reserved.
  264.35 +
  264.36 +If you wish your version of this file to be governed by only the CDDL
  264.37 +or only the GPL Version 2, indicate your decision by adding
  264.38 +"[Contributor] elects to include this software in this distribution
  264.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  264.40 +single choice of license, a recipient has the option to distribute
  264.41 +your version of this file under either the CDDL, the GPL Version 2 or
  264.42 +to extend the choice of license to its licensees as provided above.
  264.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
  264.44 +Version 2 license, then the option applies only if the new code is
  264.45 +made subject to such option by the copyright holder.
  264.46 +-->
  264.47  <div>
  264.48      Run indexers.
  264.49  </div>
  264.50 \ No newline at end of file
   265.1 --- a/remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/JackpotIndexBuilder/config.jelly	Mon Dec 19 11:37:36 2016 +0100
   265.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   265.3 @@ -1,3 +0,0 @@
   265.4 -<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
   265.5 -
   265.6 -</j:jelly>
   266.1 --- a/remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/JackpotIndexBuilder/help.html	Mon Dec 19 11:37:36 2016 +0100
   266.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   266.3 @@ -1,3 +0,0 @@
   266.4 -<div>
   266.5 -    Run Jackpot 3.0 indexer.
   266.6 -</div>
   266.7 \ No newline at end of file
   267.1 --- a/remoting/server/hudson/src/main/resources/org/netbeans/modules/jackpot30/hudson/org.netbeans.modules.jackpot30.hudson.InstallIndexingTool	Mon Dec 19 11:37:36 2016 +0100
   267.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   267.3 @@ -1,1 +0,0 @@
   267.4 -{"list": [{"id": "main", "name": "main", "url": "http://deadlock.netbeans.org/hudson/job/jackpot30/lastSuccessfulBuild/artifact/remoting/build/indexing-backend.zip"}]}
   267.5 \ No newline at end of file
   268.1 --- a/remoting/server/hudson/src/main/webapp/help-globalConfig.html	Mon Dec 19 11:37:36 2016 +0100
   268.2 +++ b/remoting/server/hudson/src/main/webapp/help-globalConfig.html	Mon Feb 27 22:40:44 2017 +0100
   268.3 @@ -1,5 +1,48 @@
   268.4 +<!--
   268.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   268.6 +
   268.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   268.8 +
   268.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  268.10 +Other names may be trademarks of their respective owners.
  268.11 +
  268.12 +The contents of this file are subject to the terms of either the GNU
  268.13 +General Public License Version 2 only ("GPL") or the Common
  268.14 +Development and Distribution License("CDDL") (collectively, the
  268.15 +"License"). You may not use this file except in compliance with the
  268.16 +License. You can obtain a copy of the License at
  268.17 +http://www.netbeans.org/cddl-gplv2.html
  268.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  268.19 +specific language governing permissions and limitations under the
  268.20 +License.  When distributing the software, include this License Header
  268.21 +Notice in each file and include the License file at
  268.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  268.23 +particular file as subject to the "Classpath" exception as provided
  268.24 +by Oracle in the GPL Version 2 section of the License file that
  268.25 +accompanied this code. If applicable, add the following below the
  268.26 +License Header, with the fields enclosed by brackets [] replaced by
  268.27 +your own identifying information:
  268.28 +"Portions Copyrighted [year] [name of copyright owner]"
  268.29 +
  268.30 +Contributor(s):
  268.31 +
  268.32 +The Original Software is NetBeans. The Initial Developer of the Original
  268.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  268.34 +Microsystems, Inc. All Rights Reserved.
  268.35 +
  268.36 +If you wish your version of this file to be governed by only the CDDL
  268.37 +or only the GPL Version 2, indicate your decision by adding
  268.38 +"[Contributor] elects to include this software in this distribution
  268.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  268.40 +single choice of license, a recipient has the option to distribute
  268.41 +your version of this file under either the CDDL, the GPL Version 2 or
  268.42 +to extend the choice of license to its licensees as provided above.
  268.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
  268.44 +Version 2 license, then the option applies only if the new code is
  268.45 +made subject to such option by the copyright holder.
  268.46 +-->
  268.47  <div>
  268.48    <p>
  268.49 -    See help-projectConfig.html for more about what these HTMLs do.
  268.50 +    Configure indexers.
  268.51    </p>
  268.52  </div>
  268.53 \ No newline at end of file
   269.1 --- a/remoting/server/indexer/build.xml	Mon Dec 19 11:37:36 2016 +0100
   269.2 +++ b/remoting/server/indexer/build.xml	Mon Feb 27 22:40:44 2017 +0100
   269.3 @@ -1,4 +1,47 @@
   269.4  <?xml version="1.0" encoding="UTF-8"?>
   269.5 +<!--
   269.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   269.7 +
   269.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   269.9 +
  269.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  269.11 +Other names may be trademarks of their respective owners.
  269.12 +
  269.13 +The contents of this file are subject to the terms of either the GNU
  269.14 +General Public License Version 2 only ("GPL") or the Common
  269.15 +Development and Distribution License("CDDL") (collectively, the
  269.16 +"License"). You may not use this file except in compliance with the
  269.17 +License. You can obtain a copy of the License at
  269.18 +http://www.netbeans.org/cddl-gplv2.html
  269.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  269.20 +specific language governing permissions and limitations under the
  269.21 +License.  When distributing the software, include this License Header
  269.22 +Notice in each file and include the License file at
  269.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  269.24 +particular file as subject to the "Classpath" exception as provided
  269.25 +by Oracle in the GPL Version 2 section of the License file that
  269.26 +accompanied this code. If applicable, add the following below the
  269.27 +License Header, with the fields enclosed by brackets [] replaced by
  269.28 +your own identifying information:
  269.29 +"Portions Copyrighted [year] [name of copyright owner]"
  269.30 +
  269.31 +Contributor(s):
  269.32 +
  269.33 +The Original Software is NetBeans. The Initial Developer of the Original
  269.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  269.35 +Microsystems, Inc. All Rights Reserved.
  269.36 +
  269.37 +If you wish your version of this file to be governed by only the CDDL
  269.38 +or only the GPL Version 2, indicate your decision by adding
  269.39 +"[Contributor] elects to include this software in this distribution
  269.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  269.41 +single choice of license, a recipient has the option to distribute
  269.42 +your version of this file under either the CDDL, the GPL Version 2 or
  269.43 +to extend the choice of license to its licensees as provided above.
  269.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  269.45 +Version 2 license, then the option applies only if the new code is
  269.46 +made subject to such option by the copyright holder.
  269.47 +-->
  269.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  269.49  <!-- for some information on what you could do (e.g. targets to override). -->
  269.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   270.1 --- a/remoting/server/indexer/etc/app.conf	Mon Dec 19 11:37:36 2016 +0100
   270.2 +++ b/remoting/server/indexer/etc/app.conf	Mon Feb 27 22:40:44 2017 +0100
   270.3 @@ -1,3 +1,45 @@
   270.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   270.5 +#
   270.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   270.7 +#
   270.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   270.9 +# Other names may be trademarks of their respective owners.
  270.10 +#
  270.11 +# The contents of this file are subject to the terms of either the GNU
  270.12 +# General Public License Version 2 only ("GPL") or the Common
  270.13 +# Development and Distribution License("CDDL") (collectively, the
  270.14 +# "License"). You may not use this file except in compliance with the
  270.15 +# License. You can obtain a copy of the License at
  270.16 +# http://www.netbeans.org/cddl-gplv2.html
  270.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  270.18 +# specific language governing permissions and limitations under the
  270.19 +# License.  When distributing the software, include this License Header
  270.20 +# Notice in each file and include the License file at
  270.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  270.22 +# particular file as subject to the "Classpath" exception as provided
  270.23 +# by Oracle in the GPL Version 2 section of the License file that
  270.24 +# accompanied this code. If applicable, add the following below the
  270.25 +# License Header, with the fields enclosed by brackets [] replaced by
  270.26 +# your own identifying information:
  270.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  270.28 +#
  270.29 +# Contributor(s):
  270.30 +#
  270.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  270.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  270.33 +# Microsystems, Inc. All Rights Reserved.
  270.34 +#
  270.35 +# If you wish your version of this file to be governed by only the CDDL
  270.36 +# or only the GPL Version 2, indicate your decision by adding
  270.37 +# "[Contributor] elects to include this software in this distribution
  270.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  270.39 +# single choice of license, a recipient has the option to distribute
  270.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  270.41 +# to extend the choice of license to its licensees as provided above.
  270.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  270.43 +# Version 2 license, then the option applies only if the new code is
  270.44 +# made subject to such option by the copyright holder.
  270.45 +
  270.46  # ${HOME} will be replaced by user home directory according to platform
  270.47  default_userdir="${HOME}/.${APPNAME}/dev"
  270.48  default_mac_userdir="${HOME}/Library/Application Support/${APPNAME}/dev"
   271.1 --- a/remoting/server/indexer/impl/build.xml	Mon Dec 19 11:37:36 2016 +0100
   271.2 +++ b/remoting/server/indexer/impl/build.xml	Mon Feb 27 22:40:44 2017 +0100
   271.3 @@ -1,4 +1,47 @@
   271.4  <?xml version="1.0" encoding="UTF-8"?>
   271.5 +<!--
   271.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   271.7 +
   271.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   271.9 +
  271.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  271.11 +Other names may be trademarks of their respective owners.
  271.12 +
  271.13 +The contents of this file are subject to the terms of either the GNU
  271.14 +General Public License Version 2 only ("GPL") or the Common
  271.15 +Development and Distribution License("CDDL") (collectively, the
  271.16 +"License"). You may not use this file except in compliance with the
  271.17 +License. You can obtain a copy of the License at
  271.18 +http://www.netbeans.org/cddl-gplv2.html
  271.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  271.20 +specific language governing permissions and limitations under the
  271.21 +License.  When distributing the software, include this License Header
  271.22 +Notice in each file and include the License file at
  271.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  271.24 +particular file as subject to the "Classpath" exception as provided
  271.25 +by Oracle in the GPL Version 2 section of the License file that
  271.26 +accompanied this code. If applicable, add the following below the
  271.27 +License Header, with the fields enclosed by brackets [] replaced by
  271.28 +your own identifying information:
  271.29 +"Portions Copyrighted [year] [name of copyright owner]"
  271.30 +
  271.31 +Contributor(s):
  271.32 +
  271.33 +The Original Software is NetBeans. The Initial Developer of the Original
  271.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  271.35 +Microsystems, Inc. All Rights Reserved.
  271.36 +
  271.37 +If you wish your version of this file to be governed by only the CDDL
  271.38 +or only the GPL Version 2, indicate your decision by adding
  271.39 +"[Contributor] elects to include this software in this distribution
  271.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  271.41 +single choice of license, a recipient has the option to distribute
  271.42 +your version of this file under either the CDDL, the GPL Version 2 or
  271.43 +to extend the choice of license to its licensees as provided above.
  271.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  271.45 +Version 2 license, then the option applies only if the new code is
  271.46 +made subject to such option by the copyright holder.
  271.47 +-->
  271.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  271.49  <!-- for some information on what you could do (e.g. targets to override). -->
  271.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   272.1 --- a/remoting/server/indexer/impl/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   272.2 +++ b/remoting/server/indexer/impl/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   272.3 @@ -1,5 +1,48 @@
   272.4  <?xml version="1.0" encoding="UTF-8"?>
   272.5  <!--
   272.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   272.7 +
   272.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   272.9 +
  272.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  272.11 +Other names may be trademarks of their respective owners.
  272.12 +
  272.13 +The contents of this file are subject to the terms of either the GNU
  272.14 +General Public License Version 2 only ("GPL") or the Common
  272.15 +Development and Distribution License("CDDL") (collectively, the
  272.16 +"License"). You may not use this file except in compliance with the
  272.17 +License. You can obtain a copy of the License at
  272.18 +http://www.netbeans.org/cddl-gplv2.html
  272.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  272.20 +specific language governing permissions and limitations under the
  272.21 +License.  When distributing the software, include this License Header
  272.22 +Notice in each file and include the License file at
  272.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  272.24 +particular file as subject to the "Classpath" exception as provided
  272.25 +by Oracle in the GPL Version 2 section of the License file that
  272.26 +accompanied this code. If applicable, add the following below the
  272.27 +License Header, with the fields enclosed by brackets [] replaced by
  272.28 +your own identifying information:
  272.29 +"Portions Copyrighted [year] [name of copyright owner]"
  272.30 +
  272.31 +Contributor(s):
  272.32 +
  272.33 +The Original Software is NetBeans. The Initial Developer of the Original
  272.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  272.35 +Microsystems, Inc. All Rights Reserved.
  272.36 +
  272.37 +If you wish your version of this file to be governed by only the CDDL
  272.38 +or only the GPL Version 2, indicate your decision by adding
  272.39 +"[Contributor] elects to include this software in this distribution
  272.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  272.41 +single choice of license, a recipient has the option to distribute
  272.42 +your version of this file under either the CDDL, the GPL Version 2 or
  272.43 +to extend the choice of license to its licensees as provided above.
  272.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  272.45 +Version 2 license, then the option applies only if the new code is
  272.46 +made subject to such option by the copyright holder.
  272.47 +-->
  272.48 +<!--
  272.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  272.50  ***         EDIT ../build.xml INSTEAD         ***
  272.51  -->
   273.1 --- a/remoting/server/indexer/impl/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   273.2 +++ b/remoting/server/indexer/impl/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   273.3 @@ -1,3 +1,44 @@
   273.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   273.5 +#
   273.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   273.7 +#
   273.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   273.9 +# Other names may be trademarks of their respective owners.
  273.10 +#
  273.11 +# The contents of this file are subject to the terms of either the GNU
  273.12 +# General Public License Version 2 only ("GPL") or the Common
  273.13 +# Development and Distribution License("CDDL") (collectively, the
  273.14 +# "License"). You may not use this file except in compliance with the
  273.15 +# License. You can obtain a copy of the License at
  273.16 +# http://www.netbeans.org/cddl-gplv2.html
  273.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  273.18 +# specific language governing permissions and limitations under the
  273.19 +# License.  When distributing the software, include this License Header
  273.20 +# Notice in each file and include the License file at
  273.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  273.22 +# particular file as subject to the "Classpath" exception as provided
  273.23 +# by Oracle in the GPL Version 2 section of the License file that
  273.24 +# accompanied this code. If applicable, add the following below the
  273.25 +# License Header, with the fields enclosed by brackets [] replaced by
  273.26 +# your own identifying information:
  273.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  273.28 +#
  273.29 +# Contributor(s):
  273.30 +#
  273.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  273.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  273.33 +# Microsystems, Inc. All Rights Reserved.
  273.34 +#
  273.35 +# If you wish your version of this file to be governed by only the CDDL
  273.36 +# or only the GPL Version 2, indicate your decision by adding
  273.37 +# "[Contributor] elects to include this software in this distribution
  273.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  273.39 +# single choice of license, a recipient has the option to distribute
  273.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  273.41 +# to extend the choice of license to its licensees as provided above.
  273.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  273.43 +# Version 2 license, then the option applies only if the new code is
  273.44 +# made subject to such option by the copyright holder.
  273.45  build.xml.data.CRC32=73a66b48
  273.46  build.xml.script.CRC32=c32e03a8
  273.47  build.xml.stylesheet.CRC32=a56c6a5b@1.47
   274.1 --- a/remoting/server/indexer/impl/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   274.2 +++ b/remoting/server/indexer/impl/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   274.3 @@ -1,3 +1,44 @@
   274.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   274.5 +#
   274.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   274.7 +#
   274.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   274.9 +# Other names may be trademarks of their respective owners.
  274.10 +#
  274.11 +# The contents of this file are subject to the terms of either the GNU
  274.12 +# General Public License Version 2 only ("GPL") or the Common
  274.13 +# Development and Distribution License("CDDL") (collectively, the
  274.14 +# "License"). You may not use this file except in compliance with the
  274.15 +# License. You can obtain a copy of the License at
  274.16 +# http://www.netbeans.org/cddl-gplv2.html
  274.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  274.18 +# specific language governing permissions and limitations under the
  274.19 +# License.  When distributing the software, include this License Header
  274.20 +# Notice in each file and include the License file at
  274.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  274.22 +# particular file as subject to the "Classpath" exception as provided
  274.23 +# by Oracle in the GPL Version 2 section of the License file that
  274.24 +# accompanied this code. If applicable, add the following below the
  274.25 +# License Header, with the fields enclosed by brackets [] replaced by
  274.26 +# your own identifying information:
  274.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  274.28 +#
  274.29 +# Contributor(s):
  274.30 +#
  274.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  274.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  274.33 +# Microsystems, Inc. All Rights Reserved.
  274.34 +#
  274.35 +# If you wish your version of this file to be governed by only the CDDL
  274.36 +# or only the GPL Version 2, indicate your decision by adding
  274.37 +# "[Contributor] elects to include this software in this distribution
  274.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  274.39 +# single choice of license, a recipient has the option to distribute
  274.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  274.41 +# to extend the choice of license to its licensees as provided above.
  274.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  274.43 +# Version 2 license, then the option applies only if the new code is
  274.44 +# made subject to such option by the copyright holder.
  274.45  javac.source=1.6
  274.46  javac.compilerargs=-Xlint -Xlint:-serial
  274.47  spec.version.base=1.1
   275.1 --- a/remoting/server/indexer/impl/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   275.2 +++ b/remoting/server/indexer/impl/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   275.3 @@ -1,4 +1,47 @@
   275.4  <?xml version="1.0" encoding="UTF-8"?>
   275.5 +<!--
   275.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   275.7 +
   275.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   275.9 +
  275.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  275.11 +Other names may be trademarks of their respective owners.
  275.12 +
  275.13 +The contents of this file are subject to the terms of either the GNU
  275.14 +General Public License Version 2 only ("GPL") or the Common
  275.15 +Development and Distribution License("CDDL") (collectively, the
  275.16 +"License"). You may not use this file except in compliance with the
  275.17 +License. You can obtain a copy of the License at
  275.18 +http://www.netbeans.org/cddl-gplv2.html
  275.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  275.20 +specific language governing permissions and limitations under the
  275.21 +License.  When distributing the software, include this License Header
  275.22 +Notice in each file and include the License file at
  275.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  275.24 +particular file as subject to the "Classpath" exception as provided
  275.25 +by Oracle in the GPL Version 2 section of the License file that
  275.26 +accompanied this code. If applicable, add the following below the
  275.27 +License Header, with the fields enclosed by brackets [] replaced by
  275.28 +your own identifying information:
  275.29 +"Portions Copyrighted [year] [name of copyright owner]"
  275.30 +
  275.31 +Contributor(s):
  275.32 +
  275.33 +The Original Software is NetBeans. The Initial Developer of the Original
  275.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  275.35 +Microsystems, Inc. All Rights Reserved.
  275.36 +
  275.37 +If you wish your version of this file to be governed by only the CDDL
  275.38 +or only the GPL Version 2, indicate your decision by adding
  275.39 +"[Contributor] elects to include this software in this distribution
  275.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  275.41 +single choice of license, a recipient has the option to distribute
  275.42 +your version of this file under either the CDDL, the GPL Version 2 or
  275.43 +to extend the choice of license to its licensees as provided above.
  275.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  275.45 +Version 2 license, then the option applies only if the new code is
  275.46 +made subject to such option by the copyright holder.
  275.47 +-->
  275.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  275.49      <type>org.netbeans.modules.apisupport.project</type>
  275.50      <configuration>
   276.1 --- a/remoting/server/indexer/impl/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   276.2 +++ b/remoting/server/indexer/impl/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
   276.3 @@ -1,1 +1,42 @@
   276.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   276.5 +#
   276.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   276.7 +#
   276.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   276.9 +# Other names may be trademarks of their respective owners.
  276.10 +#
  276.11 +# The contents of this file are subject to the terms of either the GNU
  276.12 +# General Public License Version 2 only ("GPL") or the Common
  276.13 +# Development and Distribution License("CDDL") (collectively, the
  276.14 +# "License"). You may not use this file except in compliance with the
  276.15 +# License. You can obtain a copy of the License at
  276.16 +# http://www.netbeans.org/cddl-gplv2.html
  276.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  276.18 +# specific language governing permissions and limitations under the
  276.19 +# License.  When distributing the software, include this License Header
  276.20 +# Notice in each file and include the License file at
  276.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  276.22 +# particular file as subject to the "Classpath" exception as provided
  276.23 +# by Oracle in the GPL Version 2 section of the License file that
  276.24 +# accompanied this code. If applicable, add the following below the
  276.25 +# License Header, with the fields enclosed by brackets [] replaced by
  276.26 +# your own identifying information:
  276.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  276.28 +#
  276.29 +# Contributor(s):
  276.30 +#
  276.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  276.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  276.33 +# Microsystems, Inc. All Rights Reserved.
  276.34 +#
  276.35 +# If you wish your version of this file to be governed by only the CDDL
  276.36 +# or only the GPL Version 2, indicate your decision by adding
  276.37 +# "[Contributor] elects to include this software in this distribution
  276.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  276.39 +# single choice of license, a recipient has the option to distribute
  276.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  276.41 +# to extend the choice of license to its licensees as provided above.
  276.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  276.43 +# Version 2 license, then the option applies only if the new code is
  276.44 +# made subject to such option by the copyright holder.
  276.45  suite.dir=${basedir}/..
   277.1 --- a/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   277.2 +++ b/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/Bundle.properties	Mon Feb 27 22:40:44 2017 +0100
   277.3 @@ -1,1 +1,42 @@
   277.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   277.5 +#
   277.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   277.7 +#
   277.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   277.9 +# Other names may be trademarks of their respective owners.
  277.10 +#
  277.11 +# The contents of this file are subject to the terms of either the GNU
  277.12 +# General Public License Version 2 only ("GPL") or the Common
  277.13 +# Development and Distribution License("CDDL") (collectively, the
  277.14 +# "License"). You may not use this file except in compliance with the
  277.15 +# License. You can obtain a copy of the License at
  277.16 +# http://www.netbeans.org/cddl-gplv2.html
  277.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  277.18 +# specific language governing permissions and limitations under the
  277.19 +# License.  When distributing the software, include this License Header
  277.20 +# Notice in each file and include the License file at
  277.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  277.22 +# particular file as subject to the "Classpath" exception as provided
  277.23 +# by Oracle in the GPL Version 2 section of the License file that
  277.24 +# accompanied this code. If applicable, add the following below the
  277.25 +# License Header, with the fields enclosed by brackets [] replaced by
  277.26 +# your own identifying information:
  277.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  277.28 +#
  277.29 +# Contributor(s):
  277.30 +#
  277.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  277.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  277.33 +# Microsystems, Inc. All Rights Reserved.
  277.34 +#
  277.35 +# If you wish your version of this file to be governed by only the CDDL
  277.36 +# or only the GPL Version 2, indicate your decision by adding
  277.37 +# "[Contributor] elects to include this software in this distribution
  277.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  277.39 +# single choice of license, a recipient has the option to distribute
  277.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  277.41 +# to extend the choice of license to its licensees as provided above.
  277.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  277.43 +# Version 2 license, then the option applies only if the new code is
  277.44 +# made subject to such option by the copyright holder.
  277.45  OpenIDE-Module-Name=Jackpot 3.0 Backend Impl
   278.1 --- a/remoting/server/indexer/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   278.2 +++ b/remoting/server/indexer/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   278.3 @@ -1,5 +1,48 @@
   278.4  <?xml version="1.0" encoding="UTF-8"?>
   278.5  <!--
   278.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   278.7 +
   278.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   278.9 +
  278.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  278.11 +Other names may be trademarks of their respective owners.
  278.12 +
  278.13 +The contents of this file are subject to the terms of either the GNU
  278.14 +General Public License Version 2 only ("GPL") or the Common
  278.15 +Development and Distribution License("CDDL") (collectively, the
  278.16 +"License"). You may not use this file except in compliance with the
  278.17 +License. You can obtain a copy of the License at
  278.18 +http://www.netbeans.org/cddl-gplv2.html
  278.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  278.20 +specific language governing permissions and limitations under the
  278.21 +License.  When distributing the software, include this License Header
  278.22 +Notice in each file and include the License file at
  278.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  278.24 +particular file as subject to the "Classpath" exception as provided
  278.25 +by Oracle in the GPL Version 2 section of the License file that
  278.26 +accompanied this code. If applicable, add the following below the
  278.27 +License Header, with the fields enclosed by brackets [] replaced by
  278.28 +your own identifying information:
  278.29 +"Portions Copyrighted [year] [name of copyright owner]"
  278.30 +
  278.31 +Contributor(s):
  278.32 +
  278.33 +The Original Software is NetBeans. The Initial Developer of the Original
  278.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  278.35 +Microsystems, Inc. All Rights Reserved.
  278.36 +
  278.37 +If you wish your version of this file to be governed by only the CDDL
  278.38 +or only the GPL Version 2, indicate your decision by adding
  278.39 +"[Contributor] elects to include this software in this distribution
  278.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  278.41 +single choice of license, a recipient has the option to distribute
  278.42 +your version of this file under either the CDDL, the GPL Version 2 or
  278.43 +to extend the choice of license to its licensees as provided above.
  278.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  278.45 +Version 2 license, then the option applies only if the new code is
  278.46 +made subject to such option by the copyright holder.
  278.47 +-->
  278.48 +<!--
  278.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  278.50  ***         EDIT ../build.xml INSTEAD         ***
  278.51  -->
   279.1 --- a/remoting/server/indexer/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   279.2 +++ b/remoting/server/indexer/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   279.3 @@ -1,3 +1,44 @@
   279.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   279.5 +#
   279.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   279.7 +#
   279.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   279.9 +# Other names may be trademarks of their respective owners.
  279.10 +#
  279.11 +# The contents of this file are subject to the terms of either the GNU
  279.12 +# General Public License Version 2 only ("GPL") or the Common
  279.13 +# Development and Distribution License("CDDL") (collectively, the
  279.14 +# "License"). You may not use this file except in compliance with the
  279.15 +# License. You can obtain a copy of the License at
  279.16 +# http://www.netbeans.org/cddl-gplv2.html
  279.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  279.18 +# specific language governing permissions and limitations under the
  279.19 +# License.  When distributing the software, include this License Header
  279.20 +# Notice in each file and include the License file at
  279.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  279.22 +# particular file as subject to the "Classpath" exception as provided
  279.23 +# by Oracle in the GPL Version 2 section of the License file that
  279.24 +# accompanied this code. If applicable, add the following below the
  279.25 +# License Header, with the fields enclosed by brackets [] replaced by
  279.26 +# your own identifying information:
  279.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  279.28 +#
  279.29 +# Contributor(s):
  279.30 +#
  279.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  279.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  279.33 +# Microsystems, Inc. All Rights Reserved.
  279.34 +#
  279.35 +# If you wish your version of this file to be governed by only the CDDL
  279.36 +# or only the GPL Version 2, indicate your decision by adding
  279.37 +# "[Contributor] elects to include this software in this distribution
  279.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  279.39 +# single choice of license, a recipient has the option to distribute
  279.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  279.41 +# to extend the choice of license to its licensees as provided above.
  279.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  279.43 +# Version 2 license, then the option applies only if the new code is
  279.44 +# made subject to such option by the copyright holder.
  279.45  build.xml.data.CRC32=7bd55f34
  279.46  build.xml.script.CRC32=f378700b
  279.47  build.xml.stylesheet.CRC32=eaf9f76a@1.47
   280.1 --- a/remoting/server/indexer/nbproject/platform.properties	Mon Dec 19 11:37:36 2016 +0100
   280.2 +++ b/remoting/server/indexer/nbproject/platform.properties	Mon Feb 27 22:40:44 2017 +0100
   280.3 @@ -1,3 +1,44 @@
   280.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   280.5 +#
   280.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   280.7 +#
   280.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   280.9 +# Other names may be trademarks of their respective owners.
  280.10 +#
  280.11 +# The contents of this file are subject to the terms of either the GNU
  280.12 +# General Public License Version 2 only ("GPL") or the Common
  280.13 +# Development and Distribution License("CDDL") (collectively, the
  280.14 +# "License"). You may not use this file except in compliance with the
  280.15 +# License. You can obtain a copy of the License at
  280.16 +# http://www.netbeans.org/cddl-gplv2.html
  280.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  280.18 +# specific language governing permissions and limitations under the
  280.19 +# License.  When distributing the software, include this License Header
  280.20 +# Notice in each file and include the License file at
  280.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  280.22 +# particular file as subject to the "Classpath" exception as provided
  280.23 +# by Oracle in the GPL Version 2 section of the License file that
  280.24 +# accompanied this code. If applicable, add the following below the
  280.25 +# License Header, with the fields enclosed by brackets [] replaced by
  280.26 +# your own identifying information:
  280.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  280.28 +#
  280.29 +# Contributor(s):
  280.30 +#
  280.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  280.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  280.33 +# Microsystems, Inc. All Rights Reserved.
  280.34 +#
  280.35 +# If you wish your version of this file to be governed by only the CDDL
  280.36 +# or only the GPL Version 2, indicate your decision by adding
  280.37 +# "[Contributor] elects to include this software in this distribution
  280.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  280.39 +# single choice of license, a recipient has the option to distribute
  280.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  280.41 +# to extend the choice of license to its licensees as provided above.
  280.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  280.43 +# Version 2 license, then the option applies only if the new code is
  280.44 +# made subject to such option by the copyright holder.
  280.45  cluster.path=\
  280.46      ${nbplatform.active.dir}/apisupport:\
  280.47      ${nbplatform.active.dir}/cnd:\
   281.1 --- a/remoting/server/indexer/nbproject/platform.xml	Mon Dec 19 11:37:36 2016 +0100
   281.2 +++ b/remoting/server/indexer/nbproject/platform.xml	Mon Feb 27 22:40:44 2017 +0100
   281.3 @@ -1,4 +1,47 @@
   281.4  <?xml version="1.0" encoding="UTF-8"?>
   281.5 +<!--
   281.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   281.7 +
   281.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   281.9 +
  281.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  281.11 +Other names may be trademarks of their respective owners.
  281.12 +
  281.13 +The contents of this file are subject to the terms of either the GNU
  281.14 +General Public License Version 2 only ("GPL") or the Common
  281.15 +Development and Distribution License("CDDL") (collectively, the
  281.16 +"License"). You may not use this file except in compliance with the
  281.17 +License. You can obtain a copy of the License at
  281.18 +http://www.netbeans.org/cddl-gplv2.html
  281.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  281.20 +specific language governing permissions and limitations under the
  281.21 +License.  When distributing the software, include this License Header
  281.22 +Notice in each file and include the License file at
  281.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  281.24 +particular file as subject to the "Classpath" exception as provided
  281.25 +by Oracle in the GPL Version 2 section of the License file that
  281.26 +accompanied this code. If applicable, add the following below the
  281.27 +License Header, with the fields enclosed by brackets [] replaced by
  281.28 +your own identifying information:
  281.29 +"Portions Copyrighted [year] [name of copyright owner]"
  281.30 +
  281.31 +Contributor(s):
  281.32 +
  281.33 +The Original Software is NetBeans. The Initial Developer of the Original
  281.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  281.35 +Microsystems, Inc. All Rights Reserved.
  281.36 +
  281.37 +If you wish your version of this file to be governed by only the CDDL
  281.38 +or only the GPL Version 2, indicate your decision by adding
  281.39 +"[Contributor] elects to include this software in this distribution
  281.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  281.41 +single choice of license, a recipient has the option to distribute
  281.42 +your version of this file under either the CDDL, the GPL Version 2 or
  281.43 +to extend the choice of license to its licensees as provided above.
  281.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  281.45 +Version 2 license, then the option applies only if the new code is
  281.46 +made subject to such option by the copyright holder.
  281.47 +-->
  281.48  <project name="platform" default="download" basedir="..">
  281.49      <condition property="download.required">
  281.50          <and>
   282.1 --- a/remoting/server/indexer/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   282.2 +++ b/remoting/server/indexer/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   282.3 @@ -1,3 +1,44 @@
   282.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   282.5 +#
   282.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   282.7 +#
   282.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   282.9 +# Other names may be trademarks of their respective owners.
  282.10 +#
  282.11 +# The contents of this file are subject to the terms of either the GNU
  282.12 +# General Public License Version 2 only ("GPL") or the Common
  282.13 +# Development and Distribution License("CDDL") (collectively, the
  282.14 +# "License"). You may not use this file except in compliance with the
  282.15 +# License. You can obtain a copy of the License at
  282.16 +# http://www.netbeans.org/cddl-gplv2.html
  282.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  282.18 +# specific language governing permissions and limitations under the
  282.19 +# License.  When distributing the software, include this License Header
  282.20 +# Notice in each file and include the License file at
  282.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  282.22 +# particular file as subject to the "Classpath" exception as provided
  282.23 +# by Oracle in the GPL Version 2 section of the License file that
  282.24 +# accompanied this code. If applicable, add the following below the
  282.25 +# License Header, with the fields enclosed by brackets [] replaced by
  282.26 +# your own identifying information:
  282.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  282.28 +#
  282.29 +# Contributor(s):
  282.30 +#
  282.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  282.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  282.33 +# Microsystems, Inc. All Rights Reserved.
  282.34 +#
  282.35 +# If you wish your version of this file to be governed by only the CDDL
  282.36 +# or only the GPL Version 2, indicate your decision by adding
  282.37 +# "[Contributor] elects to include this software in this distribution
  282.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  282.39 +# single choice of license, a recipient has the option to distribute
  282.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  282.41 +# to extend the choice of license to its licensees as provided above.
  282.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  282.43 +# Version 2 license, then the option applies only if the new code is
  282.44 +# made subject to such option by the copyright holder.
  282.45  app.conf=etc/app.conf
  282.46  app.name=indexer
  282.47  branding.token=${app.name}
   283.1 --- a/remoting/server/indexer/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   283.2 +++ b/remoting/server/indexer/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   283.3 @@ -1,4 +1,47 @@
   283.4  <?xml version="1.0" encoding="UTF-8"?>
   283.5 +<!--
   283.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   283.7 +
   283.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   283.9 +
  283.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  283.11 +Other names may be trademarks of their respective owners.
  283.12 +
  283.13 +The contents of this file are subject to the terms of either the GNU
  283.14 +General Public License Version 2 only ("GPL") or the Common
  283.15 +Development and Distribution License("CDDL") (collectively, the
  283.16 +"License"). You may not use this file except in compliance with the
  283.17 +License. You can obtain a copy of the License at
  283.18 +http://www.netbeans.org/cddl-gplv2.html
  283.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  283.20 +specific language governing permissions and limitations under the
  283.21 +License.  When distributing the software, include this License Header
  283.22 +Notice in each file and include the License file at
  283.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  283.24 +particular file as subject to the "Classpath" exception as provided
  283.25 +by Oracle in the GPL Version 2 section of the License file that
  283.26 +accompanied this code. If applicable, add the following below the
  283.27 +License Header, with the fields enclosed by brackets [] replaced by
  283.28 +your own identifying information:
  283.29 +"Portions Copyrighted [year] [name of copyright owner]"
  283.30 +
  283.31 +Contributor(s):
  283.32 +
  283.33 +The Original Software is NetBeans. The Initial Developer of the Original
  283.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  283.35 +Microsystems, Inc. All Rights Reserved.
  283.36 +
  283.37 +If you wish your version of this file to be governed by only the CDDL
  283.38 +or only the GPL Version 2, indicate your decision by adding
  283.39 +"[Contributor] elects to include this software in this distribution
  283.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  283.41 +single choice of license, a recipient has the option to distribute
  283.42 +your version of this file under either the CDDL, the GPL Version 2 or
  283.43 +to extend the choice of license to its licensees as provided above.
  283.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  283.45 +Version 2 license, then the option applies only if the new code is
  283.46 +made subject to such option by the copyright holder.
  283.47 +-->
  283.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  283.49      <type>org.netbeans.modules.apisupport.project.suite</type>
  283.50      <configuration>
   284.1 --- a/remoting/server/indexer/source/build.xml	Mon Dec 19 11:37:36 2016 +0100
   284.2 +++ b/remoting/server/indexer/source/build.xml	Mon Feb 27 22:40:44 2017 +0100
   284.3 @@ -1,4 +1,47 @@
   284.4  <?xml version="1.0" encoding="UTF-8"?>
   284.5 +<!--
   284.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   284.7 +
   284.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   284.9 +
  284.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  284.11 +Other names may be trademarks of their respective owners.
  284.12 +
  284.13 +The contents of this file are subject to the terms of either the GNU
  284.14 +General Public License Version 2 only ("GPL") or the Common
  284.15 +Development and Distribution License("CDDL") (collectively, the
  284.16 +"License"). You may not use this file except in compliance with the
  284.17 +License. You can obtain a copy of the License at
  284.18 +http://www.netbeans.org/cddl-gplv2.html
  284.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  284.20 +specific language governing permissions and limitations under the
  284.21 +License.  When distributing the software, include this License Header
  284.22 +Notice in each file and include the License file at
  284.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  284.24 +particular file as subject to the "Classpath" exception as provided
  284.25 +by Oracle in the GPL Version 2 section of the License file that
  284.26 +accompanied this code. If applicable, add the following below the
  284.27 +License Header, with the fields enclosed by brackets [] replaced by
  284.28 +your own identifying information:
  284.29 +"Portions Copyrighted [year] [name of copyright owner]"
  284.30 +
  284.31 +Contributor(s):
  284.32 +
  284.33 +The Original Software is NetBeans. The Initial Developer of the Original
  284.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  284.35 +Microsystems, Inc. All Rights Reserved.
  284.36 +
  284.37 +If you wish your version of this file to be governed by only the CDDL
  284.38 +or only the GPL Version 2, indicate your decision by adding
  284.39 +"[Contributor] elects to include this software in this distribution
  284.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  284.41 +single choice of license, a recipient has the option to distribute
  284.42 +your version of this file under either the CDDL, the GPL Version 2 or
  284.43 +to extend the choice of license to its licensees as provided above.
  284.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  284.45 +Version 2 license, then the option applies only if the new code is
  284.46 +made subject to such option by the copyright holder.
  284.47 +-->
  284.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  284.49  <!-- for some information on what you could do (e.g. targets to override). -->
  284.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   285.1 --- a/remoting/server/indexer/source/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   285.2 +++ b/remoting/server/indexer/source/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   285.3 @@ -1,5 +1,48 @@
   285.4  <?xml version="1.0" encoding="UTF-8"?>
   285.5  <!--
   285.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   285.7 +
   285.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   285.9 +
  285.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  285.11 +Other names may be trademarks of their respective owners.
  285.12 +
  285.13 +The contents of this file are subject to the terms of either the GNU
  285.14 +General Public License Version 2 only ("GPL") or the Common
  285.15 +Development and Distribution License("CDDL") (collectively, the
  285.16 +"License"). You may not use this file except in compliance with the
  285.17 +License. You can obtain a copy of the License at
  285.18 +http://www.netbeans.org/cddl-gplv2.html
  285.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  285.20 +specific language governing permissions and limitations under the
  285.21 +License.  When distributing the software, include this License Header
  285.22 +Notice in each file and include the License file at
  285.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  285.24 +particular file as subject to the "Classpath" exception as provided
  285.25 +by Oracle in the GPL Version 2 section of the License file that
  285.26 +accompanied this code. If applicable, add the following below the
  285.27 +License Header, with the fields enclosed by brackets [] replaced by
  285.28 +your own identifying information:
  285.29 +"Portions Copyrighted [year] [name of copyright owner]"
  285.30 +
  285.31 +Contributor(s):
  285.32 +
  285.33 +The Original Software is NetBeans. The Initial Developer of the Original
  285.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  285.35 +Microsystems, Inc. All Rights Reserved.
  285.36 +
  285.37 +If you wish your version of this file to be governed by only the CDDL
  285.38 +or only the GPL Version 2, indicate your decision by adding
  285.39 +"[Contributor] elects to include this software in this distribution
  285.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  285.41 +single choice of license, a recipient has the option to distribute
  285.42 +your version of this file under either the CDDL, the GPL Version 2 or
  285.43 +to extend the choice of license to its licensees as provided above.
  285.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  285.45 +Version 2 license, then the option applies only if the new code is
  285.46 +made subject to such option by the copyright holder.
  285.47 +-->
  285.48 +<!--
  285.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  285.50  ***         EDIT ../build.xml INSTEAD         ***
  285.51  -->
   286.1 --- a/remoting/server/indexer/source/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   286.2 +++ b/remoting/server/indexer/source/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   286.3 @@ -1,3 +1,44 @@
   286.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   286.5 +#
   286.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   286.7 +#
   286.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   286.9 +# Other names may be trademarks of their respective owners.
  286.10 +#
  286.11 +# The contents of this file are subject to the terms of either the GNU
  286.12 +# General Public License Version 2 only ("GPL") or the Common
  286.13 +# Development and Distribution License("CDDL") (collectively, the
  286.14 +# "License"). You may not use this file except in compliance with the
  286.15 +# License. You can obtain a copy of the License at
  286.16 +# http://www.netbeans.org/cddl-gplv2.html
  286.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  286.18 +# specific language governing permissions and limitations under the
  286.19 +# License.  When distributing the software, include this License Header
  286.20 +# Notice in each file and include the License file at
  286.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  286.22 +# particular file as subject to the "Classpath" exception as provided
  286.23 +# by Oracle in the GPL Version 2 section of the License file that
  286.24 +# accompanied this code. If applicable, add the following below the
  286.25 +# License Header, with the fields enclosed by brackets [] replaced by
  286.26 +# your own identifying information:
  286.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  286.28 +#
  286.29 +# Contributor(s):
  286.30 +#
  286.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  286.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  286.33 +# Microsystems, Inc. All Rights Reserved.
  286.34 +#
  286.35 +# If you wish your version of this file to be governed by only the CDDL
  286.36 +# or only the GPL Version 2, indicate your decision by adding
  286.37 +# "[Contributor] elects to include this software in this distribution
  286.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  286.39 +# single choice of license, a recipient has the option to distribute
  286.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  286.41 +# to extend the choice of license to its licensees as provided above.
  286.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  286.43 +# Version 2 license, then the option applies only if the new code is
  286.44 +# made subject to such option by the copyright holder.
  286.45  build.xml.data.CRC32=006ca2fd
  286.46  build.xml.script.CRC32=aab17f8c
  286.47  build.xml.stylesheet.CRC32=a56c6a5b@2.45
   287.1 --- a/remoting/server/indexer/source/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   287.2 +++ b/remoting/server/indexer/source/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   287.3 @@ -1,2 +1,43 @@
   287.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   287.5 +#
   287.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   287.7 +#
   287.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   287.9 +# Other names may be trademarks of their respective owners.
  287.10 +#
  287.11 +# The contents of this file are subject to the terms of either the GNU
  287.12 +# General Public License Version 2 only ("GPL") or the Common
  287.13 +# Development and Distribution License("CDDL") (collectively, the
  287.14 +# "License"). You may not use this file except in compliance with the
  287.15 +# License. You can obtain a copy of the License at
  287.16 +# http://www.netbeans.org/cddl-gplv2.html
  287.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  287.18 +# specific language governing permissions and limitations under the
  287.19 +# License.  When distributing the software, include this License Header
  287.20 +# Notice in each file and include the License file at
  287.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  287.22 +# particular file as subject to the "Classpath" exception as provided
  287.23 +# by Oracle in the GPL Version 2 section of the License file that
  287.24 +# accompanied this code. If applicable, add the following below the
  287.25 +# License Header, with the fields enclosed by brackets [] replaced by
  287.26 +# your own identifying information:
  287.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  287.28 +#
  287.29 +# Contributor(s):
  287.30 +#
  287.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  287.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  287.33 +# Microsystems, Inc. All Rights Reserved.
  287.34 +#
  287.35 +# If you wish your version of this file to be governed by only the CDDL
  287.36 +# or only the GPL Version 2, indicate your decision by adding
  287.37 +# "[Contributor] elects to include this software in this distribution
  287.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  287.39 +# single choice of license, a recipient has the option to distribute
  287.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  287.41 +# to extend the choice of license to its licensees as provided above.
  287.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  287.43 +# Version 2 license, then the option applies only if the new code is
  287.44 +# made subject to such option by the copyright holder.
  287.45  javac.source=1.6
  287.46  javac.compilerargs=-Xlint -Xlint:-serial
   288.1 --- a/remoting/server/indexer/source/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   288.2 +++ b/remoting/server/indexer/source/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   288.3 @@ -1,4 +1,47 @@
   288.4  <?xml version="1.0" encoding="UTF-8"?>
   288.5 +<!--
   288.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   288.7 +
   288.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   288.9 +
  288.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  288.11 +Other names may be trademarks of their respective owners.
  288.12 +
  288.13 +The contents of this file are subject to the terms of either the GNU
  288.14 +General Public License Version 2 only ("GPL") or the Common
  288.15 +Development and Distribution License("CDDL") (collectively, the
  288.16 +"License"). You may not use this file except in compliance with the
  288.17 +License. You can obtain a copy of the License at
  288.18 +http://www.netbeans.org/cddl-gplv2.html
  288.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  288.20 +specific language governing permissions and limitations under the
  288.21 +License.  When distributing the software, include this License Header
  288.22 +Notice in each file and include the License file at
  288.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  288.24 +particular file as subject to the "Classpath" exception as provided
  288.25 +by Oracle in the GPL Version 2 section of the License file that
  288.26 +accompanied this code. If applicable, add the following below the
  288.27 +License Header, with the fields enclosed by brackets [] replaced by
  288.28 +your own identifying information:
  288.29 +"Portions Copyrighted [year] [name of copyright owner]"
  288.30 +
  288.31 +Contributor(s):
  288.32 +
  288.33 +The Original Software is NetBeans. The Initial Developer of the Original
  288.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  288.35 +Microsystems, Inc. All Rights Reserved.
  288.36 +
  288.37 +If you wish your version of this file to be governed by only the CDDL
  288.38 +or only the GPL Version 2, indicate your decision by adding
  288.39 +"[Contributor] elects to include this software in this distribution
  288.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  288.41 +single choice of license, a recipient has the option to distribute
  288.42 +your version of this file under either the CDDL, the GPL Version 2 or
  288.43 +to extend the choice of license to its licensees as provided above.
  288.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  288.45 +Version 2 license, then the option applies only if the new code is
  288.46 +made subject to such option by the copyright holder.
  288.47 +-->
  288.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  288.49      <type>org.netbeans.modules.apisupport.project</type>
  288.50      <configuration>
   289.1 --- a/remoting/server/indexer/source/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   289.2 +++ b/remoting/server/indexer/source/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
   289.3 @@ -1,1 +1,42 @@
   289.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   289.5 +#
   289.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   289.7 +#
   289.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   289.9 +# Other names may be trademarks of their respective owners.
  289.10 +#
  289.11 +# The contents of this file are subject to the terms of either the GNU
  289.12 +# General Public License Version 2 only ("GPL") or the Common
  289.13 +# Development and Distribution License("CDDL") (collectively, the
  289.14 +# "License"). You may not use this file except in compliance with the
  289.15 +# License. You can obtain a copy of the License at
  289.16 +# http://www.netbeans.org/cddl-gplv2.html
  289.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  289.18 +# specific language governing permissions and limitations under the
  289.19 +# License.  When distributing the software, include this License Header
  289.20 +# Notice in each file and include the License file at
  289.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  289.22 +# particular file as subject to the "Classpath" exception as provided
  289.23 +# by Oracle in the GPL Version 2 section of the License file that
  289.24 +# accompanied this code. If applicable, add the following below the
  289.25 +# License Header, with the fields enclosed by brackets [] replaced by
  289.26 +# your own identifying information:
  289.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  289.28 +#
  289.29 +# Contributor(s):
  289.30 +#
  289.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  289.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  289.33 +# Microsystems, Inc. All Rights Reserved.
  289.34 +#
  289.35 +# If you wish your version of this file to be governed by only the CDDL
  289.36 +# or only the GPL Version 2, indicate your decision by adding
  289.37 +# "[Contributor] elects to include this software in this distribution
  289.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  289.39 +# single choice of license, a recipient has the option to distribute
  289.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  289.41 +# to extend the choice of license to its licensees as provided above.
  289.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  289.43 +# Version 2 license, then the option applies only if the new code is
  289.44 +# made subject to such option by the copyright holder.
  289.45  suite.dir=${basedir}/..
   290.1 --- a/remoting/server/indexer/source/src/org/netbeans/modules/jackpot30/indexer/source/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   290.2 +++ b/remoting/server/indexer/source/src/org/netbeans/modules/jackpot30/indexer/source/Bundle.properties	Mon Feb 27 22:40:44 2017 +0100
   290.3 @@ -1,1 +1,42 @@
   290.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   290.5 +#
   290.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   290.7 +#
   290.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   290.9 +# Other names may be trademarks of their respective owners.
  290.10 +#
  290.11 +# The contents of this file are subject to the terms of either the GNU
  290.12 +# General Public License Version 2 only ("GPL") or the Common
  290.13 +# Development and Distribution License("CDDL") (collectively, the
  290.14 +# "License"). You may not use this file except in compliance with the
  290.15 +# License. You can obtain a copy of the License at
  290.16 +# http://www.netbeans.org/cddl-gplv2.html
  290.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  290.18 +# specific language governing permissions and limitations under the
  290.19 +# License.  When distributing the software, include this License Header
  290.20 +# Notice in each file and include the License file at
  290.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  290.22 +# particular file as subject to the "Classpath" exception as provided
  290.23 +# by Oracle in the GPL Version 2 section of the License file that
  290.24 +# accompanied this code. If applicable, add the following below the
  290.25 +# License Header, with the fields enclosed by brackets [] replaced by
  290.26 +# your own identifying information:
  290.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  290.28 +#
  290.29 +# Contributor(s):
  290.30 +#
  290.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  290.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  290.33 +# Microsystems, Inc. All Rights Reserved.
  290.34 +#
  290.35 +# If you wish your version of this file to be governed by only the CDDL
  290.36 +# or only the GPL Version 2, indicate your decision by adding
  290.37 +# "[Contributor] elects to include this software in this distribution
  290.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  290.39 +# single choice of license, a recipient has the option to distribute
  290.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  290.41 +# to extend the choice of license to its licensees as provided above.
  290.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  290.43 +# Version 2 license, then the option applies only if the new code is
  290.44 +# made subject to such option by the copyright holder.
  290.45  OpenIDE-Module-Name=Jackpot 3.0 Source Indexer
   291.1 --- a/remoting/server/indexer/usages/build.xml	Mon Dec 19 11:37:36 2016 +0100
   291.2 +++ b/remoting/server/indexer/usages/build.xml	Mon Feb 27 22:40:44 2017 +0100
   291.3 @@ -1,4 +1,47 @@
   291.4  <?xml version="1.0" encoding="UTF-8"?>
   291.5 +<!--
   291.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   291.7 +
   291.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   291.9 +
  291.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  291.11 +Other names may be trademarks of their respective owners.
  291.12 +
  291.13 +The contents of this file are subject to the terms of either the GNU
  291.14 +General Public License Version 2 only ("GPL") or the Common
  291.15 +Development and Distribution License("CDDL") (collectively, the
  291.16 +"License"). You may not use this file except in compliance with the
  291.17 +License. You can obtain a copy of the License at
  291.18 +http://www.netbeans.org/cddl-gplv2.html
  291.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  291.20 +specific language governing permissions and limitations under the
  291.21 +License.  When distributing the software, include this License Header
  291.22 +Notice in each file and include the License file at
  291.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  291.24 +particular file as subject to the "Classpath" exception as provided
  291.25 +by Oracle in the GPL Version 2 section of the License file that
  291.26 +accompanied this code. If applicable, add the following below the
  291.27 +License Header, with the fields enclosed by brackets [] replaced by
  291.28 +your own identifying information:
  291.29 +"Portions Copyrighted [year] [name of copyright owner]"
  291.30 +
  291.31 +Contributor(s):
  291.32 +
  291.33 +The Original Software is NetBeans. The Initial Developer of the Original
  291.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  291.35 +Microsystems, Inc. All Rights Reserved.
  291.36 +
  291.37 +If you wish your version of this file to be governed by only the CDDL
  291.38 +or only the GPL Version 2, indicate your decision by adding
  291.39 +"[Contributor] elects to include this software in this distribution
  291.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  291.41 +single choice of license, a recipient has the option to distribute
  291.42 +your version of this file under either the CDDL, the GPL Version 2 or
  291.43 +to extend the choice of license to its licensees as provided above.
  291.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  291.45 +Version 2 license, then the option applies only if the new code is
  291.46 +made subject to such option by the copyright holder.
  291.47 +-->
  291.48  <!-- You may freely edit this file. See harness/README in the NetBeans platform -->
  291.49  <!-- for some information on what you could do (e.g. targets to override). -->
  291.50  <!-- If you delete this file and reopen the project it will be recreated. -->
   292.1 --- a/remoting/server/indexer/usages/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   292.2 +++ b/remoting/server/indexer/usages/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   292.3 @@ -1,5 +1,48 @@
   292.4  <?xml version="1.0" encoding="UTF-8"?>
   292.5  <!--
   292.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   292.7 +
   292.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   292.9 +
  292.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  292.11 +Other names may be trademarks of their respective owners.
  292.12 +
  292.13 +The contents of this file are subject to the terms of either the GNU
  292.14 +General Public License Version 2 only ("GPL") or the Common
  292.15 +Development and Distribution License("CDDL") (collectively, the
  292.16 +"License"). You may not use this file except in compliance with the
  292.17 +License. You can obtain a copy of the License at
  292.18 +http://www.netbeans.org/cddl-gplv2.html
  292.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  292.20 +specific language governing permissions and limitations under the
  292.21 +License.  When distributing the software, include this License Header
  292.22 +Notice in each file and include the License file at
  292.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  292.24 +particular file as subject to the "Classpath" exception as provided
  292.25 +by Oracle in the GPL Version 2 section of the License file that
  292.26 +accompanied this code. If applicable, add the following below the
  292.27 +License Header, with the fields enclosed by brackets [] replaced by
  292.28 +your own identifying information:
  292.29 +"Portions Copyrighted [year] [name of copyright owner]"
  292.30 +
  292.31 +Contributor(s):
  292.32 +
  292.33 +The Original Software is NetBeans. The Initial Developer of the Original
  292.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  292.35 +Microsystems, Inc. All Rights Reserved.
  292.36 +
  292.37 +If you wish your version of this file to be governed by only the CDDL
  292.38 +or only the GPL Version 2, indicate your decision by adding
  292.39 +"[Contributor] elects to include this software in this distribution
  292.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  292.41 +single choice of license, a recipient has the option to distribute
  292.42 +your version of this file under either the CDDL, the GPL Version 2 or
  292.43 +to extend the choice of license to its licensees as provided above.
  292.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  292.45 +Version 2 license, then the option applies only if the new code is
  292.46 +made subject to such option by the copyright holder.
  292.47 +-->
  292.48 +<!--
  292.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  292.50  ***         EDIT ../build.xml INSTEAD         ***
  292.51  -->
   293.1 --- a/remoting/server/indexer/usages/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   293.2 +++ b/remoting/server/indexer/usages/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   293.3 @@ -1,3 +1,44 @@
   293.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   293.5 +#
   293.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   293.7 +#
   293.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   293.9 +# Other names may be trademarks of their respective owners.
  293.10 +#
  293.11 +# The contents of this file are subject to the terms of either the GNU
  293.12 +# General Public License Version 2 only ("GPL") or the Common
  293.13 +# Development and Distribution License("CDDL") (collectively, the
  293.14 +# "License"). You may not use this file except in compliance with the
  293.15 +# License. You can obtain a copy of the License at
  293.16 +# http://www.netbeans.org/cddl-gplv2.html
  293.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  293.18 +# specific language governing permissions and limitations under the
  293.19 +# License.  When distributing the software, include this License Header
  293.20 +# Notice in each file and include the License file at
  293.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  293.22 +# particular file as subject to the "Classpath" exception as provided
  293.23 +# by Oracle in the GPL Version 2 section of the License file that
  293.24 +# accompanied this code. If applicable, add the following below the
  293.25 +# License Header, with the fields enclosed by brackets [] replaced by
  293.26 +# your own identifying information:
  293.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  293.28 +#
  293.29 +# Contributor(s):
  293.30 +#
  293.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  293.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  293.33 +# Microsystems, Inc. All Rights Reserved.
  293.34 +#
  293.35 +# If you wish your version of this file to be governed by only the CDDL
  293.36 +# or only the GPL Version 2, indicate your decision by adding
  293.37 +# "[Contributor] elects to include this software in this distribution
  293.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  293.39 +# single choice of license, a recipient has the option to distribute
  293.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  293.41 +# to extend the choice of license to its licensees as provided above.
  293.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  293.43 +# Version 2 license, then the option applies only if the new code is
  293.44 +# made subject to such option by the copyright holder.
  293.45  build.xml.data.CRC32=80410336
  293.46  build.xml.script.CRC32=4ae79e41
  293.47  build.xml.stylesheet.CRC32=a56c6a5b@2.47
   294.1 --- a/remoting/server/indexer/usages/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   294.2 +++ b/remoting/server/indexer/usages/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   294.3 @@ -1,2 +1,43 @@
   294.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   294.5 +#
   294.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   294.7 +#
   294.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   294.9 +# Other names may be trademarks of their respective owners.
  294.10 +#
  294.11 +# The contents of this file are subject to the terms of either the GNU
  294.12 +# General Public License Version 2 only ("GPL") or the Common
  294.13 +# Development and Distribution License("CDDL") (collectively, the
  294.14 +# "License"). You may not use this file except in compliance with the
  294.15 +# License. You can obtain a copy of the License at
  294.16 +# http://www.netbeans.org/cddl-gplv2.html
  294.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  294.18 +# specific language governing permissions and limitations under the
  294.19 +# License.  When distributing the software, include this License Header
  294.20 +# Notice in each file and include the License file at
  294.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  294.22 +# particular file as subject to the "Classpath" exception as provided
  294.23 +# by Oracle in the GPL Version 2 section of the License file that
  294.24 +# accompanied this code. If applicable, add the following below the
  294.25 +# License Header, with the fields enclosed by brackets [] replaced by
  294.26 +# your own identifying information:
  294.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  294.28 +#
  294.29 +# Contributor(s):
  294.30 +#
  294.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  294.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  294.33 +# Microsystems, Inc. All Rights Reserved.
  294.34 +#
  294.35 +# If you wish your version of this file to be governed by only the CDDL
  294.36 +# or only the GPL Version 2, indicate your decision by adding
  294.37 +# "[Contributor] elects to include this software in this distribution
  294.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  294.39 +# single choice of license, a recipient has the option to distribute
  294.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  294.41 +# to extend the choice of license to its licensees as provided above.
  294.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  294.43 +# Version 2 license, then the option applies only if the new code is
  294.44 +# made subject to such option by the copyright holder.
  294.45  javac.source=1.6
  294.46  javac.compilerargs=-Xlint -Xlint:-serial
   295.1 --- a/remoting/server/indexer/usages/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   295.2 +++ b/remoting/server/indexer/usages/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   295.3 @@ -1,4 +1,47 @@
   295.4  <?xml version="1.0" encoding="UTF-8"?>
   295.5 +<!--
   295.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   295.7 +
   295.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   295.9 +
  295.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  295.11 +Other names may be trademarks of their respective owners.
  295.12 +
  295.13 +The contents of this file are subject to the terms of either the GNU
  295.14 +General Public License Version 2 only ("GPL") or the Common
  295.15 +Development and Distribution License("CDDL") (collectively, the
  295.16 +"License"). You may not use this file except in compliance with the
  295.17 +License. You can obtain a copy of the License at
  295.18 +http://www.netbeans.org/cddl-gplv2.html
  295.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  295.20 +specific language governing permissions and limitations under the
  295.21 +License.  When distributing the software, include this License Header
  295.22 +Notice in each file and include the License file at
  295.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  295.24 +particular file as subject to the "Classpath" exception as provided
  295.25 +by Oracle in the GPL Version 2 section of the License file that
  295.26 +accompanied this code. If applicable, add the following below the
  295.27 +License Header, with the fields enclosed by brackets [] replaced by
  295.28 +your own identifying information:
  295.29 +"Portions Copyrighted [year] [name of copyright owner]"
  295.30 +
  295.31 +Contributor(s):
  295.32 +
  295.33 +The Original Software is NetBeans. The Initial Developer of the Original
  295.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  295.35 +Microsystems, Inc. All Rights Reserved.
  295.36 +
  295.37 +If you wish your version of this file to be governed by only the CDDL
  295.38 +or only the GPL Version 2, indicate your decision by adding
  295.39 +"[Contributor] elects to include this software in this distribution
  295.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  295.41 +single choice of license, a recipient has the option to distribute
  295.42 +your version of this file under either the CDDL, the GPL Version 2 or
  295.43 +to extend the choice of license to its licensees as provided above.
  295.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  295.45 +Version 2 license, then the option applies only if the new code is
  295.46 +made subject to such option by the copyright holder.
  295.47 +-->
  295.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  295.49      <type>org.netbeans.modules.apisupport.project</type>
  295.50      <configuration>
   296.1 --- a/remoting/server/indexer/usages/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   296.2 +++ b/remoting/server/indexer/usages/nbproject/suite.properties	Mon Feb 27 22:40:44 2017 +0100
   296.3 @@ -1,1 +1,42 @@
   296.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   296.5 +#
   296.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   296.7 +#
   296.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   296.9 +# Other names may be trademarks of their respective owners.
  296.10 +#
  296.11 +# The contents of this file are subject to the terms of either the GNU
  296.12 +# General Public License Version 2 only ("GPL") or the Common
  296.13 +# Development and Distribution License("CDDL") (collectively, the
  296.14 +# "License"). You may not use this file except in compliance with the
  296.15 +# License. You can obtain a copy of the License at
  296.16 +# http://www.netbeans.org/cddl-gplv2.html
  296.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  296.18 +# specific language governing permissions and limitations under the
  296.19 +# License.  When distributing the software, include this License Header
  296.20 +# Notice in each file and include the License file at
  296.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  296.22 +# particular file as subject to the "Classpath" exception as provided
  296.23 +# by Oracle in the GPL Version 2 section of the License file that
  296.24 +# accompanied this code. If applicable, add the following below the
  296.25 +# License Header, with the fields enclosed by brackets [] replaced by
  296.26 +# your own identifying information:
  296.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  296.28 +#
  296.29 +# Contributor(s):
  296.30 +#
  296.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  296.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  296.33 +# Microsystems, Inc. All Rights Reserved.
  296.34 +#
  296.35 +# If you wish your version of this file to be governed by only the CDDL
  296.36 +# or only the GPL Version 2, indicate your decision by adding
  296.37 +# "[Contributor] elects to include this software in this distribution
  296.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  296.39 +# single choice of license, a recipient has the option to distribute
  296.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  296.41 +# to extend the choice of license to its licensees as provided above.
  296.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  296.43 +# Version 2 license, then the option applies only if the new code is
  296.44 +# made subject to such option by the copyright holder.
  296.45  suite.dir=${basedir}/..
   297.1 --- a/remoting/server/scripts/index.sh	Mon Dec 19 11:37:36 2016 +0100
   297.2 +++ b/remoting/server/scripts/index.sh	Mon Feb 27 22:40:44 2017 +0100
   297.3 @@ -1,3 +1,45 @@
   297.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   297.5 +#
   297.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   297.7 +#
   297.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   297.9 +# Other names may be trademarks of their respective owners.
  297.10 +#
  297.11 +# The contents of this file are subject to the terms of either the GNU
  297.12 +# General Public License Version 2 only ("GPL") or the Common
  297.13 +# Development and Distribution License("CDDL") (collectively, the
  297.14 +# "License"). You may not use this file except in compliance with the
  297.15 +# License. You can obtain a copy of the License at
  297.16 +# http://www.netbeans.org/cddl-gplv2.html
  297.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  297.18 +# specific language governing permissions and limitations under the
  297.19 +# License.  When distributing the software, include this License Header
  297.20 +# Notice in each file and include the License file at
  297.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  297.22 +# particular file as subject to the "Classpath" exception as provided
  297.23 +# by Oracle in the GPL Version 2 section of the License file that
  297.24 +# accompanied this code. If applicable, add the following below the
  297.25 +# License Header, with the fields enclosed by brackets [] replaced by
  297.26 +# your own identifying information:
  297.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  297.28 +#
  297.29 +# Contributor(s):
  297.30 +#
  297.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  297.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  297.33 +# Microsystems, Inc. All Rights Reserved.
  297.34 +#
  297.35 +# If you wish your version of this file to be governed by only the CDDL
  297.36 +# or only the GPL Version 2, indicate your decision by adding
  297.37 +# "[Contributor] elects to include this software in this distribution
  297.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  297.39 +# single choice of license, a recipient has the option to distribute
  297.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  297.41 +# to extend the choice of license to its licensees as provided above.
  297.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  297.43 +# Version 2 license, then the option applies only if the new code is
  297.44 +# made subject to such option by the copyright holder.
  297.45 +
  297.46  DIR=`dirname $0`
  297.47  USERDIR=`mktemp -d`;
  297.48  trap "rm -rf -- '$USERDIR'" EXIT
   298.1 --- a/remoting/server/scripts/web.sh	Mon Dec 19 11:37:36 2016 +0100
   298.2 +++ b/remoting/server/scripts/web.sh	Mon Feb 27 22:40:44 2017 +0100
   298.3 @@ -1,8 +1,51 @@
   298.4  #!/bin/bash
   298.5 +
   298.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   298.7 +#
   298.8 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   298.9 +#
  298.10 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  298.11 +# Other names may be trademarks of their respective owners.
  298.12 +#
  298.13 +# The contents of this file are subject to the terms of either the GNU
  298.14 +# General Public License Version 2 only ("GPL") or the Common
  298.15 +# Development and Distribution License("CDDL") (collectively, the
  298.16 +# "License"). You may not use this file except in compliance with the
  298.17 +# License. You can obtain a copy of the License at
  298.18 +# http://www.netbeans.org/cddl-gplv2.html
  298.19 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  298.20 +# specific language governing permissions and limitations under the
  298.21 +# License.  When distributing the software, include this License Header
  298.22 +# Notice in each file and include the License file at
  298.23 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  298.24 +# particular file as subject to the "Classpath" exception as provided
  298.25 +# by Oracle in the GPL Version 2 section of the License file that
  298.26 +# accompanied this code. If applicable, add the following below the
  298.27 +# License Header, with the fields enclosed by brackets [] replaced by
  298.28 +# your own identifying information:
  298.29 +# "Portions Copyrighted [year] [name of copyright owner]"
  298.30 +#
  298.31 +# Contributor(s):
  298.32 +#
  298.33 +# The Original Software is NetBeans. The Initial Developer of the Original
  298.34 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  298.35 +# Microsystems, Inc. All Rights Reserved.
  298.36 +#
  298.37 +# If you wish your version of this file to be governed by only the CDDL
  298.38 +# or only the GPL Version 2, indicate your decision by adding
  298.39 +# "[Contributor] elects to include this software in this distribution
  298.40 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  298.41 +# single choice of license, a recipient has the option to distribute
  298.42 +# your version of this file under either the CDDL, the GPL Version 2 or
  298.43 +# to extend the choice of license to its licensees as provided above.
  298.44 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  298.45 +# Version 2 license, then the option applies only if the new code is
  298.46 +# made subject to such option by the copyright holder.
  298.47 +
  298.48  #XXX: unix only
  298.49  DIR=$(readlink -m `dirname $0`)
  298.50  classpath="$DIR/web/web.main.jar"
  298.51  for jar in $DIR/web/lib/*.jar; do
  298.52      classpath="$classpath:$jar"
  298.53  done
  298.54 -exec java $JACKPOT_WEB_OPTS -Djava.index.useMemCache=false -Xbootclasspath/p:$DIR/web/lib/nb-javac-api.jar:$DIR/web/lib/nb-javac-impl.jar -classpath "$classpath" web.main.WebMain "$@" "$DIR/web/public_html"
  298.55 +exec java $JACKPOT_WEB_OPTS -Djava.index.useMemCache=false -Xbootclasspath/p:$DIR/web/lib/nb-javac-api.jar:$DIR/web/lib/nb-javac-impl.jar -classpath "$classpath" org.netbeans.modules.jackpot30.backend.main.WebMain "$@" "$DIR/web/public_html"
   299.1 --- a/remoting/server/tests/data/group1/prj1/build.xml	Mon Dec 19 11:37:36 2016 +0100
   299.2 +++ b/remoting/server/tests/data/group1/prj1/build.xml	Mon Feb 27 22:40:44 2017 +0100
   299.3 @@ -1,4 +1,47 @@
   299.4  <?xml version="1.0" encoding="UTF-8"?>
   299.5 +<!--
   299.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   299.7 +
   299.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   299.9 +
  299.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  299.11 +Other names may be trademarks of their respective owners.
  299.12 +
  299.13 +The contents of this file are subject to the terms of either the GNU
  299.14 +General Public License Version 2 only ("GPL") or the Common
  299.15 +Development and Distribution License("CDDL") (collectively, the
  299.16 +"License"). You may not use this file except in compliance with the
  299.17 +License. You can obtain a copy of the License at
  299.18 +http://www.netbeans.org/cddl-gplv2.html
  299.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  299.20 +specific language governing permissions and limitations under the
  299.21 +License.  When distributing the software, include this License Header
  299.22 +Notice in each file and include the License file at
  299.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  299.24 +particular file as subject to the "Classpath" exception as provided
  299.25 +by Oracle in the GPL Version 2 section of the License file that
  299.26 +accompanied this code. If applicable, add the following below the
  299.27 +License Header, with the fields enclosed by brackets [] replaced by
  299.28 +your own identifying information:
  299.29 +"Portions Copyrighted [year] [name of copyright owner]"
  299.30 +
  299.31 +Contributor(s):
  299.32 +
  299.33 +The Original Software is NetBeans. The Initial Developer of the Original
  299.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  299.35 +Microsystems, Inc. All Rights Reserved.
  299.36 +
  299.37 +If you wish your version of this file to be governed by only the CDDL
  299.38 +or only the GPL Version 2, indicate your decision by adding
  299.39 +"[Contributor] elects to include this software in this distribution
  299.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  299.41 +single choice of license, a recipient has the option to distribute
  299.42 +your version of this file under either the CDDL, the GPL Version 2 or
  299.43 +to extend the choice of license to its licensees as provided above.
  299.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  299.45 +Version 2 license, then the option applies only if the new code is
  299.46 +made subject to such option by the copyright holder.
  299.47 +-->
  299.48  <!-- You may freely edit this file. See commented blocks below for -->
  299.49  <!-- some examples of how to customize the build. -->
  299.50  <!-- (If you delete it and reopen the project it will be recreated.) -->
   300.1 --- a/remoting/server/tests/data/group1/prj1/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   300.2 +++ b/remoting/server/tests/data/group1/prj1/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   300.3 @@ -1,5 +1,48 @@
   300.4  <?xml version="1.0" encoding="UTF-8"?>
   300.5  <!--
   300.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   300.7 +
   300.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   300.9 +
  300.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  300.11 +Other names may be trademarks of their respective owners.
  300.12 +
  300.13 +The contents of this file are subject to the terms of either the GNU
  300.14 +General Public License Version 2 only ("GPL") or the Common
  300.15 +Development and Distribution License("CDDL") (collectively, the
  300.16 +"License"). You may not use this file except in compliance with the
  300.17 +License. You can obtain a copy of the License at
  300.18 +http://www.netbeans.org/cddl-gplv2.html
  300.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  300.20 +specific language governing permissions and limitations under the
  300.21 +License.  When distributing the software, include this License Header
  300.22 +Notice in each file and include the License file at
  300.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  300.24 +particular file as subject to the "Classpath" exception as provided
  300.25 +by Oracle in the GPL Version 2 section of the License file that
  300.26 +accompanied this code. If applicable, add the following below the
  300.27 +License Header, with the fields enclosed by brackets [] replaced by
  300.28 +your own identifying information:
  300.29 +"Portions Copyrighted [year] [name of copyright owner]"
  300.30 +
  300.31 +Contributor(s):
  300.32 +
  300.33 +The Original Software is NetBeans. The Initial Developer of the Original
  300.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  300.35 +Microsystems, Inc. All Rights Reserved.
  300.36 +
  300.37 +If you wish your version of this file to be governed by only the CDDL
  300.38 +or only the GPL Version 2, indicate your decision by adding
  300.39 +"[Contributor] elects to include this software in this distribution
  300.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  300.41 +single choice of license, a recipient has the option to distribute
  300.42 +your version of this file under either the CDDL, the GPL Version 2 or
  300.43 +to extend the choice of license to its licensees as provided above.
  300.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  300.45 +Version 2 license, then the option applies only if the new code is
  300.46 +made subject to such option by the copyright holder.
  300.47 +-->
  300.48 +<!--
  300.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  300.50  ***         EDIT ../build.xml INSTEAD         ***
  300.51  
   301.1 --- a/remoting/server/tests/data/group1/prj1/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   301.2 +++ b/remoting/server/tests/data/group1/prj1/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   301.3 @@ -1,3 +1,44 @@
   301.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   301.5 +#
   301.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   301.7 +#
   301.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   301.9 +# Other names may be trademarks of their respective owners.
  301.10 +#
  301.11 +# The contents of this file are subject to the terms of either the GNU
  301.12 +# General Public License Version 2 only ("GPL") or the Common
  301.13 +# Development and Distribution License("CDDL") (collectively, the
  301.14 +# "License"). You may not use this file except in compliance with the
  301.15 +# License. You can obtain a copy of the License at
  301.16 +# http://www.netbeans.org/cddl-gplv2.html
  301.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  301.18 +# specific language governing permissions and limitations under the
  301.19 +# License.  When distributing the software, include this License Header
  301.20 +# Notice in each file and include the License file at
  301.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  301.22 +# particular file as subject to the "Classpath" exception as provided
  301.23 +# by Oracle in the GPL Version 2 section of the License file that
  301.24 +# accompanied this code. If applicable, add the following below the
  301.25 +# License Header, with the fields enclosed by brackets [] replaced by
  301.26 +# your own identifying information:
  301.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  301.28 +#
  301.29 +# Contributor(s):
  301.30 +#
  301.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  301.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  301.33 +# Microsystems, Inc. All Rights Reserved.
  301.34 +#
  301.35 +# If you wish your version of this file to be governed by only the CDDL
  301.36 +# or only the GPL Version 2, indicate your decision by adding
  301.37 +# "[Contributor] elects to include this software in this distribution
  301.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  301.39 +# single choice of license, a recipient has the option to distribute
  301.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  301.41 +# to extend the choice of license to its licensees as provided above.
  301.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  301.43 +# Version 2 license, then the option applies only if the new code is
  301.44 +# made subject to such option by the copyright holder.
  301.45  build.xml.data.CRC32=9fba8b40
  301.46  build.xml.script.CRC32=a2a6ce1b
  301.47  build.xml.stylesheet.CRC32=8064a381@1.78.0.48
   302.1 --- a/remoting/server/tests/data/group1/prj1/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   302.2 +++ b/remoting/server/tests/data/group1/prj1/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   302.3 @@ -1,3 +1,44 @@
   302.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   302.5 +#
   302.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   302.7 +#
   302.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   302.9 +# Other names may be trademarks of their respective owners.
  302.10 +#
  302.11 +# The contents of this file are subject to the terms of either the GNU
  302.12 +# General Public License Version 2 only ("GPL") or the Common
  302.13 +# Development and Distribution License("CDDL") (collectively, the
  302.14 +# "License"). You may not use this file except in compliance with the
  302.15 +# License. You can obtain a copy of the License at
  302.16 +# http://www.netbeans.org/cddl-gplv2.html
  302.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  302.18 +# specific language governing permissions and limitations under the
  302.19 +# License.  When distributing the software, include this License Header
  302.20 +# Notice in each file and include the License file at
  302.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  302.22 +# particular file as subject to the "Classpath" exception as provided
  302.23 +# by Oracle in the GPL Version 2 section of the License file that
  302.24 +# accompanied this code. If applicable, add the following below the
  302.25 +# License Header, with the fields enclosed by brackets [] replaced by
  302.26 +# your own identifying information:
  302.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  302.28 +#
  302.29 +# Contributor(s):
  302.30 +#
  302.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  302.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  302.33 +# Microsystems, Inc. All Rights Reserved.
  302.34 +#
  302.35 +# If you wish your version of this file to be governed by only the CDDL
  302.36 +# or only the GPL Version 2, indicate your decision by adding
  302.37 +# "[Contributor] elects to include this software in this distribution
  302.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  302.39 +# single choice of license, a recipient has the option to distribute
  302.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  302.41 +# to extend the choice of license to its licensees as provided above.
  302.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  302.43 +# Version 2 license, then the option applies only if the new code is
  302.44 +# made subject to such option by the copyright holder.
  302.45  annotation.processing.enabled=true
  302.46  annotation.processing.enabled.in.editor=false
  302.47  annotation.processing.processor.options=
   303.1 --- a/remoting/server/tests/data/group1/prj1/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   303.2 +++ b/remoting/server/tests/data/group1/prj1/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   303.3 @@ -1,4 +1,47 @@
   303.4  <?xml version="1.0" encoding="UTF-8"?>
   303.5 +<!--
   303.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   303.7 +
   303.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   303.9 +
  303.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  303.11 +Other names may be trademarks of their respective owners.
  303.12 +
  303.13 +The contents of this file are subject to the terms of either the GNU
  303.14 +General Public License Version 2 only ("GPL") or the Common
  303.15 +Development and Distribution License("CDDL") (collectively, the
  303.16 +"License"). You may not use this file except in compliance with the
  303.17 +License. You can obtain a copy of the License at
  303.18 +http://www.netbeans.org/cddl-gplv2.html
  303.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  303.20 +specific language governing permissions and limitations under the
  303.21 +License.  When distributing the software, include this License Header
  303.22 +Notice in each file and include the License file at
  303.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  303.24 +particular file as subject to the "Classpath" exception as provided
  303.25 +by Oracle in the GPL Version 2 section of the License file that
  303.26 +accompanied this code. If applicable, add the following below the
  303.27 +License Header, with the fields enclosed by brackets [] replaced by
  303.28 +your own identifying information:
  303.29 +"Portions Copyrighted [year] [name of copyright owner]"
  303.30 +
  303.31 +Contributor(s):
  303.32 +
  303.33 +The Original Software is NetBeans. The Initial Developer of the Original
  303.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  303.35 +Microsystems, Inc. All Rights Reserved.
  303.36 +
  303.37 +If you wish your version of this file to be governed by only the CDDL
  303.38 +or only the GPL Version 2, indicate your decision by adding
  303.39 +"[Contributor] elects to include this software in this distribution
  303.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  303.41 +single choice of license, a recipient has the option to distribute
  303.42 +your version of this file under either the CDDL, the GPL Version 2 or
  303.43 +to extend the choice of license to its licensees as provided above.
  303.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  303.45 +Version 2 license, then the option applies only if the new code is
  303.46 +made subject to such option by the copyright holder.
  303.47 +-->
  303.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  303.49      <type>org.netbeans.modules.java.j2seproject</type>
  303.50      <configuration>
   304.1 --- a/remoting/server/tests/data/group1/prj1/src/project1/A.java	Mon Dec 19 11:37:36 2016 +0100
   304.2 +++ b/remoting/server/tests/data/group1/prj1/src/project1/A.java	Mon Feb 27 22:40:44 2017 +0100
   304.3 @@ -1,3 +1,46 @@
   304.4 +/*
   304.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   304.6 + *
   304.7 + * Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   304.8 + *
   304.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  304.10 + * Other names may be trademarks of their respective owners.
  304.11 + *
  304.12 + * The contents of this file are subject to the terms of either the GNU
  304.13 + * General Public License Version 2 only ("GPL") or the Common
  304.14 + * Development and Distribution License("CDDL") (collectively, the
  304.15 + * "License"). You may not use this file except in compliance with the
  304.16 + * License. You can obtain a copy of the License at
  304.17 + * http://www.netbeans.org/cddl-gplv2.html
  304.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  304.19 + * specific language governing permissions and limitations under the
  304.20 + * License.  When distributing the software, include this License Header
  304.21 + * Notice in each file and include the License file at
  304.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  304.23 + * particular file as subject to the "Classpath" exception as provided
  304.24 + * by Oracle in the GPL Version 2 section of the License file that
  304.25 + * accompanied this code. If applicable, add the following below the
  304.26 + * License Header, with the fields enclosed by brackets [] replaced by
  304.27 + * your own identifying information:
  304.28 + * "Portions Copyrighted [year] [name of copyright owner]"
  304.29 + *
  304.30 + * Contributor(s):
  304.31 + *
  304.32 + * The Original Software is NetBeans. The Initial Developer of the Original
  304.33 + * Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  304.34 + * Microsystems, Inc. All Rights Reserved.
  304.35 + *
  304.36 + * If you wish your version of this file to be governed by only the CDDL
  304.37 + * or only the GPL Version 2, indicate your decision by adding
  304.38 + * "[Contributor] elects to include this software in this distribution
  304.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  304.40 + * single choice of license, a recipient has the option to distribute
  304.41 + * your version of this file under either the CDDL, the GPL Version 2 or
  304.42 + * to extend the choice of license to its licensees as provided above.
  304.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  304.44 + * Version 2 license, then the option applies only if the new code is
  304.45 + * made subject to such option by the copyright holder.
  304.46 + */
  304.47  package project1;
  304.48  
  304.49  public class A {
   305.1 --- a/remoting/server/tests/data/group1/prj1/src/project1/B.java	Mon Dec 19 11:37:36 2016 +0100
   305.2 +++ b/remoting/server/tests/data/group1/prj1/src/project1/B.java	Mon Feb 27 22:40:44 2017 +0100
   305.3 @@ -1,3 +1,46 @@
   305.4 +/*
   305.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   305.6 + *
   305.7 + * Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   305.8 + *
   305.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  305.10 + * Other names may be trademarks of their respective owners.
  305.11 + *
  305.12 + * The contents of this file are subject to the terms of either the GNU
  305.13 + * General Public License Version 2 only ("GPL") or the Common
  305.14 + * Development and Distribution License("CDDL") (collectively, the
  305.15 + * "License"). You may not use this file except in compliance with the
  305.16 + * License. You can obtain a copy of the License at
  305.17 + * http://www.netbeans.org/cddl-gplv2.html
  305.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  305.19 + * specific language governing permissions and limitations under the
  305.20 + * License.  When distributing the software, include this License Header
  305.21 + * Notice in each file and include the License file at
  305.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  305.23 + * particular file as subject to the "Classpath" exception as provided
  305.24 + * by Oracle in the GPL Version 2 section of the License file that
  305.25 + * accompanied this code. If applicable, add the following below the
  305.26 + * License Header, with the fields enclosed by brackets [] replaced by
  305.27 + * your own identifying information:
  305.28 + * "Portions Copyrighted [year] [name of copyright owner]"
  305.29 + *
  305.30 + * Contributor(s):
  305.31 + *
  305.32 + * The Original Software is NetBeans. The Initial Developer of the Original
  305.33 + * Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  305.34 + * Microsystems, Inc. All Rights Reserved.
  305.35 + *
  305.36 + * If you wish your version of this file to be governed by only the CDDL
  305.37 + * or only the GPL Version 2, indicate your decision by adding
  305.38 + * "[Contributor] elects to include this software in this distribution
  305.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  305.40 + * single choice of license, a recipient has the option to distribute
  305.41 + * your version of this file under either the CDDL, the GPL Version 2 or
  305.42 + * to extend the choice of license to its licensees as provided above.
  305.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  305.44 + * Version 2 license, then the option applies only if the new code is
  305.45 + * made subject to such option by the copyright holder.
  305.46 + */
  305.47  package project1;
  305.48  
  305.49  public class B {
   306.1 --- a/remoting/server/tests/integration-data/example/build.xml	Mon Dec 19 11:37:36 2016 +0100
   306.2 +++ b/remoting/server/tests/integration-data/example/build.xml	Mon Feb 27 22:40:44 2017 +0100
   306.3 @@ -1,4 +1,47 @@
   306.4  <?xml version="1.0" encoding="UTF-8"?>
   306.5 +<!--
   306.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   306.7 +
   306.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   306.9 +
  306.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  306.11 +Other names may be trademarks of their respective owners.
  306.12 +
  306.13 +The contents of this file are subject to the terms of either the GNU
  306.14 +General Public License Version 2 only ("GPL") or the Common
  306.15 +Development and Distribution License("CDDL") (collectively, the
  306.16 +"License"). You may not use this file except in compliance with the
  306.17 +License. You can obtain a copy of the License at
  306.18 +http://www.netbeans.org/cddl-gplv2.html
  306.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  306.20 +specific language governing permissions and limitations under the
  306.21 +License.  When distributing the software, include this License Header
  306.22 +Notice in each file and include the License file at
  306.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  306.24 +particular file as subject to the "Classpath" exception as provided
  306.25 +by Oracle in the GPL Version 2 section of the License file that
  306.26 +accompanied this code. If applicable, add the following below the
  306.27 +License Header, with the fields enclosed by brackets [] replaced by
  306.28 +your own identifying information:
  306.29 +"Portions Copyrighted [year] [name of copyright owner]"
  306.30 +
  306.31 +Contributor(s):
  306.32 +
  306.33 +The Original Software is NetBeans. The Initial Developer of the Original
  306.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  306.35 +Microsystems, Inc. All Rights Reserved.
  306.36 +
  306.37 +If you wish your version of this file to be governed by only the CDDL
  306.38 +or only the GPL Version 2, indicate your decision by adding
  306.39 +"[Contributor] elects to include this software in this distribution
  306.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  306.41 +single choice of license, a recipient has the option to distribute
  306.42 +your version of this file under either the CDDL, the GPL Version 2 or
  306.43 +to extend the choice of license to its licensees as provided above.
  306.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  306.45 +Version 2 license, then the option applies only if the new code is
  306.46 +made subject to such option by the copyright holder.
  306.47 +-->
  306.48  <!-- You may freely edit this file. See commented blocks below for -->
  306.49  <!-- some examples of how to customize the build. -->
  306.50  <!-- (If you delete it and reopen the project it will be recreated.) -->
   307.1 --- a/remoting/server/tests/integration-data/example/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   307.2 +++ b/remoting/server/tests/integration-data/example/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   307.3 @@ -1,5 +1,48 @@
   307.4  <?xml version="1.0" encoding="UTF-8"?>
   307.5  <!--
   307.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   307.7 +
   307.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   307.9 +
  307.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  307.11 +Other names may be trademarks of their respective owners.
  307.12 +
  307.13 +The contents of this file are subject to the terms of either the GNU
  307.14 +General Public License Version 2 only ("GPL") or the Common
  307.15 +Development and Distribution License("CDDL") (collectively, the
  307.16 +"License"). You may not use this file except in compliance with the
  307.17 +License. You can obtain a copy of the License at
  307.18 +http://www.netbeans.org/cddl-gplv2.html
  307.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  307.20 +specific language governing permissions and limitations under the
  307.21 +License.  When distributing the software, include this License Header
  307.22 +Notice in each file and include the License file at
  307.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  307.24 +particular file as subject to the "Classpath" exception as provided
  307.25 +by Oracle in the GPL Version 2 section of the License file that
  307.26 +accompanied this code. If applicable, add the following below the
  307.27 +License Header, with the fields enclosed by brackets [] replaced by
  307.28 +your own identifying information:
  307.29 +"Portions Copyrighted [year] [name of copyright owner]"
  307.30 +
  307.31 +Contributor(s):
  307.32 +
  307.33 +The Original Software is NetBeans. The Initial Developer of the Original
  307.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  307.35 +Microsystems, Inc. All Rights Reserved.
  307.36 +
  307.37 +If you wish your version of this file to be governed by only the CDDL
  307.38 +or only the GPL Version 2, indicate your decision by adding
  307.39 +"[Contributor] elects to include this software in this distribution
  307.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  307.41 +single choice of license, a recipient has the option to distribute
  307.42 +your version of this file under either the CDDL, the GPL Version 2 or
  307.43 +to extend the choice of license to its licensees as provided above.
  307.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  307.45 +Version 2 license, then the option applies only if the new code is
  307.46 +made subject to such option by the copyright holder.
  307.47 +-->
  307.48 +<!--
  307.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  307.50  ***         EDIT ../build.xml INSTEAD         ***
  307.51  
   308.1 --- a/remoting/server/tests/integration-data/example/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   308.2 +++ b/remoting/server/tests/integration-data/example/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   308.3 @@ -1,3 +1,44 @@
   308.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   308.5 +#
   308.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   308.7 +#
   308.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   308.9 +# Other names may be trademarks of their respective owners.
  308.10 +#
  308.11 +# The contents of this file are subject to the terms of either the GNU
  308.12 +# General Public License Version 2 only ("GPL") or the Common
  308.13 +# Development and Distribution License("CDDL") (collectively, the
  308.14 +# "License"). You may not use this file except in compliance with the
  308.15 +# License. You can obtain a copy of the License at
  308.16 +# http://www.netbeans.org/cddl-gplv2.html
  308.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  308.18 +# specific language governing permissions and limitations under the
  308.19 +# License.  When distributing the software, include this License Header
  308.20 +# Notice in each file and include the License file at
  308.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  308.22 +# particular file as subject to the "Classpath" exception as provided
  308.23 +# by Oracle in the GPL Version 2 section of the License file that
  308.24 +# accompanied this code. If applicable, add the following below the
  308.25 +# License Header, with the fields enclosed by brackets [] replaced by
  308.26 +# your own identifying information:
  308.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  308.28 +#
  308.29 +# Contributor(s):
  308.30 +#
  308.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  308.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  308.33 +# Microsystems, Inc. All Rights Reserved.
  308.34 +#
  308.35 +# If you wish your version of this file to be governed by only the CDDL
  308.36 +# or only the GPL Version 2, indicate your decision by adding
  308.37 +# "[Contributor] elects to include this software in this distribution
  308.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  308.39 +# single choice of license, a recipient has the option to distribute
  308.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  308.41 +# to extend the choice of license to its licensees as provided above.
  308.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  308.43 +# Version 2 license, then the option applies only if the new code is
  308.44 +# made subject to such option by the copyright holder.
  308.45  build.xml.data.CRC32=e1bb0e2b
  308.46  build.xml.script.CRC32=825a45da
  308.47  build.xml.stylesheet.CRC32=8064a381@1.61.0.46
   309.1 --- a/remoting/server/tests/integration-data/example/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   309.2 +++ b/remoting/server/tests/integration-data/example/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   309.3 @@ -1,3 +1,44 @@
   309.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   309.5 +#
   309.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   309.7 +#
   309.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   309.9 +# Other names may be trademarks of their respective owners.
  309.10 +#
  309.11 +# The contents of this file are subject to the terms of either the GNU
  309.12 +# General Public License Version 2 only ("GPL") or the Common
  309.13 +# Development and Distribution License("CDDL") (collectively, the
  309.14 +# "License"). You may not use this file except in compliance with the
  309.15 +# License. You can obtain a copy of the License at
  309.16 +# http://www.netbeans.org/cddl-gplv2.html
  309.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  309.18 +# specific language governing permissions and limitations under the
  309.19 +# License.  When distributing the software, include this License Header
  309.20 +# Notice in each file and include the License file at
  309.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  309.22 +# particular file as subject to the "Classpath" exception as provided
  309.23 +# by Oracle in the GPL Version 2 section of the License file that
  309.24 +# accompanied this code. If applicable, add the following below the
  309.25 +# License Header, with the fields enclosed by brackets [] replaced by
  309.26 +# your own identifying information:
  309.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  309.28 +#
  309.29 +# Contributor(s):
  309.30 +#
  309.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  309.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  309.33 +# Microsystems, Inc. All Rights Reserved.
  309.34 +#
  309.35 +# If you wish your version of this file to be governed by only the CDDL
  309.36 +# or only the GPL Version 2, indicate your decision by adding
  309.37 +# "[Contributor] elects to include this software in this distribution
  309.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  309.39 +# single choice of license, a recipient has the option to distribute
  309.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  309.41 +# to extend the choice of license to its licensees as provided above.
  309.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  309.43 +# Version 2 license, then the option applies only if the new code is
  309.44 +# made subject to such option by the copyright holder.
  309.45  annotation.processing.enabled=true
  309.46  annotation.processing.enabled.in.editor=false
  309.47  annotation.processing.processor.options=
   310.1 --- a/remoting/server/tests/integration-data/example/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   310.2 +++ b/remoting/server/tests/integration-data/example/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   310.3 @@ -1,4 +1,47 @@
   310.4  <?xml version="1.0" encoding="UTF-8"?>
   310.5 +<!--
   310.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   310.7 +
   310.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   310.9 +
  310.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  310.11 +Other names may be trademarks of their respective owners.
  310.12 +
  310.13 +The contents of this file are subject to the terms of either the GNU
  310.14 +General Public License Version 2 only ("GPL") or the Common
  310.15 +Development and Distribution License("CDDL") (collectively, the
  310.16 +"License"). You may not use this file except in compliance with the
  310.17 +License. You can obtain a copy of the License at
  310.18 +http://www.netbeans.org/cddl-gplv2.html
  310.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  310.20 +specific language governing permissions and limitations under the
  310.21 +License.  When distributing the software, include this License Header
  310.22 +Notice in each file and include the License file at
  310.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  310.24 +particular file as subject to the "Classpath" exception as provided
  310.25 +by Oracle in the GPL Version 2 section of the License file that
  310.26 +accompanied this code. If applicable, add the following below the
  310.27 +License Header, with the fields enclosed by brackets [] replaced by
  310.28 +your own identifying information:
  310.29 +"Portions Copyrighted [year] [name of copyright owner]"
  310.30 +
  310.31 +Contributor(s):
  310.32 +
  310.33 +The Original Software is NetBeans. The Initial Developer of the Original
  310.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  310.35 +Microsystems, Inc. All Rights Reserved.
  310.36 +
  310.37 +If you wish your version of this file to be governed by only the CDDL
  310.38 +or only the GPL Version 2, indicate your decision by adding
  310.39 +"[Contributor] elects to include this software in this distribution
  310.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  310.41 +single choice of license, a recipient has the option to distribute
  310.42 +your version of this file under either the CDDL, the GPL Version 2 or
  310.43 +to extend the choice of license to its licensees as provided above.
  310.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  310.45 +Version 2 license, then the option applies only if the new code is
  310.46 +made subject to such option by the copyright holder.
  310.47 +-->
  310.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  310.49      <type>org.netbeans.modules.java.j2seproject</type>
  310.50      <configuration>
   311.1 --- a/remoting/server/tests/integration-data/example/src/org/netbeans/modules/jackpot30/example/ClassA.java	Mon Dec 19 11:37:36 2016 +0100
   311.2 +++ b/remoting/server/tests/integration-data/example/src/org/netbeans/modules/jackpot30/example/ClassA.java	Mon Feb 27 22:40:44 2017 +0100
   311.3 @@ -1,3 +1,46 @@
   311.4 +/*
   311.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   311.6 + *
   311.7 + * Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   311.8 + *
   311.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  311.10 + * Other names may be trademarks of their respective owners.
  311.11 + *
  311.12 + * The contents of this file are subject to the terms of either the GNU
  311.13 + * General Public License Version 2 only ("GPL") or the Common
  311.14 + * Development and Distribution License("CDDL") (collectively, the
  311.15 + * "License"). You may not use this file except in compliance with the
  311.16 + * License. You can obtain a copy of the License at
  311.17 + * http://www.netbeans.org/cddl-gplv2.html
  311.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  311.19 + * specific language governing permissions and limitations under the
  311.20 + * License.  When distributing the software, include this License Header
  311.21 + * Notice in each file and include the License file at
  311.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  311.23 + * particular file as subject to the "Classpath" exception as provided
  311.24 + * by Oracle in the GPL Version 2 section of the License file that
  311.25 + * accompanied this code. If applicable, add the following below the
  311.26 + * License Header, with the fields enclosed by brackets [] replaced by
  311.27 + * your own identifying information:
  311.28 + * "Portions Copyrighted [year] [name of copyright owner]"
  311.29 + *
  311.30 + * Contributor(s):
  311.31 + *
  311.32 + * The Original Software is NetBeans. The Initial Developer of the Original
  311.33 + * Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  311.34 + * Microsystems, Inc. All Rights Reserved.
  311.35 + *
  311.36 + * If you wish your version of this file to be governed by only the CDDL
  311.37 + * or only the GPL Version 2, indicate your decision by adding
  311.38 + * "[Contributor] elects to include this software in this distribution
  311.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  311.40 + * single choice of license, a recipient has the option to distribute
  311.41 + * your version of this file under either the CDDL, the GPL Version 2 or
  311.42 + * to extend the choice of license to its licensees as provided above.
  311.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  311.44 + * Version 2 license, then the option applies only if the new code is
  311.45 + * made subject to such option by the copyright holder.
  311.46 + */
  311.47  package org.netbeans.modules.jackpot30.example;
  311.48  
  311.49  public class ClassA {
   312.1 --- a/remoting/server/tests/integration-data/example/src/org/netbeans/modules/jackpot30/example/SubClassA.java	Mon Dec 19 11:37:36 2016 +0100
   312.2 +++ b/remoting/server/tests/integration-data/example/src/org/netbeans/modules/jackpot30/example/SubClassA.java	Mon Feb 27 22:40:44 2017 +0100
   312.3 @@ -1,3 +1,46 @@
   312.4 +/*
   312.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   312.6 + *
   312.7 + * Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   312.8 + *
   312.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  312.10 + * Other names may be trademarks of their respective owners.
  312.11 + *
  312.12 + * The contents of this file are subject to the terms of either the GNU
  312.13 + * General Public License Version 2 only ("GPL") or the Common
  312.14 + * Development and Distribution License("CDDL") (collectively, the
  312.15 + * "License"). You may not use this file except in compliance with the
  312.16 + * License. You can obtain a copy of the License at
  312.17 + * http://www.netbeans.org/cddl-gplv2.html
  312.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  312.19 + * specific language governing permissions and limitations under the
  312.20 + * License.  When distributing the software, include this License Header
  312.21 + * Notice in each file and include the License file at
  312.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  312.23 + * particular file as subject to the "Classpath" exception as provided
  312.24 + * by Oracle in the GPL Version 2 section of the License file that
  312.25 + * accompanied this code. If applicable, add the following below the
  312.26 + * License Header, with the fields enclosed by brackets [] replaced by
  312.27 + * your own identifying information:
  312.28 + * "Portions Copyrighted [year] [name of copyright owner]"
  312.29 + *
  312.30 + * Contributor(s):
  312.31 + *
  312.32 + * The Original Software is NetBeans. The Initial Developer of the Original
  312.33 + * Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  312.34 + * Microsystems, Inc. All Rights Reserved.
  312.35 + *
  312.36 + * If you wish your version of this file to be governed by only the CDDL
  312.37 + * or only the GPL Version 2, indicate your decision by adding
  312.38 + * "[Contributor] elects to include this software in this distribution
  312.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  312.40 + * single choice of license, a recipient has the option to distribute
  312.41 + * your version of this file under either the CDDL, the GPL Version 2 or
  312.42 + * to extend the choice of license to its licensees as provided above.
  312.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  312.44 + * Version 2 license, then the option applies only if the new code is
  312.45 + * made subject to such option by the copyright holder.
  312.46 + */
  312.47  package org.netbeans.modules.jackpot30.example;
  312.48  
  312.49  public class SubClassA extends ClassA {
   313.1 --- a/remoting/server/tests/integration-data/example/src/org/netbeans/modules/jackpot30/example/UseClassA.java	Mon Dec 19 11:37:36 2016 +0100
   313.2 +++ b/remoting/server/tests/integration-data/example/src/org/netbeans/modules/jackpot30/example/UseClassA.java	Mon Feb 27 22:40:44 2017 +0100
   313.3 @@ -1,3 +1,46 @@
   313.4 +/*
   313.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   313.6 + *
   313.7 + * Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   313.8 + *
   313.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  313.10 + * Other names may be trademarks of their respective owners.
  313.11 + *
  313.12 + * The contents of this file are subject to the terms of either the GNU
  313.13 + * General Public License Version 2 only ("GPL") or the Common
  313.14 + * Development and Distribution License("CDDL") (collectively, the
  313.15 + * "License"). You may not use this file except in compliance with the
  313.16 + * License. You can obtain a copy of the License at
  313.17 + * http://www.netbeans.org/cddl-gplv2.html
  313.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  313.19 + * specific language governing permissions and limitations under the
  313.20 + * License.  When distributing the software, include this License Header
  313.21 + * Notice in each file and include the License file at
  313.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  313.23 + * particular file as subject to the "Classpath" exception as provided
  313.24 + * by Oracle in the GPL Version 2 section of the License file that
  313.25 + * accompanied this code. If applicable, add the following below the
  313.26 + * License Header, with the fields enclosed by brackets [] replaced by
  313.27 + * your own identifying information:
  313.28 + * "Portions Copyrighted [year] [name of copyright owner]"
  313.29 + *
  313.30 + * Contributor(s):
  313.31 + *
  313.32 + * The Original Software is NetBeans. The Initial Developer of the Original
  313.33 + * Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  313.34 + * Microsystems, Inc. All Rights Reserved.
  313.35 + *
  313.36 + * If you wish your version of this file to be governed by only the CDDL
  313.37 + * or only the GPL Version 2, indicate your decision by adding
  313.38 + * "[Contributor] elects to include this software in this distribution
  313.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  313.40 + * single choice of license, a recipient has the option to distribute
  313.41 + * your version of this file under either the CDDL, the GPL Version 2 or
  313.42 + * to extend the choice of license to its licensees as provided above.
  313.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  313.44 + * Version 2 license, then the option applies only if the new code is
  313.45 + * made subject to such option by the copyright holder.
  313.46 + */
  313.47  package org.netbeans.modules.jackpot30.example;
  313.48  
  313.49  public class UseClassA {
   314.1 --- a/remoting/server/tests/integration/pom.xml	Mon Dec 19 11:37:36 2016 +0100
   314.2 +++ b/remoting/server/tests/integration/pom.xml	Mon Feb 27 22:40:44 2017 +0100
   314.3 @@ -1,3 +1,46 @@
   314.4 +<!--
   314.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   314.6 +
   314.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   314.8 +
   314.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  314.10 +Other names may be trademarks of their respective owners.
  314.11 +
  314.12 +The contents of this file are subject to the terms of either the GNU
  314.13 +General Public License Version 2 only ("GPL") or the Common
  314.14 +Development and Distribution License("CDDL") (collectively, the
  314.15 +"License"). You may not use this file except in compliance with the
  314.16 +License. You can obtain a copy of the License at
  314.17 +http://www.netbeans.org/cddl-gplv2.html
  314.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  314.19 +specific language governing permissions and limitations under the
  314.20 +License.  When distributing the software, include this License Header
  314.21 +Notice in each file and include the License file at
  314.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  314.23 +particular file as subject to the "Classpath" exception as provided
  314.24 +by Oracle in the GPL Version 2 section of the License file that
  314.25 +accompanied this code. If applicable, add the following below the
  314.26 +License Header, with the fields enclosed by brackets [] replaced by
  314.27 +your own identifying information:
  314.28 +"Portions Copyrighted [year] [name of copyright owner]"
  314.29 +
  314.30 +Contributor(s):
  314.31 +
  314.32 +The Original Software is NetBeans. The Initial Developer of the Original
  314.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  314.34 +Microsystems, Inc. All Rights Reserved.
  314.35 +
  314.36 +If you wish your version of this file to be governed by only the CDDL
  314.37 +or only the GPL Version 2, indicate your decision by adding
  314.38 +"[Contributor] elects to include this software in this distribution
  314.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  314.40 +single choice of license, a recipient has the option to distribute
  314.41 +your version of this file under either the CDDL, the GPL Version 2 or
  314.42 +to extend the choice of license to its licensees as provided above.
  314.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
  314.44 +Version 2 license, then the option applies only if the new code is
  314.45 +made subject to such option by the copyright holder.
  314.46 +-->
  314.47  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  314.48    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  314.49    <modelVersion>4.0.0</modelVersion>
   315.1 --- a/remoting/server/tests/run-declarative-tests	Mon Dec 19 11:37:36 2016 +0100
   315.2 +++ b/remoting/server/tests/run-declarative-tests	Mon Feb 27 22:40:44 2017 +0100
   315.3 @@ -1,4 +1,47 @@
   315.4  #!/bin/bash -x
   315.5 +
   315.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   315.7 +#
   315.8 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   315.9 +#
  315.10 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  315.11 +# Other names may be trademarks of their respective owners.
  315.12 +#
  315.13 +# The contents of this file are subject to the terms of either the GNU
  315.14 +# General Public License Version 2 only ("GPL") or the Common
  315.15 +# Development and Distribution License("CDDL") (collectively, the
  315.16 +# "License"). You may not use this file except in compliance with the
  315.17 +# License. You can obtain a copy of the License at
  315.18 +# http://www.netbeans.org/cddl-gplv2.html
  315.19 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  315.20 +# specific language governing permissions and limitations under the
  315.21 +# License.  When distributing the software, include this License Header
  315.22 +# Notice in each file and include the License file at
  315.23 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  315.24 +# particular file as subject to the "Classpath" exception as provided
  315.25 +# by Oracle in the GPL Version 2 section of the License file that
  315.26 +# accompanied this code. If applicable, add the following below the
  315.27 +# License Header, with the fields enclosed by brackets [] replaced by
  315.28 +# your own identifying information:
  315.29 +# "Portions Copyrighted [year] [name of copyright owner]"
  315.30 +#
  315.31 +# Contributor(s):
  315.32 +#
  315.33 +# The Original Software is NetBeans. The Initial Developer of the Original
  315.34 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  315.35 +# Microsystems, Inc. All Rights Reserved.
  315.36 +#
  315.37 +# If you wish your version of this file to be governed by only the CDDL
  315.38 +# or only the GPL Version 2, indicate your decision by adding
  315.39 +# "[Contributor] elects to include this software in this distribution
  315.40 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  315.41 +# single choice of license, a recipient has the option to distribute
  315.42 +# your version of this file under either the CDDL, the GPL Version 2 or
  315.43 +# to extend the choice of license to its licensees as provided above.
  315.44 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  315.45 +# Version 2 license, then the option applies only if the new code is
  315.46 +# made subject to such option by the copyright holder.
  315.47 +
  315.48  do_index() {
  315.49      rm -rf cache
  315.50      mkdir -p cache
  315.51 @@ -54,7 +97,7 @@
  315.52  mkdir results
  315.53  
  315.54  for tc in `find testcases -name "*.tc" -type d`; do
  315.55 -    REQUEST=`cat $tc/request`;
  315.56 +    REQUEST=`cat $tc/request | grep -v '^#'`;
  315.57      TEST_NAME=`echo ${tc#testcases/} | tr '/' '-'`;
  315.58      RESULT_FILE="`pwd`/results/TEST-$TEST_NAME.xml"
  315.59      if wget -O - "http://localhost:${PORT}$REQUEST" | diff -w - $tc/response; then
   316.1 --- a/remoting/server/tests/run-integration-tests	Mon Dec 19 11:37:36 2016 +0100
   316.2 +++ b/remoting/server/tests/run-integration-tests	Mon Feb 27 22:40:44 2017 +0100
   316.3 @@ -1,4 +1,47 @@
   316.4  #!/bin/bash -x
   316.5 +
   316.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   316.7 +#
   316.8 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   316.9 +#
  316.10 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  316.11 +# Other names may be trademarks of their respective owners.
  316.12 +#
  316.13 +# The contents of this file are subject to the terms of either the GNU
  316.14 +# General Public License Version 2 only ("GPL") or the Common
  316.15 +# Development and Distribution License("CDDL") (collectively, the
  316.16 +# "License"). You may not use this file except in compliance with the
  316.17 +# License. You can obtain a copy of the License at
  316.18 +# http://www.netbeans.org/cddl-gplv2.html
  316.19 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  316.20 +# specific language governing permissions and limitations under the
  316.21 +# License.  When distributing the software, include this License Header
  316.22 +# Notice in each file and include the License file at
  316.23 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  316.24 +# particular file as subject to the "Classpath" exception as provided
  316.25 +# by Oracle in the GPL Version 2 section of the License file that
  316.26 +# accompanied this code. If applicable, add the following below the
  316.27 +# License Header, with the fields enclosed by brackets [] replaced by
  316.28 +# your own identifying information:
  316.29 +# "Portions Copyrighted [year] [name of copyright owner]"
  316.30 +#
  316.31 +# Contributor(s):
  316.32 +#
  316.33 +# The Original Software is NetBeans. The Initial Developer of the Original
  316.34 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  316.35 +# Microsystems, Inc. All Rights Reserved.
  316.36 +#
  316.37 +# If you wish your version of this file to be governed by only the CDDL
  316.38 +# or only the GPL Version 2, indicate your decision by adding
  316.39 +# "[Contributor] elects to include this software in this distribution
  316.40 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  316.41 +# single choice of license, a recipient has the option to distribute
  316.42 +# your version of this file under either the CDDL, the GPL Version 2 or
  316.43 +# to extend the choice of license to its licensees as provided above.
  316.44 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  316.45 +# Version 2 license, then the option applies only if the new code is
  316.46 +# made subject to such option by the copyright holder.
  316.47 +
  316.48  exit 0 #TODO - OverallTest is failing
  316.49  
  316.50  do_index() {
   317.1 --- a/remoting/server/tests/testcases/list.tc/request	Mon Dec 19 11:37:36 2016 +0100
   317.2 +++ b/remoting/server/tests/testcases/list.tc/request	Mon Feb 27 22:40:44 2017 +0100
   317.3 @@ -1,1 +1,42 @@
   317.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   317.5 +#
   317.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   317.7 +#
   317.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   317.9 +# Other names may be trademarks of their respective owners.
  317.10 +#
  317.11 +# The contents of this file are subject to the terms of either the GNU
  317.12 +# General Public License Version 2 only ("GPL") or the Common
  317.13 +# Development and Distribution License("CDDL") (collectively, the
  317.14 +# "License"). You may not use this file except in compliance with the
  317.15 +# License. You can obtain a copy of the License at
  317.16 +# http://www.netbeans.org/cddl-gplv2.html
  317.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  317.18 +# specific language governing permissions and limitations under the
  317.19 +# License.  When distributing the software, include this License Header
  317.20 +# Notice in each file and include the License file at
  317.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  317.22 +# particular file as subject to the "Classpath" exception as provided
  317.23 +# by Oracle in the GPL Version 2 section of the License file that
  317.24 +# accompanied this code. If applicable, add the following below the
  317.25 +# License Header, with the fields enclosed by brackets [] replaced by
  317.26 +# your own identifying information:
  317.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  317.28 +#
  317.29 +# Contributor(s):
  317.30 +#
  317.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  317.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  317.33 +# Microsystems, Inc. All Rights Reserved.
  317.34 +#
  317.35 +# If you wish your version of this file to be governed by only the CDDL
  317.36 +# or only the GPL Version 2, indicate your decision by adding
  317.37 +# "[Contributor] elects to include this software in this distribution
  317.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  317.39 +# single choice of license, a recipient has the option to distribute
  317.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  317.41 +# to extend the choice of license to its licensees as provided above.
  317.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  317.43 +# Version 2 license, then the option applies only if the new code is
  317.44 +# made subject to such option by the copyright holder.
  317.45  /index/list
  317.46 \ No newline at end of file
   318.1 --- a/remoting/server/tests/testcases/sources/simple.tc/request	Mon Dec 19 11:37:36 2016 +0100
   318.2 +++ b/remoting/server/tests/testcases/sources/simple.tc/request	Mon Feb 27 22:40:44 2017 +0100
   318.3 @@ -1,1 +1,42 @@
   318.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   318.5 +#
   318.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   318.7 +#
   318.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   318.9 +# Other names may be trademarks of their respective owners.
  318.10 +#
  318.11 +# The contents of this file are subject to the terms of either the GNU
  318.12 +# General Public License Version 2 only ("GPL") or the Common
  318.13 +# Development and Distribution License("CDDL") (collectively, the
  318.14 +# "License"). You may not use this file except in compliance with the
  318.15 +# License. You can obtain a copy of the License at
  318.16 +# http://www.netbeans.org/cddl-gplv2.html
  318.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  318.18 +# specific language governing permissions and limitations under the
  318.19 +# License.  When distributing the software, include this License Header
  318.20 +# Notice in each file and include the License file at
  318.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  318.22 +# particular file as subject to the "Classpath" exception as provided
  318.23 +# by Oracle in the GPL Version 2 section of the License file that
  318.24 +# accompanied this code. If applicable, add the following below the
  318.25 +# License Header, with the fields enclosed by brackets [] replaced by
  318.26 +# your own identifying information:
  318.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  318.28 +#
  318.29 +# Contributor(s):
  318.30 +#
  318.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  318.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  318.33 +# Microsystems, Inc. All Rights Reserved.
  318.34 +#
  318.35 +# If you wish your version of this file to be governed by only the CDDL
  318.36 +# or only the GPL Version 2, indicate your decision by adding
  318.37 +# "[Contributor] elects to include this software in this distribution
  318.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  318.39 +# single choice of license, a recipient has the option to distribute
  318.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  318.41 +# to extend the choice of license to its licensees as provided above.
  318.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  318.43 +# Version 2 license, then the option applies only if the new code is
  318.44 +# made subject to such option by the copyright holder.
  318.45  /index/source/cat?path=group1&relative=prj1/src/project1/A.java
  318.46 \ No newline at end of file
   319.1 --- a/remoting/server/tests/testcases/symbol/symbol-lookup1.tc/request	Mon Dec 19 11:37:36 2016 +0100
   319.2 +++ b/remoting/server/tests/testcases/symbol/symbol-lookup1.tc/request	Mon Feb 27 22:40:44 2017 +0100
   319.3 @@ -1,1 +1,42 @@
   319.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   319.5 +#
   319.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   319.7 +#
   319.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   319.9 +# Other names may be trademarks of their respective owners.
  319.10 +#
  319.11 +# The contents of this file are subject to the terms of either the GNU
  319.12 +# General Public License Version 2 only ("GPL") or the Common
  319.13 +# Development and Distribution License("CDDL") (collectively, the
  319.14 +# "License"). You may not use this file except in compliance with the
  319.15 +# License. You can obtain a copy of the License at
  319.16 +# http://www.netbeans.org/cddl-gplv2.html
  319.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  319.18 +# specific language governing permissions and limitations under the
  319.19 +# License.  When distributing the software, include this License Header
  319.20 +# Notice in each file and include the License file at
  319.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  319.22 +# particular file as subject to the "Classpath" exception as provided
  319.23 +# by Oracle in the GPL Version 2 section of the License file that
  319.24 +# accompanied this code. If applicable, add the following below the
  319.25 +# License Header, with the fields enclosed by brackets [] replaced by
  319.26 +# your own identifying information:
  319.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  319.28 +#
  319.29 +# Contributor(s):
  319.30 +#
  319.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  319.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  319.33 +# Microsystems, Inc. All Rights Reserved.
  319.34 +#
  319.35 +# If you wish your version of this file to be governed by only the CDDL
  319.36 +# or only the GPL Version 2, indicate your decision by adding
  319.37 +# "[Contributor] elects to include this software in this distribution
  319.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  319.39 +# single choice of license, a recipient has the option to distribute
  319.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  319.41 +# to extend the choice of license to its licensees as provided above.
  319.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  319.43 +# Version 2 license, then the option applies only if the new code is
  319.44 +# made subject to such option by the copyright holder.
  319.45  /index/symbol/search?path=group1&prefix=tes
   320.1 --- a/remoting/server/tests/testcases/type/lookup1.tc/request	Mon Dec 19 11:37:36 2016 +0100
   320.2 +++ b/remoting/server/tests/testcases/type/lookup1.tc/request	Mon Feb 27 22:40:44 2017 +0100
   320.3 @@ -1,1 +1,42 @@
   320.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   320.5 +#
   320.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   320.7 +#
   320.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   320.9 +# Other names may be trademarks of their respective owners.
  320.10 +#
  320.11 +# The contents of this file are subject to the terms of either the GNU
  320.12 +# General Public License Version 2 only ("GPL") or the Common
  320.13 +# Development and Distribution License("CDDL") (collectively, the
  320.14 +# "License"). You may not use this file except in compliance with the
  320.15 +# License. You can obtain a copy of the License at
  320.16 +# http://www.netbeans.org/cddl-gplv2.html
  320.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  320.18 +# specific language governing permissions and limitations under the
  320.19 +# License.  When distributing the software, include this License Header
  320.20 +# Notice in each file and include the License file at
  320.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  320.22 +# particular file as subject to the "Classpath" exception as provided
  320.23 +# by Oracle in the GPL Version 2 section of the License file that
  320.24 +# accompanied this code. If applicable, add the following below the
  320.25 +# License Header, with the fields enclosed by brackets [] replaced by
  320.26 +# your own identifying information:
  320.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  320.28 +#
  320.29 +# Contributor(s):
  320.30 +#
  320.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  320.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  320.33 +# Microsystems, Inc. All Rights Reserved.
  320.34 +#
  320.35 +# If you wish your version of this file to be governed by only the CDDL
  320.36 +# or only the GPL Version 2, indicate your decision by adding
  320.37 +# "[Contributor] elects to include this software in this distribution
  320.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  320.39 +# single choice of license, a recipient has the option to distribute
  320.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  320.41 +# to extend the choice of license to its licensees as provided above.
  320.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  320.43 +# Version 2 license, then the option applies only if the new code is
  320.44 +# made subject to such option by the copyright holder.
  320.45  /index/type/search?path=group1&prefix=A
   321.1 --- a/remoting/server/tests/testcases/usages/field-new.tc/request	Mon Dec 19 11:37:36 2016 +0100
   321.2 +++ b/remoting/server/tests/testcases/usages/field-new.tc/request	Mon Feb 27 22:40:44 2017 +0100
   321.3 @@ -1,1 +1,42 @@
   321.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   321.5 +#
   321.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   321.7 +#
   321.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   321.9 +# Other names may be trademarks of their respective owners.
  321.10 +#
  321.11 +# The contents of this file are subject to the terms of either the GNU
  321.12 +# General Public License Version 2 only ("GPL") or the Common
  321.13 +# Development and Distribution License("CDDL") (collectively, the
  321.14 +# "License"). You may not use this file except in compliance with the
  321.15 +# License. You can obtain a copy of the License at
  321.16 +# http://www.netbeans.org/cddl-gplv2.html
  321.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  321.18 +# specific language governing permissions and limitations under the
  321.19 +# License.  When distributing the software, include this License Header
  321.20 +# Notice in each file and include the License file at
  321.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  321.22 +# particular file as subject to the "Classpath" exception as provided
  321.23 +# by Oracle in the GPL Version 2 section of the License file that
  321.24 +# accompanied this code. If applicable, add the following below the
  321.25 +# License Header, with the fields enclosed by brackets [] replaced by
  321.26 +# your own identifying information:
  321.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  321.28 +#
  321.29 +# Contributor(s):
  321.30 +#
  321.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  321.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  321.33 +# Microsystems, Inc. All Rights Reserved.
  321.34 +#
  321.35 +# If you wish your version of this file to be governed by only the CDDL
  321.36 +# or only the GPL Version 2, indicate your decision by adding
  321.37 +# "[Contributor] elects to include this software in this distribution
  321.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  321.39 +# single choice of license, a recipient has the option to distribute
  321.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  321.41 +# to extend the choice of license to its licensees as provided above.
  321.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  321.43 +# Version 2 license, then the option applies only if the new code is
  321.44 +# made subject to such option by the copyright holder.
  321.45  /index/usages/search?path=group1&signatures=FIELD:project1.B:F
  321.46 \ No newline at end of file
   322.1 --- a/remoting/server/tests/testcases/usages/field-old.tc/request	Mon Dec 19 11:37:36 2016 +0100
   322.2 +++ b/remoting/server/tests/testcases/usages/field-old.tc/request	Mon Feb 27 22:40:44 2017 +0100
   322.3 @@ -1,1 +1,42 @@
   322.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   322.5 +#
   322.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   322.7 +#
   322.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   322.9 +# Other names may be trademarks of their respective owners.
  322.10 +#
  322.11 +# The contents of this file are subject to the terms of either the GNU
  322.12 +# General Public License Version 2 only ("GPL") or the Common
  322.13 +# Development and Distribution License("CDDL") (collectively, the
  322.14 +# "License"). You may not use this file except in compliance with the
  322.15 +# License. You can obtain a copy of the License at
  322.16 +# http://www.netbeans.org/cddl-gplv2.html
  322.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  322.18 +# specific language governing permissions and limitations under the
  322.19 +# License.  When distributing the software, include this License Header
  322.20 +# Notice in each file and include the License file at
  322.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  322.22 +# particular file as subject to the "Classpath" exception as provided
  322.23 +# by Oracle in the GPL Version 2 section of the License file that
  322.24 +# accompanied this code. If applicable, add the following below the
  322.25 +# License Header, with the fields enclosed by brackets [] replaced by
  322.26 +# your own identifying information:
  322.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  322.28 +#
  322.29 +# Contributor(s):
  322.30 +#
  322.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  322.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  322.33 +# Microsystems, Inc. All Rights Reserved.
  322.34 +#
  322.35 +# If you wish your version of this file to be governed by only the CDDL
  322.36 +# or only the GPL Version 2, indicate your decision by adding
  322.37 +# "[Contributor] elects to include this software in this distribution
  322.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  322.39 +# single choice of license, a recipient has the option to distribute
  322.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  322.41 +# to extend the choice of license to its licensees as provided above.
  322.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  322.43 +# Version 2 license, then the option applies only if the new code is
  322.44 +# made subject to such option by the copyright holder.
  322.45  /index/usages/search?path=group1&signatures=FIELD:project1.B:F:I
  322.46 \ No newline at end of file
   323.1 --- a/remoting/server/tests/testcases/usages/usages-simple.tc/request	Mon Dec 19 11:37:36 2016 +0100
   323.2 +++ b/remoting/server/tests/testcases/usages/usages-simple.tc/request	Mon Feb 27 22:40:44 2017 +0100
   323.3 @@ -1,1 +1,42 @@
   323.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   323.5 +#
   323.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   323.7 +#
   323.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   323.9 +# Other names may be trademarks of their respective owners.
  323.10 +#
  323.11 +# The contents of this file are subject to the terms of either the GNU
  323.12 +# General Public License Version 2 only ("GPL") or the Common
  323.13 +# Development and Distribution License("CDDL") (collectively, the
  323.14 +# "License"). You may not use this file except in compliance with the
  323.15 +# License. You can obtain a copy of the License at
  323.16 +# http://www.netbeans.org/cddl-gplv2.html
  323.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  323.18 +# specific language governing permissions and limitations under the
  323.19 +# License.  When distributing the software, include this License Header
  323.20 +# Notice in each file and include the License file at
  323.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  323.22 +# particular file as subject to the "Classpath" exception as provided
  323.23 +# by Oracle in the GPL Version 2 section of the License file that
  323.24 +# accompanied this code. If applicable, add the following below the
  323.25 +# License Header, with the fields enclosed by brackets [] replaced by
  323.26 +# your own identifying information:
  323.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  323.28 +#
  323.29 +# Contributor(s):
  323.30 +#
  323.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  323.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  323.33 +# Microsystems, Inc. All Rights Reserved.
  323.34 +#
  323.35 +# If you wish your version of this file to be governed by only the CDDL
  323.36 +# or only the GPL Version 2, indicate your decision by adding
  323.37 +# "[Contributor] elects to include this software in this distribution
  323.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  323.39 +# single choice of license, a recipient has the option to distribute
  323.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  323.41 +# to extend the choice of license to its licensees as provided above.
  323.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  323.43 +# Version 2 license, then the option applies only if the new code is
  323.44 +# made subject to such option by the copyright holder.
  323.45  /index/usages/search?path=group1&signatures=METHOD:project1.B:test:()V
  323.46 \ No newline at end of file
   324.1 --- a/remoting/server/web/base.web.api/build.xml	Mon Dec 19 11:37:36 2016 +0100
   324.2 +++ b/remoting/server/web/base.web.api/build.xml	Mon Feb 27 22:40:44 2017 +0100
   324.3 @@ -1,4 +1,47 @@
   324.4  <?xml version="1.0" encoding="UTF-8"?>
   324.5 +<!--
   324.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   324.7 +
   324.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   324.9 +
  324.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  324.11 +Other names may be trademarks of their respective owners.
  324.12 +
  324.13 +The contents of this file are subject to the terms of either the GNU
  324.14 +General Public License Version 2 only ("GPL") or the Common
  324.15 +Development and Distribution License("CDDL") (collectively, the
  324.16 +"License"). You may not use this file except in compliance with the
  324.17 +License. You can obtain a copy of the License at
  324.18 +http://www.netbeans.org/cddl-gplv2.html
  324.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  324.20 +specific language governing permissions and limitations under the
  324.21 +License.  When distributing the software, include this License Header
  324.22 +Notice in each file and include the License file at
  324.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  324.24 +particular file as subject to the "Classpath" exception as provided
  324.25 +by Oracle in the GPL Version 2 section of the License file that
  324.26 +accompanied this code. If applicable, add the following below the
  324.27 +License Header, with the fields enclosed by brackets [] replaced by
  324.28 +your own identifying information:
  324.29 +"Portions Copyrighted [year] [name of copyright owner]"
  324.30 +
  324.31 +Contributor(s):
  324.32 +
  324.33 +The Original Software is NetBeans. The Initial Developer of the Original
  324.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  324.35 +Microsystems, Inc. All Rights Reserved.
  324.36 +
  324.37 +If you wish your version of this file to be governed by only the CDDL
  324.38 +or only the GPL Version 2, indicate your decision by adding
  324.39 +"[Contributor] elects to include this software in this distribution
  324.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  324.41 +single choice of license, a recipient has the option to distribute
  324.42 +your version of this file under either the CDDL, the GPL Version 2 or
  324.43 +to extend the choice of license to its licensees as provided above.
  324.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  324.45 +Version 2 license, then the option applies only if the new code is
  324.46 +made subject to such option by the copyright holder.
  324.47 +-->
  324.48  <!-- You may freely edit this file. See commented blocks below for -->
  324.49  <!-- some examples of how to customize the build. -->
  324.50  <!-- (If you delete it and reopen the project it will be recreated.) -->
   325.1 --- a/remoting/server/web/base.web.api/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   325.2 +++ b/remoting/server/web/base.web.api/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   325.3 @@ -1,5 +1,48 @@
   325.4  <?xml version="1.0" encoding="UTF-8"?>
   325.5  <!--
   325.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   325.7 +
   325.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   325.9 +
  325.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  325.11 +Other names may be trademarks of their respective owners.
  325.12 +
  325.13 +The contents of this file are subject to the terms of either the GNU
  325.14 +General Public License Version 2 only ("GPL") or the Common
  325.15 +Development and Distribution License("CDDL") (collectively, the
  325.16 +"License"). You may not use this file except in compliance with the
  325.17 +License. You can obtain a copy of the License at
  325.18 +http://www.netbeans.org/cddl-gplv2.html
  325.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  325.20 +specific language governing permissions and limitations under the
  325.21 +License.  When distributing the software, include this License Header
  325.22 +Notice in each file and include the License file at
  325.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  325.24 +particular file as subject to the "Classpath" exception as provided
  325.25 +by Oracle in the GPL Version 2 section of the License file that
  325.26 +accompanied this code. If applicable, add the following below the
  325.27 +License Header, with the fields enclosed by brackets [] replaced by
  325.28 +your own identifying information:
  325.29 +"Portions Copyrighted [year] [name of copyright owner]"
  325.30 +
  325.31 +Contributor(s):
  325.32 +
  325.33 +The Original Software is NetBeans. The Initial Developer of the Original
  325.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  325.35 +Microsystems, Inc. All Rights Reserved.
  325.36 +
  325.37 +If you wish your version of this file to be governed by only the CDDL
  325.38 +or only the GPL Version 2, indicate your decision by adding
  325.39 +"[Contributor] elects to include this software in this distribution
  325.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  325.41 +single choice of license, a recipient has the option to distribute
  325.42 +your version of this file under either the CDDL, the GPL Version 2 or
  325.43 +to extend the choice of license to its licensees as provided above.
  325.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  325.45 +Version 2 license, then the option applies only if the new code is
  325.46 +made subject to such option by the copyright holder.
  325.47 +-->
  325.48 +<!--
  325.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  325.50  ***         EDIT ../build.xml INSTEAD         ***
  325.51  
   326.1 --- a/remoting/server/web/base.web.api/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   326.2 +++ b/remoting/server/web/base.web.api/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   326.3 @@ -1,3 +1,44 @@
   326.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   326.5 +#
   326.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   326.7 +#
   326.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   326.9 +# Other names may be trademarks of their respective owners.
  326.10 +#
  326.11 +# The contents of this file are subject to the terms of either the GNU
  326.12 +# General Public License Version 2 only ("GPL") or the Common
  326.13 +# Development and Distribution License("CDDL") (collectively, the
  326.14 +# "License"). You may not use this file except in compliance with the
  326.15 +# License. You can obtain a copy of the License at
  326.16 +# http://www.netbeans.org/cddl-gplv2.html
  326.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  326.18 +# specific language governing permissions and limitations under the
  326.19 +# License.  When distributing the software, include this License Header
  326.20 +# Notice in each file and include the License file at
  326.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  326.22 +# particular file as subject to the "Classpath" exception as provided
  326.23 +# by Oracle in the GPL Version 2 section of the License file that
  326.24 +# accompanied this code. If applicable, add the following below the
  326.25 +# License Header, with the fields enclosed by brackets [] replaced by
  326.26 +# your own identifying information:
  326.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  326.28 +#
  326.29 +# Contributor(s):
  326.30 +#
  326.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  326.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  326.33 +# Microsystems, Inc. All Rights Reserved.
  326.34 +#
  326.35 +# If you wish your version of this file to be governed by only the CDDL
  326.36 +# or only the GPL Version 2, indicate your decision by adding
  326.37 +# "[Contributor] elects to include this software in this distribution
  326.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  326.39 +# single choice of license, a recipient has the option to distribute
  326.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  326.41 +# to extend the choice of license to its licensees as provided above.
  326.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  326.43 +# Version 2 license, then the option applies only if the new code is
  326.44 +# made subject to such option by the copyright holder.
  326.45  build.xml.data.CRC32=8d18f2d6
  326.46  build.xml.script.CRC32=bbda5dd1
  326.47  build.xml.stylesheet.CRC32=8064a381@1.78.0.48
   327.1 --- a/remoting/server/web/base.web.api/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   327.2 +++ b/remoting/server/web/base.web.api/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   327.3 @@ -1,3 +1,44 @@
   327.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   327.5 +#
   327.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   327.7 +#
   327.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   327.9 +# Other names may be trademarks of their respective owners.
  327.10 +#
  327.11 +# The contents of this file are subject to the terms of either the GNU
  327.12 +# General Public License Version 2 only ("GPL") or the Common
  327.13 +# Development and Distribution License("CDDL") (collectively, the
  327.14 +# "License"). You may not use this file except in compliance with the
  327.15 +# License. You can obtain a copy of the License at
  327.16 +# http://www.netbeans.org/cddl-gplv2.html
  327.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  327.18 +# specific language governing permissions and limitations under the
  327.19 +# License.  When distributing the software, include this License Header
  327.20 +# Notice in each file and include the License file at
  327.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  327.22 +# particular file as subject to the "Classpath" exception as provided
  327.23 +# by Oracle in the GPL Version 2 section of the License file that
  327.24 +# accompanied this code. If applicable, add the following below the
  327.25 +# License Header, with the fields enclosed by brackets [] replaced by
  327.26 +# your own identifying information:
  327.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  327.28 +#
  327.29 +# Contributor(s):
  327.30 +#
  327.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  327.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  327.33 +# Microsystems, Inc. All Rights Reserved.
  327.34 +#
  327.35 +# If you wish your version of this file to be governed by only the CDDL
  327.36 +# or only the GPL Version 2, indicate your decision by adding
  327.37 +# "[Contributor] elects to include this software in this distribution
  327.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  327.39 +# single choice of license, a recipient has the option to distribute
  327.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  327.41 +# to extend the choice of license to its licensees as provided above.
  327.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  327.43 +# Version 2 license, then the option applies only if the new code is
  327.44 +# made subject to such option by the copyright holder.
  327.45  annotation.processing.enabled=true
  327.46  annotation.processing.enabled.in.editor=false
  327.47  annotation.processing.processors.list=
   328.1 --- a/remoting/server/web/base.web.api/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   328.2 +++ b/remoting/server/web/base.web.api/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   328.3 @@ -1,4 +1,47 @@
   328.4  <?xml version="1.0" encoding="UTF-8"?>
   328.5 +<!--
   328.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   328.7 +
   328.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   328.9 +
  328.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  328.11 +Other names may be trademarks of their respective owners.
  328.12 +
  328.13 +The contents of this file are subject to the terms of either the GNU
  328.14 +General Public License Version 2 only ("GPL") or the Common
  328.15 +Development and Distribution License("CDDL") (collectively, the
  328.16 +"License"). You may not use this file except in compliance with the
  328.17 +License. You can obtain a copy of the License at
  328.18 +http://www.netbeans.org/cddl-gplv2.html
  328.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  328.20 +specific language governing permissions and limitations under the
  328.21 +License.  When distributing the software, include this License Header
  328.22 +Notice in each file and include the License file at
  328.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  328.24 +particular file as subject to the "Classpath" exception as provided
  328.25 +by Oracle in the GPL Version 2 section of the License file that
  328.26 +accompanied this code. If applicable, add the following below the
  328.27 +License Header, with the fields enclosed by brackets [] replaced by
  328.28 +your own identifying information:
  328.29 +"Portions Copyrighted [year] [name of copyright owner]"
  328.30 +
  328.31 +Contributor(s):
  328.32 +
  328.33 +The Original Software is NetBeans. The Initial Developer of the Original
  328.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  328.35 +Microsystems, Inc. All Rights Reserved.
  328.36 +
  328.37 +If you wish your version of this file to be governed by only the CDDL
  328.38 +or only the GPL Version 2, indicate your decision by adding
  328.39 +"[Contributor] elects to include this software in this distribution
  328.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  328.41 +single choice of license, a recipient has the option to distribute
  328.42 +your version of this file under either the CDDL, the GPL Version 2 or
  328.43 +to extend the choice of license to its licensees as provided above.
  328.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  328.45 +Version 2 license, then the option applies only if the new code is
  328.46 +made subject to such option by the copyright holder.
  328.47 +-->
  328.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  328.49      <type>org.netbeans.modules.java.j2seproject</type>
  328.50      <configuration>
   329.1 --- a/remoting/server/web/nbindex.web.api/build.xml	Mon Dec 19 11:37:36 2016 +0100
   329.2 +++ b/remoting/server/web/nbindex.web.api/build.xml	Mon Feb 27 22:40:44 2017 +0100
   329.3 @@ -1,4 +1,47 @@
   329.4  <?xml version="1.0" encoding="UTF-8"?>
   329.5 +<!--
   329.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   329.7 +
   329.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   329.9 +
  329.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  329.11 +Other names may be trademarks of their respective owners.
  329.12 +
  329.13 +The contents of this file are subject to the terms of either the GNU
  329.14 +General Public License Version 2 only ("GPL") or the Common
  329.15 +Development and Distribution License("CDDL") (collectively, the
  329.16 +"License"). You may not use this file except in compliance with the
  329.17 +License. You can obtain a copy of the License at
  329.18 +http://www.netbeans.org/cddl-gplv2.html
  329.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  329.20 +specific language governing permissions and limitations under the
  329.21 +License.  When distributing the software, include this License Header
  329.22 +Notice in each file and include the License file at
  329.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  329.24 +particular file as subject to the "Classpath" exception as provided
  329.25 +by Oracle in the GPL Version 2 section of the License file that
  329.26 +accompanied this code. If applicable, add the following below the
  329.27 +License Header, with the fields enclosed by brackets [] replaced by
  329.28 +your own identifying information:
  329.29 +"Portions Copyrighted [year] [name of copyright owner]"
  329.30 +
  329.31 +Contributor(s):
  329.32 +
  329.33 +The Original Software is NetBeans. The Initial Developer of the Original
  329.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  329.35 +Microsystems, Inc. All Rights Reserved.
  329.36 +
  329.37 +If you wish your version of this file to be governed by only the CDDL
  329.38 +or only the GPL Version 2, indicate your decision by adding
  329.39 +"[Contributor] elects to include this software in this distribution
  329.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  329.41 +single choice of license, a recipient has the option to distribute
  329.42 +your version of this file under either the CDDL, the GPL Version 2 or
  329.43 +to extend the choice of license to its licensees as provided above.
  329.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  329.45 +Version 2 license, then the option applies only if the new code is
  329.46 +made subject to such option by the copyright holder.
  329.47 +-->
  329.48  <!-- You may freely edit this file. See commented blocks below for -->
  329.49  <!-- some examples of how to customize the build. -->
  329.50  <!-- (If you delete it and reopen the project it will be recreated.) -->
   330.1 --- a/remoting/server/web/nbindex.web.api/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   330.2 +++ b/remoting/server/web/nbindex.web.api/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   330.3 @@ -1,5 +1,48 @@
   330.4  <?xml version="1.0" encoding="UTF-8"?>
   330.5  <!--
   330.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   330.7 +
   330.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   330.9 +
  330.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  330.11 +Other names may be trademarks of their respective owners.
  330.12 +
  330.13 +The contents of this file are subject to the terms of either the GNU
  330.14 +General Public License Version 2 only ("GPL") or the Common
  330.15 +Development and Distribution License("CDDL") (collectively, the
  330.16 +"License"). You may not use this file except in compliance with the
  330.17 +License. You can obtain a copy of the License at
  330.18 +http://www.netbeans.org/cddl-gplv2.html
  330.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  330.20 +specific language governing permissions and limitations under the
  330.21 +License.  When distributing the software, include this License Header
  330.22 +Notice in each file and include the License file at
  330.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  330.24 +particular file as subject to the "Classpath" exception as provided
  330.25 +by Oracle in the GPL Version 2 section of the License file that
  330.26 +accompanied this code. If applicable, add the following below the
  330.27 +License Header, with the fields enclosed by brackets [] replaced by
  330.28 +your own identifying information:
  330.29 +"Portions Copyrighted [year] [name of copyright owner]"
  330.30 +
  330.31 +Contributor(s):
  330.32 +
  330.33 +The Original Software is NetBeans. The Initial Developer of the Original
  330.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  330.35 +Microsystems, Inc. All Rights Reserved.
  330.36 +
  330.37 +If you wish your version of this file to be governed by only the CDDL
  330.38 +or only the GPL Version 2, indicate your decision by adding
  330.39 +"[Contributor] elects to include this software in this distribution
  330.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  330.41 +single choice of license, a recipient has the option to distribute
  330.42 +your version of this file under either the CDDL, the GPL Version 2 or
  330.43 +to extend the choice of license to its licensees as provided above.
  330.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  330.45 +Version 2 license, then the option applies only if the new code is
  330.46 +made subject to such option by the copyright holder.
  330.47 +-->
  330.48 +<!--
  330.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  330.50  ***         EDIT ../build.xml INSTEAD         ***
  330.51  
   331.1 --- a/remoting/server/web/nbindex.web.api/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   331.2 +++ b/remoting/server/web/nbindex.web.api/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   331.3 @@ -1,3 +1,44 @@
   331.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   331.5 +#
   331.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   331.7 +#
   331.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   331.9 +# Other names may be trademarks of their respective owners.
  331.10 +#
  331.11 +# The contents of this file are subject to the terms of either the GNU
  331.12 +# General Public License Version 2 only ("GPL") or the Common
  331.13 +# Development and Distribution License("CDDL") (collectively, the
  331.14 +# "License"). You may not use this file except in compliance with the
  331.15 +# License. You can obtain a copy of the License at
  331.16 +# http://www.netbeans.org/cddl-gplv2.html
  331.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  331.18 +# specific language governing permissions and limitations under the
  331.19 +# License.  When distributing the software, include this License Header
  331.20 +# Notice in each file and include the License file at
  331.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  331.22 +# particular file as subject to the "Classpath" exception as provided
  331.23 +# by Oracle in the GPL Version 2 section of the License file that
  331.24 +# accompanied this code. If applicable, add the following below the
  331.25 +# License Header, with the fields enclosed by brackets [] replaced by
  331.26 +# your own identifying information:
  331.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  331.28 +#
  331.29 +# Contributor(s):
  331.30 +#
  331.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  331.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  331.33 +# Microsystems, Inc. All Rights Reserved.
  331.34 +#
  331.35 +# If you wish your version of this file to be governed by only the CDDL
  331.36 +# or only the GPL Version 2, indicate your decision by adding
  331.37 +# "[Contributor] elects to include this software in this distribution
  331.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  331.39 +# single choice of license, a recipient has the option to distribute
  331.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  331.41 +# to extend the choice of license to its licensees as provided above.
  331.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  331.43 +# Version 2 license, then the option applies only if the new code is
  331.44 +# made subject to such option by the copyright holder.
  331.45  build.xml.data.CRC32=0e5c43eb
  331.46  build.xml.script.CRC32=340d1c88
  331.47  build.xml.stylesheet.CRC32=8064a381@1.78.0.48
   332.1 --- a/remoting/server/web/nbindex.web.api/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   332.2 +++ b/remoting/server/web/nbindex.web.api/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   332.3 @@ -1,3 +1,44 @@
   332.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   332.5 +#
   332.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   332.7 +#
   332.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   332.9 +# Other names may be trademarks of their respective owners.
  332.10 +#
  332.11 +# The contents of this file are subject to the terms of either the GNU
  332.12 +# General Public License Version 2 only ("GPL") or the Common
  332.13 +# Development and Distribution License("CDDL") (collectively, the
  332.14 +# "License"). You may not use this file except in compliance with the
  332.15 +# License. You can obtain a copy of the License at
  332.16 +# http://www.netbeans.org/cddl-gplv2.html
  332.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  332.18 +# specific language governing permissions and limitations under the
  332.19 +# License.  When distributing the software, include this License Header
  332.20 +# Notice in each file and include the License file at
  332.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  332.22 +# particular file as subject to the "Classpath" exception as provided
  332.23 +# by Oracle in the GPL Version 2 section of the License file that
  332.24 +# accompanied this code. If applicable, add the following below the
  332.25 +# License Header, with the fields enclosed by brackets [] replaced by
  332.26 +# your own identifying information:
  332.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  332.28 +#
  332.29 +# Contributor(s):
  332.30 +#
  332.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  332.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  332.33 +# Microsystems, Inc. All Rights Reserved.
  332.34 +#
  332.35 +# If you wish your version of this file to be governed by only the CDDL
  332.36 +# or only the GPL Version 2, indicate your decision by adding
  332.37 +# "[Contributor] elects to include this software in this distribution
  332.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  332.39 +# single choice of license, a recipient has the option to distribute
  332.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  332.41 +# to extend the choice of license to its licensees as provided above.
  332.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  332.43 +# Version 2 license, then the option applies only if the new code is
  332.44 +# made subject to such option by the copyright holder.
  332.45  annotation.processing.enabled=true
  332.46  annotation.processing.enabled.in.editor=false
  332.47  annotation.processing.processor.options=
   333.1 --- a/remoting/server/web/nbindex.web.api/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   333.2 +++ b/remoting/server/web/nbindex.web.api/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   333.3 @@ -1,4 +1,47 @@
   333.4  <?xml version="1.0" encoding="UTF-8"?>
   333.5 +<!--
   333.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   333.7 +
   333.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   333.9 +
  333.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  333.11 +Other names may be trademarks of their respective owners.
  333.12 +
  333.13 +The contents of this file are subject to the terms of either the GNU
  333.14 +General Public License Version 2 only ("GPL") or the Common
  333.15 +Development and Distribution License("CDDL") (collectively, the
  333.16 +"License"). You may not use this file except in compliance with the
  333.17 +License. You can obtain a copy of the License at
  333.18 +http://www.netbeans.org/cddl-gplv2.html
  333.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  333.20 +specific language governing permissions and limitations under the
  333.21 +License.  When distributing the software, include this License Header
  333.22 +Notice in each file and include the License file at
  333.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  333.24 +particular file as subject to the "Classpath" exception as provided
  333.25 +by Oracle in the GPL Version 2 section of the License file that
  333.26 +accompanied this code. If applicable, add the following below the
  333.27 +License Header, with the fields enclosed by brackets [] replaced by
  333.28 +your own identifying information:
  333.29 +"Portions Copyrighted [year] [name of copyright owner]"
  333.30 +
  333.31 +Contributor(s):
  333.32 +
  333.33 +The Original Software is NetBeans. The Initial Developer of the Original
  333.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  333.35 +Microsystems, Inc. All Rights Reserved.
  333.36 +
  333.37 +If you wish your version of this file to be governed by only the CDDL
  333.38 +or only the GPL Version 2, indicate your decision by adding
  333.39 +"[Contributor] elects to include this software in this distribution
  333.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  333.41 +single choice of license, a recipient has the option to distribute
  333.42 +your version of this file under either the CDDL, the GPL Version 2 or
  333.43 +to extend the choice of license to its licensees as provided above.
  333.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  333.45 +Version 2 license, then the option applies only if the new code is
  333.46 +made subject to such option by the copyright holder.
  333.47 +-->
  333.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  333.49      <type>org.netbeans.modules.java.j2seproject</type>
  333.50      <configuration>
   334.1 --- a/remoting/server/web/resolve.web.api/build.xml	Mon Dec 19 11:37:36 2016 +0100
   334.2 +++ b/remoting/server/web/resolve.web.api/build.xml	Mon Feb 27 22:40:44 2017 +0100
   334.3 @@ -1,4 +1,47 @@
   334.4  <?xml version="1.0" encoding="UTF-8"?>
   334.5 +<!--
   334.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   334.7 +
   334.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   334.9 +
  334.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  334.11 +Other names may be trademarks of their respective owners.
  334.12 +
  334.13 +The contents of this file are subject to the terms of either the GNU
  334.14 +General Public License Version 2 only ("GPL") or the Common
  334.15 +Development and Distribution License("CDDL") (collectively, the
  334.16 +"License"). You may not use this file except in compliance with the
  334.17 +License. You can obtain a copy of the License at
  334.18 +http://www.netbeans.org/cddl-gplv2.html
  334.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  334.20 +specific language governing permissions and limitations under the
  334.21 +License.  When distributing the software, include this License Header
  334.22 +Notice in each file and include the License file at
  334.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  334.24 +particular file as subject to the "Classpath" exception as provided
  334.25 +by Oracle in the GPL Version 2 section of the License file that
  334.26 +accompanied this code. If applicable, add the following below the
  334.27 +License Header, with the fields enclosed by brackets [] replaced by
  334.28 +your own identifying information:
  334.29 +"Portions Copyrighted [year] [name of copyright owner]"
  334.30 +
  334.31 +Contributor(s):
  334.32 +
  334.33 +The Original Software is NetBeans. The Initial Developer of the Original
  334.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  334.35 +Microsystems, Inc. All Rights Reserved.
  334.36 +
  334.37 +If you wish your version of this file to be governed by only the CDDL
  334.38 +or only the GPL Version 2, indicate your decision by adding
  334.39 +"[Contributor] elects to include this software in this distribution
  334.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  334.41 +single choice of license, a recipient has the option to distribute
  334.42 +your version of this file under either the CDDL, the GPL Version 2 or
  334.43 +to extend the choice of license to its licensees as provided above.
  334.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  334.45 +Version 2 license, then the option applies only if the new code is
  334.46 +made subject to such option by the copyright holder.
  334.47 +-->
  334.48  <!-- You may freely edit this file. See commented blocks below for -->
  334.49  <!-- some examples of how to customize the build. -->
  334.50  <!-- (If you delete it and reopen the project it will be recreated.) -->
   335.1 --- a/remoting/server/web/resolve.web.api/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   335.2 +++ b/remoting/server/web/resolve.web.api/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   335.3 @@ -1,5 +1,48 @@
   335.4  <?xml version="1.0" encoding="UTF-8"?>
   335.5  <!--
   335.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   335.7 +
   335.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   335.9 +
  335.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  335.11 +Other names may be trademarks of their respective owners.
  335.12 +
  335.13 +The contents of this file are subject to the terms of either the GNU
  335.14 +General Public License Version 2 only ("GPL") or the Common
  335.15 +Development and Distribution License("CDDL") (collectively, the
  335.16 +"License"). You may not use this file except in compliance with the
  335.17 +License. You can obtain a copy of the License at
  335.18 +http://www.netbeans.org/cddl-gplv2.html
  335.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  335.20 +specific language governing permissions and limitations under the
  335.21 +License.  When distributing the software, include this License Header
  335.22 +Notice in each file and include the License file at
  335.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  335.24 +particular file as subject to the "Classpath" exception as provided
  335.25 +by Oracle in the GPL Version 2 section of the License file that
  335.26 +accompanied this code. If applicable, add the following below the
  335.27 +License Header, with the fields enclosed by brackets [] replaced by
  335.28 +your own identifying information:
  335.29 +"Portions Copyrighted [year] [name of copyright owner]"
  335.30 +
  335.31 +Contributor(s):
  335.32 +
  335.33 +The Original Software is NetBeans. The Initial Developer of the Original
  335.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  335.35 +Microsystems, Inc. All Rights Reserved.
  335.36 +
  335.37 +If you wish your version of this file to be governed by only the CDDL
  335.38 +or only the GPL Version 2, indicate your decision by adding
  335.39 +"[Contributor] elects to include this software in this distribution
  335.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  335.41 +single choice of license, a recipient has the option to distribute
  335.42 +your version of this file under either the CDDL, the GPL Version 2 or
  335.43 +to extend the choice of license to its licensees as provided above.
  335.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  335.45 +Version 2 license, then the option applies only if the new code is
  335.46 +made subject to such option by the copyright holder.
  335.47 +-->
  335.48 +<!--
  335.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  335.50  ***         EDIT ../build.xml INSTEAD         ***
  335.51  
   336.1 --- a/remoting/server/web/resolve.web.api/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   336.2 +++ b/remoting/server/web/resolve.web.api/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   336.3 @@ -1,3 +1,44 @@
   336.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   336.5 +#
   336.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   336.7 +#
   336.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   336.9 +# Other names may be trademarks of their respective owners.
  336.10 +#
  336.11 +# The contents of this file are subject to the terms of either the GNU
  336.12 +# General Public License Version 2 only ("GPL") or the Common
  336.13 +# Development and Distribution License("CDDL") (collectively, the
  336.14 +# "License"). You may not use this file except in compliance with the
  336.15 +# License. You can obtain a copy of the License at
  336.16 +# http://www.netbeans.org/cddl-gplv2.html
  336.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  336.18 +# specific language governing permissions and limitations under the
  336.19 +# License.  When distributing the software, include this License Header
  336.20 +# Notice in each file and include the License file at
  336.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  336.22 +# particular file as subject to the "Classpath" exception as provided
  336.23 +# by Oracle in the GPL Version 2 section of the License file that
  336.24 +# accompanied this code. If applicable, add the following below the
  336.25 +# License Header, with the fields enclosed by brackets [] replaced by
  336.26 +# your own identifying information:
  336.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  336.28 +#
  336.29 +# Contributor(s):
  336.30 +#
  336.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  336.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  336.33 +# Microsystems, Inc. All Rights Reserved.
  336.34 +#
  336.35 +# If you wish your version of this file to be governed by only the CDDL
  336.36 +# or only the GPL Version 2, indicate your decision by adding
  336.37 +# "[Contributor] elects to include this software in this distribution
  336.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  336.39 +# single choice of license, a recipient has the option to distribute
  336.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  336.41 +# to extend the choice of license to its licensees as provided above.
  336.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  336.43 +# Version 2 license, then the option applies only if the new code is
  336.44 +# made subject to such option by the copyright holder.
  336.45  build.xml.data.CRC32=6b9c67e4
  336.46  build.xml.script.CRC32=7dffd7e8
  336.47  build.xml.stylesheet.CRC32=8064a381@1.71.0.47
   337.1 --- a/remoting/server/web/resolve.web.api/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   337.2 +++ b/remoting/server/web/resolve.web.api/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   337.3 @@ -1,3 +1,44 @@
   337.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   337.5 +#
   337.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   337.7 +#
   337.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   337.9 +# Other names may be trademarks of their respective owners.
  337.10 +#
  337.11 +# The contents of this file are subject to the terms of either the GNU
  337.12 +# General Public License Version 2 only ("GPL") or the Common
  337.13 +# Development and Distribution License("CDDL") (collectively, the
  337.14 +# "License"). You may not use this file except in compliance with the
  337.15 +# License. You can obtain a copy of the License at
  337.16 +# http://www.netbeans.org/cddl-gplv2.html
  337.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  337.18 +# specific language governing permissions and limitations under the
  337.19 +# License.  When distributing the software, include this License Header
  337.20 +# Notice in each file and include the License file at
  337.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  337.22 +# particular file as subject to the "Classpath" exception as provided
  337.23 +# by Oracle in the GPL Version 2 section of the License file that
  337.24 +# accompanied this code. If applicable, add the following below the
  337.25 +# License Header, with the fields enclosed by brackets [] replaced by
  337.26 +# your own identifying information:
  337.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  337.28 +#
  337.29 +# Contributor(s):
  337.30 +#
  337.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  337.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  337.33 +# Microsystems, Inc. All Rights Reserved.
  337.34 +#
  337.35 +# If you wish your version of this file to be governed by only the CDDL
  337.36 +# or only the GPL Version 2, indicate your decision by adding
  337.37 +# "[Contributor] elects to include this software in this distribution
  337.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  337.39 +# single choice of license, a recipient has the option to distribute
  337.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  337.41 +# to extend the choice of license to its licensees as provided above.
  337.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  337.43 +# Version 2 license, then the option applies only if the new code is
  337.44 +# made subject to such option by the copyright holder.
  337.45  annotation.processing.enabled=true
  337.46  annotation.processing.enabled.in.editor=false
  337.47  annotation.processing.processors.list=
   338.1 --- a/remoting/server/web/resolve.web.api/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   338.2 +++ b/remoting/server/web/resolve.web.api/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   338.3 @@ -1,4 +1,47 @@
   338.4  <?xml version="1.0" encoding="UTF-8"?>
   338.5 +<!--
   338.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   338.7 +
   338.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   338.9 +
  338.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  338.11 +Other names may be trademarks of their respective owners.
  338.12 +
  338.13 +The contents of this file are subject to the terms of either the GNU
  338.14 +General Public License Version 2 only ("GPL") or the Common
  338.15 +Development and Distribution License("CDDL") (collectively, the
  338.16 +"License"). You may not use this file except in compliance with the
  338.17 +License. You can obtain a copy of the License at
  338.18 +http://www.netbeans.org/cddl-gplv2.html
  338.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  338.20 +specific language governing permissions and limitations under the
  338.21 +License.  When distributing the software, include this License Header
  338.22 +Notice in each file and include the License file at
  338.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  338.24 +particular file as subject to the "Classpath" exception as provided
  338.25 +by Oracle in the GPL Version 2 section of the License file that
  338.26 +accompanied this code. If applicable, add the following below the
  338.27 +License Header, with the fields enclosed by brackets [] replaced by
  338.28 +your own identifying information:
  338.29 +"Portions Copyrighted [year] [name of copyright owner]"
  338.30 +
  338.31 +Contributor(s):
  338.32 +
  338.33 +The Original Software is NetBeans. The Initial Developer of the Original
  338.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  338.35 +Microsystems, Inc. All Rights Reserved.
  338.36 +
  338.37 +If you wish your version of this file to be governed by only the CDDL
  338.38 +or only the GPL Version 2, indicate your decision by adding
  338.39 +"[Contributor] elects to include this software in this distribution
  338.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  338.41 +single choice of license, a recipient has the option to distribute
  338.42 +your version of this file under either the CDDL, the GPL Version 2 or
  338.43 +to extend the choice of license to its licensees as provided above.
  338.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  338.45 +Version 2 license, then the option applies only if the new code is
  338.46 +made subject to such option by the copyright holder.
  338.47 +-->
  338.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  338.49      <type>org.netbeans.modules.java.j2seproject</type>
  338.50      <configuration>
   339.1 --- a/remoting/server/web/source.web.api/build.xml	Mon Dec 19 11:37:36 2016 +0100
   339.2 +++ b/remoting/server/web/source.web.api/build.xml	Mon Feb 27 22:40:44 2017 +0100
   339.3 @@ -1,4 +1,47 @@
   339.4  <?xml version="1.0" encoding="UTF-8"?>
   339.5 +<!--
   339.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   339.7 +
   339.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   339.9 +
  339.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  339.11 +Other names may be trademarks of their respective owners.
  339.12 +
  339.13 +The contents of this file are subject to the terms of either the GNU
  339.14 +General Public License Version 2 only ("GPL") or the Common
  339.15 +Development and Distribution License("CDDL") (collectively, the
  339.16 +"License"). You may not use this file except in compliance with the
  339.17 +License. You can obtain a copy of the License at
  339.18 +http://www.netbeans.org/cddl-gplv2.html
  339.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  339.20 +specific language governing permissions and limitations under the
  339.21 +License.  When distributing the software, include this License Header
  339.22 +Notice in each file and include the License file at
  339.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  339.24 +particular file as subject to the "Classpath" exception as provided
  339.25 +by Oracle in the GPL Version 2 section of the License file that
  339.26 +accompanied this code. If applicable, add the following below the
  339.27 +License Header, with the fields enclosed by brackets [] replaced by
  339.28 +your own identifying information:
  339.29 +"Portions Copyrighted [year] [name of copyright owner]"
  339.30 +
  339.31 +Contributor(s):
  339.32 +
  339.33 +The Original Software is NetBeans. The Initial Developer of the Original
  339.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  339.35 +Microsystems, Inc. All Rights Reserved.
  339.36 +
  339.37 +If you wish your version of this file to be governed by only the CDDL
  339.38 +or only the GPL Version 2, indicate your decision by adding
  339.39 +"[Contributor] elects to include this software in this distribution
  339.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  339.41 +single choice of license, a recipient has the option to distribute
  339.42 +your version of this file under either the CDDL, the GPL Version 2 or
  339.43 +to extend the choice of license to its licensees as provided above.
  339.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  339.45 +Version 2 license, then the option applies only if the new code is
  339.46 +made subject to such option by the copyright holder.
  339.47 +-->
  339.48  <!-- You may freely edit this file. See commented blocks below for -->
  339.49  <!-- some examples of how to customize the build. -->
  339.50  <!-- (If you delete it and reopen the project it will be recreated.) -->
   340.1 --- a/remoting/server/web/source.web.api/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   340.2 +++ b/remoting/server/web/source.web.api/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   340.3 @@ -1,5 +1,48 @@
   340.4  <?xml version="1.0" encoding="UTF-8"?>
   340.5  <!--
   340.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   340.7 +
   340.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   340.9 +
  340.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  340.11 +Other names may be trademarks of their respective owners.
  340.12 +
  340.13 +The contents of this file are subject to the terms of either the GNU
  340.14 +General Public License Version 2 only ("GPL") or the Common
  340.15 +Development and Distribution License("CDDL") (collectively, the
  340.16 +"License"). You may not use this file except in compliance with the
  340.17 +License. You can obtain a copy of the License at
  340.18 +http://www.netbeans.org/cddl-gplv2.html
  340.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  340.20 +specific language governing permissions and limitations under the
  340.21 +License.  When distributing the software, include this License Header
  340.22 +Notice in each file and include the License file at
  340.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  340.24 +particular file as subject to the "Classpath" exception as provided
  340.25 +by Oracle in the GPL Version 2 section of the License file that
  340.26 +accompanied this code. If applicable, add the following below the
  340.27 +License Header, with the fields enclosed by brackets [] replaced by
  340.28 +your own identifying information:
  340.29 +"Portions Copyrighted [year] [name of copyright owner]"
  340.30 +
  340.31 +Contributor(s):
  340.32 +
  340.33 +The Original Software is NetBeans. The Initial Developer of the Original
  340.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  340.35 +Microsystems, Inc. All Rights Reserved.
  340.36 +
  340.37 +If you wish your version of this file to be governed by only the CDDL
  340.38 +or only the GPL Version 2, indicate your decision by adding
  340.39 +"[Contributor] elects to include this software in this distribution
  340.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  340.41 +single choice of license, a recipient has the option to distribute
  340.42 +your version of this file under either the CDDL, the GPL Version 2 or
  340.43 +to extend the choice of license to its licensees as provided above.
  340.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  340.45 +Version 2 license, then the option applies only if the new code is
  340.46 +made subject to such option by the copyright holder.
  340.47 +-->
  340.48 +<!--
  340.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  340.50  ***         EDIT ../build.xml INSTEAD         ***
  340.51  
   341.1 --- a/remoting/server/web/source.web.api/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   341.2 +++ b/remoting/server/web/source.web.api/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   341.3 @@ -1,3 +1,44 @@
   341.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   341.5 +#
   341.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   341.7 +#
   341.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   341.9 +# Other names may be trademarks of their respective owners.
  341.10 +#
  341.11 +# The contents of this file are subject to the terms of either the GNU
  341.12 +# General Public License Version 2 only ("GPL") or the Common
  341.13 +# Development and Distribution License("CDDL") (collectively, the
  341.14 +# "License"). You may not use this file except in compliance with the
  341.15 +# License. You can obtain a copy of the License at
  341.16 +# http://www.netbeans.org/cddl-gplv2.html
  341.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  341.18 +# specific language governing permissions and limitations under the
  341.19 +# License.  When distributing the software, include this License Header
  341.20 +# Notice in each file and include the License file at
  341.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  341.22 +# particular file as subject to the "Classpath" exception as provided
  341.23 +# by Oracle in the GPL Version 2 section of the License file that
  341.24 +# accompanied this code. If applicable, add the following below the
  341.25 +# License Header, with the fields enclosed by brackets [] replaced by
  341.26 +# your own identifying information:
  341.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  341.28 +#
  341.29 +# Contributor(s):
  341.30 +#
  341.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  341.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  341.33 +# Microsystems, Inc. All Rights Reserved.
  341.34 +#
  341.35 +# If you wish your version of this file to be governed by only the CDDL
  341.36 +# or only the GPL Version 2, indicate your decision by adding
  341.37 +# "[Contributor] elects to include this software in this distribution
  341.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  341.39 +# single choice of license, a recipient has the option to distribute
  341.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  341.41 +# to extend the choice of license to its licensees as provided above.
  341.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  341.43 +# Version 2 license, then the option applies only if the new code is
  341.44 +# made subject to such option by the copyright holder.
  341.45  build.xml.data.CRC32=52865c72
  341.46  build.xml.script.CRC32=56f83b52
  341.47  build.xml.stylesheet.CRC32=8064a381@1.78.0.48
   342.1 --- a/remoting/server/web/source.web.api/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   342.2 +++ b/remoting/server/web/source.web.api/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   342.3 @@ -1,3 +1,44 @@
   342.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   342.5 +#
   342.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   342.7 +#
   342.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   342.9 +# Other names may be trademarks of their respective owners.
  342.10 +#
  342.11 +# The contents of this file are subject to the terms of either the GNU
  342.12 +# General Public License Version 2 only ("GPL") or the Common
  342.13 +# Development and Distribution License("CDDL") (collectively, the
  342.14 +# "License"). You may not use this file except in compliance with the
  342.15 +# License. You can obtain a copy of the License at
  342.16 +# http://www.netbeans.org/cddl-gplv2.html
  342.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  342.18 +# specific language governing permissions and limitations under the
  342.19 +# License.  When distributing the software, include this License Header
  342.20 +# Notice in each file and include the License file at
  342.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  342.22 +# particular file as subject to the "Classpath" exception as provided
  342.23 +# by Oracle in the GPL Version 2 section of the License file that
  342.24 +# accompanied this code. If applicable, add the following below the
  342.25 +# License Header, with the fields enclosed by brackets [] replaced by
  342.26 +# your own identifying information:
  342.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  342.28 +#
  342.29 +# Contributor(s):
  342.30 +#
  342.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  342.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  342.33 +# Microsystems, Inc. All Rights Reserved.
  342.34 +#
  342.35 +# If you wish your version of this file to be governed by only the CDDL
  342.36 +# or only the GPL Version 2, indicate your decision by adding
  342.37 +# "[Contributor] elects to include this software in this distribution
  342.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  342.39 +# single choice of license, a recipient has the option to distribute
  342.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  342.41 +# to extend the choice of license to its licensees as provided above.
  342.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  342.43 +# Version 2 license, then the option applies only if the new code is
  342.44 +# made subject to such option by the copyright holder.
  342.45  annotation.processing.enabled=true
  342.46  annotation.processing.enabled.in.editor=false
  342.47  annotation.processing.processor.options=
   343.1 --- a/remoting/server/web/source.web.api/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   343.2 +++ b/remoting/server/web/source.web.api/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   343.3 @@ -1,4 +1,47 @@
   343.4  <?xml version="1.0" encoding="UTF-8"?>
   343.5 +<!--
   343.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   343.7 +
   343.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   343.9 +
  343.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  343.11 +Other names may be trademarks of their respective owners.
  343.12 +
  343.13 +The contents of this file are subject to the terms of either the GNU
  343.14 +General Public License Version 2 only ("GPL") or the Common
  343.15 +Development and Distribution License("CDDL") (collectively, the
  343.16 +"License"). You may not use this file except in compliance with the
  343.17 +License. You can obtain a copy of the License at
  343.18 +http://www.netbeans.org/cddl-gplv2.html
  343.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  343.20 +specific language governing permissions and limitations under the
  343.21 +License.  When distributing the software, include this License Header
  343.22 +Notice in each file and include the License file at
  343.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  343.24 +particular file as subject to the "Classpath" exception as provided
  343.25 +by Oracle in the GPL Version 2 section of the License file that
  343.26 +accompanied this code. If applicable, add the following below the
  343.27 +License Header, with the fields enclosed by brackets [] replaced by
  343.28 +your own identifying information:
  343.29 +"Portions Copyrighted [year] [name of copyright owner]"
  343.30 +
  343.31 +Contributor(s):
  343.32 +
  343.33 +The Original Software is NetBeans. The Initial Developer of the Original
  343.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  343.35 +Microsystems, Inc. All Rights Reserved.
  343.36 +
  343.37 +If you wish your version of this file to be governed by only the CDDL
  343.38 +or only the GPL Version 2, indicate your decision by adding
  343.39 +"[Contributor] elects to include this software in this distribution
  343.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  343.41 +single choice of license, a recipient has the option to distribute
  343.42 +your version of this file under either the CDDL, the GPL Version 2 or
  343.43 +to extend the choice of license to its licensees as provided above.
  343.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  343.45 +Version 2 license, then the option applies only if the new code is
  343.46 +made subject to such option by the copyright holder.
  343.47 +-->
  343.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  343.49      <type>org.netbeans.modules.java.j2seproject</type>
  343.50      <configuration>
   344.1 --- a/remoting/server/web/type.web.api/build.xml	Mon Dec 19 11:37:36 2016 +0100
   344.2 +++ b/remoting/server/web/type.web.api/build.xml	Mon Feb 27 22:40:44 2017 +0100
   344.3 @@ -1,4 +1,47 @@
   344.4  <?xml version="1.0" encoding="UTF-8"?>
   344.5 +<!--
   344.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   344.7 +
   344.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   344.9 +
  344.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  344.11 +Other names may be trademarks of their respective owners.
  344.12 +
  344.13 +The contents of this file are subject to the terms of either the GNU
  344.14 +General Public License Version 2 only ("GPL") or the Common
  344.15 +Development and Distribution License("CDDL") (collectively, the
  344.16 +"License"). You may not use this file except in compliance with the
  344.17 +License. You can obtain a copy of the License at
  344.18 +http://www.netbeans.org/cddl-gplv2.html
  344.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  344.20 +specific language governing permissions and limitations under the
  344.21 +License.  When distributing the software, include this License Header
  344.22 +Notice in each file and include the License file at
  344.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  344.24 +particular file as subject to the "Classpath" exception as provided
  344.25 +by Oracle in the GPL Version 2 section of the License file that
  344.26 +accompanied this code. If applicable, add the following below the
  344.27 +License Header, with the fields enclosed by brackets [] replaced by
  344.28 +your own identifying information:
  344.29 +"Portions Copyrighted [year] [name of copyright owner]"
  344.30 +
  344.31 +Contributor(s):
  344.32 +
  344.33 +The Original Software is NetBeans. The Initial Developer of the Original
  344.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  344.35 +Microsystems, Inc. All Rights Reserved.
  344.36 +
  344.37 +If you wish your version of this file to be governed by only the CDDL
  344.38 +or only the GPL Version 2, indicate your decision by adding
  344.39 +"[Contributor] elects to include this software in this distribution
  344.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  344.41 +single choice of license, a recipient has the option to distribute
  344.42 +your version of this file under either the CDDL, the GPL Version 2 or
  344.43 +to extend the choice of license to its licensees as provided above.
  344.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  344.45 +Version 2 license, then the option applies only if the new code is
  344.46 +made subject to such option by the copyright holder.
  344.47 +-->
  344.48  <!-- You may freely edit this file. See commented blocks below for -->
  344.49  <!-- some examples of how to customize the build. -->
  344.50  <!-- (If you delete it and reopen the project it will be recreated.) -->
   345.1 --- a/remoting/server/web/type.web.api/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   345.2 +++ b/remoting/server/web/type.web.api/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   345.3 @@ -1,5 +1,48 @@
   345.4  <?xml version="1.0" encoding="UTF-8"?>
   345.5  <!--
   345.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   345.7 +
   345.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   345.9 +
  345.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  345.11 +Other names may be trademarks of their respective owners.
  345.12 +
  345.13 +The contents of this file are subject to the terms of either the GNU
  345.14 +General Public License Version 2 only ("GPL") or the Common
  345.15 +Development and Distribution License("CDDL") (collectively, the
  345.16 +"License"). You may not use this file except in compliance with the
  345.17 +License. You can obtain a copy of the License at
  345.18 +http://www.netbeans.org/cddl-gplv2.html
  345.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  345.20 +specific language governing permissions and limitations under the
  345.21 +License.  When distributing the software, include this License Header
  345.22 +Notice in each file and include the License file at
  345.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  345.24 +particular file as subject to the "Classpath" exception as provided
  345.25 +by Oracle in the GPL Version 2 section of the License file that
  345.26 +accompanied this code. If applicable, add the following below the
  345.27 +License Header, with the fields enclosed by brackets [] replaced by
  345.28 +your own identifying information:
  345.29 +"Portions Copyrighted [year] [name of copyright owner]"
  345.30 +
  345.31 +Contributor(s):
  345.32 +
  345.33 +The Original Software is NetBeans. The Initial Developer of the Original
  345.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  345.35 +Microsystems, Inc. All Rights Reserved.
  345.36 +
  345.37 +If you wish your version of this file to be governed by only the CDDL
  345.38 +or only the GPL Version 2, indicate your decision by adding
  345.39 +"[Contributor] elects to include this software in this distribution
  345.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  345.41 +single choice of license, a recipient has the option to distribute
  345.42 +your version of this file under either the CDDL, the GPL Version 2 or
  345.43 +to extend the choice of license to its licensees as provided above.
  345.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  345.45 +Version 2 license, then the option applies only if the new code is
  345.46 +made subject to such option by the copyright holder.
  345.47 +-->
  345.48 +<!--
  345.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  345.50  ***         EDIT ../build.xml INSTEAD         ***
  345.51  
   346.1 --- a/remoting/server/web/type.web.api/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   346.2 +++ b/remoting/server/web/type.web.api/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   346.3 @@ -1,3 +1,44 @@
   346.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   346.5 +#
   346.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   346.7 +#
   346.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   346.9 +# Other names may be trademarks of their respective owners.
  346.10 +#
  346.11 +# The contents of this file are subject to the terms of either the GNU
  346.12 +# General Public License Version 2 only ("GPL") or the Common
  346.13 +# Development and Distribution License("CDDL") (collectively, the
  346.14 +# "License"). You may not use this file except in compliance with the
  346.15 +# License. You can obtain a copy of the License at
  346.16 +# http://www.netbeans.org/cddl-gplv2.html
  346.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  346.18 +# specific language governing permissions and limitations under the
  346.19 +# License.  When distributing the software, include this License Header
  346.20 +# Notice in each file and include the License file at
  346.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  346.22 +# particular file as subject to the "Classpath" exception as provided
  346.23 +# by Oracle in the GPL Version 2 section of the License file that
  346.24 +# accompanied this code. If applicable, add the following below the
  346.25 +# License Header, with the fields enclosed by brackets [] replaced by
  346.26 +# your own identifying information:
  346.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  346.28 +#
  346.29 +# Contributor(s):
  346.30 +#
  346.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  346.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  346.33 +# Microsystems, Inc. All Rights Reserved.
  346.34 +#
  346.35 +# If you wish your version of this file to be governed by only the CDDL
  346.36 +# or only the GPL Version 2, indicate your decision by adding
  346.37 +# "[Contributor] elects to include this software in this distribution
  346.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  346.39 +# single choice of license, a recipient has the option to distribute
  346.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  346.41 +# to extend the choice of license to its licensees as provided above.
  346.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  346.43 +# Version 2 license, then the option applies only if the new code is
  346.44 +# made subject to such option by the copyright holder.
  346.45  build.xml.data.CRC32=7d71200f
  346.46  build.xml.script.CRC32=abaf86a6
  346.47  build.xml.stylesheet.CRC32=8064a381@1.78.0.48
   347.1 --- a/remoting/server/web/type.web.api/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   347.2 +++ b/remoting/server/web/type.web.api/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   347.3 @@ -1,3 +1,44 @@
   347.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   347.5 +#
   347.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   347.7 +#
   347.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   347.9 +# Other names may be trademarks of their respective owners.
  347.10 +#
  347.11 +# The contents of this file are subject to the terms of either the GNU
  347.12 +# General Public License Version 2 only ("GPL") or the Common
  347.13 +# Development and Distribution License("CDDL") (collectively, the
  347.14 +# "License"). You may not use this file except in compliance with the
  347.15 +# License. You can obtain a copy of the License at
  347.16 +# http://www.netbeans.org/cddl-gplv2.html
  347.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  347.18 +# specific language governing permissions and limitations under the
  347.19 +# License.  When distributing the software, include this License Header
  347.20 +# Notice in each file and include the License file at
  347.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  347.22 +# particular file as subject to the "Classpath" exception as provided
  347.23 +# by Oracle in the GPL Version 2 section of the License file that
  347.24 +# accompanied this code. If applicable, add the following below the
  347.25 +# License Header, with the fields enclosed by brackets [] replaced by
  347.26 +# your own identifying information:
  347.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  347.28 +#
  347.29 +# Contributor(s):
  347.30 +#
  347.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  347.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  347.33 +# Microsystems, Inc. All Rights Reserved.
  347.34 +#
  347.35 +# If you wish your version of this file to be governed by only the CDDL
  347.36 +# or only the GPL Version 2, indicate your decision by adding
  347.37 +# "[Contributor] elects to include this software in this distribution
  347.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  347.39 +# single choice of license, a recipient has the option to distribute
  347.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  347.41 +# to extend the choice of license to its licensees as provided above.
  347.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  347.43 +# Version 2 license, then the option applies only if the new code is
  347.44 +# made subject to such option by the copyright holder.
  347.45  annotation.processing.enabled=true
  347.46  annotation.processing.enabled.in.editor=false
  347.47  annotation.processing.run.all.processors=true
   348.1 --- a/remoting/server/web/type.web.api/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   348.2 +++ b/remoting/server/web/type.web.api/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   348.3 @@ -1,4 +1,47 @@
   348.4  <?xml version="1.0" encoding="UTF-8"?>
   348.5 +<!--
   348.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   348.7 +
   348.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   348.9 +
  348.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  348.11 +Other names may be trademarks of their respective owners.
  348.12 +
  348.13 +The contents of this file are subject to the terms of either the GNU
  348.14 +General Public License Version 2 only ("GPL") or the Common
  348.15 +Development and Distribution License("CDDL") (collectively, the
  348.16 +"License"). You may not use this file except in compliance with the
  348.17 +License. You can obtain a copy of the License at
  348.18 +http://www.netbeans.org/cddl-gplv2.html
  348.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  348.20 +specific language governing permissions and limitations under the
  348.21 +License.  When distributing the software, include this License Header
  348.22 +Notice in each file and include the License file at
  348.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  348.24 +particular file as subject to the "Classpath" exception as provided
  348.25 +by Oracle in the GPL Version 2 section of the License file that
  348.26 +accompanied this code. If applicable, add the following below the
  348.27 +License Header, with the fields enclosed by brackets [] replaced by
  348.28 +your own identifying information:
  348.29 +"Portions Copyrighted [year] [name of copyright owner]"
  348.30 +
  348.31 +Contributor(s):
  348.32 +
  348.33 +The Original Software is NetBeans. The Initial Developer of the Original
  348.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  348.35 +Microsystems, Inc. All Rights Reserved.
  348.36 +
  348.37 +If you wish your version of this file to be governed by only the CDDL
  348.38 +or only the GPL Version 2, indicate your decision by adding
  348.39 +"[Contributor] elects to include this software in this distribution
  348.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  348.41 +single choice of license, a recipient has the option to distribute
  348.42 +your version of this file under either the CDDL, the GPL Version 2 or
  348.43 +to extend the choice of license to its licensees as provided above.
  348.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  348.45 +Version 2 license, then the option applies only if the new code is
  348.46 +made subject to such option by the copyright holder.
  348.47 +-->
  348.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  348.49      <type>org.netbeans.modules.java.j2seproject</type>
  348.50      <configuration>
   349.1 --- a/remoting/server/web/usages.web.api/build.xml	Mon Dec 19 11:37:36 2016 +0100
   349.2 +++ b/remoting/server/web/usages.web.api/build.xml	Mon Feb 27 22:40:44 2017 +0100
   349.3 @@ -1,4 +1,47 @@
   349.4  <?xml version="1.0" encoding="UTF-8"?>
   349.5 +<!--
   349.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   349.7 +
   349.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   349.9 +
  349.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  349.11 +Other names may be trademarks of their respective owners.
  349.12 +
  349.13 +The contents of this file are subject to the terms of either the GNU
  349.14 +General Public License Version 2 only ("GPL") or the Common
  349.15 +Development and Distribution License("CDDL") (collectively, the
  349.16 +"License"). You may not use this file except in compliance with the
  349.17 +License. You can obtain a copy of the License at
  349.18 +http://www.netbeans.org/cddl-gplv2.html
  349.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  349.20 +specific language governing permissions and limitations under the
  349.21 +License.  When distributing the software, include this License Header
  349.22 +Notice in each file and include the License file at
  349.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  349.24 +particular file as subject to the "Classpath" exception as provided
  349.25 +by Oracle in the GPL Version 2 section of the License file that
  349.26 +accompanied this code. If applicable, add the following below the
  349.27 +License Header, with the fields enclosed by brackets [] replaced by
  349.28 +your own identifying information:
  349.29 +"Portions Copyrighted [year] [name of copyright owner]"
  349.30 +
  349.31 +Contributor(s):
  349.32 +
  349.33 +The Original Software is NetBeans. The Initial Developer of the Original
  349.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  349.35 +Microsystems, Inc. All Rights Reserved.
  349.36 +
  349.37 +If you wish your version of this file to be governed by only the CDDL
  349.38 +or only the GPL Version 2, indicate your decision by adding
  349.39 +"[Contributor] elects to include this software in this distribution
  349.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  349.41 +single choice of license, a recipient has the option to distribute
  349.42 +your version of this file under either the CDDL, the GPL Version 2 or
  349.43 +to extend the choice of license to its licensees as provided above.
  349.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  349.45 +Version 2 license, then the option applies only if the new code is
  349.46 +made subject to such option by the copyright holder.
  349.47 +-->
  349.48  <!-- You may freely edit this file. See commented blocks below for -->
  349.49  <!-- some examples of how to customize the build. -->
  349.50  <!-- (If you delete it and reopen the project it will be recreated.) -->
   350.1 --- a/remoting/server/web/usages.web.api/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   350.2 +++ b/remoting/server/web/usages.web.api/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   350.3 @@ -1,5 +1,48 @@
   350.4  <?xml version="1.0" encoding="UTF-8"?>
   350.5  <!--
   350.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   350.7 +
   350.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   350.9 +
  350.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  350.11 +Other names may be trademarks of their respective owners.
  350.12 +
  350.13 +The contents of this file are subject to the terms of either the GNU
  350.14 +General Public License Version 2 only ("GPL") or the Common
  350.15 +Development and Distribution License("CDDL") (collectively, the
  350.16 +"License"). You may not use this file except in compliance with the
  350.17 +License. You can obtain a copy of the License at
  350.18 +http://www.netbeans.org/cddl-gplv2.html
  350.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  350.20 +specific language governing permissions and limitations under the
  350.21 +License.  When distributing the software, include this License Header
  350.22 +Notice in each file and include the License file at
  350.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  350.24 +particular file as subject to the "Classpath" exception as provided
  350.25 +by Oracle in the GPL Version 2 section of the License file that
  350.26 +accompanied this code. If applicable, add the following below the
  350.27 +License Header, with the fields enclosed by brackets [] replaced by
  350.28 +your own identifying information:
  350.29 +"Portions Copyrighted [year] [name of copyright owner]"
  350.30 +
  350.31 +Contributor(s):
  350.32 +
  350.33 +The Original Software is NetBeans. The Initial Developer of the Original
  350.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  350.35 +Microsystems, Inc. All Rights Reserved.
  350.36 +
  350.37 +If you wish your version of this file to be governed by only the CDDL
  350.38 +or only the GPL Version 2, indicate your decision by adding
  350.39 +"[Contributor] elects to include this software in this distribution
  350.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  350.41 +single choice of license, a recipient has the option to distribute
  350.42 +your version of this file under either the CDDL, the GPL Version 2 or
  350.43 +to extend the choice of license to its licensees as provided above.
  350.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  350.45 +Version 2 license, then the option applies only if the new code is
  350.46 +made subject to such option by the copyright holder.
  350.47 +-->
  350.48 +<!--
  350.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  350.50  ***         EDIT ../build.xml INSTEAD         ***
  350.51  
   351.1 --- a/remoting/server/web/usages.web.api/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   351.2 +++ b/remoting/server/web/usages.web.api/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   351.3 @@ -1,3 +1,44 @@
   351.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   351.5 +#
   351.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   351.7 +#
   351.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   351.9 +# Other names may be trademarks of their respective owners.
  351.10 +#
  351.11 +# The contents of this file are subject to the terms of either the GNU
  351.12 +# General Public License Version 2 only ("GPL") or the Common
  351.13 +# Development and Distribution License("CDDL") (collectively, the
  351.14 +# "License"). You may not use this file except in compliance with the
  351.15 +# License. You can obtain a copy of the License at
  351.16 +# http://www.netbeans.org/cddl-gplv2.html
  351.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  351.18 +# specific language governing permissions and limitations under the
  351.19 +# License.  When distributing the software, include this License Header
  351.20 +# Notice in each file and include the License file at
  351.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  351.22 +# particular file as subject to the "Classpath" exception as provided
  351.23 +# by Oracle in the GPL Version 2 section of the License file that
  351.24 +# accompanied this code. If applicable, add the following below the
  351.25 +# License Header, with the fields enclosed by brackets [] replaced by
  351.26 +# your own identifying information:
  351.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  351.28 +#
  351.29 +# Contributor(s):
  351.30 +#
  351.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  351.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  351.33 +# Microsystems, Inc. All Rights Reserved.
  351.34 +#
  351.35 +# If you wish your version of this file to be governed by only the CDDL
  351.36 +# or only the GPL Version 2, indicate your decision by adding
  351.37 +# "[Contributor] elects to include this software in this distribution
  351.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  351.39 +# single choice of license, a recipient has the option to distribute
  351.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  351.41 +# to extend the choice of license to its licensees as provided above.
  351.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  351.43 +# Version 2 license, then the option applies only if the new code is
  351.44 +# made subject to such option by the copyright holder.
  351.45  build.xml.data.CRC32=0ab46c18
  351.46  build.xml.script.CRC32=c2f0069e
  351.47  build.xml.stylesheet.CRC32=8064a381@1.78.0.48
   352.1 --- a/remoting/server/web/usages.web.api/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   352.2 +++ b/remoting/server/web/usages.web.api/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   352.3 @@ -1,3 +1,44 @@
   352.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   352.5 +#
   352.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   352.7 +#
   352.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   352.9 +# Other names may be trademarks of their respective owners.
  352.10 +#
  352.11 +# The contents of this file are subject to the terms of either the GNU
  352.12 +# General Public License Version 2 only ("GPL") or the Common
  352.13 +# Development and Distribution License("CDDL") (collectively, the
  352.14 +# "License"). You may not use this file except in compliance with the
  352.15 +# License. You can obtain a copy of the License at
  352.16 +# http://www.netbeans.org/cddl-gplv2.html
  352.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  352.18 +# specific language governing permissions and limitations under the
  352.19 +# License.  When distributing the software, include this License Header
  352.20 +# Notice in each file and include the License file at
  352.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  352.22 +# particular file as subject to the "Classpath" exception as provided
  352.23 +# by Oracle in the GPL Version 2 section of the License file that
  352.24 +# accompanied this code. If applicable, add the following below the
  352.25 +# License Header, with the fields enclosed by brackets [] replaced by
  352.26 +# your own identifying information:
  352.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  352.28 +#
  352.29 +# Contributor(s):
  352.30 +#
  352.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  352.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  352.33 +# Microsystems, Inc. All Rights Reserved.
  352.34 +#
  352.35 +# If you wish your version of this file to be governed by only the CDDL
  352.36 +# or only the GPL Version 2, indicate your decision by adding
  352.37 +# "[Contributor] elects to include this software in this distribution
  352.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  352.39 +# single choice of license, a recipient has the option to distribute
  352.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  352.41 +# to extend the choice of license to its licensees as provided above.
  352.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  352.43 +# Version 2 license, then the option applies only if the new code is
  352.44 +# made subject to such option by the copyright holder.
  352.45  annotation.processing.enabled=true
  352.46  annotation.processing.enabled.in.editor=false
  352.47  annotation.processing.processor.options=
   353.1 --- a/remoting/server/web/usages.web.api/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   353.2 +++ b/remoting/server/web/usages.web.api/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   353.3 @@ -1,4 +1,47 @@
   353.4  <?xml version="1.0" encoding="UTF-8"?>
   353.5 +<!--
   353.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   353.7 +
   353.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   353.9 +
  353.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  353.11 +Other names may be trademarks of their respective owners.
  353.12 +
  353.13 +The contents of this file are subject to the terms of either the GNU
  353.14 +General Public License Version 2 only ("GPL") or the Common
  353.15 +Development and Distribution License("CDDL") (collectively, the
  353.16 +"License"). You may not use this file except in compliance with the
  353.17 +License. You can obtain a copy of the License at
  353.18 +http://www.netbeans.org/cddl-gplv2.html
  353.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  353.20 +specific language governing permissions and limitations under the
  353.21 +License.  When distributing the software, include this License Header
  353.22 +Notice in each file and include the License file at
  353.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  353.24 +particular file as subject to the "Classpath" exception as provided
  353.25 +by Oracle in the GPL Version 2 section of the License file that
  353.26 +accompanied this code. If applicable, add the following below the
  353.27 +License Header, with the fields enclosed by brackets [] replaced by
  353.28 +your own identifying information:
  353.29 +"Portions Copyrighted [year] [name of copyright owner]"
  353.30 +
  353.31 +Contributor(s):
  353.32 +
  353.33 +The Original Software is NetBeans. The Initial Developer of the Original
  353.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  353.35 +Microsystems, Inc. All Rights Reserved.
  353.36 +
  353.37 +If you wish your version of this file to be governed by only the CDDL
  353.38 +or only the GPL Version 2, indicate your decision by adding
  353.39 +"[Contributor] elects to include this software in this distribution
  353.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  353.41 +single choice of license, a recipient has the option to distribute
  353.42 +your version of this file under either the CDDL, the GPL Version 2 or
  353.43 +to extend the choice of license to its licensees as provided above.
  353.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  353.45 +Version 2 license, then the option applies only if the new code is
  353.46 +made subject to such option by the copyright holder.
  353.47 +-->
  353.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  353.49      <type>org.netbeans.modules.java.j2seproject</type>
  353.50      <configuration>
   354.1 --- a/remoting/server/web/web.main/build.xml	Mon Dec 19 11:37:36 2016 +0100
   354.2 +++ b/remoting/server/web/web.main/build.xml	Mon Feb 27 22:40:44 2017 +0100
   354.3 @@ -1,4 +1,47 @@
   354.4  <?xml version="1.0" encoding="UTF-8"?>
   354.5 +<!--
   354.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   354.7 +
   354.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   354.9 +
  354.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  354.11 +Other names may be trademarks of their respective owners.
  354.12 +
  354.13 +The contents of this file are subject to the terms of either the GNU
  354.14 +General Public License Version 2 only ("GPL") or the Common
  354.15 +Development and Distribution License("CDDL") (collectively, the
  354.16 +"License"). You may not use this file except in compliance with the
  354.17 +License. You can obtain a copy of the License at
  354.18 +http://www.netbeans.org/cddl-gplv2.html
  354.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  354.20 +specific language governing permissions and limitations under the
  354.21 +License.  When distributing the software, include this License Header
  354.22 +Notice in each file and include the License file at
  354.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  354.24 +particular file as subject to the "Classpath" exception as provided
  354.25 +by Oracle in the GPL Version 2 section of the License file that
  354.26 +accompanied this code. If applicable, add the following below the
  354.27 +License Header, with the fields enclosed by brackets [] replaced by
  354.28 +your own identifying information:
  354.29 +"Portions Copyrighted [year] [name of copyright owner]"
  354.30 +
  354.31 +Contributor(s):
  354.32 +
  354.33 +The Original Software is NetBeans. The Initial Developer of the Original
  354.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  354.35 +Microsystems, Inc. All Rights Reserved.
  354.36 +
  354.37 +If you wish your version of this file to be governed by only the CDDL
  354.38 +or only the GPL Version 2, indicate your decision by adding
  354.39 +"[Contributor] elects to include this software in this distribution
  354.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  354.41 +single choice of license, a recipient has the option to distribute
  354.42 +your version of this file under either the CDDL, the GPL Version 2 or
  354.43 +to extend the choice of license to its licensees as provided above.
  354.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  354.45 +Version 2 license, then the option applies only if the new code is
  354.46 +made subject to such option by the copyright holder.
  354.47 +-->
  354.48  <!-- You may freely edit this file. See commented blocks below for -->
  354.49  <!-- some examples of how to customize the build. -->
  354.50  <!-- (If you delete it and reopen the project it will be recreated.) -->
   355.1 --- a/remoting/server/web/web.main/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   355.2 +++ b/remoting/server/web/web.main/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   355.3 @@ -1,5 +1,48 @@
   355.4  <?xml version="1.0" encoding="UTF-8"?>
   355.5  <!--
   355.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   355.7 +
   355.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   355.9 +
  355.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  355.11 +Other names may be trademarks of their respective owners.
  355.12 +
  355.13 +The contents of this file are subject to the terms of either the GNU
  355.14 +General Public License Version 2 only ("GPL") or the Common
  355.15 +Development and Distribution License("CDDL") (collectively, the
  355.16 +"License"). You may not use this file except in compliance with the
  355.17 +License. You can obtain a copy of the License at
  355.18 +http://www.netbeans.org/cddl-gplv2.html
  355.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  355.20 +specific language governing permissions and limitations under the
  355.21 +License.  When distributing the software, include this License Header
  355.22 +Notice in each file and include the License file at
  355.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  355.24 +particular file as subject to the "Classpath" exception as provided
  355.25 +by Oracle in the GPL Version 2 section of the License file that
  355.26 +accompanied this code. If applicable, add the following below the
  355.27 +License Header, with the fields enclosed by brackets [] replaced by
  355.28 +your own identifying information:
  355.29 +"Portions Copyrighted [year] [name of copyright owner]"
  355.30 +
  355.31 +Contributor(s):
  355.32 +
  355.33 +The Original Software is NetBeans. The Initial Developer of the Original
  355.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  355.35 +Microsystems, Inc. All Rights Reserved.
  355.36 +
  355.37 +If you wish your version of this file to be governed by only the CDDL
  355.38 +or only the GPL Version 2, indicate your decision by adding
  355.39 +"[Contributor] elects to include this software in this distribution
  355.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  355.41 +single choice of license, a recipient has the option to distribute
  355.42 +your version of this file under either the CDDL, the GPL Version 2 or
  355.43 +to extend the choice of license to its licensees as provided above.
  355.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  355.45 +Version 2 license, then the option applies only if the new code is
  355.46 +made subject to such option by the copyright holder.
  355.47 +-->
  355.48 +<!--
  355.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  355.50  ***         EDIT ../build.xml INSTEAD         ***
  355.51  
   356.1 --- a/remoting/server/web/web.main/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   356.2 +++ b/remoting/server/web/web.main/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   356.3 @@ -1,3 +1,44 @@
   356.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   356.5 +#
   356.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   356.7 +#
   356.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   356.9 +# Other names may be trademarks of their respective owners.
  356.10 +#
  356.11 +# The contents of this file are subject to the terms of either the GNU
  356.12 +# General Public License Version 2 only ("GPL") or the Common
  356.13 +# Development and Distribution License("CDDL") (collectively, the
  356.14 +# "License"). You may not use this file except in compliance with the
  356.15 +# License. You can obtain a copy of the License at
  356.16 +# http://www.netbeans.org/cddl-gplv2.html
  356.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  356.18 +# specific language governing permissions and limitations under the
  356.19 +# License.  When distributing the software, include this License Header
  356.20 +# Notice in each file and include the License file at
  356.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  356.22 +# particular file as subject to the "Classpath" exception as provided
  356.23 +# by Oracle in the GPL Version 2 section of the License file that
  356.24 +# accompanied this code. If applicable, add the following below the
  356.25 +# License Header, with the fields enclosed by brackets [] replaced by
  356.26 +# your own identifying information:
  356.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  356.28 +#
  356.29 +# Contributor(s):
  356.30 +#
  356.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  356.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  356.33 +# Microsystems, Inc. All Rights Reserved.
  356.34 +#
  356.35 +# If you wish your version of this file to be governed by only the CDDL
  356.36 +# or only the GPL Version 2, indicate your decision by adding
  356.37 +# "[Contributor] elects to include this software in this distribution
  356.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  356.39 +# single choice of license, a recipient has the option to distribute
  356.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  356.41 +# to extend the choice of license to its licensees as provided above.
  356.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  356.43 +# Version 2 license, then the option applies only if the new code is
  356.44 +# made subject to such option by the copyright holder.
  356.45  build.xml.data.CRC32=f536def6
  356.46  build.xml.script.CRC32=5ddf268c
  356.47  build.xml.stylesheet.CRC32=28e38971@1.46.0.46
   357.1 --- a/remoting/server/web/web.main/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   357.2 +++ b/remoting/server/web/web.main/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   357.3 @@ -1,3 +1,44 @@
   357.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   357.5 +#
   357.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   357.7 +#
   357.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   357.9 +# Other names may be trademarks of their respective owners.
  357.10 +#
  357.11 +# The contents of this file are subject to the terms of either the GNU
  357.12 +# General Public License Version 2 only ("GPL") or the Common
  357.13 +# Development and Distribution License("CDDL") (collectively, the
  357.14 +# "License"). You may not use this file except in compliance with the
  357.15 +# License. You can obtain a copy of the License at
  357.16 +# http://www.netbeans.org/cddl-gplv2.html
  357.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  357.18 +# specific language governing permissions and limitations under the
  357.19 +# License.  When distributing the software, include this License Header
  357.20 +# Notice in each file and include the License file at
  357.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  357.22 +# particular file as subject to the "Classpath" exception as provided
  357.23 +# by Oracle in the GPL Version 2 section of the License file that
  357.24 +# accompanied this code. If applicable, add the following below the
  357.25 +# License Header, with the fields enclosed by brackets [] replaced by
  357.26 +# your own identifying information:
  357.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  357.28 +#
  357.29 +# Contributor(s):
  357.30 +#
  357.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  357.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  357.33 +# Microsystems, Inc. All Rights Reserved.
  357.34 +#
  357.35 +# If you wish your version of this file to be governed by only the CDDL
  357.36 +# or only the GPL Version 2, indicate your decision by adding
  357.37 +# "[Contributor] elects to include this software in this distribution
  357.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  357.39 +# single choice of license, a recipient has the option to distribute
  357.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  357.41 +# to extend the choice of license to its licensees as provided above.
  357.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  357.43 +# Version 2 license, then the option applies only if the new code is
  357.44 +# made subject to such option by the copyright holder.
  357.45  annotation.processing.enabled=true
  357.46  annotation.processing.enabled.in.editor=false
  357.47  annotation.processing.processors.list=
   358.1 --- a/remoting/server/web/web.main/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   358.2 +++ b/remoting/server/web/web.main/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   358.3 @@ -1,4 +1,47 @@
   358.4  <?xml version="1.0" encoding="UTF-8"?>
   358.5 +<!--
   358.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   358.7 +
   358.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   358.9 +
  358.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  358.11 +Other names may be trademarks of their respective owners.
  358.12 +
  358.13 +The contents of this file are subject to the terms of either the GNU
  358.14 +General Public License Version 2 only ("GPL") or the Common
  358.15 +Development and Distribution License("CDDL") (collectively, the
  358.16 +"License"). You may not use this file except in compliance with the
  358.17 +License. You can obtain a copy of the License at
  358.18 +http://www.netbeans.org/cddl-gplv2.html
  358.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  358.20 +specific language governing permissions and limitations under the
  358.21 +License.  When distributing the software, include this License Header
  358.22 +Notice in each file and include the License file at
  358.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  358.24 +particular file as subject to the "Classpath" exception as provided
  358.25 +by Oracle in the GPL Version 2 section of the License file that
  358.26 +accompanied this code. If applicable, add the following below the
  358.27 +License Header, with the fields enclosed by brackets [] replaced by
  358.28 +your own identifying information:
  358.29 +"Portions Copyrighted [year] [name of copyright owner]"
  358.30 +
  358.31 +Contributor(s):
  358.32 +
  358.33 +The Original Software is NetBeans. The Initial Developer of the Original
  358.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  358.35 +Microsystems, Inc. All Rights Reserved.
  358.36 +
  358.37 +If you wish your version of this file to be governed by only the CDDL
  358.38 +or only the GPL Version 2, indicate your decision by adding
  358.39 +"[Contributor] elects to include this software in this distribution
  358.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  358.41 +single choice of license, a recipient has the option to distribute
  358.42 +your version of this file under either the CDDL, the GPL Version 2 or
  358.43 +to extend the choice of license to its licensees as provided above.
  358.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  358.45 +Version 2 license, then the option applies only if the new code is
  358.46 +made subject to such option by the copyright holder.
  358.47 +-->
  358.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  358.49      <type>org.netbeans.modules.java.j2seproject</type>
  358.50      <configuration>
   359.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   359.2 +++ b/remoting/server/web/web.main/src/org/netbeans/modules/jackpot30/backend/main/MainPage.java	Mon Feb 27 22:40:44 2017 +0100
   359.3 @@ -0,0 +1,60 @@
   359.4 +/*
   359.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   359.6 + *
   359.7 + * Copyright 2011-2017 Oracle and/or its affiliates. All rights reserved.
   359.8 + *
   359.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  359.10 + * Other names may be trademarks of their respective owners.
  359.11 + *
  359.12 + * The contents of this file are subject to the terms of either the GNU
  359.13 + * General Public License Version 2 only ("GPL") or the Common
  359.14 + * Development and Distribution License("CDDL") (collectively, the
  359.15 + * "License"). You may not use this file except in compliance with the
  359.16 + * License. You can obtain a copy of the License at
  359.17 + * http://www.netbeans.org/cddl-gplv2.html
  359.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  359.19 + * specific language governing permissions and limitations under the
  359.20 + * License.  When distributing the software, include this License Header
  359.21 + * Notice in each file and include the License file at
  359.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  359.23 + * particular file as subject to the "Classpath" exception as provided
  359.24 + * by Oracle in the GPL Version 2 section of the License file that
  359.25 + * accompanied this code. If applicable, add the following below the
  359.26 + * License Header, with the fields enclosed by brackets [] replaced by
  359.27 + * your own identifying information:
  359.28 + * "Portions Copyrighted [year] [name of copyright owner]"
  359.29 + *
  359.30 + * If you wish your version of this file to be governed by only the CDDL
  359.31 + * or only the GPL Version 2, indicate your decision by adding
  359.32 + * "[Contributor] elects to include this software in this distribution
  359.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  359.34 + * single choice of license, a recipient has the option to distribute
  359.35 + * your version of this file under either the CDDL, the GPL Version 2 or
  359.36 + * to extend the choice of license to its licensees as provided above.
  359.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  359.38 + * Version 2 license, then the option applies only if the new code is
  359.39 + * made subject to such option by the copyright holder.
  359.40 + *
  359.41 + * Contributor(s):
  359.42 + *
  359.43 + * Portions Copyrighted 2011 Sun Microsystems, Inc.
  359.44 + */
  359.45 +
  359.46 +package org.netbeans.modules.jackpot30.backend.main;
  359.47 +
  359.48 +import javax.ws.rs.GET;
  359.49 +import javax.ws.rs.Path;
  359.50 +
  359.51 +/**
  359.52 + *
  359.53 + * @author lahvac
  359.54 + */
  359.55 +@Path("/")
  359.56 +public class MainPage {
  359.57 +
  359.58 +    @GET
  359.59 +    public String main() {
  359.60 +        //XXX: should be constructed automatically from installed plugins
  359.61 +        return "<html><body><ul><li><a href='index/type/ui/search'>Search Type</a></li></ul></body></html>";
  359.62 +    }
  359.63 +}
   360.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   360.2 +++ b/remoting/server/web/web.main/src/org/netbeans/modules/jackpot30/backend/main/WebMain.java	Mon Feb 27 22:40:44 2017 +0100
   360.3 @@ -0,0 +1,165 @@
   360.4 +/*
   360.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   360.6 + *
   360.7 + * Copyright 2011-2017 Oracle and/or its affiliates. All rights reserved.
   360.8 + *
   360.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  360.10 + * Other names may be trademarks of their respective owners.
  360.11 + *
  360.12 + * The contents of this file are subject to the terms of either the GNU
  360.13 + * General Public License Version 2 only ("GPL") or the Common
  360.14 + * Development and Distribution License("CDDL") (collectively, the
  360.15 + * "License"). You may not use this file except in compliance with the
  360.16 + * License. You can obtain a copy of the License at
  360.17 + * http://www.netbeans.org/cddl-gplv2.html
  360.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  360.19 + * specific language governing permissions and limitations under the
  360.20 + * License.  When distributing the software, include this License Header
  360.21 + * Notice in each file and include the License file at
  360.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  360.23 + * particular file as subject to the "Classpath" exception as provided
  360.24 + * by Oracle in the GPL Version 2 section of the License file that
  360.25 + * accompanied this code. If applicable, add the following below the
  360.26 + * License Header, with the fields enclosed by brackets [] replaced by
  360.27 + * your own identifying information:
  360.28 + * "Portions Copyrighted [year] [name of copyright owner]"
  360.29 + *
  360.30 + * If you wish your version of this file to be governed by only the CDDL
  360.31 + * or only the GPL Version 2, indicate your decision by adding
  360.32 + * "[Contributor] elects to include this software in this distribution
  360.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  360.34 + * single choice of license, a recipient has the option to distribute
  360.35 + * your version of this file under either the CDDL, the GPL Version 2 or
  360.36 + * to extend the choice of license to its licensees as provided above.
  360.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  360.38 + * Version 2 license, then the option applies only if the new code is
  360.39 + * made subject to such option by the copyright holder.
  360.40 + *
  360.41 + * Contributor(s):
  360.42 + *
  360.43 + * Portions Copyrighted 2011 Sun Microsystems, Inc.
  360.44 + */
  360.45 +package org.netbeans.modules.jackpot30.backend.main;
  360.46 +
  360.47 +import com.sun.grizzly.http.embed.GrizzlyWebServer;
  360.48 +import com.sun.grizzly.http.servlet.ServletAdapter;
  360.49 +import com.sun.grizzly.tcp.http11.GrizzlyAdapter;
  360.50 +import com.sun.grizzly.tcp.http11.GrizzlyOutputStream;
  360.51 +import com.sun.grizzly.tcp.http11.GrizzlyRequest;
  360.52 +import com.sun.grizzly.tcp.http11.GrizzlyResponse;
  360.53 +import com.sun.jersey.spi.container.servlet.ServletContainer;
  360.54 +import java.io.File;
  360.55 +import java.io.IOException;
  360.56 +import java.io.InputStream;
  360.57 +import java.net.InetAddress;
  360.58 +import java.net.URL;
  360.59 +import java.util.ArrayList;
  360.60 +import java.util.Arrays;
  360.61 +import java.util.List;
  360.62 +import org.netbeans.modules.jackpot30.backend.base.AccessStatistics;
  360.63 +import org.netbeans.modules.jackpot30.backend.base.CategoryStorage;
  360.64 +import org.netbeans.modules.jackpot30.backend.base.RelStreamHandlerFactory;
  360.65 +import org.openide.util.Exceptions;
  360.66 +
  360.67 +/**
  360.68 + *
  360.69 + * @author lahvac
  360.70 + */
  360.71 +public class WebMain {
  360.72 +
  360.73 +    /**
  360.74 +     * @param args the command line arguments
  360.75 +     */
  360.76 +    public static void main(String... origArgs) throws IOException, InterruptedException {
  360.77 +        int port = 9998;
  360.78 +
  360.79 +        List<String> args = new ArrayList<String>(Arrays.asList(origArgs));
  360.80 +
  360.81 +        if (args.size() > 1 && "--port".equals(args.get(0))) {
  360.82 +            args.remove(0);
  360.83 +            port = Integer.parseInt(args.remove(0));
  360.84 +        }
  360.85 +
  360.86 +        if (args.size() != 1 && args.size() != 2) {
  360.87 +            System.err.println("Usage: java -jar " + WebMain.class.getProtectionDomain().getCodeSource().getLocation().getPath() + " [--port <port>] <cache> [<static-content>]");
  360.88 +            return ;
  360.89 +        }
  360.90 +
  360.91 +        CategoryStorage.setCacheRoot(new File(args.get(0)));
  360.92 +        
  360.93 +//        org.netbeans.ProxyURLStreamHandlerFactory.register();
  360.94 +        URL.setURLStreamHandlerFactory(new RelStreamHandlerFactory());
  360.95 +
  360.96 +        GrizzlyWebServer gws;
  360.97 +
  360.98 +        if (args.size() == 2) {
  360.99 +            gws = new GrizzlyWebServer(port, args.get(1));
 360.100 +        } else {
 360.101 +            gws = new GrizzlyWebServer(port);
 360.102 +        }
 360.103 +        
 360.104 +        if (port == 0) {
 360.105 +            gws.getSelectorThread().setAddress(InetAddress.getByName("localhost"));
 360.106 +        }
 360.107 +
 360.108 +        // Jersey web resources
 360.109 +        ServletAdapter jerseyAdapter = new ServletAdapter();
 360.110 +        jerseyAdapter.addInitParameter("com.sun.jersey.config.property.packages", "org.netbeans.modules.jackpot30");
 360.111 +        jerseyAdapter.addInitParameter("com.sun.jersey.spi.container.ContainerRequestFilters", AccessStatistics.class.getName());
 360.112 +//        jerseyAdapter.setContextPath("/");
 360.113 +        jerseyAdapter.setServletInstance(new ServletContainer());
 360.114 +
 360.115 +        // register all above defined adapters
 360.116 +        gws.addGrizzlyAdapter(new GrizzlyAdapter(){
 360.117 +            public void service(GrizzlyRequest request, GrizzlyResponse response){
 360.118 +                if (request.getRequestURI().contains("/index/icons/")) {
 360.119 +                    String icon = request.getRequestURI().substring("/index".length());
 360.120 +                    URL iconURL = WebMain.class.getResource(icon);
 360.121 +
 360.122 +                    if (iconURL == null) return;
 360.123 +
 360.124 +                    InputStream in = null;
 360.125 +                    GrizzlyOutputStream out = null;
 360.126 +
 360.127 +                    try {
 360.128 +                        in = iconURL.openStream();
 360.129 +                        out = response.createOutputStream();
 360.130 +
 360.131 +                        int read;
 360.132 +
 360.133 +                        while ((read = in.read()) != (-1)) {
 360.134 +                            out.write(read);
 360.135 +                        }
 360.136 +                    } catch (IOException ex) {
 360.137 +                        Exceptions.printStackTrace(ex);
 360.138 +                    } finally {
 360.139 +                        if (in != null) {
 360.140 +                            try {
 360.141 +                                in.close();
 360.142 +                            } catch (IOException ex) {
 360.143 +                                Exceptions.printStackTrace(ex);
 360.144 +                            }
 360.145 +                        }
 360.146 +                        if (out != null) {
 360.147 +                            try {
 360.148 +                                out.close();
 360.149 +                            } catch (IOException ex) {
 360.150 +                                Exceptions.printStackTrace(ex);
 360.151 +                            }
 360.152 +                        }
 360.153 +                    }
 360.154 +                }
 360.155 +                response.setStatus(404);
 360.156 +            }
 360.157 +        });
 360.158 +        gws.addGrizzlyAdapter(jerseyAdapter);
 360.159 +
 360.160 +        // let Grizzly run
 360.161 +        gws.start();
 360.162 +
 360.163 +        if (port == 0) {
 360.164 +            System.out.println("Running on port: " + gws.getSelectorThread().getPortLowLevel());
 360.165 +        }
 360.166 +    }
 360.167 +
 360.168 +}
   361.1 --- a/remoting/server/web/web.main/src/web/main/MainPage.java	Mon Dec 19 11:37:36 2016 +0100
   361.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   361.3 @@ -1,60 +0,0 @@
   361.4 -/*
   361.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   361.6 - *
   361.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
   361.8 - *
   361.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  361.10 - * Other names may be trademarks of their respective owners.
  361.11 - *
  361.12 - * The contents of this file are subject to the terms of either the GNU
  361.13 - * General Public License Version 2 only ("GPL") or the Common
  361.14 - * Development and Distribution License("CDDL") (collectively, the
  361.15 - * "License"). You may not use this file except in compliance with the
  361.16 - * License. You can obtain a copy of the License at
  361.17 - * http://www.netbeans.org/cddl-gplv2.html
  361.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  361.19 - * specific language governing permissions and limitations under the
  361.20 - * License.  When distributing the software, include this License Header
  361.21 - * Notice in each file and include the License file at
  361.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  361.23 - * particular file as subject to the "Classpath" exception as provided
  361.24 - * by Oracle in the GPL Version 2 section of the License file that
  361.25 - * accompanied this code. If applicable, add the following below the
  361.26 - * License Header, with the fields enclosed by brackets [] replaced by
  361.27 - * your own identifying information:
  361.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  361.29 - *
  361.30 - * If you wish your version of this file to be governed by only the CDDL
  361.31 - * or only the GPL Version 2, indicate your decision by adding
  361.32 - * "[Contributor] elects to include this software in this distribution
  361.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  361.34 - * single choice of license, a recipient has the option to distribute
  361.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  361.36 - * to extend the choice of license to its licensees as provided above.
  361.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  361.38 - * Version 2 license, then the option applies only if the new code is
  361.39 - * made subject to such option by the copyright holder.
  361.40 - *
  361.41 - * Contributor(s):
  361.42 - *
  361.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
  361.44 - */
  361.45 -
  361.46 -package web.main;
  361.47 -
  361.48 -import javax.ws.rs.GET;
  361.49 -import javax.ws.rs.Path;
  361.50 -
  361.51 -/**
  361.52 - *
  361.53 - * @author lahvac
  361.54 - */
  361.55 -@Path("/")
  361.56 -public class MainPage {
  361.57 -
  361.58 -    @GET
  361.59 -    public String main() {
  361.60 -        //XXX: should be constructed automatically from installed plugins
  361.61 -        return "<html><body><ul><li><a href='index/type/ui/search'>Search Type</a></li></ul></body></html>";
  361.62 -    }
  361.63 -}
   362.1 --- a/remoting/server/web/web.main/src/web/main/WebMain.java	Mon Dec 19 11:37:36 2016 +0100
   362.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   362.3 @@ -1,165 +0,0 @@
   362.4 -/*
   362.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   362.6 - *
   362.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
   362.8 - *
   362.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  362.10 - * Other names may be trademarks of their respective owners.
  362.11 - *
  362.12 - * The contents of this file are subject to the terms of either the GNU
  362.13 - * General Public License Version 2 only ("GPL") or the Common
  362.14 - * Development and Distribution License("CDDL") (collectively, the
  362.15 - * "License"). You may not use this file except in compliance with the
  362.16 - * License. You can obtain a copy of the License at
  362.17 - * http://www.netbeans.org/cddl-gplv2.html
  362.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  362.19 - * specific language governing permissions and limitations under the
  362.20 - * License.  When distributing the software, include this License Header
  362.21 - * Notice in each file and include the License file at
  362.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  362.23 - * particular file as subject to the "Classpath" exception as provided
  362.24 - * by Oracle in the GPL Version 2 section of the License file that
  362.25 - * accompanied this code. If applicable, add the following below the
  362.26 - * License Header, with the fields enclosed by brackets [] replaced by
  362.27 - * your own identifying information:
  362.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  362.29 - *
  362.30 - * If you wish your version of this file to be governed by only the CDDL
  362.31 - * or only the GPL Version 2, indicate your decision by adding
  362.32 - * "[Contributor] elects to include this software in this distribution
  362.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  362.34 - * single choice of license, a recipient has the option to distribute
  362.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  362.36 - * to extend the choice of license to its licensees as provided above.
  362.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  362.38 - * Version 2 license, then the option applies only if the new code is
  362.39 - * made subject to such option by the copyright holder.
  362.40 - *
  362.41 - * Contributor(s):
  362.42 - *
  362.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
  362.44 - */
  362.45 -package web.main;
  362.46 -
  362.47 -import com.sun.grizzly.http.embed.GrizzlyWebServer;
  362.48 -import com.sun.grizzly.http.servlet.ServletAdapter;
  362.49 -import com.sun.grizzly.tcp.http11.GrizzlyAdapter;
  362.50 -import com.sun.grizzly.tcp.http11.GrizzlyOutputStream;
  362.51 -import com.sun.grizzly.tcp.http11.GrizzlyRequest;
  362.52 -import com.sun.grizzly.tcp.http11.GrizzlyResponse;
  362.53 -import com.sun.jersey.spi.container.servlet.ServletContainer;
  362.54 -import java.io.File;
  362.55 -import java.io.IOException;
  362.56 -import java.io.InputStream;
  362.57 -import java.net.InetAddress;
  362.58 -import java.net.URL;
  362.59 -import java.util.ArrayList;
  362.60 -import java.util.Arrays;
  362.61 -import java.util.List;
  362.62 -import org.netbeans.modules.jackpot30.backend.base.AccessStatistics;
  362.63 -import org.netbeans.modules.jackpot30.backend.base.CategoryStorage;
  362.64 -import org.netbeans.modules.jackpot30.backend.base.RelStreamHandlerFactory;
  362.65 -import org.openide.util.Exceptions;
  362.66 -
  362.67 -/**
  362.68 - *
  362.69 - * @author lahvac
  362.70 - */
  362.71 -public class WebMain {
  362.72 -
  362.73 -    /**
  362.74 -     * @param args the command line arguments
  362.75 -     */
  362.76 -    public static void main(String... origArgs) throws IOException, InterruptedException {
  362.77 -        int port = 9998;
  362.78 -
  362.79 -        List<String> args = new ArrayList<String>(Arrays.asList(origArgs));
  362.80 -
  362.81 -        if (args.size() > 1 && "--port".equals(args.get(0))) {
  362.82 -            args.remove(0);
  362.83 -            port = Integer.parseInt(args.remove(0));
  362.84 -        }
  362.85 -
  362.86 -        if (args.size() != 1 && args.size() != 2) {
  362.87 -            System.err.println("Usage: java -jar " + WebMain.class.getProtectionDomain().getCodeSource().getLocation().getPath() + " [--port <port>] <cache> [<static-content>]");
  362.88 -            return ;
  362.89 -        }
  362.90 -
  362.91 -        CategoryStorage.setCacheRoot(new File(args.get(0)));
  362.92 -        
  362.93 -//        org.netbeans.ProxyURLStreamHandlerFactory.register();
  362.94 -        URL.setURLStreamHandlerFactory(new RelStreamHandlerFactory());
  362.95 -
  362.96 -        GrizzlyWebServer gws;
  362.97 -
  362.98 -        if (args.size() == 2) {
  362.99 -            gws = new GrizzlyWebServer(port, args.get(1));
 362.100 -        } else {
 362.101 -            gws = new GrizzlyWebServer(port);
 362.102 -        }
 362.103 -        
 362.104 -        if (port == 0) {
 362.105 -            gws.getSelectorThread().setAddress(InetAddress.getByName("localhost"));
 362.106 -        }
 362.107 -
 362.108 -        // Jersey web resources
 362.109 -        ServletAdapter jerseyAdapter = new ServletAdapter();
 362.110 -        jerseyAdapter.addInitParameter("com.sun.jersey.config.property.packages", "org.netbeans.modules.jackpot30");
 362.111 -        jerseyAdapter.addInitParameter("com.sun.jersey.spi.container.ContainerRequestFilters", AccessStatistics.class.getName());
 362.112 -//        jerseyAdapter.setContextPath("/");
 362.113 -        jerseyAdapter.setServletInstance(new ServletContainer());
 362.114 -
 362.115 -        // register all above defined adapters
 362.116 -        gws.addGrizzlyAdapter(new GrizzlyAdapter(){
 362.117 -            public void service(GrizzlyRequest request, GrizzlyResponse response){
 362.118 -                if (request.getRequestURI().contains("/index/icons/")) {
 362.119 -                    String icon = request.getRequestURI().substring("/index".length());
 362.120 -                    URL iconURL = WebMain.class.getResource(icon);
 362.121 -
 362.122 -                    if (iconURL == null) return;
 362.123 -
 362.124 -                    InputStream in = null;
 362.125 -                    GrizzlyOutputStream out = null;
 362.126 -
 362.127 -                    try {
 362.128 -                        in = iconURL.openStream();
 362.129 -                        out = response.createOutputStream();
 362.130 -
 362.131 -                        int read;
 362.132 -
 362.133 -                        while ((read = in.read()) != (-1)) {
 362.134 -                            out.write(read);
 362.135 -                        }
 362.136 -                    } catch (IOException ex) {
 362.137 -                        Exceptions.printStackTrace(ex);
 362.138 -                    } finally {
 362.139 -                        if (in != null) {
 362.140 -                            try {
 362.141 -                                in.close();
 362.142 -                            } catch (IOException ex) {
 362.143 -                                Exceptions.printStackTrace(ex);
 362.144 -                            }
 362.145 -                        }
 362.146 -                        if (out != null) {
 362.147 -                            try {
 362.148 -                                out.close();
 362.149 -                            } catch (IOException ex) {
 362.150 -                                Exceptions.printStackTrace(ex);
 362.151 -                            }
 362.152 -                        }
 362.153 -                    }
 362.154 -                }
 362.155 -                response.setStatus(404);
 362.156 -            }
 362.157 -        });
 362.158 -        gws.addGrizzlyAdapter(jerseyAdapter);
 362.159 -
 362.160 -        // let Grizzly run
 362.161 -        gws.start();
 362.162 -
 362.163 -        if (port == 0) {
 362.164 -            System.out.println("Running on port: " + gws.getSelectorThread().getPortLowLevel());
 362.165 -        }
 362.166 -    }
 362.167 -
 362.168 -}
   363.1 --- a/remoting/server/web/web.ui.frontend/config/jsTestDriver.conf	Mon Dec 19 11:37:36 2016 +0100
   363.2 +++ b/remoting/server/web/web.ui.frontend/config/jsTestDriver.conf	Mon Feb 27 22:40:44 2017 +0100
   363.3 @@ -1,3 +1,45 @@
   363.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   363.5 +#
   363.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   363.7 +#
   363.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   363.9 +# Other names may be trademarks of their respective owners.
  363.10 +#
  363.11 +# The contents of this file are subject to the terms of either the GNU
  363.12 +# General Public License Version 2 only ("GPL") or the Common
  363.13 +# Development and Distribution License("CDDL") (collectively, the
  363.14 +# "License"). You may not use this file except in compliance with the
  363.15 +# License. You can obtain a copy of the License at
  363.16 +# http://www.netbeans.org/cddl-gplv2.html
  363.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  363.18 +# specific language governing permissions and limitations under the
  363.19 +# License.  When distributing the software, include this License Header
  363.20 +# Notice in each file and include the License file at
  363.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  363.22 +# particular file as subject to the "Classpath" exception as provided
  363.23 +# by Oracle in the GPL Version 2 section of the License file that
  363.24 +# accompanied this code. If applicable, add the following below the
  363.25 +# License Header, with the fields enclosed by brackets [] replaced by
  363.26 +# your own identifying information:
  363.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  363.28 +#
  363.29 +# Contributor(s):
  363.30 +#
  363.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  363.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  363.33 +# Microsystems, Inc. All Rights Reserved.
  363.34 +#
  363.35 +# If you wish your version of this file to be governed by only the CDDL
  363.36 +# or only the GPL Version 2, indicate your decision by adding
  363.37 +# "[Contributor] elects to include this software in this distribution
  363.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  363.39 +# single choice of license, a recipient has the option to distribute
  363.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  363.41 +# to extend the choice of license to its licensees as provided above.
  363.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  363.43 +# Version 2 license, then the option applies only if the new code is
  363.44 +# made subject to such option by the copyright holder.
  363.45 +
  363.46  server: http://localhost:42442
  363.47  
  363.48  load:
   364.1 --- a/remoting/server/web/web.ui.frontend/download.xml	Mon Dec 19 11:37:36 2016 +0100
   364.2 +++ b/remoting/server/web/web.ui.frontend/download.xml	Mon Feb 27 22:40:44 2017 +0100
   364.3 @@ -1,3 +1,46 @@
   364.4 +<!--
   364.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   364.6 +
   364.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   364.8 +
   364.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  364.10 +Other names may be trademarks of their respective owners.
  364.11 +
  364.12 +The contents of this file are subject to the terms of either the GNU
  364.13 +General Public License Version 2 only ("GPL") or the Common
  364.14 +Development and Distribution License("CDDL") (collectively, the
  364.15 +"License"). You may not use this file except in compliance with the
  364.16 +License. You can obtain a copy of the License at
  364.17 +http://www.netbeans.org/cddl-gplv2.html
  364.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  364.19 +specific language governing permissions and limitations under the
  364.20 +License.  When distributing the software, include this License Header
  364.21 +Notice in each file and include the License file at
  364.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  364.23 +particular file as subject to the "Classpath" exception as provided
  364.24 +by Oracle in the GPL Version 2 section of the License file that
  364.25 +accompanied this code. If applicable, add the following below the
  364.26 +License Header, with the fields enclosed by brackets [] replaced by
  364.27 +your own identifying information:
  364.28 +"Portions Copyrighted [year] [name of copyright owner]"
  364.29 +
  364.30 +Contributor(s):
  364.31 +
  364.32 +The Original Software is NetBeans. The Initial Developer of the Original
  364.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  364.34 +Microsystems, Inc. All Rights Reserved.
  364.35 +
  364.36 +If you wish your version of this file to be governed by only the CDDL
  364.37 +or only the GPL Version 2, indicate your decision by adding
  364.38 +"[Contributor] elects to include this software in this distribution
  364.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  364.40 +single choice of license, a recipient has the option to distribute
  364.41 +your version of this file under either the CDDL, the GPL Version 2 or
  364.42 +to extend the choice of license to its licensees as provided above.
  364.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
  364.44 +Version 2 license, then the option applies only if the new code is
  364.45 +made subject to such option by the copyright holder.
  364.46 +-->
  364.47  <project name="download" default="download">
  364.48      <target name="download">
  364.49          <property name="imported.basedir" value="${basedir}"/>
   365.1 --- a/remoting/server/web/web.ui.frontend/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   365.2 +++ b/remoting/server/web/web.ui.frontend/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   365.3 @@ -1,3 +1,44 @@
   365.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   365.5 +#
   365.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   365.7 +#
   365.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   365.9 +# Other names may be trademarks of their respective owners.
  365.10 +#
  365.11 +# The contents of this file are subject to the terms of either the GNU
  365.12 +# General Public License Version 2 only ("GPL") or the Common
  365.13 +# Development and Distribution License("CDDL") (collectively, the
  365.14 +# "License"). You may not use this file except in compliance with the
  365.15 +# License. You can obtain a copy of the License at
  365.16 +# http://www.netbeans.org/cddl-gplv2.html
  365.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  365.18 +# specific language governing permissions and limitations under the
  365.19 +# License.  When distributing the software, include this License Header
  365.20 +# Notice in each file and include the License file at
  365.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  365.22 +# particular file as subject to the "Classpath" exception as provided
  365.23 +# by Oracle in the GPL Version 2 section of the License file that
  365.24 +# accompanied this code. If applicable, add the following below the
  365.25 +# License Header, with the fields enclosed by brackets [] replaced by
  365.26 +# your own identifying information:
  365.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  365.28 +#
  365.29 +# Contributor(s):
  365.30 +#
  365.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  365.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  365.33 +# Microsystems, Inc. All Rights Reserved.
  365.34 +#
  365.35 +# If you wish your version of this file to be governed by only the CDDL
  365.36 +# or only the GPL Version 2, indicate your decision by adding
  365.37 +# "[Contributor] elects to include this software in this distribution
  365.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  365.39 +# single choice of license, a recipient has the option to distribute
  365.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  365.41 +# to extend the choice of license to its licensees as provided above.
  365.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  365.43 +# Version 2 license, then the option applies only if the new code is
  365.44 +# made subject to such option by the copyright holder.
  365.45  browser.autorefresh.SL__Browsers_ChromeBrowser=true
  365.46  browser.highlightselection.SL__Browsers_ChromeBrowser=true
  365.47  config.folder=${file.reference.js-frontend-config}
   366.1 --- a/remoting/server/web/web.ui.frontend/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   366.2 +++ b/remoting/server/web/web.ui.frontend/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   366.3 @@ -1,4 +1,47 @@
   366.4  <?xml version="1.0" encoding="UTF-8"?>
   366.5 +<!--
   366.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   366.7 +
   366.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   366.9 +
  366.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  366.11 +Other names may be trademarks of their respective owners.
  366.12 +
  366.13 +The contents of this file are subject to the terms of either the GNU
  366.14 +General Public License Version 2 only ("GPL") or the Common
  366.15 +Development and Distribution License("CDDL") (collectively, the
  366.16 +"License"). You may not use this file except in compliance with the
  366.17 +License. You can obtain a copy of the License at
  366.18 +http://www.netbeans.org/cddl-gplv2.html
  366.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  366.20 +specific language governing permissions and limitations under the
  366.21 +License.  When distributing the software, include this License Header
  366.22 +Notice in each file and include the License file at
  366.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  366.24 +particular file as subject to the "Classpath" exception as provided
  366.25 +by Oracle in the GPL Version 2 section of the License file that
  366.26 +accompanied this code. If applicable, add the following below the
  366.27 +License Header, with the fields enclosed by brackets [] replaced by
  366.28 +your own identifying information:
  366.29 +"Portions Copyrighted [year] [name of copyright owner]"
  366.30 +
  366.31 +Contributor(s):
  366.32 +
  366.33 +The Original Software is NetBeans. The Initial Developer of the Original
  366.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  366.35 +Microsystems, Inc. All Rights Reserved.
  366.36 +
  366.37 +If you wish your version of this file to be governed by only the CDDL
  366.38 +or only the GPL Version 2, indicate your decision by adding
  366.39 +"[Contributor] elects to include this software in this distribution
  366.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  366.41 +single choice of license, a recipient has the option to distribute
  366.42 +your version of this file under either the CDDL, the GPL Version 2 or
  366.43 +to extend the choice of license to its licensees as provided above.
  366.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  366.45 +Version 2 license, then the option applies only if the new code is
  366.46 +made subject to such option by the copyright holder.
  366.47 +-->
  366.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  366.49      <type>org.netbeans.modules.web.clientproject</type>
  366.50      <configuration>
   367.1 --- a/remoting/server/web/web.ui.frontend/public_html/index/ui/index.html	Mon Dec 19 11:37:36 2016 +0100
   367.2 +++ b/remoting/server/web/web.ui.frontend/public_html/index/ui/index.html	Mon Feb 27 22:40:44 2017 +0100
   367.3 @@ -1,4 +1,47 @@
   367.4  <!DOCTYPE html>
   367.5 +<!--
   367.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   367.7 +
   367.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   367.9 +
  367.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  367.11 +Other names may be trademarks of their respective owners.
  367.12 +
  367.13 +The contents of this file are subject to the terms of either the GNU
  367.14 +General Public License Version 2 only ("GPL") or the Common
  367.15 +Development and Distribution License("CDDL") (collectively, the
  367.16 +"License"). You may not use this file except in compliance with the
  367.17 +License. You can obtain a copy of the License at
  367.18 +http://www.netbeans.org/cddl-gplv2.html
  367.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  367.20 +specific language governing permissions and limitations under the
  367.21 +License.  When distributing the software, include this License Header
  367.22 +Notice in each file and include the License file at
  367.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  367.24 +particular file as subject to the "Classpath" exception as provided
  367.25 +by Oracle in the GPL Version 2 section of the License file that
  367.26 +accompanied this code. If applicable, add the following below the
  367.27 +License Header, with the fields enclosed by brackets [] replaced by
  367.28 +your own identifying information:
  367.29 +"Portions Copyrighted [year] [name of copyright owner]"
  367.30 +
  367.31 +Contributor(s):
  367.32 +
  367.33 +The Original Software is NetBeans. The Initial Developer of the Original
  367.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  367.35 +Microsystems, Inc. All Rights Reserved.
  367.36 +
  367.37 +If you wish your version of this file to be governed by only the CDDL
  367.38 +or only the GPL Version 2, indicate your decision by adding
  367.39 +"[Contributor] elects to include this software in this distribution
  367.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  367.41 +single choice of license, a recipient has the option to distribute
  367.42 +your version of this file under either the CDDL, the GPL Version 2 or
  367.43 +to extend the choice of license to its licensees as provided above.
  367.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  367.45 +Version 2 license, then the option applies only if the new code is
  367.46 +made subject to such option by the copyright holder.
  367.47 +-->
  367.48  <html xmlns:ng="http://angularjs.org" ng-app="ngView">
  367.49  <head>
  367.50      <script type="text/javascript" src="/index/lib/jquery-1.7.1.min.js"></script>
   368.1 --- a/remoting/server/web/web.ui.frontend/public_html/index/ui/script.js	Mon Dec 19 11:37:36 2016 +0100
   368.2 +++ b/remoting/server/web/web.ui.frontend/public_html/index/ui/script.js	Mon Feb 27 22:40:44 2017 +0100
   368.3 @@ -1,3 +1,47 @@
   368.4 +/*
   368.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   368.6 + *
   368.7 + * Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   368.8 + *
   368.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  368.10 + * Other names may be trademarks of their respective owners.
  368.11 + *
  368.12 + * The contents of this file are subject to the terms of either the GNU
  368.13 + * General Public License Version 2 only ("GPL") or the Common
  368.14 + * Development and Distribution License("CDDL") (collectively, the
  368.15 + * "License"). You may not use this file except in compliance with the
  368.16 + * License. You can obtain a copy of the License at
  368.17 + * http://www.netbeans.org/cddl-gplv2.html
  368.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  368.19 + * specific language governing permissions and limitations under the
  368.20 + * License.  When distributing the software, include this License Header
  368.21 + * Notice in each file and include the License file at
  368.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  368.23 + * particular file as subject to the "Classpath" exception as provided
  368.24 + * by Oracle in the GPL Version 2 section of the License file that
  368.25 + * accompanied this code. If applicable, add the following below the
  368.26 + * License Header, with the fields enclosed by brackets [] replaced by
  368.27 + * your own identifying information:
  368.28 + * "Portions Copyrighted [year] [name of copyright owner]"
  368.29 + *
  368.30 + * Contributor(s):
  368.31 + *
  368.32 + * The Original Software is NetBeans. The Initial Developer of the Original
  368.33 + * Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  368.34 + * Microsystems, Inc. All Rights Reserved.
  368.35 + *
  368.36 + * If you wish your version of this file to be governed by only the CDDL
  368.37 + * or only the GPL Version 2, indicate your decision by adding
  368.38 + * "[Contributor] elects to include this software in this distribution
  368.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  368.40 + * single choice of license, a recipient has the option to distribute
  368.41 + * your version of this file under either the CDDL, the GPL Version 2 or
  368.42 + * to extend the choice of license to its licensees as provided above.
  368.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  368.44 + * Version 2 license, then the option applies only if the new code is
  368.45 + * made subject to such option by the copyright holder.
  368.46 + */
  368.47 +
  368.48  function IndexDeclarationSearch($scope, $location, $http, $routeParams, $route) {
  368.49      DeclarationSearch($scope, $location, $http, $routeParams, $route);
  368.50      $scope.performQuery = function() {
   369.1 --- a/remoting/server/web/web.ui.frontend/public_html/index/ui/search.html	Mon Dec 19 11:37:36 2016 +0100
   369.2 +++ b/remoting/server/web/web.ui.frontend/public_html/index/ui/search.html	Mon Feb 27 22:40:44 2017 +0100
   369.3 @@ -1,3 +1,46 @@
   369.4 +<!--
   369.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   369.6 +
   369.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   369.8 +
   369.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  369.10 +Other names may be trademarks of their respective owners.
  369.11 +
  369.12 +The contents of this file are subject to the terms of either the GNU
  369.13 +General Public License Version 2 only ("GPL") or the Common
  369.14 +Development and Distribution License("CDDL") (collectively, the
  369.15 +"License"). You may not use this file except in compliance with the
  369.16 +License. You can obtain a copy of the License at
  369.17 +http://www.netbeans.org/cddl-gplv2.html
  369.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  369.19 +specific language governing permissions and limitations under the
  369.20 +License.  When distributing the software, include this License Header
  369.21 +Notice in each file and include the License file at
  369.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  369.23 +particular file as subject to the "Classpath" exception as provided
  369.24 +by Oracle in the GPL Version 2 section of the License file that
  369.25 +accompanied this code. If applicable, add the following below the
  369.26 +License Header, with the fields enclosed by brackets [] replaced by
  369.27 +your own identifying information:
  369.28 +"Portions Copyrighted [year] [name of copyright owner]"
  369.29 +
  369.30 +Contributor(s):
  369.31 +
  369.32 +The Original Software is NetBeans. The Initial Developer of the Original
  369.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  369.34 +Microsystems, Inc. All Rights Reserved.
  369.35 +
  369.36 +If you wish your version of this file to be governed by only the CDDL
  369.37 +or only the GPL Version 2, indicate your decision by adding
  369.38 +"[Contributor] elects to include this software in this distribution
  369.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  369.40 +single choice of license, a recipient has the option to distribute
  369.41 +your version of this file under either the CDDL, the GPL Version 2 or
  369.42 +to extend the choice of license to its licensees as provided above.
  369.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
  369.44 +Version 2 license, then the option applies only if the new code is
  369.45 +made subject to such option by the copyright holder.
  369.46 +-->
  369.47  <form ng-submit="performQuery()">
  369.48      <input class="search-query" ng-model="prefix" type="text" name="prefix" placeholder="Search" id="search-input"/><!--ng-change="performQueryDelayed()" -->
  369.49      <button class="btn" type="submit">Search</button>
   370.1 --- a/remoting/server/web/web.ui.frontend/public_html/index/ui/showCode.html	Mon Dec 19 11:37:36 2016 +0100
   370.2 +++ b/remoting/server/web/web.ui.frontend/public_html/index/ui/showCode.html	Mon Feb 27 22:40:44 2017 +0100
   370.3 @@ -1,3 +1,46 @@
   370.4 +<!--
   370.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   370.6 +
   370.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   370.8 +
   370.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  370.10 +Other names may be trademarks of their respective owners.
  370.11 +
  370.12 +The contents of this file are subject to the terms of either the GNU
  370.13 +General Public License Version 2 only ("GPL") or the Common
  370.14 +Development and Distribution License("CDDL") (collectively, the
  370.15 +"License"). You may not use this file except in compliance with the
  370.16 +License. You can obtain a copy of the License at
  370.17 +http://www.netbeans.org/cddl-gplv2.html
  370.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  370.19 +specific language governing permissions and limitations under the
  370.20 +License.  When distributing the software, include this License Header
  370.21 +Notice in each file and include the License file at
  370.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  370.23 +particular file as subject to the "Classpath" exception as provided
  370.24 +by Oracle in the GPL Version 2 section of the License file that
  370.25 +accompanied this code. If applicable, add the following below the
  370.26 +License Header, with the fields enclosed by brackets [] replaced by
  370.27 +your own identifying information:
  370.28 +"Portions Copyrighted [year] [name of copyright owner]"
  370.29 +
  370.30 +Contributor(s):
  370.31 +
  370.32 +The Original Software is NetBeans. The Initial Developer of the Original
  370.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  370.34 +Microsystems, Inc. All Rights Reserved.
  370.35 +
  370.36 +If you wish your version of this file to be governed by only the CDDL
  370.37 +or only the GPL Version 2, indicate your decision by adding
  370.38 +"[Contributor] elects to include this software in this distribution
  370.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  370.40 +single choice of license, a recipient has the option to distribute
  370.41 +your version of this file under either the CDDL, the GPL Version 2 or
  370.42 +to extend the choice of license to its licensees as provided above.
  370.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
  370.44 +Version 2 license, then the option applies only if the new code is
  370.45 +made subject to such option by the copyright holder.
  370.46 +-->
  370.47  <pre id="code" ng-bind-html-unsafe="sourceCode" ng-click="gotoAction($event)" ng-dblclick="markOccurrencesAction($event)">
  370.48  </pre>
  370.49  <div class="navbar navbar-fixed-bottom">
   371.1 --- a/remoting/server/web/web.ui.frontend/public_html/index/ui/usages.html	Mon Dec 19 11:37:36 2016 +0100
   371.2 +++ b/remoting/server/web/web.ui.frontend/public_html/index/ui/usages.html	Mon Feb 27 22:40:44 2017 +0100
   371.3 @@ -1,3 +1,46 @@
   371.4 +<!--
   371.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   371.6 +
   371.7 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   371.8 +
   371.9 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  371.10 +Other names may be trademarks of their respective owners.
  371.11 +
  371.12 +The contents of this file are subject to the terms of either the GNU
  371.13 +General Public License Version 2 only ("GPL") or the Common
  371.14 +Development and Distribution License("CDDL") (collectively, the
  371.15 +"License"). You may not use this file except in compliance with the
  371.16 +License. You can obtain a copy of the License at
  371.17 +http://www.netbeans.org/cddl-gplv2.html
  371.18 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  371.19 +specific language governing permissions and limitations under the
  371.20 +License.  When distributing the software, include this License Header
  371.21 +Notice in each file and include the License file at
  371.22 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  371.23 +particular file as subject to the "Classpath" exception as provided
  371.24 +by Oracle in the GPL Version 2 section of the License file that
  371.25 +accompanied this code. If applicable, add the following below the
  371.26 +License Header, with the fields enclosed by brackets [] replaced by
  371.27 +your own identifying information:
  371.28 +"Portions Copyrighted [year] [name of copyright owner]"
  371.29 +
  371.30 +Contributor(s):
  371.31 +
  371.32 +The Original Software is NetBeans. The Initial Developer of the Original
  371.33 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  371.34 +Microsystems, Inc. All Rights Reserved.
  371.35 +
  371.36 +If you wish your version of this file to be governed by only the CDDL
  371.37 +or only the GPL Version 2, indicate your decision by adding
  371.38 +"[Contributor] elects to include this software in this distribution
  371.39 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  371.40 +single choice of license, a recipient has the option to distribute
  371.41 +your version of this file under either the CDDL, the GPL Version 2 or
  371.42 +to extend the choice of license to its licensees as provided above.
  371.43 +However, if you add GPL Version 2 code and therefore, elected the GPL
  371.44 +Version 2 license, then the option applies only if the new code is
  371.45 +made subject to such option by the copyright holder.
  371.46 +-->
  371.47  References to {{symbolDisplayName}} found in the following files:
  371.48  <br>
  371.49  <label>Projects:</label>
   372.1 --- a/remoting/server/web/web.ui.frontend/test/unit/index/ui/script-test.js	Mon Dec 19 11:37:36 2016 +0100
   372.2 +++ b/remoting/server/web/web.ui.frontend/test/unit/index/ui/script-test.js	Mon Feb 27 22:40:44 2017 +0100
   372.3 @@ -1,3 +1,47 @@
   372.4 +/*
   372.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   372.6 + *
   372.7 + * Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   372.8 + *
   372.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  372.10 + * Other names may be trademarks of their respective owners.
  372.11 + *
  372.12 + * The contents of this file are subject to the terms of either the GNU
  372.13 + * General Public License Version 2 only ("GPL") or the Common
  372.14 + * Development and Distribution License("CDDL") (collectively, the
  372.15 + * "License"). You may not use this file except in compliance with the
  372.16 + * License. You can obtain a copy of the License at
  372.17 + * http://www.netbeans.org/cddl-gplv2.html
  372.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  372.19 + * specific language governing permissions and limitations under the
  372.20 + * License.  When distributing the software, include this License Header
  372.21 + * Notice in each file and include the License file at
  372.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  372.23 + * particular file as subject to the "Classpath" exception as provided
  372.24 + * by Oracle in the GPL Version 2 section of the License file that
  372.25 + * accompanied this code. If applicable, add the following below the
  372.26 + * License Header, with the fields enclosed by brackets [] replaced by
  372.27 + * your own identifying information:
  372.28 + * "Portions Copyrighted [year] [name of copyright owner]"
  372.29 + *
  372.30 + * Contributor(s):
  372.31 + *
  372.32 + * The Original Software is NetBeans. The Initial Developer of the Original
  372.33 + * Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  372.34 + * Microsystems, Inc. All Rights Reserved.
  372.35 + *
  372.36 + * If you wish your version of this file to be governed by only the CDDL
  372.37 + * or only the GPL Version 2, indicate your decision by adding
  372.38 + * "[Contributor] elects to include this software in this distribution
  372.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  372.40 + * single choice of license, a recipient has the option to distribute
  372.41 + * your version of this file under either the CDDL, the GPL Version 2 or
  372.42 + * to extend the choice of license to its licensees as provided above.
  372.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  372.44 + * Version 2 license, then the option applies only if the new code is
  372.45 + * made subject to such option by the copyright holder.
  372.46 + */
  372.47 +
  372.48  HighlightingTest = TestCase("HighlightingTest");
  372.49  
  372.50  HighlightingTest.prototype.testHighlighting = function() {
   373.1 --- a/remoting/server/web/web.ui/build.xml	Mon Dec 19 11:37:36 2016 +0100
   373.2 +++ b/remoting/server/web/web.ui/build.xml	Mon Feb 27 22:40:44 2017 +0100
   373.3 @@ -1,4 +1,47 @@
   373.4  <?xml version="1.0" encoding="UTF-8"?>
   373.5 +<!--
   373.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   373.7 +
   373.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   373.9 +
  373.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  373.11 +Other names may be trademarks of their respective owners.
  373.12 +
  373.13 +The contents of this file are subject to the terms of either the GNU
  373.14 +General Public License Version 2 only ("GPL") or the Common
  373.15 +Development and Distribution License("CDDL") (collectively, the
  373.16 +"License"). You may not use this file except in compliance with the
  373.17 +License. You can obtain a copy of the License at
  373.18 +http://www.netbeans.org/cddl-gplv2.html
  373.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  373.20 +specific language governing permissions and limitations under the
  373.21 +License.  When distributing the software, include this License Header
  373.22 +Notice in each file and include the License file at
  373.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  373.24 +particular file as subject to the "Classpath" exception as provided
  373.25 +by Oracle in the GPL Version 2 section of the License file that
  373.26 +accompanied this code. If applicable, add the following below the
  373.27 +License Header, with the fields enclosed by brackets [] replaced by
  373.28 +your own identifying information:
  373.29 +"Portions Copyrighted [year] [name of copyright owner]"
  373.30 +
  373.31 +Contributor(s):
  373.32 +
  373.33 +The Original Software is NetBeans. The Initial Developer of the Original
  373.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  373.35 +Microsystems, Inc. All Rights Reserved.
  373.36 +
  373.37 +If you wish your version of this file to be governed by only the CDDL
  373.38 +or only the GPL Version 2, indicate your decision by adding
  373.39 +"[Contributor] elects to include this software in this distribution
  373.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  373.41 +single choice of license, a recipient has the option to distribute
  373.42 +your version of this file under either the CDDL, the GPL Version 2 or
  373.43 +to extend the choice of license to its licensees as provided above.
  373.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  373.45 +Version 2 license, then the option applies only if the new code is
  373.46 +made subject to such option by the copyright holder.
  373.47 +-->
  373.48  <!-- You may freely edit this file. See commented blocks below for -->
  373.49  <!-- some examples of how to customize the build. -->
  373.50  <!-- (If you delete it and reopen the project it will be recreated.) -->
   374.1 --- a/remoting/server/web/web.ui/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   374.2 +++ b/remoting/server/web/web.ui/nbproject/build-impl.xml	Mon Feb 27 22:40:44 2017 +0100
   374.3 @@ -1,5 +1,48 @@
   374.4  <?xml version="1.0" encoding="UTF-8"?>
   374.5  <!--
   374.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   374.7 +
   374.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   374.9 +
  374.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  374.11 +Other names may be trademarks of their respective owners.
  374.12 +
  374.13 +The contents of this file are subject to the terms of either the GNU
  374.14 +General Public License Version 2 only ("GPL") or the Common
  374.15 +Development and Distribution License("CDDL") (collectively, the
  374.16 +"License"). You may not use this file except in compliance with the
  374.17 +License. You can obtain a copy of the License at
  374.18 +http://www.netbeans.org/cddl-gplv2.html
  374.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  374.20 +specific language governing permissions and limitations under the
  374.21 +License.  When distributing the software, include this License Header
  374.22 +Notice in each file and include the License file at
  374.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  374.24 +particular file as subject to the "Classpath" exception as provided
  374.25 +by Oracle in the GPL Version 2 section of the License file that
  374.26 +accompanied this code. If applicable, add the following below the
  374.27 +License Header, with the fields enclosed by brackets [] replaced by
  374.28 +your own identifying information:
  374.29 +"Portions Copyrighted [year] [name of copyright owner]"
  374.30 +
  374.31 +Contributor(s):
  374.32 +
  374.33 +The Original Software is NetBeans. The Initial Developer of the Original
  374.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  374.35 +Microsystems, Inc. All Rights Reserved.
  374.36 +
  374.37 +If you wish your version of this file to be governed by only the CDDL
  374.38 +or only the GPL Version 2, indicate your decision by adding
  374.39 +"[Contributor] elects to include this software in this distribution
  374.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  374.41 +single choice of license, a recipient has the option to distribute
  374.42 +your version of this file under either the CDDL, the GPL Version 2 or
  374.43 +to extend the choice of license to its licensees as provided above.
  374.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  374.45 +Version 2 license, then the option applies only if the new code is
  374.46 +made subject to such option by the copyright holder.
  374.47 +-->
  374.48 +<!--
  374.49  *** GENERATED FROM project.xml - DO NOT EDIT  ***
  374.50  ***         EDIT ../build.xml INSTEAD         ***
  374.51  
   375.1 --- a/remoting/server/web/web.ui/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   375.2 +++ b/remoting/server/web/web.ui/nbproject/genfiles.properties	Mon Feb 27 22:40:44 2017 +0100
   375.3 @@ -1,3 +1,44 @@
   375.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   375.5 +#
   375.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   375.7 +#
   375.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   375.9 +# Other names may be trademarks of their respective owners.
  375.10 +#
  375.11 +# The contents of this file are subject to the terms of either the GNU
  375.12 +# General Public License Version 2 only ("GPL") or the Common
  375.13 +# Development and Distribution License("CDDL") (collectively, the
  375.14 +# "License"). You may not use this file except in compliance with the
  375.15 +# License. You can obtain a copy of the License at
  375.16 +# http://www.netbeans.org/cddl-gplv2.html
  375.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  375.18 +# specific language governing permissions and limitations under the
  375.19 +# License.  When distributing the software, include this License Header
  375.20 +# Notice in each file and include the License file at
  375.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  375.22 +# particular file as subject to the "Classpath" exception as provided
  375.23 +# by Oracle in the GPL Version 2 section of the License file that
  375.24 +# accompanied this code. If applicable, add the following below the
  375.25 +# License Header, with the fields enclosed by brackets [] replaced by
  375.26 +# your own identifying information:
  375.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  375.28 +#
  375.29 +# Contributor(s):
  375.30 +#
  375.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  375.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  375.33 +# Microsystems, Inc. All Rights Reserved.
  375.34 +#
  375.35 +# If you wish your version of this file to be governed by only the CDDL
  375.36 +# or only the GPL Version 2, indicate your decision by adding
  375.37 +# "[Contributor] elects to include this software in this distribution
  375.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  375.39 +# single choice of license, a recipient has the option to distribute
  375.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  375.41 +# to extend the choice of license to its licensees as provided above.
  375.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  375.43 +# Version 2 license, then the option applies only if the new code is
  375.44 +# made subject to such option by the copyright holder.
  375.45  build.xml.data.CRC32=ea2551e2
  375.46  build.xml.script.CRC32=fd3c69fb
  375.47  build.xml.stylesheet.CRC32=8064a381@1.69.0.46
   376.1 --- a/remoting/server/web/web.ui/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   376.2 +++ b/remoting/server/web/web.ui/nbproject/project.properties	Mon Feb 27 22:40:44 2017 +0100
   376.3 @@ -1,3 +1,44 @@
   376.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   376.5 +#
   376.6 +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   376.7 +#
   376.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   376.9 +# Other names may be trademarks of their respective owners.
  376.10 +#
  376.11 +# The contents of this file are subject to the terms of either the GNU
  376.12 +# General Public License Version 2 only ("GPL") or the Common
  376.13 +# Development and Distribution License("CDDL") (collectively, the
  376.14 +# "License"). You may not use this file except in compliance with the
  376.15 +# License. You can obtain a copy of the License at
  376.16 +# http://www.netbeans.org/cddl-gplv2.html
  376.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  376.18 +# specific language governing permissions and limitations under the
  376.19 +# License.  When distributing the software, include this License Header
  376.20 +# Notice in each file and include the License file at
  376.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  376.22 +# particular file as subject to the "Classpath" exception as provided
  376.23 +# by Oracle in the GPL Version 2 section of the License file that
  376.24 +# accompanied this code. If applicable, add the following below the
  376.25 +# License Header, with the fields enclosed by brackets [] replaced by
  376.26 +# your own identifying information:
  376.27 +# "Portions Copyrighted [year] [name of copyright owner]"
  376.28 +#
  376.29 +# Contributor(s):
  376.30 +#
  376.31 +# The Original Software is NetBeans. The Initial Developer of the Original
  376.32 +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  376.33 +# Microsystems, Inc. All Rights Reserved.
  376.34 +#
  376.35 +# If you wish your version of this file to be governed by only the CDDL
  376.36 +# or only the GPL Version 2, indicate your decision by adding
  376.37 +# "[Contributor] elects to include this software in this distribution
  376.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  376.39 +# single choice of license, a recipient has the option to distribute
  376.40 +# your version of this file under either the CDDL, the GPL Version 2 or
  376.41 +# to extend the choice of license to its licensees as provided above.
  376.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  376.43 +# Version 2 license, then the option applies only if the new code is
  376.44 +# made subject to such option by the copyright holder.
  376.45  annotation.processing.enabled=true
  376.46  annotation.processing.enabled.in.editor=false
  376.47  annotation.processing.processors.list=
   377.1 --- a/remoting/server/web/web.ui/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   377.2 +++ b/remoting/server/web/web.ui/nbproject/project.xml	Mon Feb 27 22:40:44 2017 +0100
   377.3 @@ -1,4 +1,47 @@
   377.4  <?xml version="1.0" encoding="UTF-8"?>
   377.5 +<!--
   377.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   377.7 +
   377.8 +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
   377.9 +
  377.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  377.11 +Other names may be trademarks of their respective owners.
  377.12 +
  377.13 +The contents of this file are subject to the terms of either the GNU
  377.14 +General Public License Version 2 only ("GPL") or the Common
  377.15 +Development and Distribution License("CDDL") (collectively, the
  377.16 +"License"). You may not use this file except in compliance with the
  377.17 +License. You can obtain a copy of the License at
  377.18 +http://www.netbeans.org/cddl-gplv2.html
  377.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  377.20 +specific language governing permissions and limitations under the
  377.21 +License.  When distributing the software, include this License Header
  377.22 +Notice in each file and include the License file at
  377.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  377.24 +particular file as subject to the "Classpath" exception as provided
  377.25 +by Oracle in the GPL Version 2 section of the License file that
  377.26 +accompanied this code. If applicable, add the following below the
  377.27 +License Header, with the fields enclosed by brackets [] replaced by
  377.28 +your own identifying information:
  377.29 +"Portions Copyrighted [year] [name of copyright owner]"
  377.30 +
  377.31 +Contributor(s):
  377.32 +
  377.33 +The Original Software is NetBeans. The Initial Developer of the Original
  377.34 +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  377.35 +Microsystems, Inc. All Rights Reserved.
  377.36 +
  377.37 +If you wish your version of this file to be governed by only the CDDL
  377.38 +or only the GPL Version 2, indicate your decision by adding
  377.39 +"[Contributor] elects to include this software in this distribution
  377.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
  377.41 +single choice of license, a recipient has the option to distribute
  377.42 +your version of this file under either the CDDL, the GPL Version 2 or
  377.43 +to extend the choice of license to its licensees as provided above.
  377.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
  377.45 +Version 2 license, then the option applies only if the new code is
  377.46 +made subject to such option by the copyright holder.
  377.47 +-->
  377.48  <project xmlns="http://www.netbeans.org/ns/project/1">
  377.49      <type>org.netbeans.modules.java.j2seproject</type>
  377.50      <configuration>
   378.1 --- a/remoting/server/web/web.ui/src/org/netbeans/modules/jackpot30/backend/ui/highlighting/ColoringAttributes.diff	Mon Dec 19 11:37:36 2016 +0100
   378.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   378.3 @@ -1,4 +0,0 @@
   378.4 -44c44
   378.5 -< package org.netbeans.modules.java.editor.semantic;
   378.6 ----
   378.7 -> package org.netbeans.modules.jackpot30.backend.ui.highlighting;
   379.1 --- a/remoting/server/web/web.ui/src/org/netbeans/modules/jackpot30/backend/ui/highlighting/SemanticHighlighter.diff	Mon Dec 19 11:37:36 2016 +0100
   379.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   379.3 @@ -1,354 +0,0 @@
   379.4 -44c44
   379.5 -< package org.netbeans.modules.java.editor.semantic;
   379.6 ----
   379.7 -> package org.netbeans.modules.jackpot30.backend.ui.highlighting;
   379.8 -84c84,86
   379.9 -< import java.io.IOException;
  379.10 ----
  379.11 -> import com.sun.source.util.TreePathScanner;
  379.12 -> import com.sun.tools.javac.tree.JCTree;
  379.13 -> import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
  379.14 -94,96d95
  379.15 -< import java.util.concurrent.atomic.AtomicBoolean;
  379.16 -< import java.util.logging.Level;
  379.17 -< import java.util.logging.Logger;
  379.18 -102,109d100
  379.19 -< import javax.swing.SwingUtilities;
  379.20 -< import javax.swing.text.Document;
  379.21 -< import org.netbeans.api.java.source.CompilationInfo;
  379.22 -< import org.netbeans.api.java.source.JavaParserResultTask;
  379.23 -< import org.netbeans.api.java.source.JavaSource.Phase;
  379.24 -< import org.netbeans.api.java.source.TreePathHandle;
  379.25 -< import org.netbeans.api.java.source.TreeUtilities;
  379.26 -< import org.netbeans.api.java.source.support.CancellableTreePathScanner;
  379.27 -111,123c102,103
  379.28 -< import org.netbeans.api.lexer.TokenHierarchy;
  379.29 -< import org.netbeans.modules.editor.NbEditorUtilities;
  379.30 -< import org.netbeans.modules.java.editor.imports.UnusedImports;
  379.31 -< import org.netbeans.modules.java.editor.semantic.ColoringAttributes.Coloring;
  379.32 -< import org.netbeans.modules.parsing.spi.Parser.Result;
  379.33 -< import org.netbeans.modules.parsing.spi.Scheduler;
  379.34 -< import org.netbeans.modules.parsing.spi.SchedulerEvent;
  379.35 -< import org.netbeans.modules.parsing.spi.TaskIndexingMode;
  379.36 -< import org.netbeans.spi.editor.highlighting.support.OffsetsBag;
  379.37 -< import org.netbeans.spi.editor.hints.ErrorDescription;
  379.38 -< import org.openide.filesystems.FileObject;
  379.39 -< import org.openide.filesystems.FileUtil;
  379.40 -< import org.openide.loaders.DataObject;
  379.41 ----
  379.42 -> import org.netbeans.modules.jackpot30.backend.ui.highlighting.ColoringAttributes.Coloring;
  379.43 -> import org.netbeans.modules.jackpot30.resolve.api.CompilationInfo;
  379.44 -130,214c110
  379.45 -< public class SemanticHighlighter extends JavaParserResultTask {
  379.46 -<     
  379.47 -<     public static List<TreePathHandle> computeUnusedImports(CompilationInfo info) throws IOException {
  379.48 -<         final List<TreePathHandle> result = new ArrayList<TreePathHandle>();
  379.49 -<         
  379.50 -<         for (TreePath unused : UnusedImports.process(info, new AtomicBoolean())) {
  379.51 -<             result.add(TreePathHandle.create(unused, info));
  379.52 -<         }
  379.53 -<         
  379.54 -<         return result;
  379.55 -<     }
  379.56 -<     
  379.57 -<     private FileObject file;
  379.58 -<     //XXX: correct rescheduling when troubles traversing token list!
  379.59 -< //    private SemanticHighlighterFactory fact;
  379.60 -<     private AtomicBoolean cancel = new AtomicBoolean();
  379.61 -<     
  379.62 -< //    SemanticHighlighter(FileObject file) {
  379.63 -< //        this(file, null);
  379.64 -< //    }
  379.65 -< //    
  379.66 -<     SemanticHighlighter(FileObject file/*, SemanticHighlighterFactory fact*/) {
  379.67 -<         super(Phase.RESOLVED, TaskIndexingMode.ALLOWED_DURING_SCAN);
  379.68 -<         this.file = file;
  379.69 -< //        this.fact = fact;
  379.70 -<     }
  379.71 -< 
  379.72 -<     @Override
  379.73 -<     public void run(Result result, SchedulerEvent event) {
  379.74 -<         CompilationInfo info = CompilationInfo.get(result);
  379.75 -<         
  379.76 -<         if (info == null) {
  379.77 -<             return ;
  379.78 -<         }
  379.79 -<         
  379.80 -<         cancel.set(false);
  379.81 -<         
  379.82 -<         final Document doc = result.getSnapshot().getSource().getDocument(false);
  379.83 -<         
  379.84 -<         if (!verifyDocument(doc)) return;
  379.85 -< 
  379.86 -<         if (process(info, doc)/* && fact != null*/) {
  379.87 -< //            fact.rescheduleImpl(file);
  379.88 -<         }
  379.89 -<     }
  379.90 -< 
  379.91 -<     private static boolean verifyDocument(final Document doc) {
  379.92 -<         if (doc == null) {
  379.93 -<             Logger.getLogger(SemanticHighlighter.class.getName()).log(Level.FINE, "SemanticHighlighter: Cannot get document!");
  379.94 -<             return false;
  379.95 -<         }
  379.96 -< 
  379.97 -<         final boolean[] tokenSequenceNull =  new boolean[1];
  379.98 -<         doc.render(new Runnable() {
  379.99 -<             public void run() {
 379.100 -<                 tokenSequenceNull[0] = (TokenHierarchy.get(doc).tokenSequence() == null);
 379.101 -<             }
 379.102 -<         });
 379.103 -<         if (tokenSequenceNull[0]) {
 379.104 -<             return false;
 379.105 -<         }
 379.106 -<         
 379.107 -<         return true;
 379.108 -<     }
 379.109 -<     
 379.110 -<     public void cancel() {
 379.111 -<         cancel.set(true);
 379.112 -<     }
 379.113 -<     
 379.114 -< 
 379.115 -<     @Override
 379.116 -<     public int getPriority() {
 379.117 -<         return 100;
 379.118 -<     }
 379.119 -< 
 379.120 -<     @Override
 379.121 -<     public Class<? extends Scheduler> getSchedulerClass() {
 379.122 -<         return Scheduler.EDITOR_SENSITIVE_TASK_SCHEDULER;
 379.123 -<     }
 379.124 -<     
 379.125 -< 
 379.126 -<     
 379.127 -<     boolean process(CompilationInfo info, final Document doc) {
 379.128 -<         return process(info, doc, ERROR_DESCRIPTION_SETTER);
 379.129 -<     }
 379.130 ----
 379.131 -> public class SemanticHighlighter {
 379.132 -218c114
 379.133 -<         
 379.134 ----
 379.135 -> 
 379.136 -222c118
 379.137 -<         
 379.138 ----
 379.139 -> 
 379.140 -225,227c121,123
 379.141 -<     
 379.142 -<     boolean process(CompilationInfo info, final Document doc, ErrorDescriptionSetter setter) {
 379.143 -<         DetectorVisitor v = new DetectorVisitor(info, doc, cancel);
 379.144 ----
 379.145 -> 
 379.146 ->     public static Map<Token, Coloring> computeHighlights(CompilationInfo info, TokenList tl) {
 379.147 ->         DetectorVisitor v = new DetectorVisitor(info, tl);
 379.148 -232d127
 379.149 -<         List<ErrorDescription> errors = new ArrayList<ErrorDescription>();
 379.150 -238,269c133
 379.151 -<         if (cancel.get())
 379.152 -<             return true;
 379.153 -<         
 379.154 -<         boolean computeUnusedImports = "text/x-java".equals(FileUtil.getMIMEType(info.getFileObject()));
 379.155 -<         
 379.156 -<         final List<TreePathHandle> allUnusedImports = computeUnusedImports ? new ArrayList<TreePathHandle>() : null;
 379.157 -<         OffsetsBag imports = computeUnusedImports ? new OffsetsBag(doc) : null;
 379.158 -< 
 379.159 -<         if (computeUnusedImports) {
 379.160 -<             Coloring unused = ColoringAttributes.add(ColoringAttributes.empty(), ColoringAttributes.UNUSED);
 379.161 -<             Collection<TreePath> unusedImports = UnusedImports.process(info, cancel);
 379.162 -< 
 379.163 -<             if (unusedImports == null) return true;
 379.164 -<             
 379.165 -<             for (TreePath tree : unusedImports) {
 379.166 -<                 if (cancel.get()) {
 379.167 -<                     return true;
 379.168 -<                 }
 379.169 -< 
 379.170 -<                 //XXX: finish
 379.171 -<                 final int startPos = (int) info.getTrees().getSourcePositions().getStartPosition(cu, tree.getLeaf());
 379.172 -<                 final int endPos = (int) info.getTrees().getSourcePositions().getEndPosition(cu, tree.getLeaf());
 379.173 -< 
 379.174 -<                 imports.addHighlight(startPos, endPos, ColoringManager.getColoringImpl(unused));
 379.175 -< 
 379.176 -<                 TreePathHandle handle = TreePathHandle.create(tree, info);
 379.177 -< 
 379.178 -<                 allUnusedImports.add(handle);
 379.179 -<             }
 379.180 -<         }
 379.181 -<         
 379.182 -<         Map<Token, Coloring> oldColors = LexerBasedHighlightLayer.getLayer(SemanticHighlighter.class, doc).getColorings();
 379.183 ----
 379.184 ->         Map<Token, Coloring> oldColors = new HashMap<Token, Coloring>();
 379.185 -274,276d137
 379.186 -<             if (cancel.get())
 379.187 -<                 return true;
 379.188 -<             
 379.189 -283c144
 379.190 -<                 if (u.type.contains(UseTypes.DECLARATION) && org.netbeans.modules.java.editor.semantic.Utilities.isPrivateElement(decl)) {
 379.191 ----
 379.192 ->                 if (u.type.contains(UseTypes.DECLARATION) && isPrivateElement(decl)) {
 379.193 -319,332c180
 379.194 -<         if (cancel.get())
 379.195 -<             return true;
 379.196 -<         
 379.197 -<         if (computeUnusedImports) {
 379.198 -<             setter.setErrors(doc, errors, allUnusedImports);
 379.199 -<             setter.setHighlights(doc, imports);
 379.200 -<         }
 379.201 -< 
 379.202 -<         setter.setColorings(doc, newColoring, addedTokens, removedTokens.keySet());
 379.203 -< 
 379.204 -<         Logger.getLogger("TIMER").log(Level.FINE, "Semantic",
 379.205 -<             new Object[] {NbEditorUtilities.getFileObject(doc), System.currentTimeMillis() - start});
 379.206 -<         
 379.207 -<         return false;
 379.208 ----
 379.209 ->         return newColoring;
 379.210 -336c184
 379.211 -<     private boolean hasAllTypes(List<Use> uses, Collection<UseTypes> types) {
 379.212 ----
 379.213 ->     private static boolean hasAllTypes(List<Use> uses, Collection<UseTypes> types) {
 379.214 -389c237
 379.215 -<     private static class DetectorVisitor extends CancellableTreePathScanner<Void, EnumSet<UseTypes>> {
 379.216 ----
 379.217 ->     private static class DetectorVisitor extends TreePathScanner<Void, EnumSet<UseTypes>> {
 379.218 -391,392c239
 379.219 -<         private org.netbeans.api.java.source.CompilationInfo info;
 379.220 -<         private Document doc;
 379.221 ----
 379.222 ->         private CompilationInfo info;
 379.223 -402,404c249
 379.224 -<         private DetectorVisitor(org.netbeans.api.java.source.CompilationInfo info, final Document doc, AtomicBoolean cancel) {
 379.225 -<             super(cancel);
 379.226 -<             
 379.227 ----
 379.228 ->         private DetectorVisitor(CompilationInfo info, TokenList tl) {
 379.229 -406d250
 379.230 -<             this.doc  = doc;
 379.231 -411c255
 379.232 -<             tl = new TokenList(info, doc, cancel);
 379.233 ----
 379.234 ->             this.tl = tl;
 379.235 -601c445
 379.236 -<             if (Utilities.isKeyword(expr.getLeaf())) {
 379.237 ----
 379.238 ->             if (isKeyword(expr.getLeaf())) {
 379.239 -806c650
 379.240 -<             if (info.getTreeUtilities().isSynthetic(getCurrentPath()))
 379.241 ----
 379.242 ->             if (isSynthetic(getCurrentPath()))
 379.243 -834c678
 379.244 -<             if (info.getTreeUtilities().isSynthetic(getCurrentPath())) {
 379.245 ----
 379.246 ->             if (isSynthetic(getCurrentPath())) {
 379.247 -886c730
 379.248 -<                 while (tp != null && !TreeUtilities.CLASS_TREE_KINDS.contains(tp.getLeaf().getKind())) {
 379.249 ----
 379.250 ->                 while (tp != null && !CLASS_TREE_KINDS.contains(tp.getLeaf().getKind())) {
 379.251 -890c734
 379.252 -<                 if (tp != null && TreeUtilities.CLASS_TREE_KINDS.contains(tp.getLeaf().getKind())) {
 379.253 ----
 379.254 ->                 if (tp != null && CLASS_TREE_KINDS.contains(tp.getLeaf().getKind())) {
 379.255 -1003c847
 379.256 -<             int[] span = info.getTreeUtilities().findNameSpan(tree);
 379.257 ----
 379.258 ->             int[] span = new int[] {((JCVariableDecl) tree).pos, ((JCVariableDecl) tree).pos + tree.getName().length()};//info.getTreeUtilities().findNameSpan(tree);
 379.259 -1313,1317c1157,1160
 379.260 -<     public static interface ErrorDescriptionSetter {
 379.261 -<         
 379.262 -<         public void setErrors(Document doc, List<ErrorDescription> errors, List<TreePathHandle> allUnusedImports);
 379.263 -<         public void setHighlights(Document doc, OffsetsBag highlights);
 379.264 -<         public void setColorings(Document doc, Map<Token, Coloring> colorings, Set<Token> addedTokens, Set<Token> removedTokens);
 379.265 ----
 379.266 -> 
 379.267 ->     //not fully correct, but should suffice now:
 379.268 ->     private static boolean isSynthetic(TreePath path) {
 379.269 ->         return ((JCTree) path.getLeaf()).pos == (-1);
 379.270 -1319,1329c1162,1185
 379.271 -<     
 379.272 -<     static ErrorDescriptionSetter ERROR_DESCRIPTION_SETTER = new ErrorDescriptionSetter() {
 379.273 -<         
 379.274 -<         public void setErrors(Document doc, List<ErrorDescription> errors, List<TreePathHandle> allUnusedImports) {}
 379.275 -<         
 379.276 -<         public void setHighlights(final Document doc, final OffsetsBag highlights) {
 379.277 -<             SwingUtilities.invokeLater(new Runnable() {
 379.278 -<                 public void run() {
 379.279 -<                     getImportHighlightsBag(doc).setHighlights(highlights);
 379.280 -<                 }
 379.281 -<             });
 379.282 ----
 379.283 -> 
 379.284 ->     //from semantic.Utilities:
 379.285 ->     private static final Set<String> keywords;
 379.286 ->     private static final Set<String> nonCtorKeywords;
 379.287 -> 
 379.288 ->     static {
 379.289 ->         keywords = new HashSet<String>();
 379.290 -> 
 379.291 ->         keywords.add("true");
 379.292 ->         keywords.add("false");
 379.293 ->         keywords.add("null");
 379.294 ->         keywords.add("this");
 379.295 ->         keywords.add("super");
 379.296 ->         keywords.add("class");
 379.297 -> 
 379.298 ->         nonCtorKeywords = new HashSet<String>(keywords);
 379.299 ->         nonCtorKeywords.remove("this");
 379.300 ->         nonCtorKeywords.remove("super");
 379.301 -> 
 379.302 ->     }
 379.303 -> 
 379.304 ->     public static boolean isKeyword(Tree tree) {
 379.305 ->         if (tree.getKind() == Kind.IDENTIFIER) {
 379.306 ->             return keywords.contains(((IdentifierTree) tree).getName().toString());
 379.307 -1331,1337c1187,1188
 379.308 -<     
 379.309 -<         public void setColorings(final Document doc, final Map<Token, Coloring> colorings, final Set<Token> addedTokens, final Set<Token> removedTokens) {
 379.310 -<             SwingUtilities.invokeLater(new Runnable () {
 379.311 -<                 public void run() {
 379.312 -<                     LexerBasedHighlightLayer.getLayer(SemanticHighlighter.class, doc).setColorings(colorings, addedTokens, removedTokens);
 379.313 -<                 }                
 379.314 -<             });            
 379.315 ----
 379.316 ->         if (tree.getKind() == Kind.MEMBER_SELECT) {
 379.317 ->             return keywords.contains(((MemberSelectTree) tree).getIdentifier().toString());
 379.318 -1339d1189
 379.319 -<     };
 379.320 -1341,1352c1191,1196
 379.321 -<     private static final Object KEY_UNUSED_IMPORTS = new Object();
 379.322 -<     static OffsetsBag getImportHighlightsBag(Document doc) {
 379.323 -<         OffsetsBag bag = (OffsetsBag) doc.getProperty(KEY_UNUSED_IMPORTS);
 379.324 -<         
 379.325 -<         if (bag == null) {
 379.326 -<             doc.putProperty(KEY_UNUSED_IMPORTS, bag = new OffsetsBag(doc));
 379.327 -<             
 379.328 -<             Object stream = doc.getProperty(Document.StreamDescriptionProperty);
 379.329 -<             
 379.330 -<             if (stream instanceof DataObject) {
 379.331 -< //                TimesCollector.getDefault().reportReference(((DataObject) stream).getPrimaryFile(), "ImportsHighlightsBag", "[M] Imports Highlights Bag", bag);
 379.332 -<             }
 379.333 ----
 379.334 ->         return false;
 379.335 ->     }
 379.336 -> 
 379.337 ->     public static boolean isNonCtorKeyword(Tree tree) {
 379.338 ->         if (tree.getKind() == Kind.IDENTIFIER) {
 379.339 ->             return nonCtorKeywords.contains(((IdentifierTree) tree).getName().toString());
 379.340 -1354,1355c1198,1208
 379.341 -<         
 379.342 -<         return bag;
 379.343 ----
 379.344 ->         if (tree.getKind() == Kind.MEMBER_SELECT) {
 379.345 ->             return nonCtorKeywords.contains(((MemberSelectTree) tree).getIdentifier().toString());
 379.346 ->         }
 379.347 -> 
 379.348 ->         return false;
 379.349 ->     }
 379.350 -> 
 379.351 ->     private static final Set<ElementKind> LOCAL_ELEMENT_KINDS = EnumSet.of(ElementKind.PARAMETER, ElementKind.LOCAL_VARIABLE, ElementKind.EXCEPTION_PARAMETER, ElementKind.RESOURCE_VARIABLE);
 379.352 -> 
 379.353 ->     public static boolean isPrivateElement(Element el) {
 379.354 ->         return LOCAL_ELEMENT_KINDS.contains(el.getKind()) || el.getModifiers().contains(Modifier.PRIVATE);
 379.355 -1357a1211,1212
 379.356 ->     //from TreeUtilities:
 379.357 ->     public static final Set<Kind> CLASS_TREE_KINDS = EnumSet.of(Kind.ANNOTATION_TYPE, Kind.CLASS, Kind.ENUM, Kind.INTERFACE);
   380.1 --- a/remoting/server/web/web.ui/src/org/netbeans/modules/jackpot30/backend/ui/highlighting/TokenList.diff	Mon Dec 19 11:37:36 2016 +0100
   380.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   380.3 @@ -1,145 +0,0 @@
   380.4 -31c31
   380.5 -< package org.netbeans.modules.java.editor.semantic;
   380.6 ----
   380.7 -> package org.netbeans.modules.jackpot30.backend.ui.highlighting;
   380.8 -39d38
   380.9 -< import java.util.ArrayList;
  380.10 -41,42d39
  380.11 -< import java.util.Collections;
  380.12 -< import java.util.Iterator;
  380.13 -46d42
  380.14 -< import javax.swing.text.Document;
  380.15 -48d43
  380.16 -< import org.netbeans.api.java.source.CompilationInfo;
  380.17 -50,51d44
  380.18 -< import org.netbeans.api.lexer.TokenHierarchy;
  380.19 -< import org.netbeans.api.lexer.TokenId;
  380.20 -52a46
  380.21 -> import org.netbeans.modules.jackpot30.resolve.api.CompilationInfo;
  380.22 -62d55
  380.23 -<     private Document doc;
  380.24 -65,66d57
  380.25 -<     private boolean topLevelIsJava;
  380.26 -<     private TokenSequence topLevel;
  380.27 -69c60
  380.28 -<     public TokenList(CompilationInfo info, final Document doc, AtomicBoolean cancel) {
  380.29 ----
  380.30 ->     public TokenList(CompilationInfo info, TokenSequence<?> topLevel, AtomicBoolean cancel) {
  380.31 -71d61
  380.32 -<         this.doc = doc;
  380.33 -76,77d65
  380.34 -<         doc.render(new Runnable() {
  380.35 -<             public void run() {
  380.36 -81c69
  380.37 -<                 topLevel = TokenHierarchy.get(doc).tokenSequence();
  380.38 ----
  380.39 ->                 assert topLevel.language() == JavaTokenId.language();
  380.40 -83,85d70
  380.41 -<                 topLevelIsJava = topLevel.language() == JavaTokenId.language();
  380.42 -<                 
  380.43 -<                 if (topLevelIsJava) {
  380.44 -89,91d73
  380.45 -<                 }
  380.46 -<             }
  380.47 -<         });
  380.48 -95c77
  380.49 -<         final int offset = info.getSnapshot().getOriginalOffset((int) inputOffset);
  380.50 ----
  380.51 ->         final int offset = (int) inputOffset;
  380.52 -99,100d80
  380.53 -<         doc.render(new Runnable() {
  380.54 -<             public void run() {
  380.55 -108,109c88
  380.56 -<                 
  380.57 -<                 if (topLevelIsJava) {
  380.58 ----
  380.59 -> 
  380.60 -114,148d92
  380.61 -<                 } else {
  380.62 -<                     Iterator<? extends TokenSequence> embeddedSeqs = null;
  380.63 -<                     if (ts == null) {
  380.64 -<                         List<? extends TokenSequence> seqs = new ArrayList<TokenSequence>(embeddedTokenSequences(TokenHierarchy.get(doc), offset));
  380.65 -<                         Collections.reverse(seqs);
  380.66 -<                         embeddedSeqs = seqs.iterator();
  380.67 -<                         while (embeddedSeqs.hasNext()) {
  380.68 -<                             TokenSequence tseq = embeddedSeqs.next();
  380.69 -<                             if (tseq.language() == JavaTokenId.language()) {
  380.70 -<                                 ts = tseq;
  380.71 -<                                 break;
  380.72 -<                             }
  380.73 -<                         }
  380.74 -<                     }
  380.75 -< 
  380.76 -<                     while (ts != null && ts.offset() < offset) {
  380.77 -<                         if (!ts.moveNext()) {
  380.78 -<                             ts = null;
  380.79 -<                             if (embeddedSeqs == null) {
  380.80 -<                                 List<? extends TokenSequence> seqs = new ArrayList<TokenSequence>(embeddedTokenSequences(TokenHierarchy.get(doc), offset));
  380.81 -<                                 Collections.reverse(seqs);
  380.82 -<                                 embeddedSeqs = seqs.iterator();
  380.83 -<                             }
  380.84 -<                             while (embeddedSeqs.hasNext()) {
  380.85 -<                                 TokenSequence tseq = embeddedSeqs.next();
  380.86 -<                                 if (tseq.language() == JavaTokenId.language()) {
  380.87 -<                                     ts = tseq;
  380.88 -<                                     break;
  380.89 -<                                 }
  380.90 -<                             }
  380.91 -<                         }
  380.92 -<                     }
  380.93 -<                 }
  380.94 -<             }
  380.95 -<         });
  380.96 -177,178d120
  380.97 -<         doc.render(new Runnable() {
  380.98 -<             public void run() {
  380.99 -196c138
 380.100 -<                     if (name.equals(info.getTreeUtilities().decodeIdentifier(ts.token().text()).toString())) {
 380.101 ----
 380.102 ->                     if (name.equals(ts.token().text().toString())) {
 380.103 -202,203d143
 380.104 -<             }
 380.105 -<         });
 380.106 -207,208d146
 380.107 -<         doc.render(new Runnable() {
 380.108 -<             public void run() {
 380.109 -222c160
 380.110 -<                 if (t.id() == JavaTokenId.IDENTIFIER && tree.getName().toString().equals(info.getTreeUtilities().decodeIdentifier(t.text()).toString())) {
 380.111 ----
 380.112 ->                 if (t.id() == JavaTokenId.IDENTIFIER && tree.getName().toString().equals(t.text().toString())) {
 380.113 -228,229d165
 380.114 -<             }
 380.115 -<         });
 380.116 -233,234d168
 380.117 -<         doc.render(new Runnable() {
 380.118 -<             public void run() {
 380.119 -249,250d182
 380.120 -<                     offset = info.getSnapshot().getOriginalOffset(offset);
 380.121 -<                     
 380.122 -260,261d191
 380.123 -<             }
 380.124 -<         });
 380.125 -265,266d194
 380.126 -<         doc.render(new Runnable() {
 380.127 -<             public void run() {
 380.128 -279,298d206
 380.129 -<             }
 380.130 -<         });
 380.131 -<     }
 380.132 -<     
 380.133 -<     private static List<TokenSequence<?>> embeddedTokenSequences(TokenHierarchy<Document> th, int offset) {
 380.134 -<         TokenSequence<?> embedded = th.tokenSequence();
 380.135 -<         List<TokenSequence<?>> sequences = new ArrayList<TokenSequence<?>>();
 380.136 -< 
 380.137 -<         do {
 380.138 -<             TokenSequence<?> seq = embedded;
 380.139 -<             embedded = null;
 380.140 -< 
 380.141 -<             seq.move(offset);
 380.142 -<             if (seq.moveNext()) {
 380.143 -<                 sequences.add(seq);
 380.144 -<                 embedded = seq.embedded();
 380.145 -<             }
 380.146 -<         } while (embedded != null);
 380.147 -<         
 380.148 -<         return sequences;
   381.1 --- a/sandbox/attributed-index-web/API.java	Mon Dec 19 11:37:36 2016 +0100
   381.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   381.3 @@ -1,572 +0,0 @@
   381.4 -/*
   381.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   381.6 - *
   381.7 - * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
   381.8 - *
   381.9 - * The contents of this file are subject to the terms of either the GNU
  381.10 - * General Public License Version 2 only ("GPL") or the Common
  381.11 - * Development and Distribution License("CDDL") (collectively, the
  381.12 - * "License"). You may not use this file except in compliance with the
  381.13 - * License. You can obtain a copy of the License at
  381.14 - * http://www.netbeans.org/cddl-gplv2.html
  381.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  381.16 - * specific language governing permissions and limitations under the
  381.17 - * License.  When distributing the software, include this License Header
  381.18 - * Notice in each file and include the License file at
  381.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  381.20 - * particular file as subject to the "Classpath" exception as provided
  381.21 - * by Sun in the GPL Version 2 section of the License file that
  381.22 - * accompanied this code. If applicable, add the following below the
  381.23 - * License Header, with the fields enclosed by brackets [] replaced by
  381.24 - * your own identifying information:
  381.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  381.26 - *
  381.27 - * If you wish your version of this file to be governed by only the CDDL
  381.28 - * or only the GPL Version 2, indicate your decision by adding
  381.29 - * "[Contributor] elects to include this software in this distribution
  381.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  381.31 - * single choice of license, a recipient has the option to distribute
  381.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  381.33 - * to extend the choice of license to its licensees as provided above.
  381.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  381.35 - * Version 2 license, then the option applies only if the new code is
  381.36 - * made subject to such option by the copyright holder.
  381.37 - *
  381.38 - * Contributor(s):
  381.39 - *
  381.40 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  381.41 - */
  381.42 -
  381.43 -package org.netbeans.modules.jackpot30.backend.impl.api;
  381.44 -
  381.45 -import java.io.IOException;
  381.46 -import java.io.OutputStream;
  381.47 -import java.io.OutputStreamWriter;
  381.48 -import java.io.Writer;
  381.49 -import java.lang.reflect.Method;
  381.50 -import java.lang.reflect.Modifier;
  381.51 -import java.util.ArrayList;
  381.52 -import java.util.Arrays;
  381.53 -import java.util.Collection;
  381.54 -import java.util.Collections;
  381.55 -import java.util.EnumSet;
  381.56 -import java.util.HashMap;
  381.57 -import java.util.HashSet;
  381.58 -import java.util.LinkedHashMap;
  381.59 -import java.util.LinkedList;
  381.60 -import java.util.List;
  381.61 -import java.util.Map;
  381.62 -import java.util.Map.Entry;
  381.63 -import java.util.Set;
  381.64 -import java.util.concurrent.atomic.AtomicBoolean;
  381.65 -import java.util.concurrent.atomic.AtomicLong;
  381.66 -import javax.lang.model.element.TypeElement;
  381.67 -import javax.tools.Diagnostic;
  381.68 -import javax.tools.JavaFileObject;
  381.69 -import javax.ws.rs.DefaultValue;
  381.70 -import javax.ws.rs.GET;
  381.71 -import javax.ws.rs.Path;
  381.72 -import javax.ws.rs.Produces;
  381.73 -import javax.ws.rs.QueryParam;
  381.74 -import javax.ws.rs.WebApplicationException;
  381.75 -import javax.ws.rs.core.StreamingOutput;
  381.76 -import org.codeviation.pojson.Pojson;
  381.77 -import org.netbeans.api.java.classpath.ClassPath;
  381.78 -import org.netbeans.api.java.source.ClassIndex.NameKind;
  381.79 -import org.netbeans.api.java.source.ClassIndex.SearchScope;
  381.80 -import org.netbeans.api.java.source.ClasspathInfo;
  381.81 -import org.netbeans.api.java.source.CompilationController;
  381.82 -import org.netbeans.api.java.source.ElementHandle;
  381.83 -import org.netbeans.api.java.source.ModificationResult;
  381.84 -import org.netbeans.modules.jackpot30.backend.impl.CategoryStorage;
  381.85 -import org.netbeans.modules.jackpot30.impl.examples.Example;
  381.86 -import org.netbeans.modules.jackpot30.impl.examples.Example.Option;
  381.87 -import org.netbeans.modules.jackpot30.impl.examples.LoadExamples;
  381.88 -import org.netbeans.modules.jackpot30.impl.indexing.FileBasedIndex;
  381.89 -import org.netbeans.modules.jackpot30.impl.indexing.Index;
  381.90 -import org.netbeans.modules.jackpot30.spi.PatternConvertor;
  381.91 -import org.netbeans.modules.java.hints.jackpot.impl.MessageImpl;
  381.92 -import org.netbeans.modules.java.hints.jackpot.impl.batch.BatchSearch;
  381.93 -import org.netbeans.modules.java.hints.jackpot.impl.batch.BatchSearch.BatchResult;
  381.94 -import org.netbeans.modules.java.hints.jackpot.impl.batch.BatchSearch.Resource;
  381.95 -import org.netbeans.modules.java.hints.jackpot.impl.batch.BatchUtilities;
  381.96 -import org.netbeans.modules.java.hints.jackpot.impl.batch.ProgressHandleWrapper;
  381.97 -import org.netbeans.modules.java.hints.jackpot.impl.batch.Scopes;
  381.98 -import org.netbeans.modules.java.hints.jackpot.spi.HintDescription;
  381.99 -import org.netbeans.modules.java.source.usages.ClassIndexManager;
 381.100 -import org.netbeans.modules.jumpto.type.GoToTypeAction;
 381.101 -import org.netbeans.spi.editor.hints.ErrorDescription;
 381.102 -import org.netbeans.spi.java.classpath.support.ClassPathSupport;
 381.103 -import org.openide.filesystems.FileObject;
 381.104 -import org.openide.filesystems.FileUtil;
 381.105 -import org.openide.util.Exceptions;
 381.106 -
 381.107 -/**
 381.108 - *
 381.109 - * @author lahvac
 381.110 - */
 381.111 -@Path("/index")
 381.112 -public class API {
 381.113 -
 381.114 -    @GET
 381.115 -    @Path("/find")
 381.116 -    @Produces("text/plain")
 381.117 -    //TODO: parameter for "verified"?
 381.118 -    public String find(@QueryParam("path") String segment, @QueryParam("pattern") String pattern, @QueryParam("asynchronous") @DefaultValue(value="false") boolean asynchronous) throws IOException {
 381.119 -        assert !asynchronous;
 381.120 -
 381.121 -        Iterable<? extends HintDescription> hints = PatternConvertor.create(pattern);
 381.122 -        Set<FileObject> srcRoots = CategoryStorage.getCategoryContent(segment);
 381.123 -        final FileObject deepestCommonParent = deepestCommonParent(srcRoots);
 381.124 -        BatchResult batchResult = BatchSearch.findOccurrences(hints, Scopes.specifiedFoldersScope(srcRoots.toArray(new FileObject[0])));
 381.125 -        final StringBuilder result = new StringBuilder();
 381.126 -
 381.127 -        BatchSearch.getVerifiedSpans(batchResult, new ProgressHandleWrapper(1), new BatchSearch.VerifiedSpansCallBack() {
 381.128 -            @Override public void groupStarted() {}
 381.129 -            @Override public boolean spansVerified(CompilationController wc, Resource r, Collection<? extends ErrorDescription> hints) throws Exception {
 381.130 -                if (!hints.isEmpty()) {
 381.131 -                    result.append(FileUtil.getRelativePath(deepestCommonParent, r.getResolvedFile()));
 381.132 -                    result.append("\n");
 381.133 -                }
 381.134 -                return true;
 381.135 -            }
 381.136 -            @Override public void groupFinished() {}
 381.137 -            @Override public void cannotVerifySpan(Resource r) { /*TODO: warn user?*/ }
 381.138 -        }, true, new LinkedList<MessageImpl>()); //TODO: show the messages to the user?
 381.139 -
 381.140 -        return result.toString();
 381.141 -    }
 381.142 -
 381.143 -    @GET
 381.144 -    @Path("/findWithSpans")
 381.145 -    @Produces("text/plain")
 381.146 -    //TODO: parameter for "verified"?
 381.147 -    public String findWithSpans(@QueryParam("path") String segment, @QueryParam("pattern") String pattern, @QueryParam("asynchronous") @DefaultValue(value="false") boolean asynchronous) throws IOException {
 381.148 -        assert !asynchronous;
 381.149 -
 381.150 -        Iterable<? extends HintDescription> hints = PatternConvertor.create(pattern);
 381.151 -        Set<FileObject> srcRoots = CategoryStorage.getCategoryContent(segment);
 381.152 -        final FileObject deepestCommonParent = deepestCommonParent(srcRoots);
 381.153 -        BatchResult batchResult = BatchSearch.findOccurrences(hints, Scopes.specifiedFoldersScope(srcRoots.toArray(new FileObject[0])));
 381.154 -        final Map<String, int[][]> result = new HashMap<String, int[][]>();
 381.155 -
 381.156 -        BatchSearch.getVerifiedSpans(batchResult, new ProgressHandleWrapper(1), new BatchSearch.VerifiedSpansCallBack() {
 381.157 -            @Override public void groupStarted() {}
 381.158 -            @Override public boolean spansVerified(CompilationController wc, Resource r, Collection<? extends ErrorDescription> hints) throws Exception {
 381.159 -                if (!hints.isEmpty()) {
 381.160 -                    int[][] spans = new int[hints.size()][];
 381.161 -                    int i = 0;
 381.162 -
 381.163 -                    for (ErrorDescription ed : hints) {
 381.164 -                        spans[i++] = new int[] {
 381.165 -                            ed.getRange().getBegin().getOffset(),
 381.166 -                            ed.getRange().getEnd().getOffset()
 381.167 -                        };
 381.168 -                    }
 381.169 -
 381.170 -                    result.put(FileUtil.getRelativePath(deepestCommonParent, r.getResolvedFile()), spans);
 381.171 -                }
 381.172 -                return true;
 381.173 -            }
 381.174 -            @Override public void groupFinished() {}
 381.175 -            @Override public void cannotVerifySpan(Resource r) { /*TODO: warn user?*/ }
 381.176 -        }, true, new LinkedList<MessageImpl>()); //TODO: show the messages to the user?
 381.177 -
 381.178 -        return Pojson.save(result);
 381.179 -    }
 381.180 -
 381.181 -//    @GET
 381.182 -//    @Path("/findCategorize")
 381.183 -//    @Produces("text/plain")
 381.184 -//    public String findCategorize(@QueryParam("path") final String segment, @QueryParam("pattern") final String pattern, @QueryParam("asynchronous") @DefaultValue(value="false") boolean asynchronous) throws IOException {
 381.185 -//        assert asynchronous;
 381.186 -//
 381.187 -//        long id = this.id.getAndIncrement();
 381.188 -//        final ProgressImpl progress = new ProgressImpl();
 381.189 -//
 381.190 -//        workInProgress.put(id, progress);
 381.191 -//
 381.192 -//        new Thread(new Runnable() {
 381.193 -//            public void run() {
 381.194 -//                try {
 381.195 -//                    File sourceRoot = Cache.sourceRootForKey(segment);
 381.196 -//                    Index idx = FileBasedIndex.get(sourceRoot.toURI().toURL());
 381.197 -//                    new SortedQuery().query(idx, pattern, progress);
 381.198 -//                } catch (IOException ex) {
 381.199 -//                    ex.printStackTrace();
 381.200 -//                    progress.finish();
 381.201 -//                }
 381.202 -//            }
 381.203 -//        }).start();
 381.204 -//
 381.205 -//        return Long.toString(id);
 381.206 -//    }
 381.207 -
 381.208 -    @GET
 381.209 -    @Path("/findSpans")
 381.210 -    @Produces("text/plain")
 381.211 -    public String findSpans(@QueryParam("path") String segment, @QueryParam("relativePath") String relativePath, @QueryParam("pattern") String pattern) throws IOException {
 381.212 -        Iterable<? extends HintDescription> hints = PatternConvertor.create(pattern);
 381.213 -        Set<FileObject> srcRoots = CategoryStorage.getCategoryContent(segment);
 381.214 -        FileObject deepestCommonParent = deepestCommonParent(srcRoots);
 381.215 -        BatchResult batchResult = BatchSearch.findOccurrences(hints, Scopes.specifiedFoldersScope(deepestCommonParent.getFileObject(relativePath)));
 381.216 -        final StringBuilder result = new StringBuilder();
 381.217 -
 381.218 -        BatchSearch.getVerifiedSpans(batchResult, new ProgressHandleWrapper(1), new BatchSearch.VerifiedSpansCallBack() {
 381.219 -            @Override public void groupStarted() {}
 381.220 -            @Override public boolean spansVerified(CompilationController wc, Resource r, Collection<? extends ErrorDescription> hints) throws Exception {
 381.221 -                for (ErrorDescription ed : hints) {
 381.222 -                    result.append(ed.getRange().getBegin().getOffset());
 381.223 -                    result.append(":");
 381.224 -                    result.append(ed.getRange().getEnd().getOffset());
 381.225 -                    result.append(":");
 381.226 -                }
 381.227 -                return true;
 381.228 -            }
 381.229 -            @Override public void groupFinished() {}
 381.230 -            @Override public void cannotVerifySpan(Resource r) { /*TODO: warn user?*/ }
 381.231 -        }, true, new LinkedList<MessageImpl>()); //TODO: show the messages to the user?
 381.232 -
 381.233 -        if (result.length() > 0) {
 381.234 -            result.delete(result.length() - 1, result.length());
 381.235 -        }
 381.236 -        return result.toString();
 381.237 -    }
 381.238 -
 381.239 -    @GET
 381.240 -    @Path("/list")
 381.241 -    @Produces("text/plain")
 381.242 -    public String list() throws IOException {
 381.243 -        StringBuilder sb = new StringBuilder();
 381.244 -
 381.245 -        for (Entry<String, String> e : CategoryStorage.listCategoriesWithNames().entrySet()) {
 381.246 -            sb.append(e.getKey());
 381.247 -            sb.append(":");
 381.248 -            sb.append(e.getValue());
 381.249 -            sb.append("\n");
 381.250 -        }
 381.251 -
 381.252 -        return sb.toString();
 381.253 -    }
 381.254 -
 381.255 -    @GET
 381.256 -    @Path("/cat")
 381.257 -    @Produces("text/plain")
 381.258 -    public String cat(@QueryParam("path") String segment, @QueryParam("relative") String relative) throws IOException {
 381.259 -        Set<FileObject> srcRoots = CategoryStorage.getCategoryContent(segment);
 381.260 -        FileObject deepestCommonParent = deepestCommonParent(srcRoots);
 381.261 -        FileObject file = deepestCommonParent.getFileObject(relative);
 381.262 -        ClassPath cp = ClassPathSupport.createClassPath(srcRoots.toArray(new FileObject[0]));
 381.263 -        FileObject root = cp.findOwnerRoot(file);
 381.264 -        String path = cp.getResourceName(file);
 381.265 -        Index index = FileBasedIndex.get(root.getURL());
 381.266 -
 381.267 -        if (index == null) {
 381.268 -            throw new IOException("No index");
 381.269 -        }
 381.270 -
 381.271 -        CharSequence source = index.getSourceCode(path);
 381.272 -
 381.273 -        if (source == null) {
 381.274 -            throw new IOException("Source code not found");
 381.275 -        }
 381.276 -        
 381.277 -        return source.toString().replaceAll("\r\n", "\n");
 381.278 -    }
 381.279 -
 381.280 -    @GET
 381.281 -    @Path("/apply")
 381.282 -    @Produces("text/diff")
 381.283 -    //TODO: parameter for "verified"?
 381.284 -    public StreamingOutput apply(@QueryParam("path") String segment, @QueryParam("pattern") String pattern, @QueryParam("asynchronous") @DefaultValue(value="false") boolean asynchronous) throws IOException {
 381.285 -        assert !asynchronous;
 381.286 -
 381.287 -        Iterable<? extends HintDescription> hints = PatternConvertor.create(pattern);
 381.288 -        Set<FileObject> srcRoots = CategoryStorage.getCategoryContent(segment);
 381.289 -        final FileObject deepestCommonParent = deepestCommonParent(srcRoots);
 381.290 -        BatchResult batchResult = BatchSearch.findOccurrences(hints, Scopes.specifiedFoldersScope(srcRoots.toArray(new FileObject[0])));
 381.291 -        final Collection<ModificationResult> modifications = BatchUtilities.applyFixes(batchResult, new ProgressHandleWrapper(1), new AtomicBoolean(), new LinkedList<MessageImpl>());
 381.292 -
 381.293 -        return new StreamingOutput() {
 381.294 -            @Override public void write(OutputStream output) throws IOException, WebApplicationException {
 381.295 -                Writer w = new OutputStreamWriter(output, "UTF-8");
 381.296 -
 381.297 -                try {
 381.298 -                    for (ModificationResult modResult : modifications) {
 381.299 -                        org.netbeans.modules.jackpot30.impl.batch.BatchUtilities.exportDiff(modResult, deepestCommonParent, w);
 381.300 -                    }
 381.301 -                } finally {
 381.302 -                    try {
 381.303 -                        w.close();
 381.304 -                    } catch (IOException ex) {
 381.305 -                        Exceptions.printStackTrace(ex);
 381.306 -                    }
 381.307 -                }
 381.308 -            }
 381.309 -        };
 381.310 -    }
 381.311 -
 381.312 -//    @GET
 381.313 -//    @Path("/info")
 381.314 -//    @Produces("text/plain")
 381.315 -//    public String info(@QueryParam("path") String segment) throws IOException {
 381.316 -//        URL sourceRoot = Cache.sourceRootForKey(segment).toURI().toURL();
 381.317 -//        Index index = FileBasedIndex.get(sourceRoot);
 381.318 -//
 381.319 -//        if (index == null) {
 381.320 -//            throw new IOException("No index");
 381.321 -//        }
 381.322 -//
 381.323 -//        return Pojson.save(index.getIndexInfo());
 381.324 -//    }
 381.325 -
 381.326 -    @GET
 381.327 -    @Path("/examples")
 381.328 -    @Produces("text/plain")
 381.329 -    public String examples() throws IOException {
 381.330 -        List<Map<String, String>> examples = new LinkedList<Map<String, String>>();
 381.331 -
 381.332 -        for (Example ex : LoadExamples.loadExamples()) {
 381.333 -            if (ex.getOptions().contains(Option.VERIFY) || ex.getOptions().contains(Option.FIX)) continue;
 381.334 -            Map<String, String> desc = new HashMap<String, String>();
 381.335 -
 381.336 -            desc.put("displayName", ex.getDisplayName());
 381.337 -            desc.put("pattern", ex.getCode());
 381.338 -
 381.339 -            examples.add(desc);
 381.340 -        }
 381.341 -
 381.342 -        return Pojson.save(examples);
 381.343 -    }
 381.344 -
 381.345 -    @GET
 381.346 -    @Path("/errors")
 381.347 -    @Produces("text/plain")
 381.348 -    public String errors(@QueryParam("pattern") String pattern) throws IOException {
 381.349 -        StringBuilder sb = new StringBuilder();
 381.350 -
 381.351 -        for (Diagnostic<? extends JavaFileObject> d : StandaloneFinder.parseAndReportErrors(pattern)) {
 381.352 -            sb.append(d.getMessage(null));
 381.353 -            sb.append("\n");
 381.354 -        }
 381.355 -
 381.356 -        return sb.toString();
 381.357 -    }
 381.358 -
 381.359 -    @GET
 381.360 -    @Path("/findDuplicates")
 381.361 -    @Produces("text/plain")
 381.362 -    public String findDuplicates(@QueryParam("path") String segment, @QueryParam("hashes") String hashes) throws IOException {
 381.363 -        Map<String, Map<String, Collection<String>>> hash2Segment2Contains = new HashMap<String, Map<String, Collection<String>>>();
 381.364 -        Collection<String> segments = new LinkedList<String>();
 381.365 -
 381.366 -        if (segment != null) segments.add(segment);
 381.367 -        else {
 381.368 -            segments.addAll(CategoryStorage.listCategoriesWithNames().keySet());
 381.369 -        }
 381.370 -
 381.371 -        Iterable<? extends String> hashesList = Arrays.asList(Pojson.load(String[].class, hashes));
 381.372 -
 381.373 -        for (String seg : segments) {
 381.374 -            Set<FileObject> srcRoots = CategoryStorage.getCategoryContent(seg);
 381.375 -            final FileObject deepestCommonParent = deepestCommonParent(srcRoots);
 381.376 -
 381.377 -            for (FileObject root : srcRoots) {
 381.378 -                Map<String, Collection<? extends String>> found = StandaloneFinder.containsHash(FileUtil.toFile(root), hashesList);
 381.379 -
 381.380 -                for (Entry<String, Collection<? extends String>> e : found.entrySet()) {
 381.381 -                    Map<String, Collection<String>> perRoot = hash2Segment2Contains.get(e.getKey());
 381.382 -
 381.383 -                    if (perRoot == null) {
 381.384 -                        hash2Segment2Contains.put(e.getKey(), perRoot = new HashMap<String, Collection<String>>());
 381.385 -                    }
 381.386 -
 381.387 -                    Collection<String> rel = perRoot.get(seg);
 381.388 -
 381.389 -                    if (rel == null) {
 381.390 -                        perRoot.put(seg, rel = new ArrayList<String>(e.getValue().size()));
 381.391 -                    }
 381.392 -
 381.393 -                    for (String r : e.getValue()) {
 381.394 -                        rel.add(FileUtil.getRelativePath(deepestCommonParent, root.getFileObject(r)));
 381.395 -                    }
 381.396 -                }
 381.397 -            }
 381.398 -        }
 381.399 -
 381.400 -        return Pojson.save(hash2Segment2Contains);
 381.401 -    }
 381.402 -
 381.403 -    @GET
 381.404 -    @Path("/checkProgress")
 381.405 -    @Produces("text/plain")
 381.406 -    public String checkProgress(@QueryParam("id") long id) throws IOException {
 381.407 -        ProgressImpl progress = workInProgress.get(id);
 381.408 -        Map<String, Object> result;
 381.409 -
 381.410 -        if (progress == null) {
 381.411 -            result = new HashMap<String, Object>();
 381.412 -            result.put("total", 0);
 381.413 -            result.put("workDone", 0);
 381.414 -            result.put("finished", true);
 381.415 -            result.put("result", Collections.<String>emptyList());
 381.416 -        } else {
 381.417 -            result = progress.progressPacket();
 381.418 -        }
 381.419 -
 381.420 -        if (result.get("finished") == Boolean.TRUE) {
 381.421 -            workInProgress.remove(id);
 381.422 -        }
 381.423 -
 381.424 -        return Pojson.save(result);
 381.425 -    }
 381.426 -
 381.427 -    @GET
 381.428 -    @Path("/cancelProgress")
 381.429 -    @Produces("text/plain")
 381.430 -    public String cancelProgress(@QueryParam("id") long id) throws IOException {
 381.431 -        ProgressImpl progress = workInProgress.get(id);
 381.432 -
 381.433 -        if (progress != null) {
 381.434 -            progress.cancel.set(true);
 381.435 -        }
 381.436 -
 381.437 -        return "done";
 381.438 -    }
 381.439 -
 381.440 -    @GET
 381.441 -    @Path("/capabilities")
 381.442 -    @Produces("text/plain")
 381.443 -    public String capabilities() throws IOException {
 381.444 -        Map<String, Object> result = new HashMap<String, Object>();
 381.445 -        List<String> methods = new ArrayList<String>(API.class.getDeclaredMethods().length);
 381.446 -
 381.447 -        for (Method m : API.class.getDeclaredMethods()) {
 381.448 -            if (m.isAnnotationPresent(GET.class) && (m.getModifiers() & Modifier.PUBLIC) != 0) {
 381.449 -                methods.add(m.getName());
 381.450 -            }
 381.451 -        }
 381.452 -
 381.453 -        result.put("methods", methods);
 381.454 -        result.put("attributed", true);
 381.455 -
 381.456 -        return Pojson.save(result);
 381.457 -    }
 381.458 -
 381.459 -    @GET
 381.460 -    @Path("/findType")
 381.461 -    @Produces("text/plain")
 381.462 -    public String findType(@QueryParam("path") String segment, @QueryParam("prefix") String prefix, @QueryParam("casesensitive") @DefaultValue("false") boolean casesensitive, @QueryParam("asynchronous") @DefaultValue(value="false") boolean asynchronous) throws IOException {
 381.463 -        assert !asynchronous;
 381.464 -
 381.465 -        //copied (and converted to NameKind) from jumpto's GoToTypeAction:
 381.466 -        boolean exact = prefix.endsWith(" "); // NOI18N
 381.467 -
 381.468 -        prefix = prefix.trim();
 381.469 -
 381.470 -        if ( prefix.length() == 0) {
 381.471 -            return "";
 381.472 -        }
 381.473 -
 381.474 -        NameKind nameKind;
 381.475 -        int wildcard = GoToTypeAction.containsWildCard(prefix);
 381.476 -
 381.477 -        if (exact) {
 381.478 -            //nameKind = panel.isCaseSensitive() ? SearchType.EXACT_NAME : SearchType.CASE_INSENSITIVE_EXACT_NAME;
 381.479 -            nameKind = NameKind.SIMPLE_NAME;
 381.480 -        }
 381.481 -        else if ((GoToTypeAction.isAllUpper(prefix) && prefix.length() > 1) || GoToTypeAction.isCamelCase(prefix)) {
 381.482 -            nameKind = NameKind.CAMEL_CASE;
 381.483 -        }
 381.484 -        else if (wildcard != -1) {
 381.485 -            nameKind = casesensitive ? NameKind.REGEXP : NameKind.CASE_INSENSITIVE_REGEXP;
 381.486 -        }
 381.487 -        else {
 381.488 -            nameKind = casesensitive ? NameKind.PREFIX : NameKind.CASE_INSENSITIVE_PREFIX;
 381.489 -        }
 381.490 -
 381.491 -        Map<String, List<String>> result = new LinkedHashMap<String, List<String>>();
 381.492 -        Set<FileObject> srcRoots = CategoryStorage.getCategoryContent(segment);
 381.493 -        FileObject deepestCommonParent = deepestCommonParent(srcRoots);
 381.494 -
 381.495 -        for (FileObject srcRoot : srcRoots) {
 381.496 -            String rootId = FileUtil.getRelativePath(deepestCommonParent, srcRoot);
 381.497 -            List<String> currentResult = new ArrayList<String>();
 381.498 -
 381.499 -            result.put(rootId, currentResult);
 381.500 -
 381.501 -            ClassIndexManager.getDefault().createUsagesQuery(srcRoot.getURL(), true);
 381.502 -            ClasspathInfo cpInfo = ClasspathInfo.create(ClassPath.EMPTY, ClassPath.EMPTY, ClassPathSupport.createClassPath(srcRoot));
 381.503 -            Set<ElementHandle<TypeElement>> names = new HashSet<ElementHandle<TypeElement>>(cpInfo.getClassIndex().getDeclaredTypes(prefix, nameKind, EnumSet.of(SearchScope.SOURCE)));
 381.504 -
 381.505 -            if (nameKind == NameKind.CAMEL_CASE) {
 381.506 -                names.addAll(cpInfo.getClassIndex().getDeclaredTypes(prefix, NameKind.CASE_INSENSITIVE_PREFIX, EnumSet.of(SearchScope.SOURCE)));
 381.507 -            }
 381.508 -
 381.509 -            for (ElementHandle<TypeElement> d : names) {
 381.510 -                currentResult.add(d.getBinaryName());
 381.511 -            }
 381.512 -        }
 381.513 -
 381.514 -        return Pojson.save(result);
 381.515 -    }
 381.516 -
 381.517 -    //XXX: not really correct, a base directory(-ies?) should be set in the category!
 381.518 -    private static FileObject deepestCommonParent(Set<FileObject> roots) {
 381.519 -        FileObject result = null;
 381.520 -
 381.521 -        for (FileObject r : roots) {
 381.522 -            if (result == null) {
 381.523 -                result = r;
 381.524 -            } else {
 381.525 -                while (!FileUtil.isParentOf(result, r)) {
 381.526 -                    result = result.getParent();
 381.527 -                }
 381.528 -            }
 381.529 -        }
 381.530 -
 381.531 -        return result;
 381.532 -    }
 381.533 -
 381.534 -    private final static AtomicLong id = new AtomicLong();
 381.535 -    private final static Map<Long, ProgressImpl> workInProgress = new HashMap<Long, ProgressImpl>();//XXX: should be cleared eventually even if not read
 381.536 -
 381.537 -    private static final class ProgressImpl implements Progress {
 381.538 -        private int total = -1;
 381.539 -        private int workDone = 0;
 381.540 -        private boolean finished;
 381.541 -        private final List<String> result = new ArrayList<String>();
 381.542 -        private final AtomicBoolean cancel = new AtomicBoolean();
 381.543 -        public synchronized void setTotalWork(int total) {
 381.544 -            this.total = total;
 381.545 -        }
 381.546 -        public synchronized void progress(int totalDone) {
 381.547 -            workDone = totalDone;
 381.548 -        }
 381.549 -        public synchronized void updateProgress(int updateDone) {
 381.550 -            workDone += updateDone;
 381.551 -        }
 381.552 -        public synchronized void addResultPart(String part) {
 381.553 -            result.add(part);
 381.554 -        }
 381.555 -        public synchronized void finish() {
 381.556 -            finished = true;
 381.557 -        }
 381.558 -        public synchronized boolean isCancelled() {
 381.559 -            return cancel.get();
 381.560 -        }
 381.561 -        synchronized Map<String, Object> progressPacket() {
 381.562 -            Map<String, Object> result = new HashMap<String, Object>();
 381.563 -
 381.564 -            result.put("total", total);
 381.565 -            result.put("workDone", workDone);
 381.566 -            result.put("finished", finished);
 381.567 -            result.put("result", new ArrayList<String>(this.result));
 381.568 -
 381.569 -            this.result.clear();
 381.570 -
 381.571 -            return result;
 381.572 -        }
 381.573 -    }
 381.574 -
 381.575 -}
   382.1 --- a/sandbox/attributed-index-web/Progress.java	Mon Dec 19 11:37:36 2016 +0100
   382.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   382.3 @@ -1,60 +0,0 @@
   382.4 -/*
   382.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   382.6 - *
   382.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
   382.8 - *
   382.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  382.10 - * Other names may be trademarks of their respective owners.
  382.11 - *
  382.12 - * The contents of this file are subject to the terms of either the GNU
  382.13 - * General Public License Version 2 only ("GPL") or the Common
  382.14 - * Development and Distribution License("CDDL") (collectively, the
  382.15 - * "License"). You may not use this file except in compliance with the
  382.16 - * License. You can obtain a copy of the License at
  382.17 - * http://www.netbeans.org/cddl-gplv2.html
  382.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  382.19 - * specific language governing permissions and limitations under the
  382.20 - * License.  When distributing the software, include this License Header
  382.21 - * Notice in each file and include the License file at
  382.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  382.23 - * particular file as subject to the "Classpath" exception as provided
  382.24 - * by Oracle in the GPL Version 2 section of the License file that
  382.25 - * accompanied this code. If applicable, add the following below the
  382.26 - * License Header, with the fields enclosed by brackets [] replaced by
  382.27 - * your own identifying information:
  382.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  382.29 - *
  382.30 - * If you wish your version of this file to be governed by only the CDDL
  382.31 - * or only the GPL Version 2, indicate your decision by adding
  382.32 - * "[Contributor] elects to include this software in this distribution
  382.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  382.34 - * single choice of license, a recipient has the option to distribute
  382.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  382.36 - * to extend the choice of license to its licensees as provided above.
  382.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  382.38 - * Version 2 license, then the option applies only if the new code is
  382.39 - * made subject to such option by the copyright holder.
  382.40 - *
  382.41 - * Contributor(s):
  382.42 - *
  382.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
  382.44 - */
  382.45 -
  382.46 -package org.netbeans.modules.jackpot30.backend.impl.api;
  382.47 -
  382.48 -/**
  382.49 - *
  382.50 - * @author lahvac
  382.51 - */
  382.52 -public interface Progress {
  382.53 -
  382.54 -    public void setTotalWork(int total);
  382.55 -    public void progress(int totalDone);
  382.56 -    public void updateProgress(int updateDone);
  382.57 -    public void addResultPart(String part);
  382.58 -    public void finish();
  382.59 -    
  382.60 -    public boolean isCancelled();
  382.61 -
  382.62 -
  382.63 -}
   383.1 --- a/sandbox/attributed-index-web/StandaloneFinder.java	Mon Dec 19 11:37:36 2016 +0100
   383.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   383.3 @@ -1,213 +0,0 @@
   383.4 -/*
   383.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   383.6 - *
   383.7 - * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
   383.8 - *
   383.9 - * The contents of this file are subject to the terms of either the GNU
  383.10 - * General Public License Version 2 only ("GPL") or the Common
  383.11 - * Development and Distribution License("CDDL") (collectively, the
  383.12 - * "License"). You may not use this file except in compliance with the
  383.13 - * License. You can obtain a copy of the License at
  383.14 - * http://www.netbeans.org/cddl-gplv2.html
  383.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  383.16 - * specific language governing permissions and limitations under the
  383.17 - * License.  When distributing the software, include this License Header
  383.18 - * Notice in each file and include the License file at
  383.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  383.20 - * particular file as subject to the "Classpath" exception as provided
  383.21 - * by Sun in the GPL Version 2 section of the License file that
  383.22 - * accompanied this code. If applicable, add the following below the
  383.23 - * License Header, with the fields enclosed by brackets [] replaced by
  383.24 - * your own identifying information:
  383.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  383.26 - *
  383.27 - * If you wish your version of this file to be governed by only the CDDL
  383.28 - * or only the GPL Version 2, indicate your decision by adding
  383.29 - * "[Contributor] elects to include this software in this distribution
  383.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  383.31 - * single choice of license, a recipient has the option to distribute
  383.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  383.33 - * to extend the choice of license to its licensees as provided above.
  383.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  383.35 - * Version 2 license, then the option applies only if the new code is
  383.36 - * made subject to such option by the copyright holder.
  383.37 - *
  383.38 - * Contributor(s):
  383.39 - *
  383.40 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  383.41 - */
  383.42 -
  383.43 -package org.netbeans.modules.jackpot30.backend.impl.api;
  383.44 -
  383.45 -import com.sun.source.tree.CompilationUnitTree;
  383.46 -import com.sun.source.tree.Tree;
  383.47 -import com.sun.source.util.TreePath;
  383.48 -import com.sun.source.util.Trees;
  383.49 -import com.sun.tools.javac.api.JavacTaskImpl;
  383.50 -import java.io.File;
  383.51 -import java.io.IOException;
  383.52 -import java.net.URI;
  383.53 -import java.net.URL;
  383.54 -import java.util.Arrays;
  383.55 -import java.util.BitSet;
  383.56 -import java.util.Collection;
  383.57 -import java.util.Collections;
  383.58 -import java.util.HashMap;
  383.59 -import java.util.LinkedList;
  383.60 -import java.util.Map;
  383.61 -import javax.tools.Diagnostic;
  383.62 -import javax.tools.JavaCompiler;
  383.63 -import javax.tools.JavaFileObject;
  383.64 -import javax.tools.SimpleJavaFileObject;
  383.65 -import javax.tools.ToolProvider;
  383.66 -import org.apache.lucene.document.Document;
  383.67 -import org.apache.lucene.index.IndexReader;
  383.68 -import org.apache.lucene.index.Term;
  383.69 -import org.apache.lucene.search.Collector;
  383.70 -import org.apache.lucene.search.IndexSearcher;
  383.71 -import org.apache.lucene.search.Query;
  383.72 -import org.apache.lucene.search.Searcher;
  383.73 -import org.apache.lucene.search.TermQuery;
  383.74 -import org.apache.lucene.store.FSDirectory;
  383.75 -import org.netbeans.modules.jackpot30.impl.duplicates.indexing.DuplicatesIndex;
  383.76 -import org.netbeans.modules.jackpot30.impl.indexing.AbstractLuceneIndex.BitSetCollector;
  383.77 -import org.netbeans.modules.jackpot30.impl.indexing.FileBasedIndex;
  383.78 -import org.netbeans.modules.jackpot30.spi.PatternConvertor;
  383.79 -import org.netbeans.modules.java.hints.jackpot.impl.Utilities;
  383.80 -import org.netbeans.modules.java.hints.jackpot.impl.pm.BulkSearch;
  383.81 -import org.netbeans.modules.java.hints.jackpot.impl.pm.BulkSearch.BulkPattern;
  383.82 -import org.netbeans.modules.java.hints.jackpot.spi.HintDescription;
  383.83 -import org.netbeans.modules.java.hints.jackpot.spi.HintDescription.AdditionalQueryConstraints;
  383.84 -import org.netbeans.modules.java.hints.jackpot.spi.Trigger.PatternDescription;
  383.85 -import org.netbeans.modules.parsing.impl.indexing.CacheFolder;
  383.86 -import org.netbeans.modules.parsing.impl.indexing.SPIAccessor;
  383.87 -import org.openide.filesystems.FileObject;
  383.88 -import org.openide.filesystems.FileUtil;
  383.89 -
  383.90 -/**
  383.91 - *
  383.92 - * @author lahvac
  383.93 - */
  383.94 -public class StandaloneFinder {
  383.95 -
  383.96 -    public static Collection<? extends String> findCandidates(File sourceRoot, String pattern) throws IOException {
  383.97 -        BulkPattern bulkPattern = preparePattern(pattern, null);
  383.98 -        
  383.99 -        return FileBasedIndex.get(sourceRoot.toURI().toURL()).findCandidates(bulkPattern);
 383.100 -    }
 383.101 -
 383.102 -    public static int[] findCandidateOccurrenceSpans(File sourceRoot, String relativePath, String pattern) throws IOException {
 383.103 -        BulkPattern bulkPattern = preparePattern(pattern, null);
 383.104 -        CharSequence source = FileBasedIndex.get(sourceRoot.toURI().toURL()).getSourceCode(relativePath).toString().replaceAll("\r\n", "\n");
 383.105 -        JavacTaskImpl jti = prepareJavacTaskImpl();
 383.106 -        CompilationUnitTree cut = jti.parse(new JFOImpl(source)).iterator().next();
 383.107 -        Collection<TreePath> paths = new LinkedList<TreePath>();
 383.108 -        
 383.109 -        for (Collection<TreePath> c : BulkSearch.getDefault().match(null, new TreePath(cut), bulkPattern).values()) {
 383.110 -            paths.addAll(c);
 383.111 -        }
 383.112 -
 383.113 -        Trees t = Trees.instance(jti);
 383.114 -        int[] result = new int[2 * paths.size()];
 383.115 -        int i = 0;
 383.116 -
 383.117 -        for (TreePath tp : paths) {
 383.118 -            result[i++] = (int) t.getSourcePositions().getStartPosition(cut, tp.getLeaf());
 383.119 -            result[i++] = (int) t.getSourcePositions().getEndPosition(cut, tp.getLeaf());
 383.120 -        }
 383.121 -
 383.122 -        return result;
 383.123 -    }
 383.124 -
 383.125 -    public static Collection<Diagnostic<? extends JavaFileObject>> parseAndReportErrors(String pattern) {
 383.126 -        Collection<Diagnostic<? extends JavaFileObject>> errors = new LinkedList<Diagnostic<? extends JavaFileObject>>();
 383.127 -
 383.128 -        preparePattern(pattern, errors);
 383.129 -
 383.130 -        return errors;
 383.131 -    }
 383.132 -
 383.133 -    private static File getIndex(URL url) throws IOException {
 383.134 -        FileObject indexBaseFolder = CacheFolder.getDataFolder(url);
 383.135 -        String path = SPIAccessor.getInstance().getIndexerPath(DuplicatesIndex.NAME, DuplicatesIndex.VERSION);
 383.136 -        FileObject indexFolder = FileUtil.createFolder(indexBaseFolder, path);
 383.137 -        return FileUtil.toFile(indexFolder);
 383.138 -    }
 383.139 -
 383.140 -    public static Map<String, Collection<? extends String>> containsHash(File sourceRoot, Iterable<? extends String> hashes) throws IOException {
 383.141 -        File cacheRoot = getIndex(sourceRoot.toURI().toURL());
 383.142 -        File dir = new File(cacheRoot, "fulltext");
 383.143 -
 383.144 -        if (dir.listFiles() != null && dir.listFiles().length > 0) {
 383.145 -            IndexReader reader = IndexReader.open(FSDirectory.open(dir), true);
 383.146 -            Map<String, Collection<? extends String>> result = new HashMap<String, Collection<? extends String>>();
 383.147 -
 383.148 -            for (String hash : hashes) {
 383.149 -                Collection<String> found = new LinkedList<String>();
 383.150 -                Query query = new TermQuery(new Term("generalized", hash));
 383.151 -                Searcher s = new IndexSearcher(reader);
 383.152 -                BitSet matchingDocuments = new BitSet(reader.maxDoc());
 383.153 -                Collector c = new BitSetCollector(matchingDocuments);
 383.154 -
 383.155 -                s.search(query, c);
 383.156 -
 383.157 -                for (int docNum = matchingDocuments.nextSetBit(0); docNum >= 0; docNum = matchingDocuments.nextSetBit(docNum + 1)) {
 383.158 -                    final Document doc = reader.document(docNum);
 383.159 -
 383.160 -                    found.add(doc.getField("path").stringValue());
 383.161 -                }
 383.162 -
 383.163 -                result.put(hash, found);
 383.164 -            }
 383.165 -            
 383.166 -            return result;
 383.167 -        }
 383.168 -
 383.169 -        return Collections.emptyMap();
 383.170 -    }
 383.171 -    
 383.172 -    private static BulkPattern preparePattern(String pattern, Collection<Diagnostic<? extends JavaFileObject>> errors) {
 383.173 -        return preparePattern(PatternConvertor.create(pattern), errors);
 383.174 -    }
 383.175 -
 383.176 -    //XXX: copied from BatchSearch, may be possible to merge once CompilationInfo is accessible in server mode
 383.177 -    private static BulkPattern preparePattern(final Iterable<? extends HintDescription> patterns, Collection<Diagnostic<? extends JavaFileObject>> errors) {
 383.178 -        JavacTaskImpl javac = prepareJavacTaskImpl();
 383.179 -        Collection<String> code = new LinkedList<String>();
 383.180 -        Collection<Tree> trees = new LinkedList<Tree>();
 383.181 -        Collection<AdditionalQueryConstraints> additionalConstraints = new LinkedList<AdditionalQueryConstraints>();
 383.182 -
 383.183 -        for (HintDescription pattern : patterns) {
 383.184 -            String textPattern = ((PatternDescription) pattern.getTrigger()).getPattern();
 383.185 -
 383.186 -            code.add(textPattern);
 383.187 -            trees.add(Utilities.parseAndAttribute(javac, textPattern, errors));
 383.188 -            additionalConstraints.add(pattern.getAdditionalConstraints());
 383.189 -        }
 383.190 -
 383.191 -        return BulkSearch.getDefault().create(code, trees, additionalConstraints);
 383.192 -    }
 383.193 -
 383.194 -    private static JavacTaskImpl prepareJavacTaskImpl() {
 383.195 -        final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N
 383.196 -        final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
 383.197 -
 383.198 -        assert tool != null;
 383.199 -
 383.200 -        JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, null, Arrays.asList("-bootclasspath",  bootPath, "-Xjcov"), null, Collections.<JavaFileObject>emptyList());
 383.201 -        
 383.202 -        return ct;
 383.203 -    }
 383.204 -
 383.205 -    private static final class JFOImpl extends SimpleJavaFileObject {
 383.206 -        private final CharSequence code;
 383.207 -        public JFOImpl(CharSequence code) {
 383.208 -            super(URI.create(""), Kind.SOURCE);
 383.209 -            this.code = code;
 383.210 -        }
 383.211 -        @Override
 383.212 -        public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException {
 383.213 -            return code;
 383.214 -        }
 383.215 -    }
 383.216 -}
   384.1 --- a/sandbox/attributed-index-web/UI.java	Mon Dec 19 11:37:36 2016 +0100
   384.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   384.3 @@ -1,423 +0,0 @@
   384.4 -/*
   384.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   384.6 - *
   384.7 - * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
   384.8 - *
   384.9 - * The contents of this file are subject to the terms of either the GNU
  384.10 - * General Public License Version 2 only ("GPL") or the Common
  384.11 - * Development and Distribution License("CDDL") (collectively, the
  384.12 - * "License"). You may not use this file except in compliance with the
  384.13 - * License. You can obtain a copy of the License at
  384.14 - * http://www.netbeans.org/cddl-gplv2.html
  384.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  384.16 - * specific language governing permissions and limitations under the
  384.17 - * License.  When distributing the software, include this License Header
  384.18 - * Notice in each file and include the License file at
  384.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  384.20 - * particular file as subject to the "Classpath" exception as provided
  384.21 - * by Sun in the GPL Version 2 section of the License file that
  384.22 - * accompanied this code. If applicable, add the following below the
  384.23 - * License Header, with the fields enclosed by brackets [] replaced by
  384.24 - * your own identifying information:
  384.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  384.26 - *
  384.27 - * If you wish your version of this file to be governed by only the CDDL
  384.28 - * or only the GPL Version 2, indicate your decision by adding
  384.29 - * "[Contributor] elects to include this software in this distribution
  384.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  384.31 - * single choice of license, a recipient has the option to distribute
  384.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  384.33 - * to extend the choice of license to its licensees as provided above.
  384.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  384.35 - * Version 2 license, then the option applies only if the new code is
  384.36 - * made subject to such option by the copyright holder.
  384.37 - *
  384.38 - * Contributor(s):
  384.39 - *
  384.40 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  384.41 - */
  384.42 -
  384.43 -package org.netbeans.modules.jackpot30.backend.impl.ui;
  384.44 -
  384.45 -import java.util.Comparator;
  384.46 -import javax.ws.rs.core.Response;
  384.47 -import java.util.LinkedHashMap;
  384.48 -import java.util.Map.Entry;
  384.49 -import freemarker.cache.TemplateLoader;
  384.50 -import freemarker.template.Configuration;
  384.51 -import freemarker.template.Template;
  384.52 -import freemarker.template.TemplateException;
  384.53 -import java.io.IOException;
  384.54 -import java.io.InputStream;
  384.55 -import java.io.InputStreamReader;
  384.56 -import java.io.Reader;
  384.57 -import java.io.StringWriter;
  384.58 -import java.net.URI;
  384.59 -import java.net.URISyntaxException;
  384.60 -import java.util.ArrayList;
  384.61 -import java.util.Collections;
  384.62 -import java.util.HashMap;
  384.63 -import java.util.LinkedList;
  384.64 -import java.util.List;
  384.65 -import java.util.Map;
  384.66 -import javax.ws.rs.DefaultValue;
  384.67 -import javax.ws.rs.GET;
  384.68 -import javax.ws.rs.Path;
  384.69 -import javax.ws.rs.Produces;
  384.70 -import javax.ws.rs.QueryParam;
  384.71 -import org.codeviation.pojson.Pojson;
  384.72 -import org.netbeans.modules.jackpot30.impl.WebUtilities;
  384.73 -import static org.netbeans.modules.jackpot30.impl.WebUtilities.escapeForQuery;
  384.74 -
  384.75 -/**
  384.76 - *
  384.77 - * @author lahvac
  384.78 - */
  384.79 -@Path("/index/ui")
  384.80 -public class UI {
  384.81 -
  384.82 -    @GET
  384.83 -    @Path("/search")
  384.84 -    @Produces("text/html")
  384.85 -    public String search(@QueryParam("path") String path, @QueryParam("pattern") String pattern) throws URISyntaxException, IOException, TemplateException {
  384.86 -        Map<String, Object> configurationData = new HashMap<String, Object>();
  384.87 -
  384.88 -        configurationData.put("paths", list());
  384.89 -        configurationData.put("selectedPath", path);
  384.90 -        configurationData.put("pattern", pattern);
  384.91 -        configurationData.put("patternEscaped", escapeForQuery(pattern));
  384.92 -        configurationData.put("examples", loadExamples());
  384.93 -
  384.94 -        if (pattern != null && path != null) {
  384.95 -            URI u = new URI("http://localhost:9998/index/find?path=" + escapeForQuery(path) + "&pattern=" + escapeForQuery(pattern));
  384.96 -            List<Map<String, Object>> results = new LinkedList<Map<String, Object>>();
  384.97 -            long queryTime = System.currentTimeMillis();
  384.98 -            List<String> candidates = new ArrayList<String>(WebUtilities.requestStringArrayResponse(u));
  384.99 -
 384.100 -            queryTime = System.currentTimeMillis() - queryTime;
 384.101 -
 384.102 -            Collections.sort(candidates);
 384.103 -
 384.104 -            for (String c : candidates) {
 384.105 -                Map<String, Object> found = new HashMap<String, Object>(3);
 384.106 -
 384.107 -                found.put("relativePath", c);
 384.108 -
 384.109 -                results.add(found);
 384.110 -            }
 384.111 -
 384.112 -            configurationData.put("results", results);
 384.113 -
 384.114 -            Map<String, Object> statistics = new HashMap<String, Object>();
 384.115 -
 384.116 -            statistics.put("files", candidates.size());
 384.117 -            statistics.put("queryTime", queryTime);
 384.118 -
 384.119 -            configurationData.put("statistics", statistics);
 384.120 -        }
 384.121 -
 384.122 -        return processTemplate("ui-search.html", configurationData);
 384.123 -    }
 384.124 -
 384.125 -//    @GET
 384.126 -//    @Path("/searchCategorized")
 384.127 -//    @Produces("text/html")
 384.128 -//    public String searchCategorized(@QueryParam("path") String path, @QueryParam("pattern") String pattern) throws URISyntaxException, IOException, TemplateException {
 384.129 -//        Map<String, Object> configurationData = new HashMap<String, Object>();
 384.130 -//
 384.131 -//        configurationData.put("paths", list());
 384.132 -//        configurationData.put("selectedPath", path);
 384.133 -//        configurationData.put("pattern", pattern);
 384.134 -//        configurationData.put("patternEscaped", escapeForQuery(pattern));
 384.135 -//        configurationData.put("examples", loadExamples());
 384.136 -//
 384.137 -//        if (pattern != null && path != null) {
 384.138 -//            Result queryResult = new DoQuery().doQuery(path, pattern, new Cancel() {
 384.139 -//                                                           public boolean isCancelled() {
 384.140 -//                                                               return false;
 384.141 -//                                                           }
 384.142 -//                                                       });
 384.143 -//
 384.144 -//            configurationData.put("result", queryResult.result);
 384.145 -//        }
 384.146 -//
 384.147 -//        return processTemplate("ui-search-categorized.html", configurationData);
 384.148 -//    }
 384.149 -
 384.150 -    @GET
 384.151 -    @Path("/show")
 384.152 -    @Produces("text/html")
 384.153 -    public String show(@QueryParam("path") String path, @QueryParam("relative") String relativePath, @QueryParam("pattern") String pattern) throws URISyntaxException, IOException, TemplateException {
 384.154 -        Map<String, Object> configurationData = new HashMap<String, Object>();
 384.155 -        List<Map<String, String>> occurrences = new LinkedList<Map<String, String>>();
 384.156 -
 384.157 -        configurationData.put("occurrences", occurrences);
 384.158 -
 384.159 -        URI codeURL = new URI("http://localhost:9998/index/cat?path=" + escapeForQuery(path) + "&relative=" + escapeForQuery(relativePath));
 384.160 -        String code = WebUtilities.requestStringResponse(codeURL);
 384.161 -
 384.162 -        if (pattern != null) {
 384.163 -            URI spansURL = new URI("http://localhost:9998/index/findSpans?path=" + escapeForQuery(path) + "&relativePath=" + escapeForQuery(relativePath) + "&pattern=" + escapeForQuery(pattern));
 384.164 -            int currentCodePos = 0;
 384.165 -            for (int[] span : parseSpans(WebUtilities.requestStringResponse(spansURL))) { //XXX: sorted!
 384.166 -                Map<String, String> occ = new HashMap<String, String>();
 384.167 -                occ.put("prefix", WebUtilities.escapeForHTMLElement(code.substring(currentCodePos, span[0])));
 384.168 -                occ.put("occurrence", WebUtilities.escapeForHTMLElement(code.substring(span[0], span[1])));
 384.169 -                occurrences.add(occ);
 384.170 -                currentCodePos = span[1];
 384.171 -            }
 384.172 -
 384.173 -            configurationData.put("suffix", WebUtilities.escapeForHTMLElement(code.substring(currentCodePos, code.length())));
 384.174 -        } else {
 384.175 -            configurationData.put("suffix", WebUtilities.escapeForHTMLElement(code));
 384.176 -        }
 384.177 -
 384.178 -        return processTemplate("ui-cat.html", configurationData);
 384.179 -    }
 384.180 -    
 384.181 -    @GET
 384.182 -    @Path("/snippet")
 384.183 -    @Produces("text/html")
 384.184 -    public String snippet(@QueryParam("path") String path, @QueryParam("relative") String relativePath, @QueryParam("pattern") String pattern) throws URISyntaxException, IOException, TemplateException {
 384.185 -        List<Map<String, String>> snippets = new LinkedList<Map<String, String>>();
 384.186 -
 384.187 -        URI codeURL = new URI("http://localhost:9998/index/cat?path=" + escapeForQuery(path) + "&relative=" + escapeForQuery(relativePath));
 384.188 -        String code = WebUtilities.requestStringResponse(codeURL);
 384.189 -        URI spansURL = new URI("http://localhost:9998/index/findSpans?path=" + escapeForQuery(path) + "&relativePath=" + escapeForQuery(relativePath) + "&pattern=" + escapeForQuery(pattern));
 384.190 -
 384.191 -        for (int[] span : parseSpans(WebUtilities.requestStringResponse(spansURL))) {
 384.192 -            snippets.add(prepareSnippet(code, span));
 384.193 -        }
 384.194 -
 384.195 -        return processTemplate("ui-snippet.html", Collections.<String, Object>singletonMap("snippets", snippets));
 384.196 -    }
 384.197 -
 384.198 -    @GET
 384.199 -    @Path("/apply")
 384.200 -    @Produces("text/html")
 384.201 -    public Response apply(@QueryParam("path") String path, @QueryParam("pattern") String pattern, @QueryParam("preview") @DefaultValue("") String preview, @QueryParam("download") @DefaultValue("") String download) throws URISyntaxException, IOException, TemplateException {
 384.202 -        if (!download.isEmpty()) {
 384.203 -            if (pattern != null && path != null) {
 384.204 -                URI u = new URI("http://localhost:9998/index/apply?path=" + escapeForQuery(path) + "&pattern=" + escapeForQuery(pattern));
 384.205 -
 384.206 -                return Response.temporaryRedirect(u).header("meta", "Content-Disposition: download; filename=\"patch.diff\"").build();
 384.207 -            }
 384.208 -        }
 384.209 -
 384.210 -        Map<String, Object> configurationData = new HashMap<String, Object>();
 384.211 -
 384.212 -        configurationData.put("paths", list());
 384.213 -        configurationData.put("selectedPath", path);
 384.214 -        configurationData.put("pattern", pattern);
 384.215 -        configurationData.put("patternEscaped", escapeForQuery(pattern));
 384.216 -        configurationData.put("examples", loadExamples());
 384.217 -
 384.218 -        if (pattern != null && path != null) {
 384.219 -            URI u = new URI("http://localhost:9998/index/apply?path=" + escapeForQuery(path) + "&pattern=" + escapeForQuery(pattern));
 384.220 -            long queryTime = System.currentTimeMillis();
 384.221 -            String diff = WebUtilities.requestStringResponse(u);
 384.222 -
 384.223 -            queryTime = System.currentTimeMillis() - queryTime;
 384.224 -
 384.225 -            configurationData.put("diff", diff);
 384.226 -
 384.227 -            StringBuilder sb = new StringBuilder();
 384.228 -
 384.229 -            for (String l : diff.split("\n")) {
 384.230 -                sb.append("<span");
 384.231 -
 384.232 -                for (Entry<String, String> e : prefix2SpanName.entrySet()) {
 384.233 -                    if (l.startsWith(e.getKey())) {
 384.234 -                        sb.append(" class='" + e.getValue() + "'");
 384.235 -                        break;
 384.236 -                    }
 384.237 -                }
 384.238 -
 384.239 -                sb.append(">");
 384.240 -                sb.append(l);
 384.241 -                sb.append("</span>\n");
 384.242 -            }
 384.243 -
 384.244 -            configurationData.put("result", sb.toString());
 384.245 -        }
 384.246 -
 384.247 -        return Response.ok(processTemplate("ui-apply.html", configurationData), "text/html").build();
 384.248 -    }
 384.249 -
 384.250 -    @GET
 384.251 -    @Path("/searchType")
 384.252 -    @Produces("text/html")
 384.253 -    public String searchType(@QueryParam("path") String path, @QueryParam("prefix") String prefix) throws URISyntaxException, IOException, TemplateException {
 384.254 -        Map<String, Object> configurationData = new HashMap<String, Object>();
 384.255 -
 384.256 -        configurationData.put("paths", list());
 384.257 -        configurationData.put("selectedPath", path);
 384.258 -        configurationData.put("prefix", prefix);
 384.259 -
 384.260 -        if (prefix != null && path != null) {
 384.261 -            URI u = new URI("http://localhost:9998/index/findType?path=" + escapeForQuery(path) + "&prefix=" + escapeForQuery(prefix));
 384.262 -            long queryTime = System.currentTimeMillis();
 384.263 -            @SuppressWarnings("unchecked") //XXX: should not trust something got from the network!
 384.264 -            Map<String, List<String>> types = Pojson.load(LinkedHashMap.class, u);
 384.265 -            List<Map<String, Object>> results = new LinkedList<Map<String, Object>>();
 384.266 -
 384.267 -            queryTime = System.currentTimeMillis() - queryTime;
 384.268 -
 384.269 -            for (Entry<String, List<String>> e : types.entrySet()) {
 384.270 -                for (String fqn : e.getValue()) {
 384.271 -                    Map<String, Object> found = new HashMap<String, Object>(3);
 384.272 -
 384.273 -                    found.put("fqn", fqn);
 384.274 -
 384.275 -                    if (fqn.contains("$")) {
 384.276 -                        fqn = fqn.substring(0, fqn.indexOf("$"));
 384.277 -                    }
 384.278 -
 384.279 -                    found.put("relativePath", e.getKey() + "/" + fqn.replace('.', '/') + ".java");
 384.280 -
 384.281 -                    results.add(found);
 384.282 -                }
 384.283 -            }
 384.284 -
 384.285 -            Collections.sort(results, new Comparator<Map<String, Object>>() {
 384.286 -                @Override public int compare(Map<String, Object> o1, Map<String, Object> o2) {
 384.287 -                    return ((String) o1.get("fqn")).compareTo((String) o2.get("fqn"));
 384.288 -                }
 384.289 -            });
 384.290 -            
 384.291 -            configurationData.put("results", results);
 384.292 -
 384.293 -            Map<String, Object> statistics = new HashMap<String, Object>();
 384.294 -
 384.295 -            statistics.put("queryTime", queryTime);
 384.296 -
 384.297 -            configurationData.put("statistics", statistics);
 384.298 -        }
 384.299 -
 384.300 -        return processTemplate("ui-findType.html", configurationData);
 384.301 -    }
 384.302 -
 384.303 -    private static final Map<String, String> prefix2SpanName = new LinkedHashMap<String, String>();
 384.304 -
 384.305 -    static {
 384.306 -        prefix2SpanName.put("-", "diff-removed");
 384.307 -        prefix2SpanName.put("+", "diff-added");
 384.308 -        prefix2SpanName.put("@@", "diff-hunk");
 384.309 -        prefix2SpanName.put("Index:", "diff-index");
 384.310 -    }
 384.311 -
 384.312 -    private static List<Map<String, String>> list() throws URISyntaxException {
 384.313 -        List<Map<String, String>> result = new LinkedList<Map<String, String>>();
 384.314 -
 384.315 -        for (String enc : WebUtilities.requestStringArrayResponse(new URI("http://localhost:9998/index/list"))) {
 384.316 -            Map<String, String> rootDesc = new HashMap<String, String>();
 384.317 -            String[] col = enc.split(":", 2);
 384.318 -
 384.319 -            rootDesc.put("segment", col[0]);
 384.320 -            rootDesc.put("displayName", col[1]);
 384.321 -            result.add(rootDesc);
 384.322 -        }
 384.323 -
 384.324 -        return result;
 384.325 -    }
 384.326 -    
 384.327 -    private static Iterable<int[]> parseSpans(String from) {
 384.328 -        if (from.isEmpty()) {
 384.329 -            return Collections.emptyList();
 384.330 -        }
 384.331 -        String[] split = from.split(":");
 384.332 -        List<int[]> result = new LinkedList<int[]>();
 384.333 -
 384.334 -        for (int i = 0; i < split.length; i += 2) {
 384.335 -            result.add(new int[] {
 384.336 -                Integer.parseInt(split[i + 0].trim()),
 384.337 -                Integer.parseInt(split[i + 1].trim())
 384.338 -            });
 384.339 -        }
 384.340 -
 384.341 -        return result;
 384.342 -    }
 384.343 -
 384.344 -    private static final int DESIRED_CONTEXT = 2;
 384.345 -
 384.346 -    private static Map<String, String> prepareSnippet(String code, int[] span) {
 384.347 -        int grandStart = span[0];
 384.348 -        int firstLineStart = grandStart = lineStart(code, grandStart);
 384.349 -
 384.350 -        while (grandStart > 0 && contextLength(code.substring(grandStart, firstLineStart)) < DESIRED_CONTEXT)
 384.351 -            grandStart = lineStart(code, grandStart - 1);
 384.352 -
 384.353 -        int grandEnd = span[1];
 384.354 -        int firstLineEnd = grandEnd = lineEnd(code, grandEnd);
 384.355 -        
 384.356 -        while (grandEnd < code.length() - 1 && contextLength(code.substring(firstLineEnd, grandEnd)) < DESIRED_CONTEXT)
 384.357 -            grandEnd = lineEnd(code, grandEnd + 1);
 384.358 -
 384.359 -        Map<String, String> result = new HashMap<String, String>();
 384.360 -        
 384.361 -        result.put("prefix", WebUtilities.escapeForHTMLElement(code.substring(grandStart, span[0])));
 384.362 -        result.put("occurrence", WebUtilities.escapeForHTMLElement(code.substring(span[0], span[1])));
 384.363 -        result.put("suffix", WebUtilities.escapeForHTMLElement(code.substring(span[1], grandEnd)));
 384.364 -
 384.365 -        return result;
 384.366 -    }
 384.367 -
 384.368 -    private static int lineStart(String code, int o) {
 384.369 -        while (o > 0 && code.charAt(o) != '\n') {
 384.370 -            o--;
 384.371 -        }
 384.372 -
 384.373 -        return o;
 384.374 -    }
 384.375 -
 384.376 -    private static int lineEnd(String code, int o) {
 384.377 -        while (o < code.length() - 1 && code.charAt(o) != '\n') {
 384.378 -            o++;
 384.379 -        }
 384.380 -
 384.381 -        return o;
 384.382 -    }
 384.383 -
 384.384 -    private static int contextLength(String in) {
 384.385 -        return in.replaceAll("\n[ \t]*\n", "\n").trim().split("\n").length;
 384.386 -    }
 384.387 -
 384.388 -    @SuppressWarnings("unchecked")
 384.389 -    private List<Map<String, String>> loadExamples() throws IOException, URISyntaxException {
 384.390 -        return Pojson.load(LinkedList.class, new URI("http://localhost:9998/index/examples"));
 384.391 -    }
 384.392 -
 384.393 -    private static String processTemplate(String template, Map<String, Object> configurationData) throws TemplateException, IOException {
 384.394 -        Configuration conf = new Configuration();
 384.395 -
 384.396 -        conf.setTemplateLoader(new TemplateLoaderImpl());
 384.397 -
 384.398 -        Template templ = conf.getTemplate(template);
 384.399 -        StringWriter out = new StringWriter();
 384.400 -
 384.401 -        templ.process(configurationData, out);
 384.402 -
 384.403 -        return out.toString();
 384.404 -    }
 384.405 -
 384.406 -    private static final class TemplateLoaderImpl implements TemplateLoader {
 384.407 -
 384.408 -        public Object findTemplateSource(String name) throws IOException {
 384.409 -            return TemplateLoaderImpl.class.getResourceAsStream(name);
 384.410 -        }
 384.411 -
 384.412 -        public long getLastModified(Object templateSource) {
 384.413 -            return 0L;
 384.414 -        }
 384.415 -
 384.416 -        public Reader getReader(Object templateSource, String encoding) throws IOException {
 384.417 -            InputStream in = (InputStream) templateSource;
 384.418 -
 384.419 -            return new InputStreamReader(in);
 384.420 -        }
 384.421 -
 384.422 -        public void closeTemplateSource(Object templateSource) throws IOException {
 384.423 -        }
 384.424 -    }
 384.425 -
 384.426 -}
   385.1 --- a/sandbox/attributed-index-web/ui-apply.html	Mon Dec 19 11:37:36 2016 +0100
   385.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   385.3 @@ -1,68 +0,0 @@
   385.4 -<html>
   385.5 -<head>
   385.6 -    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
   385.7 -<#if results??>
   385.8 -    <script type="text/javascript">
   385.9 -        $(document).ready(function() {
  385.10 -            $('#list').find('dd').hide().end().find('dt').click(function() {
  385.11 -                current_dd=$(this).next();
  385.12 -                //XXX: will do the AJAX call for both show and hide!
  385.13 -                $.get("snippet?path=${selectedPath}&relative=" + current_dd.attr("id") + "&pattern=${patternEscaped}",function(data) {
  385.14 -                    current_dd.html(data).slideToggle();
  385.15 -                })
  385.16 -            });
  385.17 -        });
  385.18 -    </script>
  385.19 -</#if>
  385.20 -    <style type="text/css">
  385.21 -        .occurrence {background: #DDDD00;}
  385.22 -        .diff-removed {color: #FF0000;}
  385.23 -        .diff-added {color: #00FF00;}
  385.24 -        .diff-index {color: #0000FF;}
  385.25 -        .diff-hunk {color: #FF00FF;}
  385.26 -    </style>
  385.27 -</head>
  385.28 -<body>
  385.29 -<form method="get">
  385.30 -
  385.31 -<label for="path">Project:</label>
  385.32 -<select size="1" name="path">");
  385.33 -    <#list paths as path>
  385.34 -        <option <#if selectedPath?? && path.segment == selectedPath>selected</#if> value="${path.segment}">
  385.35 -            ${path.displayName}
  385.36 -        </option>
  385.37 -    </#list>
  385.38 -</select>
  385.39 -<br>
  385.40 -<label for="pattern">Pattern:</label><br>
  385.41 -<textarea rows="10" cols="40" name="pattern">
  385.42 -<#if pattern??>
  385.43 -${pattern}
  385.44 -</#if>
  385.45 -</textarea><br>
  385.46 -<input type="submit" name="preview" value="Show diff preview"/><input type="submit" name="download" value="Download diff"/>
  385.47 -</form>
  385.48 -
  385.49 -<div class="examples">
  385.50 -<#if examples??>
  385.51 -    Examples:
  385.52 -    <dl id="examples-list">
  385.53 -        <#list examples as example>
  385.54 -            <dt>${example.displayName}</dt>
  385.55 -            <dd><pre>${example.pattern}</pre>
  385.56 -            </dd>
  385.57 -        </#list>
  385.58 -    </dl>
  385.59 -</#if>
  385.60 -</div>
  385.61 -
  385.62 -<#if result??>
  385.63 -    Diff for rule: ${pattern}
  385.64 -<pre>${result}</pre>
  385.65 -</#if>
  385.66 -
  385.67 -<#if statistics??>
  385.68 -     Query time: ${statistics.queryTime}ms, matching files: ${statistics.files}.
  385.69 -</#if>
  385.70 -</body>
  385.71 -</html>
   386.1 --- a/sandbox/attributed-index-web/ui-cat.html	Mon Dec 19 11:37:36 2016 +0100
   386.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   386.3 @@ -1,10 +0,0 @@
   386.4 -<html>
   386.5 -<head>
   386.6 -    <style type="text/css">
   386.7 -        .occurrence {BACKGROUND: #DDDD00;}
   386.8 -    </style>
   386.9 -</head>
  386.10 -<body>
  386.11 -<pre><#list occurrences as occurrence>${occurrence.prefix}<span class="occurrence">${occurrence.occurrence}</span></#list>${suffix}</pre>
  386.12 -</body>
  386.13 -</html>
   387.1 --- a/sandbox/attributed-index-web/ui-findType.html	Mon Dec 19 11:37:36 2016 +0100
   387.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   387.3 @@ -1,28 +0,0 @@
   387.4 -<html>
   387.5 -<head>
   387.6 -    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
   387.7 -</head>
   387.8 -<body>
   387.9 -<form method="get">
  387.10 -<label for="path">Project:</label>
  387.11 -<select size="1" name="path">");
  387.12 -    <#list paths as path>
  387.13 -        <option <#if selectedPath?? && path.segment == selectedPath>selected</#if> value="${path.segment}">
  387.14 -            ${path.displayName}
  387.15 -        </option>
  387.16 -    </#list>
  387.17 -</select>
  387.18 -<br>
  387.19 -<label for="prefix">Type Name:</label><input type="text" name="prefix"<#if prefix??>value="${prefix}"</#if>/><br>
  387.20 -<input type="submit" name="Find Candidates"/>
  387.21 -</form>
  387.22 -
  387.23 -<#if results??>
  387.24 -    Found types:<br>
  387.25 -    <#list results as result>
  387.26 -        <a href="/index/ui/show?path=${selectedPath}&relative=${result.relativePath}">${result.fqn}</a><br>
  387.27 -    </#list>
  387.28 -</#if>
  387.29 -
  387.30 -</body>
  387.31 -</html>
   388.1 --- a/sandbox/attributed-index-web/ui-search.html	Mon Dec 19 11:37:36 2016 +0100
   388.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   388.3 @@ -1,70 +0,0 @@
   388.4 -<html>
   388.5 -<head>
   388.6 -    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
   388.7 -<#if results??>
   388.8 -    <script type="text/javascript">
   388.9 -        $(document).ready(function() {
  388.10 -            $('#list').find('dd').hide().end().find('dt').click(function() {
  388.11 -                current_dd=$(this).next();
  388.12 -                //XXX: will do the AJAX call for both show and hide!
  388.13 -                $.get("snippet?path=${selectedPath}&relative=" + current_dd.attr("id") + "&pattern=${patternEscaped}",function(data) {
  388.14 -                    current_dd.html(data).slideToggle();
  388.15 -                })
  388.16 -            });
  388.17 -        });
  388.18 -    </script>
  388.19 -</#if>
  388.20 -    <style type="text/css">
  388.21 -        .occurrence {BACKGROUND: #DDDD00;}
  388.22 -    </style>
  388.23 -</head>
  388.24 -<body>
  388.25 -<form method="get">
  388.26 -
  388.27 -<label for="path">Project:</label>
  388.28 -<select size="1" name="path">");
  388.29 -    <#list paths as path>
  388.30 -        <option <#if selectedPath?? && path.segment == selectedPath>selected</#if> value="${path.segment}">
  388.31 -            ${path.displayName}
  388.32 -        </option>
  388.33 -    </#list>
  388.34 -</select>
  388.35 -<br>
  388.36 -<label for="pattern">Pattern:</label><br>
  388.37 -<textarea rows="10" cols="40" name="pattern">
  388.38 -<#if pattern??>
  388.39 -${pattern}
  388.40 -</#if>
  388.41 -</textarea><br>
  388.42 -<input type="submit" name="Find Candidates"/>
  388.43 -</form>
  388.44 -
  388.45 -<div class="examples">
  388.46 -<#if examples??>
  388.47 -    Examples:
  388.48 -    <dl id="examples-list">
  388.49 -        <#list examples as example>
  388.50 -            <dt>${example.displayName}</dt>
  388.51 -            <dd><pre>${example.pattern}</pre>
  388.52 -            </dd>
  388.53 -        </#list>
  388.54 -    </dl>
  388.55 -</#if>
  388.56 -</div>
  388.57 -
  388.58 -<#if results??>
  388.59 -    Found candidates for pattern: ${pattern}
  388.60 -    <dl id="list">
  388.61 -        <#list results as result>
  388.62 -            <dt>${result.relativePath}<a href="/index/ui/show?path=${selectedPath}&relative=${result.relativePath}&pattern=${patternEscaped}">show</a></dt>
  388.63 -            <dd id="${result.relativePath}">
  388.64 -            </dd>
  388.65 -        </#list>
  388.66 -    </dl>
  388.67 -</#if>
  388.68 -
  388.69 -<#if statistics??>
  388.70 -     Query time: ${statistics.queryTime}ms, matching files: ${statistics.files}.
  388.71 -</#if>
  388.72 -</body>
  388.73 -</html>
   389.1 --- a/sandbox/attributed-index-web/ui-snippet.html	Mon Dec 19 11:37:36 2016 +0100
   389.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   389.3 @@ -1,7 +0,0 @@
   389.4 -<#if snippets??>
   389.5 -    <#list snippets as snippet>
   389.6 -        <pre>${snippet.prefix}<span class="occurrence">${snippet.occurrence}</span>${snippet.suffix}</pre><br>
   389.7 -    </#list>
   389.8 -<#else>
   389.9 -    No occurrences.
  389.10 -</#if>
   390.1 --- a/sandbox/java.hints/build.sh	Mon Dec 19 11:37:36 2016 +0100
   390.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   390.3 @@ -1,3 +0,0 @@
   390.4 -#!/bin/bash
   390.5 -ant "$@" clean && ant "$@" nbms && ant "$@" test || exit 1
   390.6 -
   391.1 --- a/sandbox/java.hints/build.xml	Mon Dec 19 11:37:36 2016 +0100
   391.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   391.3 @@ -1,8 +0,0 @@
   391.4 -<?xml version="1.0" encoding="UTF-8"?>
   391.5 -<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
   391.6 -<!-- for some information on what you could do (e.g. targets to override). -->
   391.7 -<!-- If you delete this file and reopen the project it will be recreated. -->
   391.8 -<project name="java.hints" basedir=".">
   391.9 -    <description>Builds the module suite java.hints.</description>
  391.10 -    <import file="nbproject/build-impl.xml"/>
  391.11 -</project>
   392.1 --- a/sandbox/java.hints/hintsimpl/build.xml	Mon Dec 19 11:37:36 2016 +0100
   392.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   392.3 @@ -1,8 +0,0 @@
   392.4 -<?xml version="1.0" encoding="UTF-8"?>
   392.5 -<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
   392.6 -<!-- for some information on what you could do (e.g. targets to override). -->
   392.7 -<!-- If you delete this file and reopen the project it will be recreated. -->
   392.8 -<project name="org.netbeans.modules.jackpot30.hintsimpl" default="netbeans" basedir=".">
   392.9 -    <description>Builds, tests, and runs the project org.netbeans.modules.jackpot30.hintsimpl.</description>
  392.10 -    <import file="nbproject/build-impl.xml"/>
  392.11 -</project>
   393.1 --- a/sandbox/java.hints/hintsimpl/manifest.mf	Mon Dec 19 11:37:36 2016 +0100
   393.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   393.3 @@ -1,5 +0,0 @@
   393.4 -Manifest-Version: 1.0
   393.5 -OpenIDE-Module: org.netbeans.modules.jackpot30.hintsimpl
   393.6 -OpenIDE-Module-Implementation-Version: 1
   393.7 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jackpot30/hintsimpl/Bundle.properties
   393.8 -
   394.1 --- a/sandbox/java.hints/hintsimpl/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   394.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   394.3 @@ -1,45 +0,0 @@
   394.4 -<?xml version="1.0" encoding="UTF-8"?>
   394.5 -<!--
   394.6 -*** GENERATED FROM project.xml - DO NOT EDIT  ***
   394.7 -***         EDIT ../build.xml INSTEAD         ***
   394.8 --->
   394.9 -<project name="org.netbeans.modules.jackpot30.hintsimpl-impl" basedir="..">
  394.10 -    <fail message="Please build using Ant 1.7.1 or higher.">
  394.11 -        <condition>
  394.12 -            <not>
  394.13 -                <antversion atleast="1.7.1"/>
  394.14 -            </not>
  394.15 -        </condition>
  394.16 -    </fail>
  394.17 -    <property file="nbproject/private/suite-private.properties"/>
  394.18 -    <property file="nbproject/suite.properties"/>
  394.19 -    <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
  394.20 -    <property file="${suite.dir}/nbproject/private/platform-private.properties"/>
  394.21 -    <property file="${suite.dir}/nbproject/platform.properties"/>
  394.22 -    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
  394.23 -        <attribute name="name"/>
  394.24 -        <attribute name="value"/>
  394.25 -        <sequential>
  394.26 -            <property name="@{name}" value="${@{value}}"/>
  394.27 -        </sequential>
  394.28 -    </macrodef>
  394.29 -    <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
  394.30 -        <attribute name="property"/>
  394.31 -        <attribute name="value"/>
  394.32 -        <sequential>
  394.33 -            <property name="@{property}" value="@{value}"/>
  394.34 -        </sequential>
  394.35 -    </macrodef>
  394.36 -    <property file="${user.properties.file}"/>
  394.37 -    <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  394.38 -    <nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  394.39 -    <nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  394.40 -    <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
  394.41 -        <condition>
  394.42 -            <not>
  394.43 -                <contains string="${cluster.path.evaluated}" substring="platform"/>
  394.44 -            </not>
  394.45 -        </condition>
  394.46 -    </fail>
  394.47 -    <import file="${harness.dir}/build.xml"/>
  394.48 -</project>
   395.1 --- a/sandbox/java.hints/hintsimpl/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   395.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   395.3 @@ -1,8 +0,0 @@
   395.4 -build.xml.data.CRC32=52580c5f
   395.5 -build.xml.script.CRC32=ef577a91
   395.6 -build.xml.stylesheet.CRC32=a56c6a5b@2.70
   395.7 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   395.8 -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   395.9 -nbproject/build-impl.xml.data.CRC32=52580c5f
  395.10 -nbproject/build-impl.xml.script.CRC32=9204f652
  395.11 -nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.70
   396.1 --- a/sandbox/java.hints/hintsimpl/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   396.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   396.3 @@ -1,5 +0,0 @@
   396.4 -javac.source=1.7
   396.5 -javac.compilerargs=-Xlint -Xlint:-serial
   396.6 -requires.nb.javac=true
   396.7 -spec.version.base=1.0
   396.8 -test.runner=junit
   397.1 --- a/sandbox/java.hints/hintsimpl/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   397.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   397.3 @@ -1,232 +0,0 @@
   397.4 -<?xml version="1.0" encoding="UTF-8"?>
   397.5 -<project xmlns="http://www.netbeans.org/ns/project/1">
   397.6 -    <type>org.netbeans.modules.apisupport.project</type>
   397.7 -    <configuration>
   397.8 -        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
   397.9 -            <code-name-base>org.netbeans.modules.jackpot30.hintsimpl</code-name-base>
  397.10 -            <suite-component/>
  397.11 -            <module-dependencies>
  397.12 -                <dependency>
  397.13 -                    <code-name-base>org.netbeans.api.annotations.common</code-name-base>
  397.14 -                    <build-prerequisite/>
  397.15 -                    <compile-dependency/>
  397.16 -                    <run-dependency>
  397.17 -                        <release-version>1</release-version>
  397.18 -                        <specification-version>1.20</specification-version>
  397.19 -                    </run-dependency>
  397.20 -                </dependency>
  397.21 -                <dependency>
  397.22 -                    <code-name-base>org.netbeans.api.java.classpath</code-name-base>
  397.23 -                    <build-prerequisite/>
  397.24 -                    <compile-dependency/>
  397.25 -                    <run-dependency>
  397.26 -                        <release-version>1</release-version>
  397.27 -                        <specification-version>1.39</specification-version>
  397.28 -                    </run-dependency>
  397.29 -                </dependency>
  397.30 -                <dependency>
  397.31 -                    <code-name-base>org.netbeans.libs.javacapi</code-name-base>
  397.32 -                    <build-prerequisite/>
  397.33 -                    <compile-dependency/>
  397.34 -                    <run-dependency>
  397.35 -                        <specification-version>8.4.0.3</specification-version>
  397.36 -                    </run-dependency>
  397.37 -                </dependency>
  397.38 -                <dependency>
  397.39 -                    <code-name-base>org.netbeans.modules.java.hints</code-name-base>
  397.40 -                    <build-prerequisite/>
  397.41 -                    <compile-dependency/>
  397.42 -                    <run-dependency>
  397.43 -                        <release-version>1</release-version>
  397.44 -                        <implementation-version/>
  397.45 -                    </run-dependency>
  397.46 -                </dependency>
  397.47 -                <dependency>
  397.48 -                    <code-name-base>org.netbeans.modules.java.source</code-name-base>
  397.49 -                    <build-prerequisite/>
  397.50 -                    <compile-dependency/>
  397.51 -                    <run-dependency>
  397.52 -                        <specification-version>0.124.0.24.1.23.6</specification-version>
  397.53 -                    </run-dependency>
  397.54 -                </dependency>
  397.55 -                <dependency>
  397.56 -                    <code-name-base>org.netbeans.modules.java.source.base</code-name-base>
  397.57 -                    <build-prerequisite/>
  397.58 -                    <compile-dependency/>
  397.59 -                    <run-dependency>
  397.60 -                        <specification-version>2.4.1.2.25.8.1</specification-version>
  397.61 -                    </run-dependency>
  397.62 -                </dependency>
  397.63 -                <dependency>
  397.64 -                    <code-name-base>org.netbeans.modules.java.sourceui</code-name-base>
  397.65 -                    <build-prerequisite/>
  397.66 -                    <compile-dependency/>
  397.67 -                    <run-dependency>
  397.68 -                        <release-version>1</release-version>
  397.69 -                        <specification-version>1.33.0.1.25</specification-version>
  397.70 -                    </run-dependency>
  397.71 -                </dependency>
  397.72 -                <dependency>
  397.73 -                    <code-name-base>org.netbeans.modules.queries</code-name-base>
  397.74 -                    <build-prerequisite/>
  397.75 -                    <compile-dependency/>
  397.76 -                    <run-dependency>
  397.77 -                        <release-version>1</release-version>
  397.78 -                        <specification-version>1.36</specification-version>
  397.79 -                    </run-dependency>
  397.80 -                </dependency>
  397.81 -                <dependency>
  397.82 -                    <code-name-base>org.netbeans.modules.refactoring.api</code-name-base>
  397.83 -                    <build-prerequisite/>
  397.84 -                    <compile-dependency/>
  397.85 -                    <run-dependency>
  397.86 -                        <specification-version>1.37.0.1</specification-version>
  397.87 -                    </run-dependency>
  397.88 -                </dependency>
  397.89 -                <dependency>
  397.90 -                    <code-name-base>org.netbeans.modules.refactoring.java</code-name-base>
  397.91 -                    <build-prerequisite/>
  397.92 -                    <compile-dependency/>
  397.93 -                    <run-dependency>
  397.94 -                        <release-version>1</release-version>
  397.95 -                        <implementation-version/>
  397.96 -                    </run-dependency>
  397.97 -                </dependency>
  397.98 -                <dependency>
  397.99 -                    <code-name-base>org.netbeans.spi.editor.hints</code-name-base>
 397.100 -                    <build-prerequisite/>
 397.101 -                    <compile-dependency/>
 397.102 -                    <run-dependency>
 397.103 -                        <release-version>0</release-version>
 397.104 -                        <specification-version>1.31.0.7.42</specification-version>
 397.105 -                    </run-dependency>
 397.106 -                </dependency>
 397.107 -                <dependency>
 397.108 -                    <code-name-base>org.netbeans.spi.java.hints</code-name-base>
 397.109 -                    <build-prerequisite/>
 397.110 -                    <compile-dependency/>
 397.111 -                    <run-dependency>
 397.112 -                        <specification-version>2.0</specification-version>
 397.113 -                    </run-dependency>
 397.114 -                </dependency>
 397.115 -                <dependency>
 397.116 -                    <code-name-base>org.openide.awt</code-name-base>
 397.117 -                    <build-prerequisite/>
 397.118 -                    <compile-dependency/>
 397.119 -                    <run-dependency>
 397.120 -                        <specification-version>7.59</specification-version>
 397.121 -                    </run-dependency>
 397.122 -                </dependency>
 397.123 -                <dependency>
 397.124 -                    <code-name-base>org.openide.filesystems</code-name-base>
 397.125 -                    <build-prerequisite/>
 397.126 -                    <compile-dependency/>
 397.127 -                    <run-dependency>
 397.128 -                        <specification-version>8.8</specification-version>
 397.129 -                    </run-dependency>
 397.130 -                </dependency>
 397.131 -                <dependency>
 397.132 -                    <code-name-base>org.openide.loaders</code-name-base>
 397.133 -                    <build-prerequisite/>
 397.134 -                    <compile-dependency/>
 397.135 -                    <run-dependency>
 397.136 -                        <specification-version>7.50</specification-version>
 397.137 -                    </run-dependency>
 397.138 -                </dependency>
 397.139 -                <dependency>
 397.140 -                    <code-name-base>org.openide.nodes</code-name-base>
 397.141 -                    <build-prerequisite/>
 397.142 -                    <compile-dependency/>
 397.143 -                    <run-dependency>
 397.144 -                        <specification-version>7.36</specification-version>
 397.145 -                    </run-dependency>
 397.146 -                </dependency>
 397.147 -                <dependency>
 397.148 -                    <code-name-base>org.openide.text</code-name-base>
 397.149 -                    <build-prerequisite/>
 397.150 -                    <compile-dependency/>
 397.151 -                    <run-dependency>
 397.152 -                        <specification-version>6.57</specification-version>
 397.153 -                    </run-dependency>
 397.154 -                </dependency>
 397.155 -                <dependency>
 397.156 -                    <code-name-base>org.openide.util</code-name-base>
 397.157 -                    <build-prerequisite/>
 397.158 -                    <compile-dependency/>
 397.159 -                    <run-dependency>
 397.160 -                        <specification-version>8.32</specification-version>
 397.161 -                    </run-dependency>
 397.162 -                </dependency>
 397.163 -                <dependency>
 397.164 -                    <code-name-base>org.openide.util.lookup</code-name-base>
 397.165 -                    <build-prerequisite/>
 397.166 -                    <compile-dependency/>
 397.167 -                    <run-dependency>
 397.168 -                        <specification-version>8.22</specification-version>
 397.169 -                    </run-dependency>
 397.170 -                </dependency>
 397.171 -                <dependency>
 397.172 -                    <code-name-base>org.openide.util.ui</code-name-base>
 397.173 -                    <build-prerequisite/>
 397.174 -                    <compile-dependency/>
 397.175 -                    <run-dependency>
 397.176 -                        <specification-version>9.3</specification-version>
 397.177 -                    </run-dependency>
 397.178 -                </dependency>
 397.179 -                <dependency>
 397.180 -                    <code-name-base>org.openide.windows</code-name-base>
 397.181 -                    <build-prerequisite/>
 397.182 -                    <compile-dependency/>
 397.183 -                    <run-dependency>
 397.184 -                        <specification-version>6.64</specification-version>
 397.185 -                    </run-dependency>
 397.186 -                </dependency>
 397.187 -            </module-dependencies>
 397.188 -            <test-dependencies>
 397.189 -                <test-type>
 397.190 -                    <name>unit</name>
 397.191 -                    <test-dependency>
 397.192 -                        <code-name-base>org.netbeans.libs.junit4</code-name-base>
 397.193 -                        <compile-dependency/>
 397.194 -                    </test-dependency>
 397.195 -                    <test-dependency>
 397.196 -                        <code-name-base>org.netbeans.libs.testng</code-name-base>
 397.197 -                        <compile-dependency/>
 397.198 -                    </test-dependency>
 397.199 -                    <test-dependency>
 397.200 -                        <code-name-base>org.netbeans.modules.editor.mimelookup.impl</code-name-base>
 397.201 -                        <compile-dependency/>
 397.202 -                    </test-dependency>
 397.203 -                    <test-dependency>
 397.204 -                        <code-name-base>org.netbeans.modules.jackpot30.test.borrowed</code-name-base>
 397.205 -                        <compile-dependency/>
 397.206 -                    </test-dependency>
 397.207 -                    <test-dependency>
 397.208 -                        <code-name-base>org.netbeans.modules.java.editor</code-name-base>
 397.209 -                        <recursive/>
 397.210 -                        <compile-dependency/>
 397.211 -                    </test-dependency>
 397.212 -                    <test-dependency>
 397.213 -                        <code-name-base>org.netbeans.modules.java.hints.test</code-name-base>
 397.214 -                        <recursive/>
 397.215 -                        <compile-dependency/>
 397.216 -                    </test-dependency>
 397.217 -                    <test-dependency>
 397.218 -                        <code-name-base>org.netbeans.modules.parsing.nb</code-name-base>
 397.219 -                        <compile-dependency/>
 397.220 -                    </test-dependency>
 397.221 -                    <test-dependency>
 397.222 -                        <code-name-base>org.netbeans.modules.projectapi.nb</code-name-base>
 397.223 -                        <compile-dependency/>
 397.224 -                    </test-dependency>
 397.225 -                    <test-dependency>
 397.226 -                        <code-name-base>org.netbeans.spi.java.hints</code-name-base>
 397.227 -                        <compile-dependency/>
 397.228 -                        <test/>
 397.229 -                    </test-dependency>
 397.230 -                </test-type>
 397.231 -            </test-dependencies>
 397.232 -            <public-packages/>
 397.233 -        </data>
 397.234 -    </configuration>
 397.235 -</project>
   398.1 --- a/sandbox/java.hints/hintsimpl/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   398.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   398.3 @@ -1,1 +0,0 @@
   398.4 -suite.dir=${basedir}/..
   399.1 --- a/sandbox/java.hints/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   399.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   399.3 @@ -1,1 +0,0 @@
   399.4 -OpenIDE-Module-Name=Jackpot 3.0 Experimental Hints Impl
   400.1 --- a/sandbox/java.hints/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/GlobalyUnused.java	Mon Dec 19 11:37:36 2016 +0100
   400.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   400.3 @@ -1,120 +0,0 @@
   400.4 -/*
   400.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   400.6 - *
   400.7 - * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
   400.8 - *
   400.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  400.10 - * Other names may be trademarks of their respective owners.
  400.11 - *
  400.12 - * The contents of this file are subject to the terms of either the GNU
  400.13 - * General Public License Version 2 only ("GPL") or the Common
  400.14 - * Development and Distribution License("CDDL") (collectively, the
  400.15 - * "License"). You may not use this file except in compliance with the
  400.16 - * License. You can obtain a copy of the License at
  400.17 - * http://www.netbeans.org/cddl-gplv2.html
  400.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  400.19 - * specific language governing permissions and limitations under the
  400.20 - * License.  When distributing the software, include this License Header
  400.21 - * Notice in each file and include the License file at
  400.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  400.23 - * particular file as subject to the "Classpath" exception as provided
  400.24 - * by Oracle in the GPL Version 2 section of the License file that
  400.25 - * accompanied this code. If applicable, add the following below the
  400.26 - * License Header, with the fields enclosed by brackets [] replaced by
  400.27 - * your own identifying information:
  400.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  400.29 - *
  400.30 - * If you wish your version of this file to be governed by only the CDDL
  400.31 - * or only the GPL Version 2, indicate your decision by adding
  400.32 - * "[Contributor] elects to include this software in this distribution
  400.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  400.34 - * single choice of license, a recipient has the option to distribute
  400.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  400.36 - * to extend the choice of license to its licensees as provided above.
  400.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  400.38 - * Version 2 license, then the option applies only if the new code is
  400.39 - * made subject to such option by the copyright holder.
  400.40 - *
  400.41 - * Contributor(s):
  400.42 - *
  400.43 - * Portions Copyrighted 2013 Sun Microsystems, Inc.
  400.44 - */
  400.45 -package org.netbeans.modules.jackpot30.hintsimpl;
  400.46 -
  400.47 -import com.sun.source.tree.Tree.Kind;
  400.48 -import javax.lang.model.element.Element;
  400.49 -import javax.lang.model.element.ElementKind;
  400.50 -import javax.lang.model.type.TypeKind;
  400.51 -import org.netbeans.api.java.source.TreePathHandle;
  400.52 -import org.netbeans.spi.editor.hints.ErrorDescription;
  400.53 -import org.netbeans.spi.java.hints.Decision;
  400.54 -import org.netbeans.spi.java.hints.Decision.Factory;
  400.55 -import org.netbeans.spi.java.hints.ErrorDescriptionFactory;
  400.56 -import org.netbeans.spi.java.hints.Hint;
  400.57 -import org.netbeans.spi.java.hints.HintContext;
  400.58 -import org.netbeans.spi.java.hints.TriggerDecision;
  400.59 -import org.netbeans.spi.java.hints.TriggerTreeKind;
  400.60 -
  400.61 -/**
  400.62 - *
  400.63 - * @author lahvac
  400.64 - */
  400.65 -@Hint(displayName="Unused", description="Unused", category="general")
  400.66 -public class GlobalyUnused {
  400.67 -    
  400.68 -    @TriggerTreeKind({Kind.IDENTIFIER, Kind.MEMBER_SELECT})
  400.69 -    public static ErrorDescription usage(HintContext ctx) {
  400.70 -        DecisionImpl d = decisionOrNull(ctx);
  400.71 -        
  400.72 -        if (d != null) {
  400.73 -            System.err.println("recording usage");
  400.74 -            d.recordLocalFact(ctx.getInfo(), null);
  400.75 -        }
  400.76 -        
  400.77 -        return null;
  400.78 -    }
  400.79 -    
  400.80 -    @TriggerTreeKind({Kind.CLASS})
  400.81 -    public static ErrorDescription declaration(HintContext ctx) {
  400.82 -        decisionOrNull(ctx);
  400.83 -        return null;
  400.84 -    }
  400.85 -    
  400.86 -    @TriggerDecision(DecisionImpl.class)
  400.87 -    public static ErrorDescription produceWarning(HintContext ctx) {
  400.88 -        if (((DecisionImpl) ctx.decision).getCurrentResult() != Boolean.TRUE) {
  400.89 -            return ErrorDescriptionFactory.forName(ctx, ctx.getPath(), "Unused");
  400.90 -        }
  400.91 -        
  400.92 -        return null;
  400.93 -    }
  400.94 -    
  400.95 -    private static DecisionImpl decisionOrNull(HintContext ctx) {
  400.96 -        Element el = ctx.getInfo().getTrees().getElement(ctx.getPath());
  400.97 -        
  400.98 -        if (el == null || (el.asType() != null && el.asType().getKind() == TypeKind.ERROR) || el.getKind() != ElementKind.CLASS) return null;
  400.99 -        
 400.100 -        TreePathHandle h = TreePathHandle.create(el, ctx.getInfo());
 400.101 -        
 400.102 -        System.err.println("decision for: " + el);
 400.103 -        return ctx.findDecision(h, new Factory<Void, Boolean, DecisionImpl>(DecisionImpl.class) {
 400.104 -            @Override
 400.105 -            public DecisionImpl create(TreePathHandle handle) {
 400.106 -                return new DecisionImpl(handle);
 400.107 -            }
 400.108 -        });
 400.109 -    }
 400.110 -    
 400.111 -    private static final class DecisionImpl extends Decision<Void, Boolean> {
 400.112 -
 400.113 -        public DecisionImpl(TreePathHandle root) {
 400.114 -            super(root);
 400.115 -        }
 400.116 -
 400.117 -        @Override
 400.118 -        protected Boolean makeDecision(Iterable<? extends Void> input) {
 400.119 -            return input.iterator().hasNext();
 400.120 -        }
 400.121 -        
 400.122 -    }
 400.123 -}
   401.1 --- a/sandbox/java.hints/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/NonPrivateMakeFinal.java	Mon Dec 19 11:37:36 2016 +0100
   401.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   401.3 @@ -1,152 +0,0 @@
   401.4 -/*
   401.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   401.6 - *
   401.7 - * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
   401.8 - *
   401.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  401.10 - * Other names may be trademarks of their respective owners.
  401.11 - *
  401.12 - * The contents of this file are subject to the terms of either the GNU
  401.13 - * General Public License Version 2 only ("GPL") or the Common
  401.14 - * Development and Distribution License("CDDL") (collectively, the
  401.15 - * "License"). You may not use this file except in compliance with the
  401.16 - * License. You can obtain a copy of the License at
  401.17 - * http://www.netbeans.org/cddl-gplv2.html
  401.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  401.19 - * specific language governing permissions and limitations under the
  401.20 - * License.  When distributing the software, include this License Header
  401.21 - * Notice in each file and include the License file at
  401.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  401.23 - * particular file as subject to the "Classpath" exception as provided
  401.24 - * by Oracle in the GPL Version 2 section of the License file that
  401.25 - * accompanied this code. If applicable, add the following below the
  401.26 - * License Header, with the fields enclosed by brackets [] replaced by
  401.27 - * your own identifying information:
  401.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  401.29 - *
  401.30 - * If you wish your version of this file to be governed by only the CDDL
  401.31 - * or only the GPL Version 2, indicate your decision by adding
  401.32 - * "[Contributor] elects to include this software in this distribution
  401.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  401.34 - * single choice of license, a recipient has the option to distribute
  401.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  401.36 - * to extend the choice of license to its licensees as provided above.
  401.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  401.38 - * Version 2 license, then the option applies only if the new code is
  401.39 - * made subject to such option by the copyright holder.
  401.40 - *
  401.41 - * Contributor(s):
  401.42 - *
  401.43 - * Portions Copyrighted 2013 Sun Microsystems, Inc.
  401.44 - */
  401.45 -package org.netbeans.modules.jackpot30.hintsimpl;
  401.46 -
  401.47 -import com.sun.source.tree.Tree.Kind;
  401.48 -import com.sun.source.tree.VariableTree;
  401.49 -import com.sun.source.util.TreePath;
  401.50 -import java.util.EnumSet;
  401.51 -import javax.lang.model.element.Element;
  401.52 -import javax.lang.model.element.ElementKind;
  401.53 -import javax.lang.model.element.Modifier;
  401.54 -import javax.lang.model.element.VariableElement;
  401.55 -import org.netbeans.api.annotations.common.NonNull;
  401.56 -import org.netbeans.api.java.source.TreePathHandle;
  401.57 -import org.netbeans.modules.java.hints.introduce.Flow;
  401.58 -import org.netbeans.modules.java.hints.introduce.Flow.FlowResult;
  401.59 -import org.netbeans.spi.editor.hints.ErrorDescription;
  401.60 -import org.netbeans.spi.editor.hints.Fix;
  401.61 -import org.netbeans.spi.java.hints.Decision;
  401.62 -import org.netbeans.spi.java.hints.Decision.Factory;
  401.63 -import org.netbeans.spi.java.hints.ErrorDescriptionFactory;
  401.64 -import org.netbeans.spi.java.hints.Hint;
  401.65 -import org.netbeans.spi.java.hints.HintContext;
  401.66 -import org.netbeans.spi.java.hints.TriggerDecision;
  401.67 -import org.netbeans.spi.java.hints.TriggerPattern;
  401.68 -import org.netbeans.spi.java.hints.TriggerTreeKind;
  401.69 -import org.netbeans.spi.java.hints.support.FixFactory;
  401.70 -import org.openide.util.NbBundle.Messages;
  401.71 -
  401.72 -/**
  401.73 - *
  401.74 - * @author lahvac
  401.75 - */
  401.76 -@Hint(displayName="Non Private Make Final", description="Non Private Make Final", category="general")
  401.77 -public class NonPrivateMakeFinal {
  401.78 -
  401.79 -    @TriggerPattern("$variable = $value")
  401.80 -    public static ErrorDescription write(HintContext ctx) {
  401.81 -        Element field = ctx.getInfo().getTrees().getElement(ctx.getVariables().get("$variable"));
  401.82 -
  401.83 -        if (field == null || field.getKind() != ElementKind.FIELD) {
  401.84 -            //unknown, or not a field, ignore.
  401.85 -            return null;
  401.86 -        }
  401.87 -
  401.88 -        if (ctx.getInfo().getTopLevelElements().contains(ctx.getInfo().getElementUtilities().outermostTypeElement(field))) {
  401.89 -            //field in current CU, ignore (will be handled by local flow)
  401.90 -            return null;
  401.91 -        }
  401.92 -
  401.93 -        decision(ctx, (VariableElement) field).recordLocalFact(ctx.getInfo(), false);
  401.94 -        
  401.95 -        return null;
  401.96 -    }
  401.97 -    
  401.98 -    @TriggerTreeKind({Kind.VARIABLE})
  401.99 -    public static ErrorDescription declaration(HintContext ctx) {
 401.100 -        Element ve = ctx.getInfo().getTrees().getElement(ctx.getPath());
 401.101 -
 401.102 -        if (ve == null || ve.getKind() != ElementKind.FIELD || ve.getModifiers().contains(Modifier.FINAL) || /*TODO: the point of volatile?*/ve.getModifiers().contains(Modifier.VOLATILE)) return null;
 401.103 -
 401.104 -        //handle all fields, even the private ones, which are handled by the standard hints.
 401.105 -        
 401.106 -        FlowResult flow = Flow.assignmentsForUse(ctx);
 401.107 -
 401.108 -        if (flow == null || ctx.isCanceled()) return null;
 401.109 -
 401.110 -        DecisionImpl decision = decision(ctx, (VariableElement) ve);
 401.111 -
 401.112 -        decision.recordLocalFact(ctx.getInfo(), flow.getFinalCandidates().contains((VariableElement) ve));
 401.113 -
 401.114 -        return null;
 401.115 -    }
 401.116 -    
 401.117 -    @TriggerDecision(DecisionImpl.class)
 401.118 -    @Messages("FIX_CanBeFinal={0} can be final")
 401.119 -    public static ErrorDescription produceWarning(HintContext ctx) {
 401.120 -        if (((DecisionImpl) ctx.decision).getCurrentResult() == Boolean.TRUE) {
 401.121 -            VariableTree vt = (VariableTree) ctx.getPath().getLeaf();
 401.122 -            Fix fix = FixFactory.addModifiersFix(ctx.getInfo(), new TreePath(ctx.getPath(), vt.getModifiers()), EnumSet.of(Modifier.FINAL), Bundle.FIX_CanBeFinal(vt.getName().toString()));
 401.123 -            return ErrorDescriptionFactory.forName(ctx, ctx.getPath(), "Can be final", fix);
 401.124 -        }
 401.125 -        
 401.126 -        return null;
 401.127 -    }
 401.128 -    
 401.129 -    private static @NonNull DecisionImpl decision(HintContext ctx, @NonNull VariableElement field) {
 401.130 -        TreePathHandle h = TreePathHandle.create(field, ctx.getInfo());
 401.131 -        
 401.132 -        return ctx.findDecision(h, new Factory<Boolean, Boolean, DecisionImpl>(DecisionImpl.class) {
 401.133 -            @Override
 401.134 -            public DecisionImpl create(TreePathHandle handle) {
 401.135 -                return new DecisionImpl(handle);
 401.136 -            }
 401.137 -        });
 401.138 -    }
 401.139 -    
 401.140 -    private static final class DecisionImpl extends Decision<Boolean, Boolean> {
 401.141 -
 401.142 -        public DecisionImpl(TreePathHandle root) {
 401.143 -            super(root);
 401.144 -        }
 401.145 -
 401.146 -        @Override
 401.147 -        protected Boolean makeDecision(Iterable<? extends Boolean> input) {
 401.148 -            for (Boolean b : input) {
 401.149 -                if (b == null || !b) return false;
 401.150 -            }
 401.151 -            return true;
 401.152 -        }
 401.153 -        
 401.154 -    }
 401.155 -}
   402.1 --- a/sandbox/java.hints/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/duplicates/DuplicateMethodRefactoring.java	Mon Dec 19 11:37:36 2016 +0100
   402.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   402.3 @@ -1,58 +0,0 @@
   402.4 -/*
   402.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   402.6 - *
   402.7 - * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
   402.8 - *
   402.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  402.10 - * Other names may be trademarks of their respective owners.
  402.11 - *
  402.12 - * The contents of this file are subject to the terms of either the GNU
  402.13 - * General Public License Version 2 only ("GPL") or the Common
  402.14 - * Development and Distribution License("CDDL") (collectively, the
  402.15 - * "License"). You may not use this file except in compliance with the
  402.16 - * License. You can obtain a copy of the License at
  402.17 - * http://www.netbeans.org/cddl-gplv2.html
  402.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  402.19 - * specific language governing permissions and limitations under the
  402.20 - * License.  When distributing the software, include this License Header
  402.21 - * Notice in each file and include the License file at
  402.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  402.23 - * particular file as subject to the "Classpath" exception as provided
  402.24 - * by Oracle in the GPL Version 2 section of the License file that
  402.25 - * accompanied this code. If applicable, add the following below the
  402.26 - * License Header, with the fields enclosed by brackets [] replaced by
  402.27 - * your own identifying information:
  402.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  402.29 - *
  402.30 - * If you wish your version of this file to be governed by only the CDDL
  402.31 - * or only the GPL Version 2, indicate your decision by adding
  402.32 - * "[Contributor] elects to include this software in this distribution
  402.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  402.34 - * single choice of license, a recipient has the option to distribute
  402.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  402.36 - * to extend the choice of license to its licensees as provided above.
  402.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  402.38 - * Version 2 license, then the option applies only if the new code is
  402.39 - * made subject to such option by the copyright holder.
  402.40 - *
  402.41 - * Contributor(s):
  402.42 - *
  402.43 - * Portions Copyrighted 2013 Sun Microsystems, Inc.
  402.44 - */
  402.45 -package org.netbeans.modules.jackpot30.hintsimpl.duplicates;
  402.46 -
  402.47 -import org.netbeans.api.java.source.TreePathHandle;
  402.48 -import org.netbeans.modules.refactoring.api.AbstractRefactoring;
  402.49 -import org.openide.util.lookup.Lookups;
  402.50 -
  402.51 -/**
  402.52 - *
  402.53 - * @author lahvac
  402.54 - */
  402.55 -public class DuplicateMethodRefactoring extends AbstractRefactoring {
  402.56 -
  402.57 -    public DuplicateMethodRefactoring(TreePathHandle source) {
  402.58 -        super(Lookups.singleton(source));
  402.59 -    }
  402.60 -
  402.61 -}
   403.1 --- a/sandbox/java.hints/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/duplicates/DuplicateMethodRefactoringAction.java	Mon Dec 19 11:37:36 2016 +0100
   403.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   403.3 @@ -1,84 +0,0 @@
   403.4 -/*
   403.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   403.6 - *
   403.7 - * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
   403.8 - *
   403.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  403.10 - * Other names may be trademarks of their respective owners.
  403.11 - *
  403.12 - * The contents of this file are subject to the terms of either the GNU
  403.13 - * General Public License Version 2 only ("GPL") or the Common
  403.14 - * Development and Distribution License("CDDL") (collectively, the
  403.15 - * "License"). You may not use this file except in compliance with the
  403.16 - * License. You can obtain a copy of the License at
  403.17 - * http://www.netbeans.org/cddl-gplv2.html
  403.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  403.19 - * specific language governing permissions and limitations under the
  403.20 - * License.  When distributing the software, include this License Header
  403.21 - * Notice in each file and include the License file at
  403.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  403.23 - * particular file as subject to the "Classpath" exception as provided
  403.24 - * by Oracle in the GPL Version 2 section of the License file that
  403.25 - * accompanied this code. If applicable, add the following below the
  403.26 - * License Header, with the fields enclosed by brackets [] replaced by
  403.27 - * your own identifying information:
  403.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  403.29 - *
  403.30 - * If you wish your version of this file to be governed by only the CDDL
  403.31 - * or only the GPL Version 2, indicate your decision by adding
  403.32 - * "[Contributor] elects to include this software in this distribution
  403.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  403.34 - * single choice of license, a recipient has the option to distribute
  403.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  403.36 - * to extend the choice of license to its licensees as provided above.
  403.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  403.38 - * Version 2 license, then the option applies only if the new code is
  403.39 - * made subject to such option by the copyright holder.
  403.40 - *
  403.41 - * Contributor(s):
  403.42 - *
  403.43 - * Portions Copyrighted 2013 Sun Microsystems, Inc.
  403.44 - */
  403.45 -package org.netbeans.modules.jackpot30.hintsimpl.duplicates;
  403.46 -
  403.47 -import com.sun.source.tree.Tree.Kind;
  403.48 -import java.awt.event.ActionEvent;
  403.49 -import java.awt.event.ActionListener;
  403.50 -import org.netbeans.api.fileinfo.NonRecursiveFolder;
  403.51 -import org.netbeans.api.java.source.CompilationInfo;
  403.52 -import org.netbeans.api.java.source.TreePathHandle;
  403.53 -import org.netbeans.api.java.source.ui.ScanDialog;
  403.54 -import org.netbeans.modules.refactoring.java.ui.ContextAnalyzer;
  403.55 -import org.netbeans.modules.refactoring.java.ui.JavaRefactoringUIFactory;
  403.56 -import org.netbeans.modules.refactoring.spi.ui.RefactoringUI;
  403.57 -import org.openide.awt.ActionID;
  403.58 -import org.openide.awt.ActionReference;
  403.59 -import org.openide.awt.ActionRegistration;
  403.60 -import org.openide.filesystems.FileObject;
  403.61 -import org.openide.util.NbBundle.Messages;
  403.62 -import org.openide.util.Utilities;
  403.63 -
  403.64 -@ActionID(
  403.65 -        category = "Refactoring",
  403.66 -        id = "org.netbeans.modules.jackpot30.hintsimpl.duplicates.DuplicateMethodRefactoringAction")
  403.67 -@ActionRegistration(
  403.68 -        displayName = "#CTL_DuplicateMethodRefactoringAction")
  403.69 -@ActionReference(path = "Menu/Refactoring", position = 1120)
  403.70 -@Messages("CTL_DuplicateMethodRefactoringAction=Find and Replace Duplicates...")
  403.71 -public final class DuplicateMethodRefactoringAction implements ActionListener {
  403.72 -
  403.73 -    @Override
  403.74 -    public void actionPerformed(ActionEvent e) {
  403.75 -        Runnable task = ContextAnalyzer.createTask(Utilities.actionsGlobalContext()/*!!!*/, new JavaRefactoringUIFactory() {
  403.76 -            @Override public RefactoringUI create(CompilationInfo info, TreePathHandle[] handles, FileObject[] files, NonRecursiveFolder[] packages) {
  403.77 -                //todo: more precise verification of refactoring feasibility:
  403.78 -                return handles.length == 1 && handles[0].getKind() == Kind.METHOD ? new DuplicateMethodRefactoringUI(handles[0]) : null;
  403.79 -            }
  403.80 -        });
  403.81 -        ScanDialog.runWhenScanFinished(task, "Find&Replace Duplicates");
  403.82 -    }
  403.83 -
  403.84 -    public boolean isEnabled() {
  403.85 -        return ContextAnalyzer.canRefactorSingle(Utilities.actionsGlobalContext()/*!!!*/, true, true);
  403.86 -    }
  403.87 -}
   404.1 --- a/sandbox/java.hints/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/duplicates/DuplicateMethodRefactoringPlugin.java	Mon Dec 19 11:37:36 2016 +0100
   404.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   404.3 @@ -1,183 +0,0 @@
   404.4 -/*
   404.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   404.6 - *
   404.7 - * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
   404.8 - *
   404.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  404.10 - * Other names may be trademarks of their respective owners.
  404.11 - *
  404.12 - * The contents of this file are subject to the terms of either the GNU
  404.13 - * General Public License Version 2 only ("GPL") or the Common
  404.14 - * Development and Distribution License("CDDL") (collectively, the
  404.15 - * "License"). You may not use this file except in compliance with the
  404.16 - * License. You can obtain a copy of the License at
  404.17 - * http://www.netbeans.org/cddl-gplv2.html
  404.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  404.19 - * specific language governing permissions and limitations under the
  404.20 - * License.  When distributing the software, include this License Header
  404.21 - * Notice in each file and include the License file at
  404.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  404.23 - * particular file as subject to the "Classpath" exception as provided
  404.24 - * by Oracle in the GPL Version 2 section of the License file that
  404.25 - * accompanied this code. If applicable, add the following below the
  404.26 - * License Header, with the fields enclosed by brackets [] replaced by
  404.27 - * your own identifying information:
  404.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  404.29 - *
  404.30 - * If you wish your version of this file to be governed by only the CDDL
  404.31 - * or only the GPL Version 2, indicate your decision by adding
  404.32 - * "[Contributor] elects to include this software in this distribution
  404.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  404.34 - * single choice of license, a recipient has the option to distribute
  404.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  404.36 - * to extend the choice of license to its licensees as provided above.
  404.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  404.38 - * Version 2 license, then the option applies only if the new code is
  404.39 - * made subject to such option by the copyright holder.
  404.40 - *
  404.41 - * Contributor(s):
  404.42 - *
  404.43 - * Portions Copyrighted 2013 Sun Microsystems, Inc.
  404.44 - */
  404.45 -package org.netbeans.modules.jackpot30.hintsimpl.duplicates;
  404.46 -
  404.47 -import com.sun.source.tree.BlockTree;
  404.48 -import com.sun.source.tree.ExpressionTree;
  404.49 -import com.sun.source.tree.MethodInvocationTree;
  404.50 -import com.sun.source.tree.MethodTree;
  404.51 -import com.sun.source.tree.StatementTree;
  404.52 -import com.sun.source.util.TreePath;
  404.53 -import java.net.URL;
  404.54 -import java.util.ArrayList;
  404.55 -import java.util.Collection;
  404.56 -import java.util.Collections;
  404.57 -import java.util.Enumeration;
  404.58 -import java.util.HashSet;
  404.59 -import java.util.List;
  404.60 -import java.util.Set;
  404.61 -import javax.lang.model.element.Element;
  404.62 -import javax.lang.model.element.ExecutableElement;
  404.63 -import javax.lang.model.element.VariableElement;
  404.64 -import org.netbeans.api.java.source.CancellableTask;
  404.65 -import org.netbeans.api.java.source.ClasspathInfo;
  404.66 -import org.netbeans.api.java.source.ClasspathInfo.PathKind;
  404.67 -import org.netbeans.api.java.source.JavaSource;
  404.68 -import org.netbeans.api.java.source.SourceUtils;
  404.69 -import org.netbeans.api.java.source.TreeMaker;
  404.70 -import org.netbeans.api.java.source.TreePathHandle;
  404.71 -import org.netbeans.api.java.source.WorkingCopy;
  404.72 -import org.netbeans.api.java.source.matching.Matcher;
  404.73 -import org.netbeans.api.java.source.matching.Occurrence;
  404.74 -import org.netbeans.api.java.source.matching.Pattern;
  404.75 -import org.netbeans.modules.refactoring.api.Problem;
  404.76 -import org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin;
  404.77 -import org.netbeans.modules.refactoring.spi.RefactoringElementsBag;
  404.78 -import org.openide.filesystems.FileObject;
  404.79 -import org.openide.filesystems.FileUtil;
  404.80 -import org.openide.filesystems.URLMapper;
  404.81 -
  404.82 -/**
  404.83 - *
  404.84 - * @author lahvac
  404.85 - */
  404.86 -public class DuplicateMethodRefactoringPlugin extends JavaRefactoringPlugin {
  404.87 -    private final DuplicateMethodRefactoring refactoring;
  404.88 -
  404.89 -    DuplicateMethodRefactoringPlugin(DuplicateMethodRefactoring refactoring) {
  404.90 -        this.refactoring = refactoring;
  404.91 -    }
  404.92 -
  404.93 -    @Override
  404.94 -    public Problem preCheck() {
  404.95 -        return null;
  404.96 -    }
  404.97 -
  404.98 -    @Override
  404.99 -    public Problem checkParameters() {
 404.100 -        return null;
 404.101 -    }
 404.102 -
 404.103 -    @Override
 404.104 -    public Problem fastCheckParameters() {
 404.105 -        return null;
 404.106 -    }
 404.107 -
 404.108 -    @Override
 404.109 -    public void cancelRequest() {
 404.110 -    }
 404.111 -
 404.112 -    @Override
 404.113 -    public Problem prepare(RefactoringElementsBag refactoringElements) {
 404.114 -        final TreePathHandle source = refactoring.getRefactoringSource().lookup(TreePathHandle.class);
 404.115 -        Set<URL> dependent = new HashSet<>();
 404.116 -
 404.117 -        for (FileObject root : ClasspathInfo.create(source.getFileObject()).getClassPath(PathKind.SOURCE).getRoots()) {
 404.118 -            dependent.add(root.toURL());
 404.119 -            dependent.addAll(SourceUtils.getDependentRoots(root.toURL()));
 404.120 -        }
 404.121 -
 404.122 -        Set<FileObject> files = new HashSet<>();
 404.123 -
 404.124 -        for (URL root : dependent) {
 404.125 -            FileObject rootFO = URLMapper.findFileObject(root);
 404.126 -
 404.127 -            if (rootFO == null) continue;
 404.128 -
 404.129 -            for (Enumeration<? extends FileObject> en = rootFO.getChildren(true); en.hasMoreElements(); ){
 404.130 -                FileObject file = en.nextElement();
 404.131 -
 404.132 -                if (file.isData() && "text/x-java".equals(FileUtil.getMIMEType(file, "text/x-java"))) {
 404.133 -                    files.add(file);
 404.134 -                }
 404.135 -            }
 404.136 -        }
 404.137 -
 404.138 -        return createAndAddElements(files, new CancellableTask<WorkingCopy>() {
 404.139 -            @Override public void cancel() {
 404.140 -                //TODO - is used? if yes, implement.
 404.141 -            }
 404.142 -            @Override public void run(WorkingCopy parameter) throws Exception {
 404.143 -                if (parameter.toPhase(org.netbeans.api.java.source.JavaSource.Phase.RESOLVED).compareTo(org.netbeans.api.java.source.JavaSource.Phase.RESOLVED) < 0) {
 404.144 -                    return ;
 404.145 -                }
 404.146 -
 404.147 -                Element methodElement = source.getElementHandle().resolve(parameter);
 404.148 -                TreePath method = parameter.getTrees().getPath(methodElement);
 404.149 -
 404.150 -                if (method == null) {
 404.151 -                    //nothing to do
 404.152 -                    //TODO: create a problem
 404.153 -                    return ;
 404.154 -                }
 404.155 -
 404.156 -                BlockTree content = ((MethodTree) method.getLeaf()).getBody();
 404.157 -                TreePath bodyPath = new TreePath(method, content);
 404.158 -                List<TreePath> statements = new ArrayList<>();
 404.159 -
 404.160 -                for (StatementTree st : content.getStatements()) {
 404.161 -                    statements.add(new TreePath(bodyPath, st));
 404.162 -                }
 404.163 -
 404.164 -                List<? extends VariableElement> formalParameters = ((ExecutableElement) methodElement).getParameters();
 404.165 -                Pattern pattern = Pattern.createPatternWithRemappableVariables(statements, formalParameters, true);
 404.166 -                Collection<? extends Occurrence> found = Matcher.create(parameter).setCancel(cancelRequested).setSearchRoot(new TreePath(parameter.getCompilationUnit())).match(pattern);
 404.167 -                TreeMaker make = parameter.getTreeMaker();
 404.168 -
 404.169 -                for (Occurrence occ : found) {
 404.170 -                    List<ExpressionTree> newParams = new ArrayList<>();
 404.171 -                    for (VariableElement p : formalParameters) {
 404.172 -                        newParams.add((ExpressionTree) occ.getVariablesRemapToTrees().get(p).getLeaf());
 404.173 -                    }
 404.174 -                    MethodInvocationTree newCall = make.MethodInvocation(Collections.<ExpressionTree>emptyList(), make.QualIdent(methodElement), newParams);
 404.175 -                    parameter.rewrite(occ.getOccurrenceRoot().getLeaf(), make.ExpressionStatement(newCall));
 404.176 -                }
 404.177 -            }
 404.178 -        }, refactoringElements, refactoring);
 404.179 -    }
 404.180 -
 404.181 -    @Override
 404.182 -    protected JavaSource getJavaSource(Phase p) {
 404.183 -        return null;
 404.184 -    }
 404.185 -
 404.186 -}
   405.1 --- a/sandbox/java.hints/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/duplicates/DuplicateMethodRefactoringUI.java	Mon Dec 19 11:37:36 2016 +0100
   405.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   405.3 @@ -1,108 +0,0 @@
   405.4 -/*
   405.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   405.6 - *
   405.7 - * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
   405.8 - *
   405.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  405.10 - * Other names may be trademarks of their respective owners.
  405.11 - *
  405.12 - * The contents of this file are subject to the terms of either the GNU
  405.13 - * General Public License Version 2 only ("GPL") or the Common
  405.14 - * Development and Distribution License("CDDL") (collectively, the
  405.15 - * "License"). You may not use this file except in compliance with the
  405.16 - * License. You can obtain a copy of the License at
  405.17 - * http://www.netbeans.org/cddl-gplv2.html
  405.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  405.19 - * specific language governing permissions and limitations under the
  405.20 - * License.  When distributing the software, include this License Header
  405.21 - * Notice in each file and include the License file at
  405.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  405.23 - * particular file as subject to the "Classpath" exception as provided
  405.24 - * by Oracle in the GPL Version 2 section of the License file that
  405.25 - * accompanied this code. If applicable, add the following below the
  405.26 - * License Header, with the fields enclosed by brackets [] replaced by
  405.27 - * your own identifying information:
  405.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  405.29 - *
  405.30 - * If you wish your version of this file to be governed by only the CDDL
  405.31 - * or only the GPL Version 2, indicate your decision by adding
  405.32 - * "[Contributor] elects to include this software in this distribution
  405.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  405.34 - * single choice of license, a recipient has the option to distribute
  405.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  405.36 - * to extend the choice of license to its licensees as provided above.
  405.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  405.38 - * Version 2 license, then the option applies only if the new code is
  405.39 - * made subject to such option by the copyright holder.
  405.40 - *
  405.41 - * Contributor(s):
  405.42 - *
  405.43 - * Portions Copyrighted 2013 Sun Microsystems, Inc.
  405.44 - */
  405.45 -package org.netbeans.modules.jackpot30.hintsimpl.duplicates;
  405.46 -
  405.47 -import javax.swing.event.ChangeListener;
  405.48 -import org.netbeans.api.java.source.TreePathHandle;
  405.49 -import org.netbeans.modules.refactoring.api.AbstractRefactoring;
  405.50 -import org.netbeans.modules.refactoring.api.Problem;
  405.51 -import org.netbeans.modules.refactoring.spi.ui.CustomRefactoringPanel;
  405.52 -import org.netbeans.modules.refactoring.spi.ui.RefactoringUI;
  405.53 -import org.openide.util.HelpCtx;
  405.54 -
  405.55 -/**
  405.56 - *
  405.57 - * @author lahvac
  405.58 - */
  405.59 -public class DuplicateMethodRefactoringUI implements RefactoringUI {
  405.60 -    private final TreePathHandle treePathHandle;
  405.61 -
  405.62 -    DuplicateMethodRefactoringUI(TreePathHandle treePathHandle) {
  405.63 -        this.treePathHandle = treePathHandle;
  405.64 -    }
  405.65 -
  405.66 -    @Override
  405.67 -    public String getName() {
  405.68 -        return "Duplicate Method Refactoring";
  405.69 -    }
  405.70 -
  405.71 -    @Override
  405.72 -    public String getDescription() {
  405.73 -        return "Duplicate Method Refactoring";
  405.74 -    }
  405.75 -
  405.76 -    @Override
  405.77 -    public boolean isQuery() {
  405.78 -        return false;
  405.79 -    }
  405.80 -
  405.81 -    @Override
  405.82 -    public CustomRefactoringPanel getPanel(ChangeListener parent) {
  405.83 -        return null;
  405.84 -    }
  405.85 -
  405.86 -    @Override
  405.87 -    public Problem setParameters() {
  405.88 -        return null;
  405.89 -    }
  405.90 -
  405.91 -    @Override
  405.92 -    public Problem checkParameters() {
  405.93 -        return null;
  405.94 -    }
  405.95 -
  405.96 -    @Override
  405.97 -    public boolean hasParameters() {
  405.98 -        return false;
  405.99 -    }
 405.100 -
 405.101 -    @Override
 405.102 -    public AbstractRefactoring getRefactoring() {
 405.103 -        return new DuplicateMethodRefactoring(treePathHandle);
 405.104 -    }
 405.105 -
 405.106 -    @Override
 405.107 -    public HelpCtx getHelpCtx() {
 405.108 -        return HelpCtx.DEFAULT_HELP;
 405.109 -    }
 405.110 -
 405.111 -}
   406.1 --- a/sandbox/java.hints/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/duplicates/RefactoringPluginFactoryImpl.java	Mon Dec 19 11:37:36 2016 +0100
   406.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   406.3 @@ -1,62 +0,0 @@
   406.4 -/*
   406.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   406.6 - *
   406.7 - * Copyright 2008-2010 Sun Microsystems, Inc. All rights reserved.
   406.8 - *
   406.9 - * The contents of this file are subject to the terms of either the GNU
  406.10 - * General Public License Version 2 only ("GPL") or the Common
  406.11 - * Development and Distribution License("CDDL") (collectively, the
  406.12 - * "License"). You may not use this file except in compliance with the
  406.13 - * License. You can obtain a copy of the License at
  406.14 - * http://www.netbeans.org/cddl-gplv2.html
  406.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  406.16 - * specific language governing permissions and limitations under the
  406.17 - * License.  When distributing the software, include this License Header
  406.18 - * Notice in each file and include the License file at
  406.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  406.20 - * particular file as subject to the "Classpath" exception as provided
  406.21 - * by Sun in the GPL Version 2 section of the License file that
  406.22 - * accompanied this code. If applicable, add the following below the
  406.23 - * License Header, with the fields enclosed by brackets [] replaced by
  406.24 - * your own identifying information:
  406.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  406.26 - *
  406.27 - * If you wish your version of this file to be governed by only the CDDL
  406.28 - * or only the GPL Version 2, indicate your decision by adding
  406.29 - * "[Contributor] elects to include this software in this distribution
  406.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  406.31 - * single choice of license, a recipient has the option to distribute
  406.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  406.33 - * to extend the choice of license to its licensees as provided above.
  406.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  406.35 - * Version 2 license, then the option applies only if the new code is
  406.36 - * made subject to such option by the copyright holder.
  406.37 - *
  406.38 - * Contributor(s):
  406.39 - *
  406.40 - * Portions Copyrighted 2008-2010 Sun Microsystems, Inc.
  406.41 - */
  406.42 -
  406.43 -package org.netbeans.modules.jackpot30.hintsimpl.duplicates;
  406.44 -
  406.45 -import org.netbeans.modules.refactoring.api.AbstractRefactoring;
  406.46 -import org.netbeans.modules.refactoring.spi.RefactoringPlugin;
  406.47 -import org.netbeans.modules.refactoring.spi.RefactoringPluginFactory;
  406.48 -import org.openide.util.lookup.ServiceProvider;
  406.49 -
  406.50 -/**
  406.51 - *
  406.52 - * @author Jan Lahoda
  406.53 - */
  406.54 -@ServiceProvider(service=RefactoringPluginFactory.class)
  406.55 -public class RefactoringPluginFactoryImpl implements RefactoringPluginFactory {
  406.56 -
  406.57 -    public RefactoringPlugin createInstance(AbstractRefactoring refactoring) {
  406.58 -        if (refactoring instanceof DuplicateMethodRefactoring) {
  406.59 -            return new DuplicateMethodRefactoringPlugin((DuplicateMethodRefactoring) refactoring);
  406.60 -        }
  406.61 -
  406.62 -        return null;
  406.63 -    }
  406.64 -
  406.65 -}
   407.1 --- a/sandbox/java.hints/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/GlobalyUnusedNGTest.java	Mon Dec 19 11:37:36 2016 +0100
   407.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   407.3 @@ -1,84 +0,0 @@
   407.4 -/*
   407.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   407.6 - *
   407.7 - * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
   407.8 - *
   407.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  407.10 - * Other names may be trademarks of their respective owners.
  407.11 - *
  407.12 - * The contents of this file are subject to the terms of either the GNU
  407.13 - * General Public License Version 2 only ("GPL") or the Common
  407.14 - * Development and Distribution License("CDDL") (collectively, the
  407.15 - * "License"). You may not use this file except in compliance with the
  407.16 - * License. You can obtain a copy of the License at
  407.17 - * http://www.netbeans.org/cddl-gplv2.html
  407.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  407.19 - * specific language governing permissions and limitations under the
  407.20 - * License.  When distributing the software, include this License Header
  407.21 - * Notice in each file and include the License file at
  407.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  407.23 - * particular file as subject to the "Classpath" exception as provided
  407.24 - * by Oracle in the GPL Version 2 section of the License file that
  407.25 - * accompanied this code. If applicable, add the following below the
  407.26 - * License Header, with the fields enclosed by brackets [] replaced by
  407.27 - * your own identifying information:
  407.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  407.29 - *
  407.30 - * If you wish your version of this file to be governed by only the CDDL
  407.31 - * or only the GPL Version 2, indicate your decision by adding
  407.32 - * "[Contributor] elects to include this software in this distribution
  407.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  407.34 - * single choice of license, a recipient has the option to distribute
  407.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  407.36 - * to extend the choice of license to its licensees as provided above.
  407.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  407.38 - * Version 2 license, then the option applies only if the new code is
  407.39 - * made subject to such option by the copyright holder.
  407.40 - *
  407.41 - * Contributor(s):
  407.42 - *
  407.43 - * Portions Copyrighted 2013 Sun Microsystems, Inc.
  407.44 - */
  407.45 -package org.netbeans.modules.jackpot30.hintsimpl;
  407.46 -
  407.47 -import org.junit.Test;
  407.48 -import org.netbeans.modules.java.hints.test.api.HintTest;
  407.49 -
  407.50 -/**
  407.51 - *
  407.52 - * @author lahvac
  407.53 - */
  407.54 -public class GlobalyUnusedNGTest {
  407.55 -
  407.56 -    @Test
  407.57 -    public void testUsed1() throws Exception {
  407.58 -        HintTest.create()
  407.59 -                .input("test/Test1.java",
  407.60 -                       "package test;\n" +
  407.61 -                       "public class Test1 {\n" +
  407.62 -                       "    private final Test2 test2 = null;\n" +
  407.63 -                       "}\n")
  407.64 -                .input("test/Test2.java",
  407.65 -                       "package test;\n" +
  407.66 -                       "public class Test2 {\n" +
  407.67 -                       "    private final Test1 test1 = null;\n" +
  407.68 -                       "}\n")
  407.69 -                .runGlobal(GlobalyUnused.class)
  407.70 -                .assertWarnings();
  407.71 -    }
  407.72 -    
  407.73 -    @Test
  407.74 -    public void testUnused() throws Exception {
  407.75 -        HintTest.create()
  407.76 -                .input("test/Test1.java",
  407.77 -                       "package test;\n" +
  407.78 -                       "public class Test1 { }\n")
  407.79 -                .input("test/Test2.java",
  407.80 -                       "package test;\n" +
  407.81 -                       "public class Test2 {\n" +
  407.82 -                       "}\n")
  407.83 -                .runGlobal(GlobalyUnused.class)
  407.84 -                .assertWarnings("1:13-1:18:verifier:Unused", "1:13-1:18:verifier:Unused");
  407.85 -    }
  407.86 -
  407.87 -}
   408.1 --- a/sandbox/java.hints/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/NonPrivateMakeFinalNGTest.java	Mon Dec 19 11:37:36 2016 +0100
   408.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   408.3 @@ -1,90 +0,0 @@
   408.4 -/*
   408.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   408.6 - *
   408.7 - * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
   408.8 - *
   408.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  408.10 - * Other names may be trademarks of their respective owners.
  408.11 - *
  408.12 - * The contents of this file are subject to the terms of either the GNU
  408.13 - * General Public License Version 2 only ("GPL") or the Common
  408.14 - * Development and Distribution License("CDDL") (collectively, the
  408.15 - * "License"). You may not use this file except in compliance with the
  408.16 - * License. You can obtain a copy of the License at
  408.17 - * http://www.netbeans.org/cddl-gplv2.html
  408.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  408.19 - * specific language governing permissions and limitations under the
  408.20 - * License.  When distributing the software, include this License Header
  408.21 - * Notice in each file and include the License file at
  408.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  408.23 - * particular file as subject to the "Classpath" exception as provided
  408.24 - * by Oracle in the GPL Version 2 section of the License file that
  408.25 - * accompanied this code. If applicable, add the following below the
  408.26 - * License Header, with the fields enclosed by brackets [] replaced by
  408.27 - * your own identifying information:
  408.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  408.29 - *
  408.30 - * If you wish your version of this file to be governed by only the CDDL
  408.31 - * or only the GPL Version 2, indicate your decision by adding
  408.32 - * "[Contributor] elects to include this software in this distribution
  408.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  408.34 - * single choice of license, a recipient has the option to distribute
  408.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  408.36 - * to extend the choice of license to its licensees as provided above.
  408.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  408.38 - * Version 2 license, then the option applies only if the new code is
  408.39 - * made subject to such option by the copyright holder.
  408.40 - *
  408.41 - * Contributor(s):
  408.42 - *
  408.43 - * Portions Copyrighted 2013 Sun Microsystems, Inc.
  408.44 - */
  408.45 -package org.netbeans.modules.jackpot30.hintsimpl;
  408.46 -
  408.47 -import org.junit.Test;
  408.48 -import org.netbeans.modules.java.hints.test.api.HintTest;
  408.49 -
  408.50 -/**
  408.51 - *
  408.52 - * @author lahvac
  408.53 - */
  408.54 -public class NonPrivateMakeFinalNGTest {
  408.55 -
  408.56 -    @Test
  408.57 -    public void testNotFinal() throws Exception {
  408.58 -        HintTest.create()
  408.59 -                .input("test/Test1.java",
  408.60 -                       "package test;\n" +
  408.61 -                       "public class Test1 {\n" +
  408.62 -                       "    public String str = \"\";\n" +
  408.63 -                       "}\n")
  408.64 -                .input("test/Test2.java",
  408.65 -                       "package test;\n" +
  408.66 -                       "public class Test2 {\n" +
  408.67 -                       "    {\n" +
  408.68 -                       "        new Test1().str = null;\n" +
  408.69 -                       "    }\n" +
  408.70 -                       "}\n")
  408.71 -                .runGlobal(NonPrivateMakeFinal.class)
  408.72 -                .assertWarnings();
  408.73 -    }
  408.74 -
  408.75 -    @Test
  408.76 -    public void testFinal() throws Exception {
  408.77 -        HintTest.create()
  408.78 -                .input("test/Test1.java",
  408.79 -                       "package test;\n" +
  408.80 -                       "public class Test1 {\n" +
  408.81 -                       "    public String str = \"\";\n" +
  408.82 -                       "}\n")
  408.83 -                .input("test/Test2.java",
  408.84 -                       "package test;\n" +
  408.85 -                       "public class Test2 {\n" +
  408.86 -                       "    {\n" +
  408.87 -                       "        System.err.println(new Test1().str);\n" +
  408.88 -                       "    }\n" +
  408.89 -                       "}\n")
  408.90 -                .runGlobal(NonPrivateMakeFinal.class)
  408.91 -                .assertWarnings("2:18-2:21:verifier:Can be final");
  408.92 -    }
  408.93 -}
   409.1 --- a/sandbox/java.hints/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/borrowed/RefactoringTestBase.java	Mon Dec 19 11:37:36 2016 +0100
   409.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   409.3 @@ -1,387 +0,0 @@
   409.4 -/*
   409.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   409.6 - *
   409.7 - * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
   409.8 - *
   409.9 - * The contents of this file are subject to the terms of either the GNU
  409.10 - * General Public License Version 2 only ("GPL") or the Common
  409.11 - * Development and Distribution License("CDDL") (collectively, the
  409.12 - * "License"). You may not use this file except in compliance with the
  409.13 - * License. You can obtain a copy of the License at
  409.14 - * http://www.netbeans.org/cddl-gplv2.html
  409.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  409.16 - * specific language governing permissions and limitations under the
  409.17 - * License.  When distributing the software, include this License Header
  409.18 - * Notice in each file and include the License file at
  409.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  409.20 - * particular file as subject to the "Classpath" exception as provided
  409.21 - * by Sun in the GPL Version 2 section of the License file that
  409.22 - * accompanied this code. If applicable, add the following below the
  409.23 - * License Header, with the fields enclosed by brackets [] replaced by
  409.24 - * your own identifying information:
  409.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  409.26 - *
  409.27 - * If you wish your version of this file to be governed by only the CDDL
  409.28 - * or only the GPL Version 2, indicate your decision by adding
  409.29 - * "[Contributor] elects to include this software in this distribution
  409.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  409.31 - * single choice of license, a recipient has the option to distribute
  409.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  409.33 - * to extend the choice of license to its licensees as provided above.
  409.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  409.35 - * Version 2 license, then the option applies only if the new code is
  409.36 - * made subject to such option by the copyright holder.
  409.37 - *
  409.38 - * Contributor(s):
  409.39 - *
  409.40 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  409.41 - */
  409.42 -package org.netbeans.modules.jackpot30.hintsimpl.borrowed;
  409.43 -
  409.44 -import java.io.EOFException;
  409.45 -import java.io.FileInputStream;
  409.46 -import java.io.IOException;
  409.47 -import java.nio.charset.Charset;
  409.48 -import java.util.Arrays;
  409.49 -import java.util.Collections;
  409.50 -import java.util.HashMap;
  409.51 -import java.util.HashSet;
  409.52 -import java.util.Iterator;
  409.53 -import java.util.LinkedList;
  409.54 -import java.util.List;
  409.55 -import java.util.Map;
  409.56 -import java.util.logging.Level;
  409.57 -import java.util.logging.Logger;
  409.58 -import javax.swing.event.ChangeListener;
  409.59 -import org.netbeans.api.editor.mimelookup.MimePath;
  409.60 -import org.netbeans.api.java.classpath.ClassPath;
  409.61 -import org.netbeans.api.java.classpath.GlobalPathRegistry;
  409.62 -import org.netbeans.api.java.source.SourceUtilsTestUtil;
  409.63 -import org.netbeans.api.java.source.TestUtilities;
  409.64 -import org.netbeans.api.java.source.TreeUtilities;
  409.65 -import org.netbeans.api.project.Project;
  409.66 -import org.netbeans.api.project.ProjectManager;
  409.67 -import org.netbeans.api.project.SourceGroup;
  409.68 -import org.netbeans.api.project.Sources;
  409.69 -import org.netbeans.core.startup.Main;
  409.70 -import org.netbeans.junit.NbTestCase;
  409.71 -import org.netbeans.modules.java.source.indexing.JavaCustomIndexer;
  409.72 -import org.netbeans.modules.parsing.api.indexing.IndexingManager;
  409.73 -import org.netbeans.modules.parsing.impl.indexing.CacheFolder;
  409.74 -import org.netbeans.modules.parsing.impl.indexing.MimeTypes;
  409.75 -import org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater;
  409.76 -import org.netbeans.modules.refactoring.api.Problem;
  409.77 -import org.netbeans.spi.editor.mimelookup.MimeDataProvider;
  409.78 -import org.netbeans.spi.gototest.TestLocator;
  409.79 -import org.netbeans.spi.gototest.TestLocator.FileType;
  409.80 -import org.netbeans.spi.gototest.TestLocator.LocationListener;
  409.81 -import org.netbeans.spi.gototest.TestLocator.LocationResult;
  409.82 -import org.netbeans.spi.java.classpath.ClassPathProvider;
  409.83 -import org.netbeans.spi.java.classpath.support.ClassPathSupport;
  409.84 -import org.netbeans.spi.project.ProjectFactory;
  409.85 -import org.netbeans.spi.project.ProjectState;
  409.86 -import org.netbeans.spi.project.support.GenericSources;
  409.87 -import org.openide.filesystems.FileObject;
  409.88 -import org.openide.filesystems.FileUtil;
  409.89 -import org.openide.util.Lookup;
  409.90 -import org.openide.util.NbBundle;
  409.91 -import org.openide.util.lookup.Lookups;
  409.92 -import org.openide.util.lookup.ServiceProvider;
  409.93 -
  409.94 -public class RefactoringTestBase extends NbTestCase {
  409.95 -    // Turning off annoying info messages from treeutilities
  409.96 -    private static final Logger TREEUTILITIESLOGGER = Logger.getLogger(TreeUtilities.class.getName());
  409.97 -
  409.98 -    public RefactoringTestBase(String name) {
  409.99 -        super(name);
 409.100 -    }
 409.101 -
 409.102 -    protected static void writeFilesAndWaitForScan(FileObject sourceRoot, File... files) throws Exception {
 409.103 -        for (FileObject c : sourceRoot.getChildren()) {
 409.104 -            c.delete();
 409.105 -        }
 409.106 -
 409.107 -        for (File f : files) {
 409.108 -            FileObject fo = FileUtil.createData(sourceRoot, f.filename);
 409.109 -            TestUtilities.copyStringToFile(fo, f.content);
 409.110 -        }
 409.111 -
 409.112 -        IndexingManager.getDefault().refreshIndexAndWait(sourceRoot.toURL(), null, true);
 409.113 -    }
 409.114 -
 409.115 -    protected void verifyContent(FileObject sourceRoot, File... files) throws Exception {
 409.116 -        List<FileObject> todo = new LinkedList<FileObject>();
 409.117 -
 409.118 -        todo.add(sourceRoot);
 409.119 -
 409.120 -        Map<String, String> content = new HashMap<String, String>();
 409.121 -
 409.122 -        FileUtil.refreshFor(FileUtil.toFile(sourceRoot));
 409.123 -
 409.124 -        while (!todo.isEmpty()) {
 409.125 -            FileObject file = todo.remove(0);
 409.126 -
 409.127 -            if (file.isData()) {
 409.128 -                content.put(FileUtil.getRelativePath(sourceRoot, file), copyFileToString(FileUtil.toFile(file)));
 409.129 -            } else {
 409.130 -                todo.addAll(Arrays.asList(file.getChildren()));
 409.131 -            }
 409.132 -        }
 409.133 -
 409.134 -        for (File f : files) {
 409.135 -            String fileContent = content.remove(f.filename);
 409.136 -
 409.137 -            assertNotNull(f);
 409.138 -            assertNotNull(f.content);
 409.139 -            assertNotNull("Cannot find " + f.filename + " in map " + content, fileContent);
 409.140 -            assertEquals(getName() ,f.content.replaceAll("[ \t\r\n\n]+", " "), fileContent.replaceAll("[ \t\r\n\n]+", " "));
 409.141 -        }
 409.142 -
 409.143 -        assertTrue(content.toString(), content.isEmpty());
 409.144 -    }
 409.145 -    
 409.146 -    /**
 409.147 -     * Returns a string which contains the contents of a file.
 409.148 -     *
 409.149 -     * @param f the file to be read
 409.150 -     * @return the contents of the file(s).
 409.151 -     */
 409.152 -    private static String copyFileToString(java.io.File f) throws java.io.IOException {
 409.153 -        int s = (int) f.length();
 409.154 -        byte[] data = new byte[s];
 409.155 -        int len = new FileInputStream(f).read(data);
 409.156 -        if (len != s) {
 409.157 -            throw new EOFException("truncated file");
 409.158 -        }
 409.159 -        return new String(data, Charset.forName("UTF8"));
 409.160 -    }
 409.161 -
 409.162 -    protected static void addAllProblems(List<Problem> problems, Problem head) {
 409.163 -        while (head != null) {
 409.164 -            problems.add(head);
 409.165 -            head = head.getNext();
 409.166 -        }
 409.167 -    }
 409.168 -
 409.169 -    protected static void assertProblems(Iterable<? extends Problem> golden, Iterable<? extends Problem> real) {
 409.170 -        Iterator<? extends Problem> g = golden.iterator();
 409.171 -        Iterator<? extends Problem> r = real.iterator();
 409.172 -
 409.173 -        while (g.hasNext() && r.hasNext()) {
 409.174 -            Problem gp = g.next();
 409.175 -            Problem rp = r.next();
 409.176 -
 409.177 -            assertEquals(gp.isFatal(), rp.isFatal());
 409.178 -            assertEquals(gp.getMessage(), rp.getMessage());
 409.179 -        }
 409.180 -        boolean goldenHasNext = g.hasNext();
 409.181 -        boolean realHasNext = r.hasNext();
 409.182 -
 409.183 -        assertFalse(goldenHasNext?"Expected: " + g.next().getMessage():"", goldenHasNext);
 409.184 -        assertFalse(realHasNext?"Unexpected: " + r.next().getMessage():"", realHasNext);
 409.185 -    }
 409.186 -
 409.187 -    static {
 409.188 -        NbBundle.setBranding("test");
 409.189 -    }
 409.190 -
 409.191 -    protected static final class File {
 409.192 -        public final String filename;
 409.193 -        public final String content;
 409.194 -
 409.195 -        public File(String filename, String content) {
 409.196 -            this.filename = filename;
 409.197 -            this.content = content;
 409.198 -        }
 409.199 -    }
 409.200 -
 409.201 -    protected FileObject src;
 409.202 -    protected FileObject test;
 409.203 -    protected Project prj;
 409.204 -    private ClassPath sourcePath;
 409.205 -
 409.206 -    @Override
 409.207 -    protected void setUp() throws Exception {
 409.208 -        System.setProperty("org.netbeans.modules.java.source.usages.SourceAnalyser.fullIndex", "true");
 409.209 -        TREEUTILITIESLOGGER.setLevel(Level.SEVERE);
 409.210 -        MimeTypes.setAllMimeTypes(new HashSet<String>());
 409.211 -        SourceUtilsTestUtil.prepareTest(new String[] {"org/netbeans/modules/openide/loaders/layer.xml",
 409.212 -                    "org/netbeans/modules/java/source/resources/layer.xml",
 409.213 -                    "org/netbeans/modules/java/editor/resources/layer.xml",
 409.214 -            /*"org/netbeans/modules/refactoring/java/test/resources/layer.xml", */"META-INF/generated-layer.xml"}, new Object[] {
 409.215 -                    new ClassPathProvider() {
 409.216 -                        @Override
 409.217 -                        public ClassPath findClassPath(FileObject file, String type) {
 409.218 -                    if (sourcePath != null && sourcePath.contains(file)){
 409.219 -                                if (ClassPath.BOOT.equals(type)) {
 409.220 -                                    return ClassPathSupport.createClassPath(System.getProperty("sun.boot.class.path"));
 409.221 -                                }
 409.222 -                                if (ClassPath.COMPILE.equals(type)) {
 409.223 -                                    return ClassPathSupport.createClassPath(new FileObject[0]);
 409.224 -                                }
 409.225 -                                if (ClassPath.SOURCE.equals(type)) {
 409.226 -                                    return sourcePath;
 409.227 -                                }
 409.228 -                            }
 409.229 -
 409.230 -                            return null;
 409.231 -                        }
 409.232 -                    },
 409.233 -                    new ProjectFactory() {
 409.234 -                        @Override
 409.235 -                        public boolean isProject(FileObject projectDirectory) {
 409.236 -                            return src != null && src.getParent() == projectDirectory;
 409.237 -                        }
 409.238 -                        @Override
 409.239 -                        public Project loadProject(final FileObject projectDirectory, ProjectState state) throws IOException {
 409.240 -                if (!isProject(projectDirectory)) {
 409.241 -                    return null;
 409.242 -                }
 409.243 -                            return new Project() {
 409.244 -                                @Override
 409.245 -                                public FileObject getProjectDirectory() {
 409.246 -                                    return projectDirectory;
 409.247 -                                }
 409.248 -                                @Override
 409.249 -                                public Lookup getLookup() {
 409.250 -                                    final Project p = this;
 409.251 -                                    return Lookups.singleton(new Sources() {
 409.252 -
 409.253 -                                        @Override
 409.254 -                                        public SourceGroup[] getSourceGroups(String type) {
 409.255 -                                return new SourceGroup[] {GenericSources.group(p, src.getParent(), "source", "Java Sources", null, null),
 409.256 -                                                        GenericSources.group(p, test, "testsources", "Test Sources", null, null)};
 409.257 -                                        }
 409.258 -
 409.259 -                                        @Override
 409.260 -                                        public void addChangeListener(ChangeListener listener) {
 409.261 -                                        }
 409.262 -
 409.263 -                                        @Override
 409.264 -                                        public void removeChangeListener(ChangeListener listener) {
 409.265 -                                        }
 409.266 -                                    });
 409.267 -                                }
 409.268 -                            };
 409.269 -                        }
 409.270 -                        @Override
 409.271 -            public void saveProject(Project project) throws IOException, ClassCastException {}
 409.272 -                    },
 409.273 -                    new TestLocator() {
 409.274 -
 409.275 -                        @Override
 409.276 -                        public boolean appliesTo(FileObject fo) {
 409.277 -                            return true;
 409.278 -                        }
 409.279 -
 409.280 -                        @Override
 409.281 -                        public boolean asynchronous() {
 409.282 -                            return false;
 409.283 -                        }
 409.284 -
 409.285 -                        @Override
 409.286 -                        public LocationResult findOpposite(FileObject fo, int caretOffset) {
 409.287 -                            ClassPath srcCp;
 409.288 -
 409.289 -                            if ((srcCp = ClassPath.getClassPath(fo, ClassPath.SOURCE)) == null) {
 409.290 -                                return new LocationResult("File not found"); //NOI18N
 409.291 -                            }
 409.292 -
 409.293 -                            String baseResName = srcCp.getResourceName(fo, '/', false);
 409.294 -                            String testResName = getTestResName(baseResName, fo.getExt());
 409.295 -                            assert testResName != null;
 409.296 -                            FileObject fileObject = test.getFileObject(testResName);
 409.297 -                if(fileObject != null) {
 409.298 -                                return new LocationResult(fileObject, -1);
 409.299 -                            }
 409.300 -
 409.301 -                            return new LocationResult("File not found"); //NOI18N
 409.302 -                        }
 409.303 -
 409.304 -                        @Override
 409.305 -                        public void findOpposite(FileObject fo, int caretOffset, LocationListener callback) {
 409.306 -                            throw new UnsupportedOperationException("This should not be called on synchronous locators.");
 409.307 -                        }
 409.308 -
 409.309 -                        @Override
 409.310 -                        public FileType getFileType(FileObject fo) {
 409.311 -                if(FileUtil.isParentOf(test, fo)) {
 409.312 -                                return FileType.TEST;
 409.313 -                } else if(FileUtil.isParentOf(src, fo)) {
 409.314 -                                return FileType.TESTED;
 409.315 -                            }
 409.316 -                            return FileType.NEITHER;
 409.317 -                        }
 409.318 -
 409.319 -                        private String getTestResName(String baseResName, String ext) {
 409.320 -                StringBuilder buf
 409.321 -                        = new StringBuilder(baseResName.length() + ext.length() + 10);
 409.322 -                            buf.append(baseResName).append("Test");                         //NOI18N
 409.323 -                            if (ext.length() != 0) {
 409.324 -                                buf.append('.').append(ext);
 409.325 -                            }
 409.326 -                            return buf.toString();
 409.327 -                        }
 409.328 -                    }});
 409.329 -        Main.initializeURLFactory();
 409.330 -        org.netbeans.api.project.ui.OpenProjects.getDefault().getOpenProjects();
 409.331 -        prepareTest();
 409.332 -        org.netbeans.api.project.ui.OpenProjects.getDefault().open(new Project[] {prj = ProjectManager.getDefault().findProject(src.getParent())}, false);
 409.333 -        MimeTypes.setAllMimeTypes(Collections.singleton("text/x-java"));
 409.334 -        sourcePath = ClassPathSupport.createClassPath(src, test);
 409.335 -        GlobalPathRegistry.getDefault().register(ClassPath.SOURCE, new ClassPath[] {sourcePath});
 409.336 -        RepositoryUpdater.getDefault().start(true);
 409.337 -        super.setUp();
 409.338 -        FileUtil.createData(FileUtil.getConfigRoot(), "Templates/Classes/Empty.java");
 409.339 -        System.setProperty("org.netbeans.modules.parsing.impl.Source.excludedTasks", ".*");
 409.340 -    }
 409.341 -
 409.342 -    @Override
 409.343 -    protected void tearDown() throws Exception {
 409.344 -        super.tearDown();
 409.345 -        GlobalPathRegistry.getDefault().unregister(ClassPath.SOURCE, new ClassPath[] {sourcePath});
 409.346 -        org.netbeans.api.project.ui.OpenProjects.getDefault().close(new Project[] {prj});
 409.347 -        prj = null;
 409.348 -    }
 409.349 -
 409.350 -    private void prepareTest() throws Exception {
 409.351 -        FileObject workdir = SourceUtilsTestUtil.makeScratchDir(this);
 409.352 -
 409.353 -        FileObject projectFolder = FileUtil.createFolder(workdir, "testProject");
 409.354 -        src = FileUtil.createFolder(projectFolder, "src");
 409.355 -        test = FileUtil.createFolder(projectFolder, "test");
 409.356 -
 409.357 -        FileObject cache = FileUtil.createFolder(workdir, "cache");
 409.358 -
 409.359 -        CacheFolder.setCacheFolder(cache);
 409.360 -    }
 409.361 -
 409.362 -    @ServiceProvider(service=MimeDataProvider.class)
 409.363 -    public static final class MimeDataProviderImpl implements MimeDataProvider {
 409.364 -
 409.365 -        private static final Lookup L = Lookups.singleton(new JavaCustomIndexer.Factory());
 409.366 -
 409.367 -        @Override
 409.368 -        public Lookup getLookup(MimePath mimePath) {
 409.369 -            if ("text/x-java".equals(mimePath.getPath())) {
 409.370 -                return L;
 409.371 -            }
 409.372 -
 409.373 -            return null;
 409.374 -        }
 409.375 -        
 409.376 -    }
 409.377 -
 409.378 -    protected static boolean problemIsFatal(List<Problem> problems) {
 409.379 -        for (Problem problem : problems) {
 409.380 -            Problem next = problem;
 409.381 -            do {
 409.382 -                if (next.isFatal()) {
 409.383 -                    return true;
 409.384 -                }
 409.385 -                next = next.getNext();
 409.386 -            } while (next != null);
 409.387 -        }
 409.388 -        return false;
 409.389 -    }
 409.390 -}
 409.391 \ No newline at end of file
   410.1 --- a/sandbox/java.hints/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/duplicates/DuplicateMethodRefactoringPluginTest.java	Mon Dec 19 11:37:36 2016 +0100
   410.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   410.3 @@ -1,165 +0,0 @@
   410.4 -/*
   410.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   410.6 - *
   410.7 - * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
   410.8 - *
   410.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  410.10 - * Other names may be trademarks of their respective owners.
  410.11 - *
  410.12 - * The contents of this file are subject to the terms of either the GNU
  410.13 - * General Public License Version 2 only ("GPL") or the Common
  410.14 - * Development and Distribution License("CDDL") (collectively, the
  410.15 - * "License"). You may not use this file except in compliance with the
  410.16 - * License. You can obtain a copy of the License at
  410.17 - * http://www.netbeans.org/cddl-gplv2.html
  410.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  410.19 - * specific language governing permissions and limitations under the
  410.20 - * License.  When distributing the software, include this License Header
  410.21 - * Notice in each file and include the License file at
  410.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  410.23 - * particular file as subject to the "Classpath" exception as provided
  410.24 - * by Oracle in the GPL Version 2 section of the License file that
  410.25 - * accompanied this code. If applicable, add the following below the
  410.26 - * License Header, with the fields enclosed by brackets [] replaced by
  410.27 - * your own identifying information:
  410.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  410.29 - *
  410.30 - * If you wish your version of this file to be governed by only the CDDL
  410.31 - * or only the GPL Version 2, indicate your decision by adding
  410.32 - * "[Contributor] elects to include this software in this distribution
  410.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  410.34 - * single choice of license, a recipient has the option to distribute
  410.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  410.36 - * to extend the choice of license to its licensees as provided above.
  410.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  410.38 - * Version 2 license, then the option applies only if the new code is
  410.39 - * made subject to such option by the copyright holder.
  410.40 - *
  410.41 - * Contributor(s):
  410.42 - *
  410.43 - * Portions Copyrighted 2013 Sun Microsystems, Inc.
  410.44 - */
  410.45 -package org.netbeans.modules.jackpot30.hintsimpl.duplicates;
  410.46 -
  410.47 -import java.util.Arrays;
  410.48 -import java.util.LinkedList;
  410.49 -import java.util.List;
  410.50 -import javax.lang.model.element.ExecutableElement;
  410.51 -import javax.lang.model.util.ElementFilter;
  410.52 -import org.netbeans.api.java.source.CompilationController;
  410.53 -import org.netbeans.api.java.source.JavaSource;
  410.54 -import org.netbeans.api.java.source.Task;
  410.55 -import org.netbeans.api.java.source.TreePathHandle;
  410.56 -import org.netbeans.modules.jackpot30.hintsimpl.borrowed.RefactoringTestBase;
  410.57 -import org.netbeans.modules.refactoring.api.Problem;
  410.58 -import org.netbeans.modules.refactoring.api.RefactoringSession;
  410.59 -
  410.60 -/**
  410.61 - *
  410.62 - * @author lahvac
  410.63 - */
  410.64 -public class DuplicateMethodRefactoringPluginTest extends RefactoringTestBase {
  410.65 -
  410.66 -    public DuplicateMethodRefactoringPluginTest(String name) {
  410.67 -        super(name);
  410.68 -    }
  410.69 -
  410.70 -    public void testSimple() throws Exception {
  410.71 -        writeFilesAndWaitForScan(src,
  410.72 -                                 new File("test/Test.java",
  410.73 -                                          "package test;\n" +
  410.74 -                                          "public class Test {\n" +
  410.75 -                                          "    public static void toCall() {\n" +
  410.76 -                                          "        System.err.println(1);\n" +
  410.77 -                                          "    }\n" +
  410.78 -                                          "    public static void test1() {\n" +
  410.79 -                                          "        System.err.println(1);\n" +
  410.80 -                                          "    }\n" +
  410.81 -                                          "    public static void test2() {\n" +
  410.82 -                                          "        System.out.println(1);\n" +
  410.83 -                                          "    }\n" +
  410.84 -                                          "    public static void test3() {\n" +
  410.85 -                                          "        System.err.println(2);\n" +
  410.86 -                                          "    }\n" +
  410.87 -                                          "}\n"));
  410.88 -        performDuplicateMethod("toCall");
  410.89 -        verifyContent(src,
  410.90 -                      new File("test/Test.java",
  410.91 -                               "package test;\n" +
  410.92 -                               "public class Test {\n" +
  410.93 -                               "    public static void toCall() {\n" +
  410.94 -                               "        System.err.println(1);\n" +
  410.95 -                               "    }\n" +
  410.96 -                               "    public static void test1() {\n" +
  410.97 -                               "        toCall();\n" +
  410.98 -                               "    }\n" +
  410.99 -                               "    public static void test2() {\n" +
 410.100 -                               "        System.out.println(1);\n" +
 410.101 -                               "    }\n" +
 410.102 -                               "    public static void test3() {\n" +
 410.103 -                               "        System.err.println(2);\n" +
 410.104 -                               "    }\n" +
 410.105 -                               "}\n"));
 410.106 -    }
 410.107 -
 410.108 -    public void testParams() throws Exception {
 410.109 -        writeFilesAndWaitForScan(src,
 410.110 -                                 new File("test/Test.java",
 410.111 -                                          "package test;\n" +
 410.112 -                                          "public class Test {\n" +
 410.113 -                                          "    public static void toCall(int i) {\n" +
 410.114 -                                          "        System.err.println(i);\n" +
 410.115 -                                          "    }\n" +
 410.116 -                                          "    public static void test1(int j) {\n" +
 410.117 -                                          "        System.err.println(1 + j);\n" +
 410.118 -                                          "    }\n" +
 410.119 -                                          "    public static void test3() {\n" +
 410.120 -                                          "        System.err.println(2);\n" +
 410.121 -                                          "    }\n" +
 410.122 -                                          "}\n"));
 410.123 -        performDuplicateMethod("toCall");
 410.124 -        verifyContent(src,
 410.125 -                      new File("test/Test.java",
 410.126 -                               "package test;\n" +
 410.127 -                               "public class Test {\n" +
 410.128 -                               "    public static void toCall(int i) {\n" +
 410.129 -                               "        System.err.println(i);\n" +
 410.130 -                               "    }\n" +
 410.131 -                               "    public static void test1(int j) {\n" +
 410.132 -                               "        toCall(1 + j);\n" +
 410.133 -                               "    }\n" +
 410.134 -                               "    public static void test3() {\n" +
 410.135 -                               "        toCall(2);\n" +
 410.136 -                               "    }\n" +
 410.137 -                               "}\n"));
 410.138 -    }
 410.139 -
 410.140 -    private void performDuplicateMethod(final String methodName, Problem... expectedProblems) throws Exception {
 410.141 -        final DuplicateMethodRefactoring[] r = new DuplicateMethodRefactoring[1];
 410.142 -
 410.143 -        JavaSource.forFileObject(src.getFileObject("test/Test.java")).runUserActionTask(new Task<CompilationController>() {
 410.144 -            @Override public void run(CompilationController javac) throws Exception {
 410.145 -                javac.toPhase(JavaSource.Phase.RESOLVED);
 410.146 -
 410.147 -                for (ExecutableElement method : ElementFilter.methodsIn(javac.getTopLevelElements().get(0).getEnclosedElements())) {
 410.148 -                    if (method.getSimpleName().contentEquals(methodName)) {
 410.149 -                        r[0] = new DuplicateMethodRefactoring(TreePathHandle.create(javac.getTrees().getPath(method), javac));
 410.150 -                    }
 410.151 -                }
 410.152 -            }
 410.153 -        }, true);
 410.154 -
 410.155 -        RefactoringSession rs = RefactoringSession.create("Session");
 410.156 -        List<Problem> problems = new LinkedList<Problem>();
 410.157 -
 410.158 -        addAllProblems(problems, r[0].preCheck());
 410.159 -        if (!problemIsFatal(problems)) {
 410.160 -            addAllProblems(problems, r[0].prepare(rs));
 410.161 -        }
 410.162 -        if (!problemIsFatal(problems)) {
 410.163 -            addAllProblems(problems, rs.doRefactoring(true));
 410.164 -        }
 410.165 -
 410.166 -        assertProblems(Arrays.asList(expectedProblems), problems);
 410.167 -    }
 410.168 -}
   411.1 --- a/sandbox/java.hints/java.hints.test/apichanges.xml	Mon Dec 19 11:37:36 2016 +0100
   411.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   411.3 @@ -1,181 +0,0 @@
   411.4 -<?xml version="1.0" encoding="UTF-8"?>
   411.5 -<!-- Search for CHANGEME in this document when copying and using it: -->
   411.6 -<!--
   411.7 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   411.8 -
   411.9 -Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
  411.10 -
  411.11 -Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  411.12 -Other names may be trademarks of their respective owners.
  411.13 -
  411.14 -The contents of this file are subject to the terms of either the GNU
  411.15 -General Public License Version 2 only ("GPL") or the Common
  411.16 -Development and Distribution License("CDDL") (collectively, the
  411.17 -"License"). You may not use this file except in compliance with the
  411.18 -License. You can obtain a copy of the License at
  411.19 -http://www.netbeans.org/cddl-gplv2.html
  411.20 -or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  411.21 -specific language governing permissions and limitations under the
  411.22 -License.  When distributing the software, include this License Header
  411.23 -Notice in each file and include the License file at
  411.24 -nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  411.25 -particular file as subject to the "Classpath" exception as provided
  411.26 -by Oracle in the GPL Version 2 section of the License file that
  411.27 -accompanied this code. If applicable, add the following below the
  411.28 -License Header, with the fields enclosed by brackets [] replaced by
  411.29 -your own identifying information:
  411.30 -"Portions Copyrighted [year] [name of copyright owner]"
  411.31 -
  411.32 -Contributor(s):
  411.33 -
  411.34 -The Original Software is NetBeans. The Initial Developer of the Original
  411.35 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2010 Sun
  411.36 -Microsystems, Inc. All Rights Reserved.
  411.37 -
  411.38 -If you wish your version of this file to be governed by only the CDDL
  411.39 -or only the GPL Version 2, indicate your decision by adding
  411.40 -"[Contributor] elects to include this software in this distribution
  411.41 -under the [CDDL or GPL Version 2] license." If you do not indicate a
  411.42 -single choice of license, a recipient has the option to distribute
  411.43 -your version of this file under either the CDDL, the GPL Version 2 or
  411.44 -to extend the choice of license to its licensees as provided above.
  411.45 -However, if you add GPL Version 2 code and therefore, elected the GPL
  411.46 -Version 2 license, then the option applies only if the new code is
  411.47 -made subject to such option by the copyright holder.
  411.48 --->
  411.49 -<?xml-stylesheet type="text/xml" href="../nbbuild/javadoctools/apichanges.xsl"?>
  411.50 -<!DOCTYPE apichanges PUBLIC "-//NetBeans//DTD API changes list 1.0//EN" "../nbbuild/javadoctools/apichanges.dtd">
  411.51 -
  411.52 -<!--
  411.53 -
  411.54 -INFO FOR PEOPLE ADDING CHANGES:
  411.55 -
  411.56 -Check the DTD (apichanges.dtd) for details on the syntax. You do not
  411.57 -need to regenerate the HTML, as this is part of Javadoc generation; just
  411.58 -change the XML. Rough syntax of a change (several parts optional):
  411.59 -
  411.60 -<change>
  411.61 -    <api name="compiler"/>
  411.62 -    <summary>Some brief description here, can use <b>XHTML</b></summary>
  411.63 -    <version major="1" minor="99"/>
  411.64 -    <date day="13" month="6" year="2001"/>
  411.65 -    <author login="jrhacker"/>
  411.66 -    <compatibility addition="yes"/>
  411.67 -    <description>
  411.68 -        The main description of the change here.
  411.69 -        Again can use full <b>XHTML</b> as needed.
  411.70 -    </description>
  411.71 -    <class package="org.openide.compiler" name="DoWhatIWantCompiler"/>
  411.72 -    <issue number="14309"/>
  411.73 -</change>
  411.74 -
  411.75 -Also permitted elements: <package>, <branch>. <version> is API spec
  411.76 -version, recommended for all new changes. <compatibility> should say
  411.77 -if things were added/modified/deprecated/etc. and give all information
  411.78 -related to upgrading old code. List affected top-level classes and
  411.79 -link to issue numbers if applicable. See the DTD for more details.
  411.80 -
  411.81 -Changes need not be in any particular order, they are sorted in various
  411.82 -ways by the stylesheet anyway.
  411.83 -
  411.84 -Dates are assumed to mean "on the trunk". If you *also* make the same
  411.85 -change on a stabilization branch, use the <branch> tag to indicate this
  411.86 -and explain why the change was made on a branch in the <description>.
  411.87 -
  411.88 -Please only change this file on the trunk! Rather: you can change it
  411.89 -on branches if you want, but these changes will be ignored; only the
  411.90 -trunk version of this file is important.
  411.91 -
  411.92 -Deprecations do not count as incompatible, assuming that code using the
  411.93 -deprecated calls continues to see their documented behavior. But do
  411.94 -specify deprecation="yes" in <compatibility>.
  411.95 -
  411.96 -This file is not a replacement for Javadoc: it is intended to list changes,
  411.97 -not describe the complete current behavior, for which ordinary documentation
  411.98 -is the proper place.
  411.99 -
 411.100 --->
 411.101 -
 411.102 -<apichanges>
 411.103 -
 411.104 -    <!-- First, a list of API names you may use: -->
 411.105 -    <apidefs>
 411.106 -        <apidef name="JavaHintsTest">Java Hints Test API</apidef>
 411.107 -    </apidefs>
 411.108 -
 411.109 -    <!-- ACTUAL CHANGES BEGIN HERE: -->
 411.110 -
 411.111 -    <changes>
 411.112 -        <change id="HintTest-singleHint">
 411.113 -            <api name="JavaHintsTest"/>
 411.114 -            <summary>Allowed to check a single hint</summary>
 411.115 -            <version major="1" minor="9"/>
 411.116 -            <date day="3" month="4" year="2013"/>
 411.117 -            <author login="sdedic"/>
 411.118 -            <compatibility addition="yes" binary="compatible" deletion="no" deprecation="no" modification="no" semantic="compatible" source="compatible"/>
 411.119 -            <description>
 411.120 -                New method <code>run(Class, String)</code> was added so that hint with a specific ID can be run, if the
 411.121 -                class contains multiple hint implementations.
 411.122 -            </description>
 411.123 -            <class name="HintTest" package="org.netbeans.modules.java.hints.test.api"/>
 411.124 -            <issue number="227962"/>
 411.125 -        </change>
 411.126 -        <change id="HintTest-ensureJavaFixes">
 411.127 -             <api name="JavaHintsTest"/>
 411.128 -             <summary>Added assertFixes method to HintWarning</summary>
 411.129 -             <version major="1" minor="8"/>
 411.130 -             <date day="22" month="3" year="2013"/>
 411.131 -             <author login="jlahoda"/>
 411.132 -             <compatibility addition="no" binary="compatible" deletion="no" deprecation="no" modification="no" semantic="incompatible" source="compatible"/>
 411.133 -             <description>
 411.134 -                 <code>HintTest.HintWarning.applyFix</code> now enforces constraints for Inspect&amp;Transform. Unless a hint
 411.135 -                 is marked as <code>Options.QUERY</code>, <code>Options.NO_BULK</code> or <code>Kind.ACTION</code>,
 411.136 -                 the <code>Fix</code> that is being applied is tested to be <code>JavaFix</code> and repeatable,
 411.137 -                 which are the requirements of Inspect&amp;Transform.
 411.138 -             </description>
 411.139 -             <class name="HintTest" package="org.netbeans.modules.java.hints.test.api"/>
 411.140 -             <issue number="227271"/>
 411.141 -        </change>
 411.142 -        
 411.143 -        <change id="HintWarning-assertFixes">
 411.144 -             <api name="JavaHintsTest"/>
 411.145 -             <summary>Added assertFixes method to HintWarning</summary>
 411.146 -             <version major="1" minor="1"/>
 411.147 -             <date day="30" month="3" year="2012"/>
 411.148 -             <author login="jlahoda"/>
 411.149 -             <compatibility addition="yes" binary="compatible" deletion="no" deprecation="no" modification="no" semantic="compatible" source="compatible"/>
 411.150 -             <description>
 411.151 -                 Added assertFixes method to HintWarning
 411.152 -             </description>
 411.153 -             <class name="HintTest" package="org.netbeans.modules.java.hints.test.api"/>
 411.154 -             <issue number="209828"/>
 411.155 -        </change>
 411.156 -
 411.157 -    </changes>
 411.158 -
 411.159 -    <!-- Now the surrounding HTML text and document structure: -->
 411.160 -
 411.161 -    <htmlcontents>
 411.162 -<!-- Generated from apichanges.xml -->
 411.163 -    <head>
 411.164 -      <title>Change History for the Editor Hints SPI</title>
 411.165 -      <link rel="stylesheet" href="prose.css" type="text/css"/>
 411.166 -    </head>
 411.167 -    <body>
 411.168 -
 411.169 -<p class="overviewlink"><a href="@TOP@/overview-summary.html">Overview</a></p>
 411.170 -
 411.171 -<h1>Introduction</h1>
 411.172 -
 411.173 -<p>This document lists changes made to the <a href="@TOP@/overview-summary.html">Editor Hints SPI</a>.</p>
 411.174 -
 411.175 -<!-- The actual lists of changes, as summaries and details: -->
 411.176 -      <hr/>
 411.177 -      <standard-changelists module-code-name="org.netbeans.spi.editor.hints/0"/>
 411.178 -
 411.179 -      <hr/><p>@FOOTER@</p>
 411.180 -
 411.181 -    </body>
 411.182 -  </htmlcontents>
 411.183 -
 411.184 -</apichanges>
   412.1 --- a/sandbox/java.hints/java.hints.test/arch.xml	Mon Dec 19 11:37:36 2016 +0100
   412.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   412.3 @@ -1,1078 +0,0 @@
   412.4 -<?xml version="1.0" encoding="UTF-8"?>
   412.5 -<!DOCTYPE api-answers PUBLIC "-//NetBeans//DTD Arch Answers//EN" "../nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd" [
   412.6 -  <!ENTITY api-questions SYSTEM "../nbbuild/antsrc/org/netbeans/nbbuild/Arch-api-questions.xml">
   412.7 -]>
   412.8 -
   412.9 -<api-answers
  412.10 -  question-version="1.29"
  412.11 -  author="yourname@netbeans.org"
  412.12 ->
  412.13 -
  412.14 -  &api-questions;
  412.15 -
  412.16 -
  412.17 -<!--
  412.18 -        <question id="arch-overall" when="init">
  412.19 -            Describe the overall architecture. 
  412.20 -            <hint>
  412.21 -            What will be API for 
  412.22 -            <a href="http://wiki.netbeans.org/API_Design#Separate_API_for_clients_from_support_API">
  412.23 -                clients and what support API</a>? 
  412.24 -            What parts will be pluggable?
  412.25 -            How will plug-ins be registered? Please use <code>&lt;api type="export"/&gt;</code>
  412.26 -            to describe your general APIs and specify their
  412.27 -            <a href="http://wiki.netbeans.org/API_Stability#Private">
  412.28 -            stability categories</a>.
  412.29 -            If possible please provide simple diagrams.
  412.30 -            </hint>
  412.31 -        </question>
  412.32 --->
  412.33 - <answer id="arch-overall">
  412.34 -  <p>
  412.35 -   <api type="export" category="devel" group="java" name="java.hints.test">
  412.36 -       API to create tests for the custom Java hints.
  412.37 -   </api>
  412.38 -  </p>
  412.39 - </answer>
  412.40 -
  412.41 -
  412.42 -
  412.43 -<!--
  412.44 -        <question id="arch-quality" when="init">
  412.45 -            How will the <a href="http://www.netbeans.org/community/guidelines/q-evangelism.html">quality</a>
  412.46 -            of your code be tested and 
  412.47 -            how are future regressions going to be prevented?
  412.48 -            <hint>
  412.49 -            What kind of testing do
  412.50 -            you want to use? How much functionality, in which areas,
  412.51 -            should be covered by the tests? How you find out that your
  412.52 -            project was successful?
  412.53 -            </hint>
  412.54 -        </question>
  412.55 --->
  412.56 - <answer id="arch-quality">
  412.57 -  <p>
  412.58 -   XXX no answer for arch-quality
  412.59 -  </p>
  412.60 - </answer>
  412.61 -
  412.62 -
  412.63 -
  412.64 -<!--
  412.65 -        <question id="arch-time" when="init">
  412.66 -            What are the time estimates of the work?
  412.67 -            <hint>
  412.68 -            Please express your estimates of how long the design, implementation,
  412.69 -            stabilization are likely to last. How many people will be needed to
  412.70 -            implement this and what is the expected milestone by which the work should be 
  412.71 -            ready?
  412.72 -            </hint>
  412.73 -        </question>
  412.74 --->
  412.75 - <answer id="arch-time">
  412.76 -  <p>
  412.77 -   XXX no answer for arch-time
  412.78 -  </p>
  412.79 - </answer>
  412.80 -
  412.81 -
  412.82 -
  412.83 -<!--
  412.84 -        <question id="arch-usecases" when="init">
  412.85 -            <hint>
  412.86 -                Content of this answer will be displayed as part of page at
  412.87 -                http://www.netbeans.org/download/dev/javadoc/usecases.html 
  412.88 -                You can use tags &lt;usecase name="name&gt; regular html description &lt;/usecase&gt;
  412.89 -                and if you want to use an URL you can prefix if with @TOP@ to begin
  412.90 -                at the root of your javadoc
  412.91 -            </hint>
  412.92 -        
  412.93 -            Describe the main <a href="http://wiki.netbeans.org/API_Design#The_Importance_of_Being_Use_Case_Oriented">
  412.94 -            use cases</a> of the new API. Who will use it under
  412.95 -            what circumstances? What kind of code would typically need to be written
  412.96 -            to use the module?
  412.97 -        </question>
  412.98 --->
  412.99 - <answer id="arch-usecases">
 412.100 -  <p>
 412.101 -   XXX no answer for arch-usecases
 412.102 -  </p>
 412.103 - </answer>
 412.104 -
 412.105 -
 412.106 -
 412.107 -<!--
 412.108 -        <question id="arch-what" when="init">
 412.109 -            What is this project good for?
 412.110 -            <hint>
 412.111 -            Please provide here a few lines describing the project, 
 412.112 -            what problem it should solve, provide links to documentation, 
 412.113 -            specifications, etc.
 412.114 -            </hint>
 412.115 -        </question>
 412.116 --->
 412.117 - <answer id="arch-what">
 412.118 -  <p>
 412.119 -   XXX no answer for arch-what
 412.120 -  </p>
 412.121 - </answer>
 412.122 -
 412.123 -
 412.124 -
 412.125 -<!--
 412.126 -        <question id="arch-where" when="impl">
 412.127 -            Where one can find sources for your module?
 412.128 -            <hint>
 412.129 -                Please provide link to the Hg web client at
 412.130 -                http://hg.netbeans.org/
 412.131 -                or just use tag defaultanswer generate='here'
 412.132 -            </hint>
 412.133 -        </question>
 412.134 --->
 412.135 - <answer id="arch-where">
 412.136 -  <defaultanswer generate='here' />
 412.137 - </answer>
 412.138 -
 412.139 -
 412.140 -
 412.141 -<!--
 412.142 -        <question id="compat-deprecation" when="init">
 412.143 -            How the introduction of your project influences functionality
 412.144 -            provided by previous version of the product?
 412.145 -            <hint>
 412.146 -            If you are planning to deprecate/remove/change any existing APIs,
 412.147 -            list them here accompanied with the reason explaining why you
 412.148 -            are doing so.
 412.149 -            </hint>
 412.150 -        </question>
 412.151 --->
 412.152 - <answer id="compat-deprecation">
 412.153 -  <p>
 412.154 -   XXX no answer for compat-deprecation
 412.155 -  </p>
 412.156 - </answer>
 412.157 -
 412.158 -
 412.159 -
 412.160 -<!--
 412.161 -        <question id="compat-i18n" when="impl">
 412.162 -            Is your module correctly internationalized?
 412.163 -            <hint>
 412.164 -            Correct internationalization means that it obeys instructions 
 412.165 -            at <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/i18n-branding.html">
 412.166 -            NetBeans I18N pages</a>.
 412.167 -            </hint>
 412.168 -        </question>
 412.169 --->
 412.170 - <answer id="compat-i18n">
 412.171 -  <p>
 412.172 -   XXX no answer for compat-i18n
 412.173 -  </p>
 412.174 - </answer>
 412.175 -
 412.176 -
 412.177 -
 412.178 -<!--
 412.179 -        <question id="compat-standards" when="init">
 412.180 -            Does the module implement or define any standards? Is the 
 412.181 -            implementation exact or does it deviate somehow?
 412.182 -        </question>
 412.183 --->
 412.184 - <answer id="compat-standards">
 412.185 -  <p>
 412.186 -   XXX no answer for compat-standards
 412.187 -  </p>
 412.188 - </answer>
 412.189 -
 412.190 -
 412.191 -
 412.192 -<!--
 412.193 -        <question id="compat-version" when="impl">
 412.194 -            Can your module coexist with earlier and future
 412.195 -            versions of itself? Can you correctly read all old settings? Will future
 412.196 -            versions be able to read your current settings? Can you read
 412.197 -            or politely ignore settings stored by a future version?
 412.198 -            
 412.199 -            <hint>
 412.200 -            Very helpful for reading settings is to store version number
 412.201 -            there, so future versions can decide whether how to read/convert
 412.202 -            the settings and older versions can ignore the new ones.
 412.203 -            </hint>
 412.204 -        </question>
 412.205 --->
 412.206 - <answer id="compat-version">
 412.207 -  <p>
 412.208 -   XXX no answer for compat-version
 412.209 -  </p>
 412.210 - </answer>
 412.211 -
 412.212 -
 412.213 -
 412.214 -<!--
 412.215 -        <question id="dep-jre" when="final">
 412.216 -            Which version of JRE do you need (1.2, 1.3, 1.4, etc.)?
 412.217 -            <hint>
 412.218 -            It is expected that if your module runs on 1.x that it will run 
 412.219 -            on 1.x+1 if no, state that please. Also describe here cases where
 412.220 -            you run different code on different versions of JRE and why.
 412.221 -            </hint>
 412.222 -        </question>
 412.223 --->
 412.224 - <answer id="dep-jre">
 412.225 -  <p>
 412.226 -   XXX no answer for dep-jre
 412.227 -  </p>
 412.228 - </answer>
 412.229 -
 412.230 -
 412.231 -
 412.232 -<!--
 412.233 -        <question id="dep-jrejdk" when="final">
 412.234 -            Do you require the JDK or is the JRE enough?
 412.235 -        </question>
 412.236 --->
 412.237 - <answer id="dep-jrejdk">
 412.238 -  <p>
 412.239 -   XXX no answer for dep-jrejdk
 412.240 -  </p>
 412.241 - </answer>
 412.242 -
 412.243 -
 412.244 -
 412.245 -<!--
 412.246 -        <question id="dep-nb" when="init">
 412.247 -            What other NetBeans projects and modules does this one depend on?
 412.248 -            <hint>
 412.249 -            Depending on other NetBeans projects influnces the ability of
 412.250 -            users of your work to customize their own branded version of
 412.251 -            NetBeans by enabling and disabling some modules. Too
 412.252 -            much dependencies restrict this kind of customization. If that
 412.253 -            is your case, then you may want to split your functionality into
 412.254 -            pieces of autoload, eager and regular modules which can be
 412.255 -            enabled independently. Usually the answer to this question
 412.256 -            is generated from your <code>project.xml</code> file, but
 412.257 -            if it is not guessed correctly, you can suppress it by
 412.258 -            specifying &lt;defaultanswer generate="none"/&gt; and
 412.259 -            write here your own. Please describe such projects as imported APIs using
 412.260 -            the <code>&lt;api name="identification" type="import or export" category="stable" url="where is the description" /&gt;</code>.
 412.261 -            By doing this information gets listed in the summary page of your
 412.262 -            javadoc.
 412.263 -            </hint>
 412.264 -        </question>
 412.265 --->
 412.266 - <answer id="dep-nb">
 412.267 -  <defaultanswer generate='here' />
 412.268 - </answer>
 412.269 -
 412.270 -
 412.271 -
 412.272 -<!--
 412.273 -        <question id="dep-non-nb" when="init">
 412.274 -            What other projects outside NetBeans does this one depend on?
 412.275 -            
 412.276 -            <hint>
 412.277 -            Depending on 3rd party libraries is always problematic,
 412.278 -            especially if they are not open source, as that complicates
 412.279 -            the licensing scheme of NetBeans. Please enumerate your
 412.280 -            external dependencies here, so it is correctly understood since
 412.281 -            the begining what are the legal implications of your project.
 412.282 -            Also please note that
 412.283 -            some non-NetBeans projects are packaged as NetBeans modules
 412.284 -            (see <a href="http://libs.netbeans.org/">libraries</a>) and
 412.285 -            it is preferred to use this approach when more modules may
 412.286 -            depend and share such third-party libraries.
 412.287 -            </hint>
 412.288 -        </question>
 412.289 --->
 412.290 - <answer id="dep-non-nb">
 412.291 -  <p>
 412.292 -   XXX no answer for dep-non-nb
 412.293 -  </p>
 412.294 - </answer>
 412.295 -
 412.296 -
 412.297 -
 412.298 -<!--
 412.299 -        <question id="dep-platform" when="init">
 412.300 -            On which platforms does your module run? Does it run in the same
 412.301 -            way on each?
 412.302 -            <hint>
 412.303 -            If you plan any dependency on OS or any usage of native code,
 412.304 -            please describe why you are doing so and describe how you envision
 412.305 -            to enforce the portability of your code.
 412.306 -            Please note that there is a support for <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html#how-os-specific">OS conditionally
 412.307 -            enabled modules</a> which together with autoload/eager modules
 412.308 -            can allow you to enable to provide the best OS aware support
 412.309 -            on certain OSes while providing compatibility bridge on the not
 412.310 -            supported ones.
 412.311 -            Also please list the supported
 412.312 -            OSes/HW platforms and mentioned the lovest version of JDK required
 412.313 -            for your project to run on. Also state whether JRE is enough or
 412.314 -            you really need JDK.
 412.315 -            </hint>
 412.316 -        </question>
 412.317 --->
 412.318 - <answer id="dep-platform">
 412.319 -  <p>
 412.320 -   XXX no answer for dep-platform
 412.321 -  </p>
 412.322 - </answer>
 412.323 -
 412.324 -
 412.325 -
 412.326 -<!--
 412.327 -        <question id="deploy-dependencies" when="final">
 412.328 -            What do other modules need to do to declare a dependency on this one,
 412.329 -            in addition to or instead of the normal module dependency declaration
 412.330 -            (e.g. tokens to require)?
 412.331 -            <hint>
 412.332 -                Provide a sample of the actual lines you would add to a module manifest
 412.333 -                to declare a dependency, for example OpenIDE-Module-Requires: some.token.
 412.334 -                If other modules should not depend on this module, or should just use a
 412.335 -                simple regular module dependency, you can just answer "nothing". If you
 412.336 -                intentionally expose a semistable API to clients using implementation
 412.337 -                dependencies, you should mention that here (but there is no need to give
 412.338 -                an example of usage).
 412.339 -            </hint>
 412.340 -        </question>
 412.341 --->
 412.342 - <answer id="deploy-dependencies">
 412.343 -  <p>
 412.344 -   XXX no answer for deploy-dependencies
 412.345 -  </p>
 412.346 - </answer>
 412.347 -
 412.348 -
 412.349 -
 412.350 -<!--
 412.351 -        <question id="deploy-jar" when="impl">
 412.352 -            Do you deploy just module JAR file(s) or other files as well?
 412.353 -            <hint>
 412.354 -            Usually a module consist of one JAR file (perhaps with Class-Path
 412.355 -            extensions) and also a configuration file that enables it. If you
 412.356 -            have any other files, use
 412.357 -            &lt;api group="java.io.File" name="yourname" type="export" category="friend"&gt;...&lt;/api&gt;
 412.358 -            to define the location, name and stability of your files (of course
 412.359 -            changing "yourname" and "friend" to suit your needs).
 412.360 -            
 412.361 -            If it uses more than one JAR, describe where they are located, how
 412.362 -            they refer to each other. 
 412.363 -            If it consist of module JAR(s) and other files, please describe
 412.364 -            what is their purpose, why other files are necessary. Please 
 412.365 -            make sure that installation/uninstallation leaves the system 
 412.366 -            in state as it was before installation.
 412.367 -            </hint>
 412.368 -        </question>
 412.369 --->
 412.370 - <answer id="deploy-jar">
 412.371 -  <p>
 412.372 -   XXX no answer for deploy-jar
 412.373 -  </p>
 412.374 - </answer>
 412.375 -
 412.376 -
 412.377 -
 412.378 -<!--
 412.379 -        <question id="deploy-nbm" when="impl">
 412.380 -            Can you deploy an NBM via the Update Center?
 412.381 -            <hint>
 412.382 -            If not why?
 412.383 -            </hint>
 412.384 -        </question>
 412.385 --->
 412.386 - <answer id="deploy-nbm">
 412.387 -  <p>
 412.388 -   XXX no answer for deploy-nbm
 412.389 -  </p>
 412.390 - </answer>
 412.391 -
 412.392 -
 412.393 -
 412.394 -<!--
 412.395 -        <question id="deploy-packages" when="init">
 412.396 -            Are packages of your module made inaccessible by not declaring them
 412.397 -            public?
 412.398 -            
 412.399 -            <hint>
 412.400 -            By default NetBeans build harness treats all packages are private.
 412.401 -            If you export some of them - either as public or friend packages,
 412.402 -            you should have a reason. If the reason is described elsewhere
 412.403 -            in this document, you can ignore this question.
 412.404 -            </hint>
 412.405 -        </question>
 412.406 --->
 412.407 - <answer id="deploy-packages">
 412.408 -  <p>
 412.409 -   XXX no answer for deploy-packages
 412.410 -  </p>
 412.411 - </answer>
 412.412 -
 412.413 -
 412.414 -
 412.415 -<!--
 412.416 -        <question id="deploy-shared" when="final">
 412.417 -            Do you need to be installed in the shared location only, or in the user directory only,
 412.418 -            or can your module be installed anywhere?
 412.419 -            <hint>
 412.420 -            Installation location shall not matter, if it does explain why.
 412.421 -            Consider also whether <code>InstalledFileLocator</code> can help.
 412.422 -            </hint>
 412.423 -        </question>
 412.424 --->
 412.425 - <answer id="deploy-shared">
 412.426 -  <p>
 412.427 -   XXX no answer for deploy-shared
 412.428 -  </p>
 412.429 - </answer>
 412.430 -
 412.431 -
 412.432 -
 412.433 -<!--
 412.434 -        <question id="exec-ant-tasks" when="impl">
 412.435 -            Do you define or register any ant tasks that other can use?
 412.436 -            
 412.437 -            <hint>
 412.438 -            If you provide an ant task that users can use, you need to be very
 412.439 -            careful about its syntax and behaviour, as it most likely forms an
 412.440 -	          API for end users and as there is a lot of end users, their reaction
 412.441 -            when such API gets broken can be pretty strong.
 412.442 -            </hint>
 412.443 -        </question>
 412.444 --->
 412.445 - <answer id="exec-ant-tasks">
 412.446 -  <p>
 412.447 -   XXX no answer for exec-ant-tasks
 412.448 -  </p>
 412.449 - </answer>
 412.450 -
 412.451 -
 412.452 -
 412.453 -<!--
 412.454 -        <question id="exec-classloader" when="impl">
 412.455 -            Does your code create its own class loader(s)?
 412.456 -            <hint>
 412.457 -            A bit unusual. Please explain why and what for.
 412.458 -            </hint>
 412.459 -        </question>
 412.460 --->
 412.461 - <answer id="exec-classloader">
 412.462 -  <p>
 412.463 -   XXX no answer for exec-classloader
 412.464 -  </p>
 412.465 - </answer>
 412.466 -
 412.467 -
 412.468 -
 412.469 -<!--
 412.470 -        <question id="exec-component" when="impl">
 412.471 -            Is execution of your code influenced by any (string) property
 412.472 -            of any of your components?
 412.473 -            
 412.474 -            <hint>
 412.475 -            Often <code>JComponent.getClientProperty</code>, <code>Action.getValue</code>
 412.476 -            or <code>PropertyDescriptor.getValue</code>, etc. are used to influence
 412.477 -            a behavior of some code. This of course forms an interface that should
 412.478 -            be documented. Also if one depends on some interface that an object
 412.479 -            implements (<code>component instanceof Runnable</code>) that forms an
 412.480 -            API as well.
 412.481 -            </hint>
 412.482 -        </question>
 412.483 --->
 412.484 - <answer id="exec-component">
 412.485 -  <p>
 412.486 -   XXX no answer for exec-component
 412.487 -  </p>
 412.488 - </answer>
 412.489 -
 412.490 -
 412.491 -
 412.492 -<!--
 412.493 -        <question id="exec-introspection" when="impl">
 412.494 -            Does your module use any kind of runtime type information (<code>instanceof</code>,
 412.495 -            work with <code>java.lang.Class</code>, etc.)?
 412.496 -            <hint>
 412.497 -            Check for cases when you have an object of type A and you also
 412.498 -            expect it to (possibly) be of type B and do some special action. That
 412.499 -            should be documented. The same applies on operations in meta-level
 412.500 -            (Class.isInstance(...), Class.isAssignableFrom(...), etc.).
 412.501 -            </hint>
 412.502 -        </question>
 412.503 --->
 412.504 - <answer id="exec-introspection">
 412.505 -  <p>
 412.506 -   XXX no answer for exec-introspection
 412.507 -  </p>
 412.508 - </answer>
 412.509 -
 412.510 -
 412.511 -
 412.512 -<!--
 412.513 -        <question id="exec-privateaccess" when="final">
 412.514 -            Are you aware of any other parts of the system calling some of 
 412.515 -            your methods by reflection?
 412.516 -            <hint>
 412.517 -            If so, describe the "contract" as an API. Likely private or friend one, but
 412.518 -            still API and consider rewrite of it.
 412.519 -            </hint>
 412.520 -        </question>
 412.521 --->
 412.522 - <answer id="exec-privateaccess">
 412.523 -  <p>
 412.524 -   XXX no answer for exec-privateaccess
 412.525 -  </p>
 412.526 - </answer>
 412.527 -
 412.528 -
 412.529 -
 412.530 -<!--
 412.531 -        <question id="exec-process" when="impl">
 412.532 -            Do you execute an external process from your module? How do you ensure
 412.533 -            that the result is the same on different platforms? Do you parse output?
 412.534 -            Do you depend on result code?
 412.535 -            <hint>
 412.536 -            If you feed an input, parse the output please declare that as an API.
 412.537 -            </hint>
 412.538 -        </question>
 412.539 --->
 412.540 - <answer id="exec-process">
 412.541 -  <p>
 412.542 -   XXX no answer for exec-process
 412.543 -  </p>
 412.544 - </answer>
 412.545 -
 412.546 -
 412.547 -
 412.548 -<!--
 412.549 -        <question id="exec-property" when="impl">
 412.550 -            Is execution of your code influenced by any environment or
 412.551 -            Java system (<code>System.getProperty</code>) property?
 412.552 -            On a similar note, is there something interesting that you
 412.553 -            pass to <code>java.util.logging.Logger</code>? Or do you observe
 412.554 -            what others log?
 412.555 -            <hint>
 412.556 -            If there is a property that can change the behavior of your 
 412.557 -            code, somebody will likely use it. You should describe what it does 
 412.558 -            and the <a href="http://wiki.netbeans.org/API_Stability">stability category</a>
 412.559 -            of this API. You may use
 412.560 -            <pre>
 412.561 -                &lt;api type="export" group="property" name="id" category="private" url="http://..."&gt;
 412.562 -                    description of the property, where it is used, what it influence, etc.
 412.563 -                &lt;/api&gt;            
 412.564 -            </pre>
 412.565 -            </hint>
 412.566 -        </question>
 412.567 --->
 412.568 - <answer id="exec-property">
 412.569 -  <p>
 412.570 -   XXX no answer for exec-property
 412.571 -  </p>
 412.572 - </answer>
 412.573 -
 412.574 -
 412.575 -
 412.576 -<!--
 412.577 -        <question id="exec-reflection" when="impl">
 412.578 -            Does your code use Java Reflection to execute other code?
 412.579 -            <hint>
 412.580 -            This usually indicates a missing or insufficient API in the other
 412.581 -            part of the system. If the other side is not aware of your dependency
 412.582 -            this contract can be easily broken.
 412.583 -            </hint>
 412.584 -        </question>
 412.585 --->
 412.586 - <answer id="exec-reflection">
 412.587 -  <p>
 412.588 -   XXX no answer for exec-reflection
 412.589 -  </p>
 412.590 - </answer>
 412.591 -
 412.592 -
 412.593 -
 412.594 -<!--
 412.595 -        <question id="exec-threading" when="init">
 412.596 -            What threading models, if any, does your module adhere to? How the
 412.597 -            project behaves with respect to threading?
 412.598 -            <hint>
 412.599 -                Is your API threadsafe? Can it be accessed from any threads or
 412.600 -                just from some dedicated ones? Any special relation to AWT and
 412.601 -                its Event Dispatch thread? Also
 412.602 -                if your module calls foreign APIs which have a specific threading model,
 412.603 -                indicate how you comply with the requirements for multithreaded access
 412.604 -                (synchronization, mutexes, etc.) applicable to those APIs.
 412.605 -                If your module defines any APIs, or has complex internal structures
 412.606 -                that might be used from multiple threads, declare how you protect
 412.607 -                data against concurrent access, race conditions, deadlocks, etc.,
 412.608 -                and whether such rules are enforced by runtime warnings, errors, assertions, etc.
 412.609 -                Examples: a class might be non-thread-safe (like Java Collections); might
 412.610 -                be fully thread-safe (internal locking); might require access through a mutex
 412.611 -                (and may or may not automatically acquire that mutex on behalf of a client method);
 412.612 -                might be able to run only in the event queue; etc.
 412.613 -                Also describe when any events are fired: synchronously, asynchronously, etc.
 412.614 -                Ideas: <a href="http://core.netbeans.org/proposals/threading/index.html#recommendations">Threading Recommendations</a> (in progress)
 412.615 -            </hint>
 412.616 -        </question>
 412.617 --->
 412.618 - <answer id="exec-threading">
 412.619 -  <p>
 412.620 -   XXX no answer for exec-threading
 412.621 -  </p>
 412.622 - </answer>
 412.623 -
 412.624 -
 412.625 -
 412.626 -<!--
 412.627 -        <question id="format-clipboard" when="impl">
 412.628 -            Which data flavors (if any) does your code read from or insert to
 412.629 -            the clipboard (by access to clipboard on means calling methods on <code>java.awt.datatransfer.Transferable</code>?
 412.630 -            
 412.631 -            <hint>
 412.632 -            Often Node's deal with clipboard by usage of <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>.
 412.633 -            Check your code for overriding these methods.
 412.634 -            </hint>
 412.635 -        </question>
 412.636 --->
 412.637 - <answer id="format-clipboard">
 412.638 -  <p>
 412.639 -   XXX no answer for format-clipboard
 412.640 -  </p>
 412.641 - </answer>
 412.642 -
 412.643 -
 412.644 -
 412.645 -<!--
 412.646 -        <question id="format-dnd" when="impl">
 412.647 -            Which protocols (if any) does your code understand during Drag &amp; Drop?
 412.648 -            <hint>
 412.649 -            Often Node's deal with clipboard by usage of <code>Node.drag, Node.getDropType</code>. 
 412.650 -            Check your code for overriding these methods. Btw. if they are not overridden, they
 412.651 -            by default delegate to <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>.
 412.652 -            </hint>
 412.653 -        </question>
 412.654 --->
 412.655 - <answer id="format-dnd">
 412.656 -  <p>
 412.657 -   XXX no answer for format-dnd
 412.658 -  </p>
 412.659 - </answer>
 412.660 -
 412.661 -
 412.662 -
 412.663 -<!--
 412.664 -        <question id="format-types" when="impl">
 412.665 -            Which protocols and file formats (if any) does your module read or write on disk,
 412.666 -            or transmit or receive over the network? Do you generate an ant build script?
 412.667 -            Can it be edited and modified? 
 412.668 -            
 412.669 -            <hint>
 412.670 -            <p>
 412.671 -            Files can be read and written by other programs, modules and users. If they influence
 412.672 -            your behaviour, make sure you either document the format or claim that it is a private
 412.673 -            api (using the &lt;api&gt; tag). 
 412.674 -            </p>
 412.675 -            
 412.676 -            <p>
 412.677 -            If you generate an ant build file, this is very likely going to be seen by end users and
 412.678 -            they will be attempted to edit it. You should be ready for that and provide here a link
 412.679 -            to documentation that you have for such purposes and also describe how you are going to
 412.680 -            understand such files during next release, when you (very likely) slightly change the 
 412.681 -            format.
 412.682 -            </p>
 412.683 -            </hint>
 412.684 -        </question>
 412.685 --->
 412.686 - <answer id="format-types">
 412.687 -  <p>
 412.688 -   XXX no answer for format-types
 412.689 -  </p>
 412.690 - </answer>
 412.691 -
 412.692 -
 412.693 -
 412.694 -<!--
 412.695 -        <question id="lookup-lookup" when="init">
 412.696 -            Does your module use <code>org.openide.util.Lookup</code>
 412.697 -            or any similar technology to find any components to communicate with? Which ones?
 412.698 -            
 412.699 -            <hint>
 412.700 -            NetBeans is build around a generic registry of services called
 412.701 -            lookup. It is preferable to use it for registration and discovery
 412.702 -            if possible. See
 412.703 -            <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-util/org/openide/util/lookup/doc-files/index.html">
 412.704 -            The Solution to Comunication Between Components
 412.705 -            </a>. If you do not plan to use lookup and insist usage
 412.706 -            of other solution, then please describe why it is not working for
 412.707 -            you.
 412.708 -            <br/>
 412.709 -            When filling the final version of your arch document, please
 412.710 -            describe the interfaces you are searching for, where 
 412.711 -            are defined, whether you are searching for just one or more of them,
 412.712 -            if the order is important, etc. Also classify the stability of such
 412.713 -            API contract. Use &lt;api group=&amp;lookup&amp; /&gt; tag, so
 412.714 -            your information gets listed in the summary page of your javadoc.
 412.715 -            </hint>
 412.716 -        </question>
 412.717 --->
 412.718 - <answer id="lookup-lookup">
 412.719 -  <p>
 412.720 -   XXX no answer for lookup-lookup
 412.721 -  </p>
 412.722 - </answer>
 412.723 -
 412.724 -
 412.725 -
 412.726 -<!--
 412.727 -        <question id="lookup-register" when="final">
 412.728 -            Do you register anything into lookup for other code to find?
 412.729 -            <hint>
 412.730 -            Do you register using layer file or using a declarative annotation such as <code>@ServiceProvider</code>?
 412.731 -            Who is supposed to find your component?
 412.732 -            </hint>
 412.733 -        </question>
 412.734 --->
 412.735 - <answer id="lookup-register">
 412.736 -  <p>
 412.737 -   XXX no answer for lookup-register
 412.738 -  </p>
 412.739 - </answer>
 412.740 -
 412.741 -
 412.742 -
 412.743 -<!--
 412.744 -        <question id="lookup-remove" when="final">
 412.745 -            Do you remove entries of other modules from lookup?
 412.746 -            <hint>
 412.747 -            Why? Of course, that is possible, but it can be dangerous. Is the module
 412.748 -            your are masking resource from aware of what you are doing?
 412.749 -            </hint>
 412.750 -        </question>
 412.751 --->
 412.752 - <answer id="lookup-remove">
 412.753 -  <p>
 412.754 -   XXX no answer for lookup-remove
 412.755 -  </p>
 412.756 - </answer>
 412.757 -
 412.758 -
 412.759 -
 412.760 -<!--
 412.761 -        <question id="perf-exit" when="final">
 412.762 -            Does your module run any code on exit?
 412.763 -        </question>
 412.764 --->
 412.765 - <answer id="perf-exit">
 412.766 -  <p>
 412.767 -   XXX no answer for perf-exit
 412.768 -  </p>
 412.769 - </answer>
 412.770 -
 412.771 -
 412.772 -
 412.773 -<!--
 412.774 -        <question id="perf-huge_dialogs" when="final">
 412.775 -            Does your module contain any dialogs or wizards with a large number of
 412.776 -            GUI controls such as combo boxes, lists, trees, or text areas?
 412.777 -        </question>
 412.778 --->
 412.779 - <answer id="perf-huge_dialogs">
 412.780 -  <p>
 412.781 -   XXX no answer for perf-huge_dialogs
 412.782 -  </p>
 412.783 - </answer>
 412.784 -
 412.785 -
 412.786 -
 412.787 -<!--
 412.788 -        <question id="perf-limit" when="init">
 412.789 -            Are there any hard-coded or practical limits in the number or size of
 412.790 -            elements your code can handle?
 412.791 -            <hint>
 412.792 -                Most of algorithms have increasing memory and speed complexity
 412.793 -                with respect to size of data they operate on. What is the critical
 412.794 -                part of your project that can be seen as a bottleneck with
 412.795 -                respect to speed or required memory? What are the practical
 412.796 -                sizes of data you tested your project with? What is your estimate
 412.797 -                of potential size of data that would cause visible performance
 412.798 -                problems? Is there some kind of check to detect such situation
 412.799 -                and prevent "hard" crashes - for example the CloneableEditorSupport
 412.800 -                checks for size of a file to be opened in editor
 412.801 -                and if it is larger than 1Mb it shows a dialog giving the
 412.802 -                user the right to decide - e.g. to cancel or commit suicide.
 412.803 -            </hint>
 412.804 -        </question>
 412.805 --->
 412.806 - <answer id="perf-limit">
 412.807 -  <p>
 412.808 -   XXX no answer for perf-limit
 412.809 -  </p>
 412.810 - </answer>
 412.811 -
 412.812 -
 412.813 -
 412.814 -<!--
 412.815 -        <question id="perf-mem" when="final">
 412.816 -            How much memory does your component consume? Estimate
 412.817 -            with a relation to the number of windows, etc.
 412.818 -        </question>
 412.819 --->
 412.820 - <answer id="perf-mem">
 412.821 -  <p>
 412.822 -   XXX no answer for perf-mem
 412.823 -  </p>
 412.824 - </answer>
 412.825 -
 412.826 -
 412.827 -
 412.828 -<!--
 412.829 -        <question id="perf-menus" when="final">
 412.830 -            Does your module use dynamically updated context menus, or
 412.831 -            context-sensitive actions with complicated and slow enablement logic?
 412.832 -            <hint>
 412.833 -                If you do a lot of tricks when adding actions to regular or context menus, you can significantly
 412.834 -                slow down display of the menu, even when the user is not using your action. Pay attention to
 412.835 -                actions you add to the main menu bar, and to context menus of foreign nodes or components. If
 412.836 -                the action is conditionally enabled, or changes its display dynamically, you need to check the
 412.837 -                impact on performance. In some cases it may be more appropriate to make a simple action that is
 412.838 -                always enabled but does more detailed checks in a dialog if it is actually run.
 412.839 -            </hint>
 412.840 -        </question>
 412.841 --->
 412.842 - <answer id="perf-menus">
 412.843 -  <p>
 412.844 -   XXX no answer for perf-menus
 412.845 -  </p>
 412.846 - </answer>
 412.847 -
 412.848 -
 412.849 -
 412.850 -<!--
 412.851 -        <question id="perf-progress" when="final">
 412.852 -            Does your module execute any long-running tasks?
 412.853 -            
 412.854 -            <hint>Long running tasks should never block 
 412.855 -            AWT thread as it badly hurts the UI
 412.856 -            <a href="http://performance.netbeans.org/responsiveness/issues.html">
 412.857 -            responsiveness</a>.
 412.858 -            Tasks like connecting over
 412.859 -            network, computing huge amount of data, compilation
 412.860 -            be done asynchronously (for example
 412.861 -            using <code>RequestProcessor</code>), definitively it should 
 412.862 -            not block AWT thread.
 412.863 -            </hint>
 412.864 -        </question>
 412.865 --->
 412.866 - <answer id="perf-progress">
 412.867 -  <p>
 412.868 -   XXX no answer for perf-progress
 412.869 -  </p>
 412.870 - </answer>
 412.871 -
 412.872 -
 412.873 -
 412.874 -<!--
 412.875 -        <question id="perf-scale" when="init">
 412.876 -            Which external criteria influence the performance of your
 412.877 -            program (size of file in editor, number of files in menu, 
 412.878 -            in source directory, etc.) and how well your code scales?
 412.879 -            <hint>
 412.880 -            Please include some estimates, there are other more detailed 
 412.881 -            questions to answer in later phases of implementation. 
 412.882 -            </hint>
 412.883 -        </question>
 412.884 --->
 412.885 - <answer id="perf-scale">
 412.886 -  <p>
 412.887 -   XXX no answer for perf-scale
 412.888 -  </p>
 412.889 - </answer>
 412.890 -
 412.891 -
 412.892 -
 412.893 -<!--
 412.894 -        <question id="perf-spi" when="init">
 412.895 -            How the performance of the plugged in code will be enforced?
 412.896 -            <hint>
 412.897 -            If you allow foreign code to be plugged into your own module, how
 412.898 -            do you enforce that it will behave correctly and quickly and will not
 412.899 -            negatively influence the performance of your own module?
 412.900 -            </hint>
 412.901 -        </question>
 412.902 --->
 412.903 - <answer id="perf-spi">
 412.904 -  <p>
 412.905 -   XXX no answer for perf-spi
 412.906 -  </p>
 412.907 - </answer>
 412.908 -
 412.909 -
 412.910 -
 412.911 -<!--
 412.912 -        <question id="perf-startup" when="final">
 412.913 -            Does your module run any code on startup?
 412.914 -        </question>
 412.915 --->
 412.916 - <answer id="perf-startup">
 412.917 -  <p>
 412.918 -   XXX no answer for perf-startup
 412.919 -  </p>
 412.920 - </answer>
 412.921 -
 412.922 -
 412.923 -
 412.924 -<!--
 412.925 -        <question id="perf-wakeup" when="final">
 412.926 -            Does any piece of your code wake up periodically and do something
 412.927 -            even when the system is otherwise idle (no user interaction)?
 412.928 -        </question>
 412.929 --->
 412.930 - <answer id="perf-wakeup">
 412.931 -  <p>
 412.932 -   XXX no answer for perf-wakeup
 412.933 -  </p>
 412.934 - </answer>
 412.935 -
 412.936 -
 412.937 -
 412.938 -<!--
 412.939 -        <question id="resources-file" when="final">
 412.940 -            Does your module use <code>java.io.File</code> directly?
 412.941 -            
 412.942 -            <hint>
 412.943 -            NetBeans provide a logical wrapper over plain files called 
 412.944 -            <code>org.openide.filesystems.FileObject</code> that
 412.945 -            provides uniform access to such resources and is the preferred
 412.946 -            way that should be used. But of course there can be situations when
 412.947 -            this is not suitable.
 412.948 -            </hint>
 412.949 -        </question>
 412.950 --->
 412.951 - <answer id="resources-file">
 412.952 -  <p>
 412.953 -   XXX no answer for resources-file
 412.954 -  </p>
 412.955 - </answer>
 412.956 -
 412.957 -
 412.958 -
 412.959 -<!--
 412.960 -        <question id="resources-layer" when="final">
 412.961 -            Does your module provide own layer? Does it create any files or
 412.962 -            folders in it? What it is trying to communicate by that and with which 
 412.963 -            components?
 412.964 -            
 412.965 -            <hint>
 412.966 -            NetBeans allows automatic and declarative installation of resources 
 412.967 -            by module layers. Module register files into appropriate places
 412.968 -            and other components use that information to perform their task
 412.969 -            (build menu, toolbar, window layout, list of templates, set of
 412.970 -            options, etc.). 
 412.971 -            </hint>
 412.972 -        </question>
 412.973 --->
 412.974 - <answer id="resources-layer">
 412.975 -  <p>
 412.976 -   XXX no answer for resources-layer
 412.977 -  </p>
 412.978 - </answer>
 412.979 -
 412.980 -
 412.981 -
 412.982 -<!--
 412.983 -        <question id="resources-mask" when="final">
 412.984 -            Does your module mask/hide/override any resources provided by other modules in
 412.985 -            their layers?
 412.986 -            
 412.987 -            <hint>
 412.988 -            If you mask a file provided by another module, you probably depend
 412.989 -            on that and do not want the other module to (for example) change
 412.990 -            the file's name. That module shall thus make that file available as an API
 412.991 -            of some stability category.
 412.992 -            </hint>
 412.993 -        </question>
 412.994 --->
 412.995 - <answer id="resources-mask">
 412.996 -  <p>
 412.997 -   XXX no answer for resources-mask
 412.998 -  </p>
 412.999 - </answer>
412.1000 -
412.1001 -
412.1002 -
412.1003 -<!--
412.1004 -        <question id="resources-preferences" when="final">
412.1005 -            Does your module uses preferences via Preferences API? Does your module use NbPreferences or
412.1006 -            or regular JDK Preferences ? Does it read, write or both ? 
412.1007 -            Does it share preferences with other modules ? If so, then why ?
412.1008 -            <hint>
412.1009 -                You may use
412.1010 -                    &lt;api type="export" group="preferences"
412.1011 -                    name="preference node name" category="private"&gt;
412.1012 -                    description of individual keys, where it is used, what it
412.1013 -                    influences, whether the module reads/write it, etc.
412.1014 -                    &lt;/api&gt;
412.1015 -                Due to XML ID restrictions, rather than /org/netbeans/modules/foo give the "name" as org.netbeans.modules.foo.
412.1016 -                Note that if you use NbPreferences this name will then be the same as the code name base of the module.
412.1017 -            </hint>
412.1018 -        </question>
412.1019 --->
412.1020 - <answer id="resources-preferences">
412.1021 -  <p>
412.1022 -   XXX no answer for resources-preferences
412.1023 -  </p>
412.1024 - </answer>
412.1025 -
412.1026 -
412.1027 -
412.1028 -<!--
412.1029 -        <question id="resources-read" when="final">
412.1030 -            Does your module read any resources from layers? For what purpose?
412.1031 -            
412.1032 -            <hint>
412.1033 -            As this is some kind of intermodule dependency, it is a kind of API.
412.1034 -            Please describe it and classify according to 
412.1035 -            <a href="http://wiki.netbeans.org/API_Design#What_is_an_API.3F">
412.1036 -            common stability categories</a>.
412.1037 -            </hint>
412.1038 -        </question>
412.1039 --->
412.1040 - <answer id="resources-read">
412.1041 -  <p>
412.1042 -   XXX no answer for resources-read
412.1043 -  </p>
412.1044 - </answer>
412.1045 -
412.1046 -
412.1047 -
412.1048 -<!--
412.1049 -        <question id="security-grant" when="final">
412.1050 -            Does your code grant additional rights to some other code?
412.1051 -            <hint>Avoid using a class loader that adds extra
412.1052 -            permissions to loaded code unless really necessary.
412.1053 -            Also note that your API implementation
412.1054 -            can also expose unneeded permissions to enemy code by
412.1055 -            calling AccessController.doPrivileged().</hint>
412.1056 -        </question>
412.1057 --->
412.1058 - <answer id="security-grant">
412.1059 -  <p>
412.1060 -   XXX no answer for security-grant
412.1061 -  </p>
412.1062 - </answer>
412.1063 -
412.1064 -
412.1065 -
412.1066 -<!--
412.1067 -        <question id="security-policy" when="final">
412.1068 -            Does your functionality require modifications to the standard policy file?
412.1069 -            <hint>Your code might pass control to third-party code not
412.1070 -            coming from trusted domains. This could be code downloaded over the
412.1071 -            network or code coming from libraries that are not bundled
412.1072 -            with NetBeans. Which permissions need to be granted to which domains?</hint>
412.1073 -        </question>
412.1074 --->
412.1075 - <answer id="security-policy">
412.1076 -  <p>
412.1077 -   XXX no answer for security-policy
412.1078 -  </p>
412.1079 - </answer>
412.1080 -
412.1081 -</api-answers>
   413.1 --- a/sandbox/java.hints/java.hints.test/build.xml	Mon Dec 19 11:37:36 2016 +0100
   413.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   413.3 @@ -1,8 +0,0 @@
   413.4 -<?xml version="1.0" encoding="UTF-8"?>
   413.5 -<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
   413.6 -<!-- for some information on what you could do (e.g. targets to override). -->
   413.7 -<!-- If you delete this file and reopen the project it will be recreated. -->
   413.8 -<project name="org.netbeans.modules.java.hints.test" default="netbeans" basedir=".">
   413.9 -    <description>Builds, tests, and runs the project org.netbeans.modules.java.hints.test.</description>
  413.10 -    <import file="nbproject/build-impl.xml"/>
  413.11 -</project>
   414.1 --- a/sandbox/java.hints/java.hints.test/manifest.mf	Mon Dec 19 11:37:36 2016 +0100
   414.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   414.3 @@ -1,5 +0,0 @@
   414.4 -Manifest-Version: 1.0
   414.5 -OpenIDE-Module: org.netbeans.modules.java.hints.test/1
   414.6 -OpenIDE-Module-Implementation-Version: 1
   414.7 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/java/hints/test/Bundle.properties
   414.8 -
   415.1 --- a/sandbox/java.hints/java.hints.test/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   415.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   415.3 @@ -1,45 +0,0 @@
   415.4 -<?xml version="1.0" encoding="UTF-8"?>
   415.5 -<!--
   415.6 -*** GENERATED FROM project.xml - DO NOT EDIT  ***
   415.7 -***         EDIT ../build.xml INSTEAD         ***
   415.8 --->
   415.9 -<project name="org.netbeans.modules.java.hints.test-impl" basedir="..">
  415.10 -    <fail message="Please build using Ant 1.7.1 or higher.">
  415.11 -        <condition>
  415.12 -            <not>
  415.13 -                <antversion atleast="1.7.1"/>
  415.14 -            </not>
  415.15 -        </condition>
  415.16 -    </fail>
  415.17 -    <property file="nbproject/private/suite-private.properties"/>
  415.18 -    <property file="nbproject/suite.properties"/>
  415.19 -    <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
  415.20 -    <property file="${suite.dir}/nbproject/private/platform-private.properties"/>
  415.21 -    <property file="${suite.dir}/nbproject/platform.properties"/>
  415.22 -    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
  415.23 -        <attribute name="name"/>
  415.24 -        <attribute name="value"/>
  415.25 -        <sequential>
  415.26 -            <property name="@{name}" value="${@{value}}"/>
  415.27 -        </sequential>
  415.28 -    </macrodef>
  415.29 -    <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
  415.30 -        <attribute name="property"/>
  415.31 -        <attribute name="value"/>
  415.32 -        <sequential>
  415.33 -            <property name="@{property}" value="@{value}"/>
  415.34 -        </sequential>
  415.35 -    </macrodef>
  415.36 -    <property file="${user.properties.file}"/>
  415.37 -    <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  415.38 -    <nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  415.39 -    <nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  415.40 -    <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
  415.41 -        <condition>
  415.42 -            <not>
  415.43 -                <contains string="${cluster.path.evaluated}" substring="platform"/>
  415.44 -            </not>
  415.45 -        </condition>
  415.46 -    </fail>
  415.47 -    <import file="${harness.dir}/build.xml"/>
  415.48 -</project>
   416.1 --- a/sandbox/java.hints/java.hints.test/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   416.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   416.3 @@ -1,8 +0,0 @@
   416.4 -build.xml.data.CRC32=bdfc486d
   416.5 -build.xml.script.CRC32=fb578ef0
   416.6 -build.xml.stylesheet.CRC32=a56c6a5b@2.70
   416.7 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   416.8 -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   416.9 -nbproject/build-impl.xml.data.CRC32=bdfc486d
  416.10 -nbproject/build-impl.xml.script.CRC32=c676886e
  416.11 -nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.70
   417.1 --- a/sandbox/java.hints/java.hints.test/nbproject/org-netbeans-modules-java-hints-test.sig	Mon Dec 19 11:37:36 2016 +0100
   417.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   417.3 @@ -1,67 +0,0 @@
   417.4 -#Signature file v4.1
   417.5 -#Version 1.6.1
   417.6 -
   417.7 -CLSS public java.lang.Object
   417.8 -cons public init()
   417.9 -meth protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
  417.10 -meth protected void finalize() throws java.lang.Throwable
  417.11 -meth public boolean equals(java.lang.Object)
  417.12 -meth public final java.lang.Class<?> getClass()
  417.13 -meth public final void notify()
  417.14 -meth public final void notifyAll()
  417.15 -meth public final void wait() throws java.lang.InterruptedException
  417.16 -meth public final void wait(long) throws java.lang.InterruptedException
  417.17 -meth public final void wait(long,int) throws java.lang.InterruptedException
  417.18 -meth public int hashCode()
  417.19 -meth public java.lang.String toString()
  417.20 -
  417.21 -CLSS public org.netbeans.modules.java.hints.test.api.HintTest
  417.22 -innr public final AppliedFix
  417.23 -innr public final HintOutput
  417.24 -innr public final HintWarning
  417.25 -meth public !varargs org.netbeans.modules.java.hints.test.api.HintTest classpath(java.net.URL[])
  417.26 -meth public org.netbeans.modules.java.hints.test.api.HintTest input(java.lang.String) throws java.lang.Exception
  417.27 -meth public org.netbeans.modules.java.hints.test.api.HintTest input(java.lang.String,boolean) throws java.lang.Exception
  417.28 -meth public org.netbeans.modules.java.hints.test.api.HintTest input(java.lang.String,java.lang.String) throws java.lang.Exception
  417.29 -meth public org.netbeans.modules.java.hints.test.api.HintTest input(java.lang.String,java.lang.String,boolean) throws java.lang.Exception
  417.30 -meth public org.netbeans.modules.java.hints.test.api.HintTest preference(java.lang.String,boolean)
  417.31 -meth public org.netbeans.modules.java.hints.test.api.HintTest preference(java.lang.String,int)
  417.32 -meth public org.netbeans.modules.java.hints.test.api.HintTest preference(java.lang.String,java.lang.String)
  417.33 -meth public org.netbeans.modules.java.hints.test.api.HintTest setCaretMarker(char)
  417.34 -meth public org.netbeans.modules.java.hints.test.api.HintTest sourceLevel(java.lang.String)
  417.35 -meth public org.netbeans.modules.java.hints.test.api.HintTest$HintOutput run(java.lang.Class<?>) throws java.lang.Exception
  417.36 -meth public static org.netbeans.modules.java.hints.test.api.HintTest create() throws java.lang.Exception
  417.37 -supr java.lang.Object
  417.38 -hfds DEBUGGING_HELPER,ERRORS_COMPARATOR,INDEXING_LOGGER,JUNIT_PROPERTIES_FILENAME,JUNIT_PROPERTIES_LOCATION_PROPERTY,NBJUNIT_WORKDIR,bootClassPath,buildRoot,cache,caret,caretMarker,checkCompilable,compileClassPath,log,sourceLevel,sourcePath,sourceRoot,testFile,testPreferences,usedPaths,workDir
  417.39 -hcls DeadlockTask,TempPreferences,TestProxyClassPathProvider,TestSourceForBinaryQuery,TestSourceLevelQueryImplementation
  417.40 -
  417.41 -CLSS public final org.netbeans.modules.java.hints.test.api.HintTest$AppliedFix
  417.42 - outer org.netbeans.modules.java.hints.test.api.HintTest
  417.43 -cons public init(org.netbeans.modules.java.hints.test.api.HintTest)
  417.44 -meth public java.lang.String getOutput() throws java.lang.Exception
  417.45 -meth public java.lang.String getOutput(java.lang.String) throws java.lang.Exception
  417.46 -meth public org.netbeans.modules.java.hints.test.api.HintTest$AppliedFix assertCompilable() throws java.lang.Exception
  417.47 -meth public org.netbeans.modules.java.hints.test.api.HintTest$AppliedFix assertCompilable(java.lang.String) throws java.lang.Exception
  417.48 -meth public org.netbeans.modules.java.hints.test.api.HintTest$AppliedFix assertOutput(java.lang.String) throws java.lang.Exception
  417.49 -meth public org.netbeans.modules.java.hints.test.api.HintTest$AppliedFix assertOutput(java.lang.String,java.lang.String) throws java.lang.Exception
  417.50 -meth public org.netbeans.modules.java.hints.test.api.HintTest$AppliedFix assertVerbatimOutput(java.lang.String) throws java.lang.Exception
  417.51 -meth public org.netbeans.modules.java.hints.test.api.HintTest$AppliedFix assertVerbatimOutput(java.lang.String,java.lang.String) throws java.lang.Exception
  417.52 -supr java.lang.Object
  417.53 -
  417.54 -CLSS public final org.netbeans.modules.java.hints.test.api.HintTest$HintOutput
  417.55 - outer org.netbeans.modules.java.hints.test.api.HintTest
  417.56 -meth public !varargs org.netbeans.modules.java.hints.test.api.HintTest$HintOutput assertContainsWarnings(java.lang.String[])
  417.57 -meth public !varargs org.netbeans.modules.java.hints.test.api.HintTest$HintOutput assertNotContainsWarnings(java.lang.String[])
  417.58 -meth public !varargs org.netbeans.modules.java.hints.test.api.HintTest$HintOutput assertWarnings(java.lang.String[])
  417.59 -meth public org.netbeans.modules.java.hints.test.api.HintTest$HintWarning findWarning(java.lang.String)
  417.60 -supr java.lang.Object
  417.61 -hfds errors
  417.62 -
  417.63 -CLSS public final org.netbeans.modules.java.hints.test.api.HintTest$HintWarning
  417.64 - outer org.netbeans.modules.java.hints.test.api.HintTest
  417.65 -meth public !varargs org.netbeans.modules.java.hints.test.api.HintTest$HintWarning assertFixes(java.lang.String[]) throws java.lang.Exception
  417.66 -meth public org.netbeans.modules.java.hints.test.api.HintTest$AppliedFix applyFix() throws java.lang.Exception
  417.67 -meth public org.netbeans.modules.java.hints.test.api.HintTest$AppliedFix applyFix(java.lang.String) throws java.lang.Exception
  417.68 -supr java.lang.Object
  417.69 -hfds warning
  417.70 -
   418.1 --- a/sandbox/java.hints/java.hints.test/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   418.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   418.3 @@ -1,8 +0,0 @@
   418.4 -is.autoload=true
   418.5 -javac.source=1.7
   418.6 -javac.compilerargs=-Xlint -Xlint:-serial
   418.7 -spec.version.base=2.0.0
   418.8 -javadoc.arch=${basedir}/arch.xml
   418.9 -javadoc.apichanges=${basedir}/apichanges.xml
  418.10 -requires.nb.javac=true
  418.11 -spec.version.base.fatal.warning=false
   419.1 --- a/sandbox/java.hints/java.hints.test/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   419.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   419.3 @@ -1,276 +0,0 @@
   419.4 -<?xml version="1.0" encoding="UTF-8"?>
   419.5 -<project xmlns="http://www.netbeans.org/ns/project/1">
   419.6 -    <type>org.netbeans.modules.apisupport.project</type>
   419.7 -    <configuration>
   419.8 -        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
   419.9 -            <code-name-base>org.netbeans.modules.java.hints.test</code-name-base>
  419.10 -            <suite-component/>
  419.11 -            <module-dependencies>
  419.12 -                <dependency>
  419.13 -                    <code-name-base>org.netbeans.api.annotations.common</code-name-base>
  419.14 -                    <build-prerequisite/>
  419.15 -                    <compile-dependency/>
  419.16 -                    <run-dependency>
  419.17 -                        <release-version>1</release-version>
  419.18 -                        <specification-version>1.13</specification-version>
  419.19 -                    </run-dependency>
  419.20 -                </dependency>
  419.21 -                <dependency>
  419.22 -                    <code-name-base>org.netbeans.api.java</code-name-base>
  419.23 -                    <build-prerequisite/>
  419.24 -                    <compile-dependency/>
  419.25 -                    <run-dependency>
  419.26 -                        <release-version>1</release-version>
  419.27 -                        <specification-version>1.37</specification-version>
  419.28 -                    </run-dependency>
  419.29 -                </dependency>
  419.30 -                <dependency>
  419.31 -                    <code-name-base>org.netbeans.api.java.classpath</code-name-base>
  419.32 -                    <build-prerequisite/>
  419.33 -                    <compile-dependency/>
  419.34 -                    <run-dependency>
  419.35 -                        <release-version>1</release-version>
  419.36 -                        <specification-version>1.32</specification-version>
  419.37 -                    </run-dependency>
  419.38 -                </dependency>
  419.39 -                <dependency>
  419.40 -                    <code-name-base>org.netbeans.api.progress</code-name-base>
  419.41 -                    <build-prerequisite/>
  419.42 -                    <compile-dependency/>
  419.43 -                    <run-dependency>
  419.44 -                        <release-version>1</release-version>
  419.45 -                        <specification-version>1.33</specification-version>
  419.46 -                    </run-dependency>
  419.47 -                </dependency>
  419.48 -                <dependency>
  419.49 -                    <code-name-base>org.netbeans.core.startup</code-name-base>
  419.50 -                    <build-prerequisite/>
  419.51 -                    <compile-dependency/>
  419.52 -                    <run-dependency>
  419.53 -                        <release-version>1</release-version>
  419.54 -                        <specification-version>1.41</specification-version>
  419.55 -                    </run-dependency>
  419.56 -                </dependency>
  419.57 -                <dependency>
  419.58 -                    <code-name-base>org.netbeans.libs.javacapi</code-name-base>
  419.59 -                    <build-prerequisite/>
  419.60 -                    <compile-dependency/>
  419.61 -                    <run-dependency>
  419.62 -                        <specification-version>7.9</specification-version>
  419.63 -                    </run-dependency>
  419.64 -                </dependency>
  419.65 -                <dependency>
  419.66 -                    <code-name-base>org.netbeans.libs.junit4</code-name-base>
  419.67 -                    <build-prerequisite/>
  419.68 -                    <compile-dependency/>
  419.69 -                    <run-dependency>
  419.70 -                        <specification-version>1.13</specification-version>
  419.71 -                    </run-dependency>
  419.72 -                </dependency>
  419.73 -                <dependency>
  419.74 -                    <code-name-base>org.netbeans.modules.code.analysis</code-name-base>
  419.75 -                    <build-prerequisite/>
  419.76 -                    <compile-dependency/>
  419.77 -                    <run-dependency>
  419.78 -                        <release-version>0</release-version>
  419.79 -                        <implementation-version/>
  419.80 -                    </run-dependency>
  419.81 -                </dependency>
  419.82 -                <dependency>
  419.83 -                    <code-name-base>org.netbeans.modules.editor.mimelookup</code-name-base>
  419.84 -                    <build-prerequisite/>
  419.85 -                    <compile-dependency/>
  419.86 -                    <run-dependency>
  419.87 -                        <release-version>1</release-version>
  419.88 -                        <specification-version>1.25</specification-version>
  419.89 -                    </run-dependency>
  419.90 -                </dependency>
  419.91 -                <dependency>
  419.92 -                    <code-name-base>org.netbeans.modules.java.lexer</code-name-base>
  419.93 -                    <build-prerequisite/>
  419.94 -                    <compile-dependency/>
  419.95 -                    <run-dependency>
  419.96 -                        <release-version>1</release-version>
  419.97 -                        <specification-version>1.17</specification-version>
  419.98 -                    </run-dependency>
  419.99 -                </dependency>
 419.100 -                <dependency>
 419.101 -                    <code-name-base>org.netbeans.modules.java.source</code-name-base>
 419.102 -                    <build-prerequisite/>
 419.103 -                    <compile-dependency/>
 419.104 -                    <run-dependency>
 419.105 -                        <implementation-version/>
 419.106 -                    </run-dependency>
 419.107 -                </dependency>
 419.108 -                <dependency>
 419.109 -                    <code-name-base>org.netbeans.modules.java.source.base</code-name-base>
 419.110 -                    <build-prerequisite/>
 419.111 -                    <compile-dependency/>
 419.112 -                    <run-dependency>
 419.113 -                        <implementation-version/>
 419.114 -                    </run-dependency>
 419.115 -                </dependency>
 419.116 -                <dependency>
 419.117 -                    <code-name-base>org.netbeans.modules.lexer</code-name-base>
 419.118 -                    <build-prerequisite/>
 419.119 -                    <compile-dependency/>
 419.120 -                    <run-dependency>
 419.121 -                        <release-version>2</release-version>
 419.122 -                        <specification-version>1.43</specification-version>
 419.123 -                    </run-dependency>
 419.124 -                </dependency>
 419.125 -                <dependency>
 419.126 -                    <code-name-base>org.netbeans.modules.nbjunit</code-name-base>
 419.127 -                    <build-prerequisite/>
 419.128 -                    <compile-dependency/>
 419.129 -                    <run-dependency>
 419.130 -                        <release-version>1</release-version>
 419.131 -                        <specification-version>1.74</specification-version>
 419.132 -                    </run-dependency>
 419.133 -                </dependency>
 419.134 -                <dependency>
 419.135 -                    <code-name-base>org.netbeans.modules.parsing.api</code-name-base>
 419.136 -                    <build-prerequisite/>
 419.137 -                    <compile-dependency/>
 419.138 -                    <run-dependency>
 419.139 -                        <release-version>1</release-version>
 419.140 -                        <implementation-version/>
 419.141 -                    </run-dependency>
 419.142 -                </dependency>
 419.143 -                <dependency>
 419.144 -                    <code-name-base>org.netbeans.modules.parsing.indexing</code-name-base>
 419.145 -                    <build-prerequisite/>
 419.146 -                    <compile-dependency/>
 419.147 -                    <run-dependency>
 419.148 -                        <implementation-version/>
 419.149 -                    </run-dependency>
 419.150 -                </dependency>
 419.151 -                <dependency>
 419.152 -                    <code-name-base>org.netbeans.modules.projectapi</code-name-base>
 419.153 -                    <build-prerequisite/>
 419.154 -                    <compile-dependency/>
 419.155 -                    <run-dependency>
 419.156 -                        <release-version>1</release-version>
 419.157 -                        <specification-version>1.41</specification-version>
 419.158 -                    </run-dependency>
 419.159 -                </dependency>
 419.160 -                <dependency>
 419.161 -                    <code-name-base>org.netbeans.modules.projectuiapi</code-name-base>
 419.162 -                    <build-prerequisite/>
 419.163 -                    <compile-dependency/>
 419.164 -                    <run-dependency>
 419.165 -                        <release-version>1</release-version>
 419.166 -                        <specification-version>1.54</specification-version>
 419.167 -                    </run-dependency>
 419.168 -                </dependency>
 419.169 -                <dependency>
 419.170 -                    <code-name-base>org.netbeans.modules.projectuiapi.base</code-name-base>
 419.171 -                    <build-prerequisite/>
 419.172 -                    <compile-dependency/>
 419.173 -                    <run-dependency>
 419.174 -                        <release-version>1</release-version>
 419.175 -                        <specification-version>1.79.0.9</specification-version>
 419.176 -                    </run-dependency>
 419.177 -                </dependency>
 419.178 -                <dependency>
 419.179 -                    <code-name-base>org.netbeans.modules.refactoring.api</code-name-base>
 419.180 -                    <build-prerequisite/>
 419.181 -                    <compile-dependency/>
 419.182 -                    <run-dependency>
 419.183 -                        <specification-version>1.34</specification-version>
 419.184 -                    </run-dependency>
 419.185 -                </dependency>
 419.186 -                <dependency>
 419.187 -                    <code-name-base>org.netbeans.spi.editor.hints</code-name-base>
 419.188 -                    <build-prerequisite/>
 419.189 -                    <compile-dependency/>
 419.190 -                    <run-dependency>
 419.191 -                        <release-version>0-1</release-version>
 419.192 -                        <specification-version>1.22</specification-version>
 419.193 -                    </run-dependency>
 419.194 -                </dependency>
 419.195 -                <dependency>
 419.196 -                    <code-name-base>org.netbeans.spi.java.hints</code-name-base>
 419.197 -                    <build-prerequisite/>
 419.198 -                    <compile-dependency/>
 419.199 -                    <run-dependency>
 419.200 -                        <implementation-version/>
 419.201 -                    </run-dependency>
 419.202 -                </dependency>
 419.203 -                <dependency>
 419.204 -                    <code-name-base>org.openide.filesystems</code-name-base>
 419.205 -                    <build-prerequisite/>
 419.206 -                    <compile-dependency/>
 419.207 -                    <run-dependency>
 419.208 -                        <specification-version>7.55</specification-version>
 419.209 -                    </run-dependency>
 419.210 -                </dependency>
 419.211 -                <dependency>
 419.212 -                    <code-name-base>org.openide.loaders</code-name-base>
 419.213 -                    <build-prerequisite/>
 419.214 -                    <compile-dependency/>
 419.215 -                    <run-dependency>
 419.216 -                        <specification-version>7.33</specification-version>
 419.217 -                    </run-dependency>
 419.218 -                </dependency>
 419.219 -                <dependency>
 419.220 -                    <code-name-base>org.openide.nodes</code-name-base>
 419.221 -                    <build-prerequisite/>
 419.222 -                    <compile-dependency/>
 419.223 -                    <run-dependency>
 419.224 -                        <specification-version>7.26</specification-version>
 419.225 -                    </run-dependency>
 419.226 -                </dependency>
 419.227 -                <dependency>
 419.228 -                    <code-name-base>org.openide.text</code-name-base>
 419.229 -                    <build-prerequisite/>
 419.230 -                    <compile-dependency/>
 419.231 -                    <run-dependency>
 419.232 -                        <specification-version>6.44</specification-version>
 419.233 -                    </run-dependency>
 419.234 -                </dependency>
 419.235 -                <dependency>
 419.236 -                    <code-name-base>org.openide.util</code-name-base>
 419.237 -                    <build-prerequisite/>
 419.238 -                    <compile-dependency/>
 419.239 -                    <run-dependency>
 419.240 -                        <specification-version>8.20</specification-version>
 419.241 -                    </run-dependency>
 419.242 -                </dependency>
 419.243 -                <dependency>
 419.244 -                    <code-name-base>org.openide.util.lookup</code-name-base>
 419.245 -                    <build-prerequisite/>
 419.246 -                    <compile-dependency/>
 419.247 -                    <run-dependency>
 419.248 -                        <specification-version>8.12</specification-version>
 419.249 -                    </run-dependency>
 419.250 -                </dependency>
 419.251 -                <dependency>
 419.252 -                    <code-name-base>org.openide.util.ui</code-name-base>
 419.253 -                    <build-prerequisite/>
 419.254 -                    <compile-dependency/>
 419.255 -                    <run-dependency>
 419.256 -                        <specification-version>9.3</specification-version>
 419.257 -                    </run-dependency>
 419.258 -                </dependency>
 419.259 -            </module-dependencies>
 419.260 -            <test-dependencies>
 419.261 -                <test-type>
 419.262 -                    <name>unit</name>
 419.263 -                    <test-dependency>
 419.264 -                        <code-name-base>org.netbeans.modules.parsing.nb</code-name-base>
 419.265 -                        <recursive/>
 419.266 -                        <compile-dependency/>
 419.267 -                    </test-dependency>
 419.268 -                    <test-dependency>
 419.269 -                        <code-name-base>org.netbeans.modules.projectapi.nb</code-name-base>
 419.270 -                        <compile-dependency/>
 419.271 -                    </test-dependency>
 419.272 -                </test-type>
 419.273 -            </test-dependencies>
 419.274 -            <public-packages>
 419.275 -                <package>org.netbeans.modules.java.hints.test.api</package>
 419.276 -            </public-packages>
 419.277 -        </data>
 419.278 -    </configuration>
 419.279 -</project>
   420.1 --- a/sandbox/java.hints/java.hints.test/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   420.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   420.3 @@ -1,1 +0,0 @@
   420.4 -suite.dir=${basedir}/..
   421.1 --- a/sandbox/java.hints/java.hints.test/src/org/netbeans/modules/java/hints/test/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   421.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   421.3 @@ -1,1 +0,0 @@
   421.4 -OpenIDE-Module-Name=Java Hints Test API
   422.1 --- a/sandbox/java.hints/java.hints.test/src/org/netbeans/modules/java/hints/test/Utilities.java	Mon Dec 19 11:37:36 2016 +0100
   422.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   422.3 @@ -1,104 +0,0 @@
   422.4 -/*
   422.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   422.6 - *
   422.7 - * Copyright 2012 Oracle and/or its affiliates. All rights reserved.
   422.8 - *
   422.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  422.10 - * Other names may be trademarks of their respective owners.
  422.11 - *
  422.12 - * The contents of this file are subject to the terms of either the GNU
  422.13 - * General Public License Version 2 only ("GPL") or the Common
  422.14 - * Development and Distribution License("CDDL") (collectively, the
  422.15 - * "License"). You may not use this file except in compliance with the
  422.16 - * License. You can obtain a copy of the License at
  422.17 - * http://www.netbeans.org/cddl-gplv2.html
  422.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  422.19 - * specific language governing permissions and limitations under the
  422.20 - * License.  When distributing the software, include this License Header
  422.21 - * Notice in each file and include the License file at
  422.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  422.23 - * particular file as subject to the "Classpath" exception as provided
  422.24 - * by Oracle in the GPL Version 2 section of the License file that
  422.25 - * accompanied this code. If applicable, add the following below the
  422.26 - * License Header, with the fields enclosed by brackets [] replaced by
  422.27 - * your own identifying information:
  422.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  422.29 - *
  422.30 - * If you wish your version of this file to be governed by only the CDDL
  422.31 - * or only the GPL Version 2, indicate your decision by adding
  422.32 - * "[Contributor] elects to include this software in this distribution
  422.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  422.34 - * single choice of license, a recipient has the option to distribute
  422.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  422.36 - * to extend the choice of license to its licensees as provided above.
  422.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  422.38 - * Version 2 license, then the option applies only if the new code is
  422.39 - * made subject to such option by the copyright holder.
  422.40 - *
  422.41 - * Contributor(s):
  422.42 - *
  422.43 - * Portions Copyrighted 2012 Sun Microsystems, Inc.
  422.44 - */
  422.45 -package org.netbeans.modules.java.hints.test;
  422.46 -
  422.47 -import org.netbeans.api.editor.mimelookup.MimePath;
  422.48 -import org.netbeans.modules.java.source.indexing.JavaCustomIndexer;
  422.49 -import org.netbeans.modules.java.source.parsing.JavacParser;
  422.50 -import org.netbeans.modules.java.source.parsing.JavacParserFactory;
  422.51 -import org.netbeans.spi.editor.mimelookup.MimeDataProvider;
  422.52 -import org.openide.filesystems.FileObject;
  422.53 -import org.openide.filesystems.MIMEResolver;
  422.54 -import org.openide.util.Lookup;
  422.55 -import org.openide.util.lookup.Lookups;
  422.56 -import org.openide.util.lookup.ProxyLookup;
  422.57 -import org.openide.util.lookup.ServiceProvider;
  422.58 -
  422.59 -/**
  422.60 - *
  422.61 - * @author lahvac
  422.62 - */
  422.63 -public class Utilities {
  422.64 -
  422.65 -    @ServiceProvider(service = Lookup.class)
  422.66 -    public static final class TestLookup extends ProxyLookup {
  422.67 -
  422.68 -        public void setLookupsImpl(Lookup... lookups) {
  422.69 -            setLookups(lookups);
  422.70 -        }
  422.71 -
  422.72 -    }
  422.73 -
  422.74 -    @ServiceProvider(service=MimeDataProvider.class)
  422.75 -    public static final class JavacParserProvider implements MimeDataProvider {
  422.76 -
  422.77 -        private Lookup javaLookup = Lookups.fixed(new JavacParserFactory(), new JavaCustomIndexer.Factory());
  422.78 -
  422.79 -        public Lookup getLookup(MimePath mimePath) {
  422.80 -            if (mimePath.getPath().endsWith(JavacParser.MIME_TYPE)) {
  422.81 -                return javaLookup;
  422.82 -            }
  422.83 -
  422.84 -            return Lookup.EMPTY;
  422.85 -        }
  422.86 -
  422.87 -    }
  422.88 -
  422.89 -    @ServiceProvider(service=MIMEResolver.class)
  422.90 -    public static final class JavaMimeResolver extends MIMEResolver {
  422.91 -
  422.92 -        public JavaMimeResolver() {
  422.93 -            super(JavacParser.MIME_TYPE);
  422.94 -        }
  422.95 -
  422.96 -        @Override
  422.97 -        public String findMIMEType(FileObject fo) {
  422.98 -            if ("java".equals(fo.getExt())) {
  422.99 -                return JavacParser.MIME_TYPE;
 422.100 -            }
 422.101 -
 422.102 -            return null;
 422.103 -        }
 422.104 -
 422.105 -    }
 422.106 -
 422.107 -}
   423.1 --- a/sandbox/java.hints/java.hints.test/src/org/netbeans/modules/java/hints/test/api/HintTest.java	Mon Dec 19 11:37:36 2016 +0100
   423.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   423.3 @@ -1,1427 +0,0 @@
   423.4 -/*
   423.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   423.6 - *
   423.7 - * Copyright 2012 Oracle and/or its affiliates. All rights reserved.
   423.8 - *
   423.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  423.10 - * Other names may be trademarks of their respective owners.
  423.11 - *
  423.12 - * The contents of this file are subject to the terms of either the GNU
  423.13 - * General Public License Version 2 only ("GPL") or the Common
  423.14 - * Development and Distribution License("CDDL") (collectively, the
  423.15 - * "License"). You may not use this file except in compliance with the
  423.16 - * License. You can obtain a copy of the License at
  423.17 - * http://www.netbeans.org/cddl-gplv2.html
  423.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  423.19 - * specific language governing permissions and limitations under the
  423.20 - * License.  When distributing the software, include this License Header
  423.21 - * Notice in each file and include the License file at
  423.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  423.23 - * particular file as subject to the "Classpath" exception as provided
  423.24 - * by Oracle in the GPL Version 2 section of the License file that
  423.25 - * accompanied this code. If applicable, add the following below the
  423.26 - * License Header, with the fields enclosed by brackets [] replaced by
  423.27 - * your own identifying information:
  423.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  423.29 - *
  423.30 - * If you wish your version of this file to be governed by only the CDDL
  423.31 - * or only the GPL Version 2, indicate your decision by adding
  423.32 - * "[Contributor] elects to include this software in this distribution
  423.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  423.34 - * single choice of license, a recipient has the option to distribute
  423.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  423.36 - * to extend the choice of license to its licensees as provided above.
  423.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  423.38 - * Version 2 license, then the option applies only if the new code is
  423.39 - * made subject to such option by the copyright holder.
  423.40 - *
  423.41 - * Contributor(s):
  423.42 - *
  423.43 - * Portions Copyrighted 2012 Sun Microsystems, Inc.
  423.44 - */
  423.45 -package org.netbeans.modules.java.hints.test.api;
  423.46 -
  423.47 -import com.sun.source.tree.CompilationUnitTree;
  423.48 -import com.sun.source.util.TreePath;
  423.49 -import java.io.File;
  423.50 -import java.io.FileInputStream;
  423.51 -import java.io.IOException;
  423.52 -import java.io.OutputStream;
  423.53 -import java.lang.ref.Reference;
  423.54 -import java.lang.ref.WeakReference;
  423.55 -import java.net.URL;
  423.56 -import java.util.ArrayList;
  423.57 -import java.util.Arrays;
  423.58 -import java.util.Collection;
  423.59 -import java.util.Collections;
  423.60 -import java.util.Comparator;
  423.61 -import java.util.Enumeration;
  423.62 -import java.util.HashMap;
  423.63 -import java.util.HashSet;
  423.64 -import java.util.IdentityHashMap;
  423.65 -import java.util.LinkedList;
  423.66 -import java.util.List;
  423.67 -import java.util.Map;
  423.68 -import java.util.Map.Entry;
  423.69 -import java.util.Properties;
  423.70 -import java.util.Set;
  423.71 -import java.util.concurrent.atomic.AtomicBoolean;
  423.72 -import java.util.logging.Handler;
  423.73 -import java.util.logging.Level;
  423.74 -import java.util.logging.LogRecord;
  423.75 -import java.util.logging.Logger;
  423.76 -import java.util.prefs.AbstractPreferences;
  423.77 -import java.util.prefs.BackingStoreException;
  423.78 -import java.util.prefs.Preferences;
  423.79 -import java.util.regex.Pattern;
  423.80 -import javax.swing.event.ChangeListener;
  423.81 -import javax.swing.text.Document;
  423.82 -import javax.tools.Diagnostic;
  423.83 -import junit.framework.Assert;
  423.84 -import static junit.framework.Assert.assertEquals;
  423.85 -import static junit.framework.Assert.assertFalse;
  423.86 -import static junit.framework.Assert.assertNotNull;
  423.87 -import static junit.framework.Assert.assertNotSame;
  423.88 -import static junit.framework.Assert.assertTrue;
  423.89 -
  423.90 -import org.netbeans.api.editor.mimelookup.MimeLookup;
  423.91 -import org.netbeans.api.java.classpath.ClassPath;
  423.92 -import org.netbeans.api.java.lexer.JavaTokenId;
  423.93 -import org.netbeans.api.java.queries.SourceForBinaryQuery;
  423.94 -import org.netbeans.api.java.source.ClasspathInfo;
  423.95 -import org.netbeans.api.java.source.CompilationController;
  423.96 -import org.netbeans.api.java.source.CompilationInfo;
  423.97 -import org.netbeans.api.java.source.JavaSource;
  423.98 -import org.netbeans.api.java.source.JavaSource.Phase;
  423.99 -import org.netbeans.api.java.source.ModificationResult;
 423.100 -import org.netbeans.api.java.source.ModificationResult.Difference;
 423.101 -import org.netbeans.api.java.source.Task;
 423.102 -import org.netbeans.api.java.source.WorkingCopy;
 423.103 -import org.netbeans.api.lexer.Language;
 423.104 -import org.netbeans.api.project.ui.*;
 423.105 -import org.netbeans.core.startup.Main;
 423.106 -import org.netbeans.junit.NbTestCase;
 423.107 -import org.netbeans.modules.java.JavaDataLoader;
 423.108 -import org.netbeans.modules.java.hints.providers.code.CodeHintProviderImpl;
 423.109 -import org.netbeans.modules.java.hints.providers.code.FSWrapper;
 423.110 -import org.netbeans.modules.java.hints.providers.code.FSWrapper.ClassWrapper;
 423.111 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
 423.112 -import org.netbeans.modules.java.hints.providers.spi.HintDescription.Worker;
 423.113 -import org.netbeans.modules.java.hints.providers.spi.HintDescriptionFactory;
 423.114 -import org.netbeans.modules.java.hints.providers.spi.HintMetadata;
 423.115 -import org.netbeans.modules.java.hints.providers.spi.HintMetadata.Options;
 423.116 -import org.netbeans.modules.java.hints.spiimpl.JavaFixImpl;
 423.117 -import org.netbeans.modules.java.hints.spiimpl.JavaFixImpl.Accessor;
 423.118 -import org.netbeans.modules.java.hints.spiimpl.MessageImpl;
 423.119 -import org.netbeans.modules.java.hints.spiimpl.SyntheticFix;
 423.120 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch;
 423.121 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.BatchResult;
 423.122 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.Folder;
 423.123 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.Resource;
 423.124 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.Scope;
 423.125 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.VerifiedSpansCallBack;
 423.126 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchUtilities;
 423.127 -import org.netbeans.modules.java.hints.spiimpl.batch.ProgressHandleWrapper;
 423.128 -import org.netbeans.modules.java.hints.spiimpl.batch.Scopes;
 423.129 -import org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker;
 423.130 -import org.netbeans.modules.java.hints.spiimpl.options.HintsSettings;
 423.131 -import org.netbeans.modules.java.hints.test.Utilities.TestLookup;
 423.132 -import org.netbeans.modules.java.source.JavaSourceAccessor;
 423.133 -import org.netbeans.modules.java.source.TreeLoader;
 423.134 -import org.netbeans.modules.parsing.api.indexing.IndexingManager;
 423.135 -import org.netbeans.modules.parsing.impl.indexing.CacheFolder;
 423.136 -import org.netbeans.modules.parsing.impl.indexing.MimeTypes;
 423.137 -import org.netbeans.modules.refactoring.spi.RefactoringElementImplementation;
 423.138 -import org.netbeans.spi.editor.hints.ErrorDescription;
 423.139 -import org.netbeans.spi.editor.hints.Fix;
 423.140 -import org.netbeans.spi.editor.hints.Severity;
 423.141 -import org.netbeans.spi.java.classpath.ClassPathProvider;
 423.142 -import org.netbeans.spi.java.classpath.support.ClassPathSupport;
 423.143 -import org.netbeans.spi.java.hints.Hint.Kind;
 423.144 -import org.netbeans.spi.java.hints.HintContext;
 423.145 -import org.netbeans.spi.java.hints.JavaFix;
 423.146 -import org.netbeans.spi.java.queries.SourceForBinaryQueryImplementation;
 423.147 -import org.netbeans.spi.java.queries.SourceLevelQueryImplementation;
 423.148 -import org.openide.LifecycleManager;
 423.149 -import org.openide.cookies.EditorCookie;
 423.150 -import org.openide.filesystems.FileObject;
 423.151 -import org.openide.filesystems.FileStateInvalidException;
 423.152 -import org.openide.filesystems.FileSystem;
 423.153 -import org.openide.filesystems.FileUtil;
 423.154 -import org.openide.filesystems.MultiFileSystem;
 423.155 -import org.openide.filesystems.Repository;
 423.156 -import org.openide.filesystems.URLMapper;
 423.157 -import org.openide.filesystems.XMLFileSystem;
 423.158 -import org.openide.loaders.DataObject;
 423.159 -import org.openide.loaders.DataObjectNotFoundException;
 423.160 -import org.openide.util.Exceptions;
 423.161 -import org.openide.util.Lookup;
 423.162 -import org.openide.util.NbBundle;
 423.163 -import org.openide.util.lookup.Lookups;
 423.164 -
 423.165 -/**A support class for writing a test for a Java Hint. A test verifying that correct
 423.166 - * warnings are produced should look like:
 423.167 - * <pre>
 423.168 - * HintTest.create()
 423.169 - *         .input("&lt;input Java source code>")
 423.170 - *         .run(&lt;class containg the hint>)
 423.171 - *         .assertWarnings("&lt;required warning(s)>");
 423.172 - * </pre>
 423.173 - *
 423.174 - * Note: when verifying that no warnings are produced in a particular situation,
 423.175 - * do not pass any warnings to the {@code assertWarnings} method.
 423.176 - *
 423.177 - * A test verifying that a hint's transformation is correct:
 423.178 - * <pre>
 423.179 - * HintTest.create()
 423.180 - *         .input("&lt;input Java source code>")
 423.181 - *         .run(&lt;class containg the hint>)
 423.182 - *         .findWarning("&lt;a warning produce by the hint>")
 423.183 - *         .applyFix() //fill apply the only fix in the given ErrorDescription
 423.184 - *         .assertCompilable()
 423.185 - *         .assertOutput("&lt;output Java source code>");
 423.186 - * </pre>
 423.187 - *
 423.188 - * All the tests run under the {@code test} branding, which allows to specify test values
 423.189 - * for bundle keys for warning and fix in {@code Bundle_test.properties}, to isolate the
 423.190 - * test from changes in the production {@code Bundle.properties}.
 423.191 - *
 423.192 - * @author lahvac
 423.193 - */
 423.194 -public class HintTest {
 423.195 -
 423.196 -    private static final Logger INDEXING_LOGGER = /* RepositoryUpdater.UI_LOGGER */ Logger.getLogger("org.netbeans.ui.indexing");
 423.197 -    static {
 423.198 -        INDEXING_LOGGER.setLevel(Level.WARNING);
 423.199 -    }
 423.200 -
 423.201 -    private final File workDir;
 423.202 -    private final FileObject sourceRoot;
 423.203 -    private final FileObject buildRoot;
 423.204 -    private final FileObject cache;
 423.205 -    private final Preferences testPreferences;
 423.206 -    private final HintsSettings hintSettings;
 423.207 -    private final List<FileObject> checkCompilable = new ArrayList<FileObject>();
 423.208 -    private final List<FileObject> testFiles = new ArrayList<FileObject>();
 423.209 -    private String sourceLevel = "1.5";
 423.210 -    private Character caretMarker;
 423.211 -    private FileObject testFile;
 423.212 -    private int caret = -1;
 423.213 -    private ClassPath sourcePath;
 423.214 -    private ClassPath compileClassPath = ClassPathSupport.createClassPath(new URL[0]);
 423.215 -
 423.216 -    private HintTest() throws Exception {
 423.217 -        List<URL> layers = new LinkedList<URL>();
 423.218 -
 423.219 -        for (String layer : new String[] {"META-INF/generated-layer.xml"}) {
 423.220 -            boolean found = false;
 423.221 -
 423.222 -            for (Enumeration<URL> en = Thread.currentThread().getContextClassLoader().getResources(layer); en.hasMoreElements(); ) {
 423.223 -                found = true;
 423.224 -                layers.add(en.nextElement());
 423.225 -            }
 423.226 -
 423.227 -            Assert.assertTrue(layer, found);
 423.228 -        }
 423.229 -
 423.230 -        XMLFileSystem xmlFS = new XMLFileSystem();
 423.231 -        xmlFS.setXmlUrls(layers.toArray(new URL[0]));
 423.232 -
 423.233 -        FileSystem system = new MultiFileSystem(new FileSystem[] {FileUtil.createMemoryFileSystem(), xmlFS});
 423.234 -
 423.235 -        Repository repository = new Repository(system);
 423.236 -
 423.237 -        assertEquals(Lookup.getDefault().getClass().getCanonicalName(), TestLookup.class, Lookup.getDefault().getClass());
 423.238 -
 423.239 -        ((TestLookup) Lookup.getDefault()).setLookupsImpl(
 423.240 -            Lookups.fixed(repository,
 423.241 -                          new TestProxyClassPathProvider(),
 423.242 -                          new TestSourceForBinaryQuery(),
 423.243 -                          new TestSourceLevelQueryImplementation(),
 423.244 -                          JavaDataLoader.findObject(JavaDataLoader.class, true)),
 423.245 -            Lookups.metaInfServices(HintTest.class.getClassLoader()),
 423.246 -            Lookups.singleton(HintTest.class.getClassLoader())
 423.247 -        );
 423.248 -
 423.249 -        Set<String> amt = MimeTypes.getAllMimeTypes();
 423.250 -        if (amt == null) {
 423.251 -            amt = new HashSet<String>();
 423.252 -        } else {
 423.253 -            amt = new HashSet<String>(amt);
 423.254 -        }
 423.255 -        amt.add("text/x-java");
 423.256 -        MimeTypes.setAllMimeTypes(amt);
 423.257 -        org.netbeans.api.project.ui.OpenProjects.getDefault().getOpenProjects();
 423.258 -
 423.259 -        TreeLoader.DISABLE_CONFINEMENT_TEST = true;
 423.260 -        testPreferences = new TempPreferences();
 423.261 -        hintSettings = new HintsSettings() {
 423.262 -            @Override public boolean isEnabled(HintMetadata hint) {
 423.263 -                return true;
 423.264 -            }
 423.265 -            @Override public void setEnabled(HintMetadata hint, boolean value) {
 423.266 -                throw new UnsupportedOperationException("Not supported.");
 423.267 -            }
 423.268 -            @Override public Preferences getHintPreferences(HintMetadata hint) {
 423.269 -                return testPreferences;
 423.270 -            }
 423.271 -            @Override public Severity getSeverity(HintMetadata hint) {
 423.272 -                return hint.severity;
 423.273 -            }
 423.274 -            @Override public void setSeverity(HintMetadata hint, Severity severity) {
 423.275 -                throw new UnsupportedOperationException("Not supported.");
 423.276 -            }
 423.277 -        };
 423.278 -
 423.279 -        workDir = getWorkDir();
 423.280 -        deleteSubFiles(workDir);
 423.281 -        FileUtil.refreshFor(workDir);
 423.282 -
 423.283 -        FileObject wd = FileUtil.toFileObject(workDir);
 423.284 -        
 423.285 -        assertNotNull(wd);
 423.286 -
 423.287 -        sourceRoot = FileUtil.createFolder(wd, "src");
 423.288 -        buildRoot = FileUtil.createFolder(wd, "build");
 423.289 -        cache = FileUtil.createFolder(wd, "cache");
 423.290 -
 423.291 -        CacheFolder.setCacheFolder(cache);
 423.292 -
 423.293 -        NbBundle.setBranding("test");
 423.294 -
 423.295 -        sourcePath = ClassPathSupport.createClassPath(sourceRoot);
 423.296 -        
 423.297 -        Main.initializeURLFactory();
 423.298 -    }
 423.299 -
 423.300 -    /**Bootstraps the test framework.
 423.301 -     *
 423.302 -     * @return the test framework - call more methods on it to set-up a test, then call {@code run} method and assert results.
 423.303 -     */
 423.304 -    public static HintTest create() throws Exception {
 423.305 -        return new HintTest();
 423.306 -    }
 423.307 -
 423.308 -    /**A character to use as a marker of a caret in the input code. The caret position
 423.309 -     * during the run method will be set to the position of this character in the first input file.
 423.310 -     *
 423.311 -     * @param c a caret marker
 423.312 -     * @return itself
 423.313 -     */
 423.314 -    public HintTest setCaretMarker(char c) {
 423.315 -        this.caretMarker = c;
 423.316 -        return this;
 423.317 -    }
 423.318 -
 423.319 -    /**Use the specified {@link java.net.URL}s as compile classpath while parsing
 423.320 -     * the Java input. The {@link java.net.URL}s need to be "folder" {@link java.net.URL}s,
 423.321 -     * ready to be passed to {@link ClassPathSupport#createClassPath(java.net.URL[]) }.
 423.322 -     *
 423.323 -     * @param entries that should become roots of the compile classpath
 423.324 -     * @return itself
 423.325 -     * @see FileUtil#urlForArchiveOrDir(java.io.File)
 423.326 -     * @see FileUtil#getArchiveRoot(java.net.URL)
 423.327 -     */
 423.328 -    public HintTest classpath(URL... entries) {
 423.329 -        compileClassPath = ClassPathSupport.createClassPath(entries);
 423.330 -        return this;
 423.331 -    }
 423.332 -
 423.333 -    /**Create a test file. Equivalent to calling {@code input("test/Test.java", code, true)}.
 423.334 -     *
 423.335 -     * @param code the content of the newly created test file
 423.336 -     * @return itself
 423.337 -     */
 423.338 -    public HintTest input(String code) throws Exception {
 423.339 -        return input("test/Test.java", code, true);
 423.340 -    }
 423.341 -
 423.342 -    /**Create a test file. Equivalent to calling {@code input("test/Test.java", code, compilable)}.
 423.343 -     *
 423.344 -     * @param code the content of the newly created test file
 423.345 -     * @param compilable if true, it will be verified that the file does not contain
 423.346 -     *                   compilation errors before the hint is run on it
 423.347 -     * @return itself
 423.348 -     */
 423.349 -    public HintTest input(String code, boolean compilable) throws Exception {
 423.350 -        return input("test/Test.java", code, compilable);
 423.351 -    }
 423.352 -
 423.353 -    /**Create a test file. Equivalent to calling {@code input(fileName, code, true)}.
 423.354 -     *
 423.355 -     * @param fileName a relative file name of the newly created file from a (automatically created) source root
 423.356 -     * @param code the content of the newly created test file
 423.357 -     * @return itself
 423.358 -     */
 423.359 -    public HintTest input(String fileName, String code) throws Exception {
 423.360 -        return input(fileName, code, true);
 423.361 -    }
 423.362 -    
 423.363 -    /**Create a test file. Any number of files can be created for one test, but the hint
 423.364 -     * will be run only on the first one.
 423.365 -     *
 423.366 -     * @param fileName a relative file name of the newly created file from a (automatically created) source root
 423.367 -     * @param code the content of the newly created test file
 423.368 -     * @param compilable if true, it will be verified that the file does not contain
 423.369 -     *                   compilation errors before the hint is run on it
 423.370 -     * @return itself
 423.371 -     */
 423.372 -    public HintTest input(String fileName, String code, boolean compilable) throws Exception {
 423.373 -        int caret = -1;
 423.374 -
 423.375 -        if (caretMarker != null && testFile == null) {
 423.376 -            caret = code.indexOf(caretMarker);
 423.377 -
 423.378 -            assertNotSame("A caret location must be specified", -1, caret);
 423.379 -
 423.380 -            code = code.substring(0, caret) + code.substring(caret + 1);
 423.381 -        }
 423.382 -
 423.383 -        FileObject file = FileUtil.createData(sourceRoot, fileName);
 423.384 -
 423.385 -        copyStringToFile(file, code);
 423.386 -
 423.387 -        if (compilable) {
 423.388 -            checkCompilable.add(file);
 423.389 -        }
 423.390 -
 423.391 -        if (testFile == null) {
 423.392 -            testFile = file;
 423.393 -            this.caret = caret;
 423.394 -        }
 423.395 -        
 423.396 -        testFiles.add(file);
 423.397 -        
 423.398 -        return this;
 423.399 -    }
 423.400 -
 423.401 -    private void ensureCompilable(FileObject file) throws IOException, AssertionError, IllegalArgumentException {
 423.402 -        CompilationInfo info = parse(file);
 423.403 -
 423.404 -        assertNotNull(info);
 423.405 -
 423.406 -        for (Diagnostic d : info.getDiagnostics()) {
 423.407 -            if (d.getKind() == Diagnostic.Kind.ERROR)
 423.408 -                throw new AssertionError(d.getLineNumber() + ":" + d.getColumnNumber() + " " + d.getMessage(null));
 423.409 -        }
 423.410 -    }
 423.411 -
 423.412 -    /**Sets a source level for all Java files used in this test.
 423.413 -     *
 423.414 -     * @param sourceLevel the source level to use while parsing Java files
 423.415 -     * @return itself
 423.416 -     */
 423.417 -    public HintTest sourceLevel(String sourceLevel) {
 423.418 -        this.sourceLevel = sourceLevel;
 423.419 -        return this;
 423.420 -    }
 423.421 -
 423.422 -    /**Sets a preference that will be visible to the hint.
 423.423 -     *
 423.424 -     * @param preferencesKey a key for the preferences
 423.425 -     * @param value the value to set
 423.426 -     * @return itself
 423.427 -     */
 423.428 -    public HintTest preference(String preferencesKey, String value) {
 423.429 -        this.testPreferences.put(preferencesKey, value);
 423.430 -        return this;
 423.431 -    }
 423.432 -
 423.433 -    /**Sets a preference that will be visible to the hint.
 423.434 -     *
 423.435 -     * @param preferencesKey a key for the preferences
 423.436 -     * @param value the value to set
 423.437 -     * @return itself
 423.438 -     */
 423.439 -    public HintTest preference(String preferencesKey, int value) {
 423.440 -        this.testPreferences.putInt(preferencesKey, value);
 423.441 -        return this;
 423.442 -    }
 423.443 -
 423.444 -    /**Sets a preference that will be visible to the hint.
 423.445 -     *
 423.446 -     * @param preferencesKey a key for the preferences
 423.447 -     * @param value the value to set
 423.448 -     * @return itself
 423.449 -     */
 423.450 -    public HintTest preference(String preferencesKey, boolean value) {
 423.451 -        this.testPreferences.putBoolean(preferencesKey, value);
 423.452 -        return this;
 423.453 -    }
 423.454 -    
 423.455 -    /**Runs the given hint(s) on the first file written by a {@code input} method.
 423.456 -     *
 423.457 -     * @param hint all hints in this class will be run on the file
 423.458 -     * @return a wrapper over the hint output that allows verifying results of the hint
 423.459 -     */
 423.460 -    public HintOutput run(Class<?> hint) throws Exception {
 423.461 -        return run(hint, null);
 423.462 -    }
 423.463 -
 423.464 -    /**Runs the given hint(s) on the first file written by a {@code input} method.
 423.465 -     * Runs only hints with the specified {@code hintCode}. Null hintCode includes
 423.466 -     * all hints from the class
 423.467 -     *
 423.468 -     * @param hint all hints in this class will be run on the file
 423.469 -     * @param hintCode if not {@code null}, only hints with the same id will be run
 423.470 -     * @return a wrapper over the hint output that allows verifying results of the hint
 423.471 -     */
 423.472 -    public HintOutput run(Class<?> hint, String hintCode) throws Exception {
 423.473 -        return runImpl(hint, hintCode, new HintComputer() {
 423.474 -            @Override public Collection<ErrorDescription> computeHints(List<HintDescription> total) throws Exception {
 423.475 -                CompilationInfo info = parse(testFile);
 423.476 -
 423.477 -                assertNotNull(info);
 423.478 -
 423.479 -                List<ErrorDescription> result = new ArrayList<ErrorDescription>();
 423.480 -
 423.481 -                Map<HintDescription, List<ErrorDescription>> errors = computeErrors(info, total, new AtomicBoolean());
 423.482 -
 423.483 -                for (Entry<HintDescription, List<ErrorDescription>> e : errors.entrySet()) {
 423.484 -                    result.addAll(e.getValue());
 423.485 -                }
 423.486 -
 423.487 -                Reference<CompilationInfo> infoRef = new WeakReference<CompilationInfo>(info);
 423.488 -                Reference<CompilationUnitTree> cut = new WeakReference<CompilationUnitTree>(info.getCompilationUnit());
 423.489 -
 423.490 -                info = null;
 423.491 -
 423.492 -                DEBUGGING_HELPER.add(result);
 423.493 -                NbTestCase.assertGC("noone holds CompilationInfo", infoRef);
 423.494 -                NbTestCase.assertGC("noone holds javac", cut);
 423.495 -                DEBUGGING_HELPER.remove(result);
 423.496 -
 423.497 -                return result;
 423.498 -            }
 423.499 -        });
 423.500 -    }
 423.501 -
 423.502 -    private HintOutput runImpl(Class<?> hint, String hintCode, HintComputer doComputeErrors) throws Exception {
 423.503 -        IndexingManager.getDefault().refreshIndexAndWait(sourceRoot.toURL(), null);
 423.504 -        
 423.505 -        for (FileObject file : checkCompilable) {
 423.506 -            ensureCompilable(file);
 423.507 -        }
 423.508 -        
 423.509 -        Map<HintMetadata, Collection<HintDescription>> hints = new HashMap<HintMetadata, Collection<HintDescription>>();
 423.510 -        List<ClassWrapper> found = new ArrayList<ClassWrapper>();
 423.511 -
 423.512 -        for (ClassWrapper w : FSWrapper.listClasses()) {
 423.513 -            if (hint.getCanonicalName().equals(w.getName().replace('$', '.'))) {
 423.514 -                found.add(w);
 423.515 -            }
 423.516 -        }
 423.517 -
 423.518 -        assertFalse(found.isEmpty());
 423.519 -
 423.520 -        for (ClassWrapper w : found) {
 423.521 -            CodeHintProviderImpl.processClass(w, hints);
 423.522 -        }
 423.523 -
 423.524 -        List<HintDescription> total = new LinkedList<HintDescription>();
 423.525 -        final Set<ErrorDescription> requiresJavaFix = Collections.newSetFromMap(new IdentityHashMap<ErrorDescription, Boolean>());
 423.526 -
 423.527 -        for (final Entry<HintMetadata, Collection<HintDescription>> e : hints.entrySet()) {
 423.528 -            if (null != hintCode && !e.getKey().id.equals(hintCode)) {
 423.529 -                continue;
 423.530 -            }
 423.531 -            if (   e.getKey().options.contains(Options.NO_BATCH)
 423.532 -                || e.getKey().options.contains(Options.QUERY)
 423.533 -                || e.getKey().kind == Kind.ACTION) {
 423.534 -                total.addAll(e.getValue());
 423.535 -                continue;
 423.536 -            }
 423.537 -            for (final HintDescription hd : e.getValue()) {
 423.538 -                total.add(HintDescriptionFactory.create()
 423.539 -                                               .setTrigger(hd.getTrigger())
 423.540 -                                               .setMetadata(e.getKey())
 423.541 -                                               .setAdditionalConstraints(hd.getAdditionalConstraints())
 423.542 -                                               .addOptions(hd.getOptions().toArray(new Options[0]))
 423.543 -                                               .setWorker(new Worker() {
 423.544 -                                                    @Override public Collection<? extends ErrorDescription> createErrors(HintContext ctx) {
 423.545 -                                                        Collection<? extends ErrorDescription> errors = hd.getWorker().createErrors(ctx);
 423.546 - 
 423.547 -                                                        if (errors != null) {
 423.548 -                                                            for (ErrorDescription ed : errors) {
 423.549 -                                                                requiresJavaFix.add(ed);
 423.550 -                                                            }
 423.551 -                                                        }
 423.552 -                                                        
 423.553 -                                                        return errors;
 423.554 -                                                     }
 423.555 -                                                })
 423.556 -                                              .produce());
 423.557 -            }
 423.558 -        }
 423.559 -        
 423.560 -        Handler h = new Handler() {
 423.561 -            @Override public void publish(LogRecord record) {
 423.562 -                if (   record.getLevel().intValue() >= Level.WARNING.intValue()
 423.563 -                    && record.getThrown() != null) {
 423.564 -                    throw new IllegalStateException(record.getThrown());
 423.565 -                }
 423.566 -            }
 423.567 -            @Override public void flush() { }
 423.568 -            @Override public void close() throws SecurityException { }
 423.569 -        };
 423.570 -
 423.571 -        Logger log = Logger.getLogger(Exceptions.class.getName());
 423.572 -        log.addHandler(h);
 423.573 -        List<ErrorDescription> result = new ArrayList<ErrorDescription>(doComputeErrors.computeHints(total));
 423.574 -        log.removeHandler(h);
 423.575 -
 423.576 -        Collections.sort(result, ERRORS_COMPARATOR);
 423.577 -        
 423.578 -        return new HintOutput(result, requiresJavaFix);
 423.579 -    }
 423.580 -
 423.581 -    private interface HintComputer {
 423.582 -        public Collection<ErrorDescription> computeHints(List<HintDescription> total) throws Exception;
 423.583 -    }
 423.584 -    
 423.585 -    public HintOutput runGlobal(Class<?> hint) throws Exception {
 423.586 -        return runImpl(hint, null, new HintComputer() {
 423.587 -            @Override public Collection<ErrorDescription> computeHints(List<HintDescription> total) throws Exception {
 423.588 -                final List<ErrorDescription> result = new ArrayList<ErrorDescription>();
 423.589 -                Scope s = Scopes.specifiedFoldersScope(Folder.convert(sourceRoot));
 423.590 -                BatchResult batchResult = BatchSearch.findOccurrences(total, s);
 423.591 -                BatchSearch.getVerifiedSpans(batchResult, new ProgressHandleWrapper(1, 1), new VerifiedSpansCallBack() {
 423.592 -                    @Override public void groupStarted() { }
 423.593 -                    @Override public boolean spansVerified(CompilationController wc, Resource r, Collection<? extends ErrorDescription> hints) throws Exception {
 423.594 -                        result.addAll(hints);
 423.595 -                        return true;
 423.596 -                    }
 423.597 -                    @Override public void groupFinished() { }
 423.598 -                    @Override public void cannotVerifySpan(Resource r) { }
 423.599 -                }, false, new ArrayList<MessageImpl>(), new AtomicBoolean());
 423.600 -
 423.601 -                return result;
 423.602 -            }
 423.603 -        });
 423.604 -    }
 423.605 -    
 423.606 -    //must keep the error descriptions (and their Fixes through them) in a field
 423.607 -    //so that assertGC is able to provide a useful trace of references:
 423.608 -    private static Set<List<ErrorDescription>> DEBUGGING_HELPER = Collections.newSetFromMap(new IdentityHashMap<List<ErrorDescription>, Boolean>());
 423.609 -
 423.610 -    private CompilationInfo parse(FileObject file) throws DataObjectNotFoundException, IllegalArgumentException, IOException {
 423.611 -        DataObject od = DataObject.find(file);
 423.612 -        EditorCookie ec = od.getLookup().lookup(EditorCookie.class);
 423.613 -
 423.614 -        assertNotNull(ec);
 423.615 -
 423.616 -        Document doc = ec.openDocument();
 423.617 -
 423.618 -        doc.putProperty(Language.class, JavaTokenId.language());
 423.619 -        doc.putProperty("mimeType", "text/x-java");
 423.620 -
 423.621 -        JavaSource js = JavaSource.create(ClasspathInfo.create(file), file);
 423.622 -
 423.623 -        assertNotNull("found JavaSource for " + file, js);
 423.624 -
 423.625 -        final DeadlockTask bt = new DeadlockTask(Phase.RESOLVED);
 423.626 -
 423.627 -        js.runUserActionTask(bt, true);
 423.628 -        
 423.629 -        return bt.info;
 423.630 -    }
 423.631 -
 423.632 -    private Map<HintDescription, List<ErrorDescription>> computeErrors(CompilationInfo info, Iterable<? extends HintDescription> hints, AtomicBoolean cancel) {
 423.633 -        return new HintsInvoker(hintSettings, caret, cancel).computeHints(info, new TreePath(info.getCompilationUnit()), hints, new LinkedList<MessageImpl>());
 423.634 -    }
 423.635 -
 423.636 -    FileObject getSourceRoot() {
 423.637 -        return sourceRoot;
 423.638 -    }
 423.639 -
 423.640 -    private static class TempPreferences extends AbstractPreferences {
 423.641 -
 423.642 -        /*private*/Properties properties;
 423.643 -
 423.644 -        private TempPreferences() {
 423.645 -            super(null, "");
 423.646 -        }
 423.647 -
 423.648 -        private  TempPreferences(TempPreferences parent, String name)  {
 423.649 -            super(parent, name);
 423.650 -            newNode = true;
 423.651 -        }
 423.652 -
 423.653 -        protected final String getSpi(String key) {
 423.654 -            return properties().getProperty(key);
 423.655 -        }
 423.656 -
 423.657 -        protected final String[] childrenNamesSpi() throws BackingStoreException {
 423.658 -            return new String[0];
 423.659 -        }
 423.660 -
 423.661 -        protected final String[] keysSpi() throws BackingStoreException {
 423.662 -            return properties().keySet().toArray(new String[0]);
 423.663 -        }
 423.664 -
 423.665 -        protected final void putSpi(String key, String value) {
 423.666 -            properties().put(key,value);
 423.667 -        }
 423.668 -
 423.669 -        protected final void removeSpi(String key) {
 423.670 -            properties().remove(key);
 423.671 -        }
 423.672 -
 423.673 -        protected final void removeNodeSpi() throws BackingStoreException {}
 423.674 -        protected  void flushSpi() throws BackingStoreException {}
 423.675 -        protected void syncSpi() throws BackingStoreException {
 423.676 -            properties().clear();
 423.677 -        }
 423.678 -
 423.679 -        @Override
 423.680 -        public void put(String key, String value) {
 423.681 -            try {
 423.682 -                super.put(key, value);
 423.683 -            } catch (IllegalArgumentException iae) {
 423.684 -                if (iae.getMessage().contains("too long")) {
 423.685 -                    // Not for us!
 423.686 -                    putSpi(key, value);
 423.687 -                } else {
 423.688 -                    throw iae;
 423.689 -                }
 423.690 -            }
 423.691 -        }
 423.692 -
 423.693 -        Properties properties()  {
 423.694 -            if (properties == null) {
 423.695 -                properties = new Properties();
 423.696 -            }
 423.697 -            return properties;
 423.698 -        }
 423.699 -
 423.700 -        protected AbstractPreferences childSpi(String name) {
 423.701 -            return new TempPreferences(this, name);
 423.702 -        }
 423.703 -    }
 423.704 -
 423.705 -    private class TestSourceForBinaryQuery implements SourceForBinaryQueryImplementation {
 423.706 -
 423.707 -        public SourceForBinaryQuery.Result findSourceRoots(URL binaryRoot) {
 423.708 -            FileObject f = URLMapper.findFileObject(binaryRoot);
 423.709 -
 423.710 -            if (buildRoot.equals(f)) {
 423.711 -                return new SourceForBinaryQuery.Result() {
 423.712 -                    public FileObject[] getRoots() {
 423.713 -                        return new FileObject[] {
 423.714 -                            sourceRoot,
 423.715 -                        };
 423.716 -                    }
 423.717 -
 423.718 -                    public void addChangeListener(ChangeListener l) {
 423.719 -                    }
 423.720 -
 423.721 -                    public void removeChangeListener(ChangeListener l) {
 423.722 -                    }
 423.723 -                };
 423.724 -            }
 423.725 -
 423.726 -            return null;
 423.727 -        }
 423.728 -
 423.729 -    }
 423.730 -
 423.731 -    private static List<URL> bootClassPath;
 423.732 -
 423.733 -    private static Logger log = Logger.getLogger(HintTest.class.getName());
 423.734 -
 423.735 -    private static synchronized List<URL> getBootClassPath() {
 423.736 -        if (bootClassPath == null) {
 423.737 -            try {
 423.738 -                String cp = System.getProperty("sun.boot.class.path");
 423.739 -                List<URL> urls = new ArrayList<URL>();
 423.740 -                String[] paths = cp.split(Pattern.quote(System.getProperty("path.separator")));
 423.741 -
 423.742 -                for (String path : paths) {
 423.743 -                    File f = new File(path);
 423.744 -
 423.745 -                    if (!f.canRead())
 423.746 -                        continue;
 423.747 -
 423.748 -                    FileObject fo = FileUtil.toFileObject(f);
 423.749 -
 423.750 -                    if (FileUtil.isArchiveFile(fo)) {
 423.751 -                        fo = FileUtil.getArchiveRoot(fo);
 423.752 -                    }
 423.753 -
 423.754 -                    if (fo != null) {
 423.755 -                        urls.add(fo.getURL());
 423.756 -                    }
 423.757 -                }
 423.758 -
 423.759 -                bootClassPath = urls;
 423.760 -            } catch (FileStateInvalidException e) {
 423.761 -                if (log.isLoggable(Level.SEVERE))
 423.762 -                    log.log(Level.SEVERE, e.getMessage(), e);
 423.763 -            }
 423.764 -        }
 423.765 -
 423.766 -        return bootClassPath;
 423.767 -    }
 423.768 -    
 423.769 -    private class TestProxyClassPathProvider implements ClassPathProvider {
 423.770 -
 423.771 -        public ClassPath findClassPath(FileObject file, String type) {
 423.772 -            try {
 423.773 -            if (ClassPath.BOOT == type) {
 423.774 -                // XXX simpler to use JavaPlatformManager.getDefault().getDefaultPlatform().getBootstrapLibraries()
 423.775 -                return ClassPathSupport.createClassPath(getBootClassPath().toArray(new URL[0]));
 423.776 -            }
 423.777 -
 423.778 -            if (ClassPath.SOURCE == type) {
 423.779 -                return sourcePath;
 423.780 -            }
 423.781 -
 423.782 -            if (ClassPath.COMPILE == type) {
 423.783 -                return compileClassPath;
 423.784 -            }
 423.785 -
 423.786 -            if (ClassPath.EXECUTE == type) {
 423.787 -                return ClassPathSupport.createClassPath(new FileObject[] {
 423.788 -                    buildRoot
 423.789 -                });
 423.790 -            }
 423.791 -            } catch (Exception e) {
 423.792 -                e.printStackTrace();
 423.793 -            }
 423.794 -            return null;
 423.795 -        }
 423.796 -
 423.797 -    }
 423.798 -
 423.799 -    private class TestSourceLevelQueryImplementation implements SourceLevelQueryImplementation {
 423.800 -
 423.801 -        public String getSourceLevel(FileObject javaFile) {
 423.802 -            return sourceLevel;
 423.803 -        }
 423.804 -
 423.805 -    }
 423.806 -
 423.807 -
 423.808 -    private static class DeadlockTask implements Task<CompilationController> {
 423.809 -
 423.810 -        private final Phase phase;
 423.811 -        private CompilationInfo info;
 423.812 -
 423.813 -        public DeadlockTask(Phase phase) {
 423.814 -            assert phase != null;
 423.815 -            this.phase = phase;
 423.816 -        }
 423.817 -
 423.818 -        public void run( CompilationController info ) {
 423.819 -            try {
 423.820 -                info.toPhase(this.phase);
 423.821 -                this.info = info;
 423.822 -            } catch (IOException ioe) {
 423.823 -                if (log.isLoggable(Level.SEVERE))
 423.824 -                    log.log(Level.SEVERE, ioe.getMessage(), ioe);
 423.825 -            }
 423.826 -        }
 423.827 -
 423.828 -    }
 423.829 -
 423.830 -    /**Encapsulated the output of the hint.
 423.831 -     */
 423.832 -    public final class HintOutput {
 423.833 -        
 423.834 -        private final List<ErrorDescription> errors;
 423.835 -        private final Set<ErrorDescription> requiresJavaFix;
 423.836 -
 423.837 -        private HintOutput(List<ErrorDescription> errors, Set<ErrorDescription> requiresJavaFix) {
 423.838 -            this.errors = errors;
 423.839 -            this.requiresJavaFix = requiresJavaFix;
 423.840 -
 423.841 -        }
 423.842 -
 423.843 -        /**Assert that the hint(s) produced the given warnings. The provided strings
 423.844 -         * should match {@code toString()} results of {@link ErrorDescription}s produced
 423.845 -         * by the hint(s).
 423.846 -         *
 423.847 -         * @param warnings expected {@code toString()} results of {@link ErrorDescription}s produced
 423.848 -         *                 by the hint
 423.849 -         * @return itself
 423.850 -         * @throws AssertionError if the given warnings do not match the actual warnings
 423.851 -         */
 423.852 -        public HintOutput assertWarnings(String... warnings) {
 423.853 -            assertEquals("The warnings provided by the hint do not match expected warnings.", Arrays.toString(warnings), errors.toString());
 423.854 -
 423.855 -            return this;
 423.856 -        }
 423.857 -
 423.858 -        /**Assert that the hint(s) produced warnings include the given warnings. The provided strings
 423.859 -         * should match {@code toString()} results of {@link ErrorDescription}s produced
 423.860 -         * by the hint(s).
 423.861 -         *
 423.862 -         * @param warnings expected {@code toString()} results of {@link ErrorDescription}s produced
 423.863 -         *                 by the hint
 423.864 -         * @return itself
 423.865 -         * @throws AssertionError if the given warnings do not match the actual warnings
 423.866 -         */
 423.867 -        public HintOutput assertContainsWarnings(String... warnings) {
 423.868 -            Set<String> goldenSet = new HashSet<String>(Arrays.asList(warnings));
 423.869 -            List<String> errorsNames = new LinkedList<String>();
 423.870 -
 423.871 -            for (ErrorDescription d : errors) {
 423.872 -                goldenSet.remove(d.toString());
 423.873 -                errorsNames.add(d.toString());
 423.874 -            }
 423.875 -            
 423.876 -            assertTrue("The warnings provided by the hint do not contain expected warnings. Provided warnings: " + errorsNames.toString(), goldenSet.isEmpty());
 423.877 -
 423.878 -            return this;
 423.879 -        }
 423.880 -
 423.881 -        /**Assert that the hint(s) produced warnings do not include the given warnings. The provided strings
 423.882 -         * should match {@code toString()} results of {@link ErrorDescription}s produced
 423.883 -         * by the hint(s).
 423.884 -         *
 423.885 -         * @param warnings expected {@code toString()} results of {@link ErrorDescription}s produced
 423.886 -         *                 by the hint
 423.887 -         * @return itself
 423.888 -         * @throws AssertionError if the given warnings do not match the actual warnings
 423.889 -         */
 423.890 -        public HintOutput assertNotContainsWarnings(String... warnings) {
 423.891 -            Set<String> goldenSet = new HashSet<String>(Arrays.asList(warnings));
 423.892 -            List<String> errorsNames = new LinkedList<String>();
 423.893 -
 423.894 -            boolean fail = false;
 423.895 -            for (ErrorDescription d : errors) {
 423.896 -                if (goldenSet.remove(d.getDescription()))
 423.897 -                    fail = true;
 423.898 -                errorsNames.add(d.toString());
 423.899 -            }
 423.900 -            
 423.901 -            assertFalse("The warnings provided by the hint do not exclude expected warnings. Provided warnings: " + errorsNames.toString(), fail);
 423.902 -
 423.903 -            return this;
 423.904 -        }
 423.905 -        
 423.906 -        /**Find a specific warning.
 423.907 -         *
 423.908 -         * @param warning the warning to find - must be equivalent to {@code toString()}
 423.909 -         *                results of the {@link ErrorDescription}.
 423.910 -         * @return a wrapper about the given specific warnings
 423.911 -         * @throws AssertionError if the given warning cannot be found
 423.912 -         */
 423.913 -        public HintWarning findWarning(String warning) {
 423.914 -            ErrorDescription toFix = null;
 423.915 -
 423.916 -            for (ErrorDescription d : errors) {
 423.917 -                if (warning.equals(d.toString())) {
 423.918 -                    toFix = d;
 423.919 -                    break;
 423.920 -                }
 423.921 -            }
 423.922 -
 423.923 -            assertNotNull("Warning: \"" + warning + "\" not found. All ErrorDescriptions: " + errors.toString(), toFix);
 423.924 -
 423.925 -            return new HintWarning(toFix, requiresJavaFix.contains(toFix));
 423.926 -        }
 423.927 -    }
 423.928 -
 423.929 -    /**A wrapper over a single warning.
 423.930 -     */
 423.931 -    public final class HintWarning {
 423.932 -        private final ErrorDescription warning;
 423.933 -        private final boolean requiresJavaFix;
 423.934 -        HintWarning(ErrorDescription warning, boolean requiresJavaFix) {
 423.935 -            this.warning = warning;
 423.936 -            this.requiresJavaFix = requiresJavaFix;
 423.937 -        }
 423.938 -        /**Applies the only fix of the current warning. Fails if the given warning
 423.939 -         * does not have exactly one fix.
 423.940 -         *
 423.941 -         * Note this is a destructive operation - the {@link #run(java.lang.Class)} or {@link #applyFix}
 423.942 -         * cannot be run in the future on any object that follows the chain from the same invocation of {@link #create()}.
 423.943 -         *
 423.944 -         * @return a wrapper over resulting source code
 423.945 -         * @throws AssertionError if there is not one fix for the given {@link ErrorDescription}
 423.946 -         */
 423.947 -        public AppliedFix applyFix() throws Exception {
 423.948 -            return applyFix(true);
 423.949 -        }
 423.950 -
 423.951 -        AppliedFix applyFix(boolean saveAll) throws Exception {
 423.952 -            assertTrue("Must be computed", warning.getFixes().isComputed());
 423.953 -
 423.954 -            List<Fix> fixes = warning.getFixes().getFixes();
 423.955 -
 423.956 -            assertEquals(1, fixes.size());
 423.957 -
 423.958 -            doApplyFix(fixes.get(0));
 423.959 -
 423.960 -            if (saveAll)
 423.961 -                LifecycleManager.getDefault().saveAll();
 423.962 -            
 423.963 -            return new AppliedFix();
 423.964 -        }
 423.965 -        /**Applies the specified fix of the current warning.
 423.966 -         *
 423.967 -         * Note this is a destructive operation - the {@link #run(java.lang.Class)} or {@link #applyFix}
 423.968 -         * cannot be run in the future on any object that follows the chain from the same invocation of {@link #create()}.
 423.969 -         *
 423.970 -         * @param fix {@link Fix#getText() } result of the required fix
 423.971 -         * @return a wrapper over resulting source code
 423.972 -         * @throws AssertionError if the fix cannot be found
 423.973 -         */
 423.974 -        public AppliedFix applyFix(String fix) throws Exception {
 423.975 -            assertTrue("Must be computed", warning.getFixes().isComputed());
 423.976 -
 423.977 -            List<Fix> fixes = warning.getFixes().getFixes();
 423.978 -            List<String> fixNames = new LinkedList<String>();
 423.979 -            Fix toApply = null;
 423.980 -
 423.981 -            for (Fix f : fixes) {
 423.982 -                if (fix.equals(f.getText())) {
 423.983 -                    toApply = f;
 423.984 -                }
 423.985 -
 423.986 -                fixNames.add(f.getText());
 423.987 -            }
 423.988 -
 423.989 -            assertNotNull("Cannot find fix to invoke: " + fixNames.toString(), toApply);
 423.990 -
 423.991 -            doApplyFix(toApply);
 423.992 -            
 423.993 -            LifecycleManager.getDefault().saveAll();
 423.994 -
 423.995 -            return new AppliedFix();
 423.996 -        }
 423.997 -        private void doApplyFix(Fix f) throws Exception {
 423.998 -            Preferences preferences = MimeLookup.getLookup(JavaTokenId.language().mimeType()).lookup(Preferences.class);
 423.999 -            preferences.putBoolean("importInnerClasses", true);
423.1000 -            try {
423.1001 -                if (requiresJavaFix) {
423.1002 -                    assertTrue("The fix must be a JavaFix", f instanceof JavaFixImpl);
423.1003 -                    
423.1004 -                    ModificationResult result1 = runJavaFix(((JavaFixImpl) f).jf);
423.1005 -                    ModificationResult result2 = runJavaFix(((JavaFixImpl) f).jf);
423.1006 -                    
423.1007 -                    //ensure the results are the same:
423.1008 -                    assertEquals("The fix must be repeatable", result1.getModifiedFileObjects(), result2.getModifiedFileObjects());
423.1009 -                    
423.1010 -                    for (FileObject file : result1.getModifiedFileObjects()) {
423.1011 -                        assertEquals("The fix must be repeatable", result1.getResultingSource(file), result2.getResultingSource(file));
423.1012 -                    }
423.1013 -                    
423.1014 -                    result1.commit();
423.1015 -                } else {
423.1016 -                    f.implement();
423.1017 -                }
423.1018 -            } finally {
423.1019 -                preferences.remove("importInnerClasses");
423.1020 -            }
423.1021 -        }
423.1022 -        private ModificationResult runJavaFix(final JavaFix jf) throws IOException {
423.1023 -            FileObject file = Accessor.INSTANCE.getFile(jf);
423.1024 -            JavaSource js = JavaSource.forFileObject(file);
423.1025 -            final Map<FileObject, List<Difference>> changes = new HashMap<FileObject, List<Difference>>();
423.1026 -
423.1027 -            ModificationResult mr = js.runModificationTask(new Task<WorkingCopy>() {
423.1028 -                public void run(WorkingCopy wc) throws Exception {
423.1029 -                    if (wc.toPhase(Phase.RESOLVED).compareTo(Phase.RESOLVED) < 0) {
423.1030 -                        return;
423.1031 -                    }
423.1032 -
423.1033 -                    Map<FileObject, byte[]> resourceContentChanges = new HashMap<FileObject, byte[]>();
423.1034 -                    Accessor.INSTANCE.process(jf, wc, true, resourceContentChanges, /*Ignored for now:*/new ArrayList<RefactoringElementImplementation>());
423.1035 -                    BatchUtilities.addResourceContentChanges(resourceContentChanges, changes);
423.1036 -                    
423.1037 -                }
423.1038 -            });
423.1039 -            
423.1040 -            changes.putAll(JavaSourceAccessor.getINSTANCE().getDiffsFromModificationResult(mr));
423.1041 -            
423.1042 -            return JavaSourceAccessor.getINSTANCE().createModificationResult(changes, Collections.<Object, int[]>emptyMap());
423.1043 -        }
423.1044 -        /**Verifies that the current warning provides the given fixes.
423.1045 -         *
423.1046 -         * @param fixes the {@link Fix#getText() } of the expected fixes
423.1047 -         * @return itself
423.1048 -         * @throws AssertionError if the expected fixes do not match the provided fixes
423.1049 -         * @since 1.1
423.1050 -         */
423.1051 -        public HintWarning assertFixes(String... expectedFixes) throws Exception {
423.1052 -            assertTrue("Must be computed", warning.getFixes().isComputed());
423.1053 -
423.1054 -            List<String> fixNames = new LinkedList<String>();
423.1055 -
423.1056 -            for (Fix f : warning.getFixes().getFixes()) {
423.1057 -                if (f instanceof SyntheticFix) continue;
423.1058 -                fixNames.add(f.getText());
423.1059 -            }
423.1060 -
423.1061 -            assertEquals("Fixes for the current warning do not match the expected fixes. All fixes: " + fixNames.toString(), Arrays.asList(expectedFixes), fixNames);
423.1062 -
423.1063 -            return this;
423.1064 -        }
423.1065 -    }
423.1066 -
423.1067 -    /**A wrapper over result after applying a fix.
423.1068 -     */
423.1069 -    public final class AppliedFix {
423.1070 -        /**Require that the result is compilable. Equivalent to {@code assertCompilable("test/Test.java")}
423.1071 -         *
423.1072 -         * @return the wrapper itself
423.1073 -         * @throws AssertionError if the result is not compilable
423.1074 -         */
423.1075 -        public AppliedFix assertCompilable() throws Exception {
423.1076 -            return assertCompilable("test/Test.java");
423.1077 -        }
423.1078 -        /**Require that the given resulting file is compilable.
423.1079 -         *
423.1080 -         * @param fileName the name of the file that should be verified
423.1081 -         * @return the wrapper itself
423.1082 -         * @throws AssertionError if the result is not compilable
423.1083 -         */
423.1084 -        public AppliedFix assertCompilable(String fileName) throws Exception {
423.1085 -            FileObject toCheck = sourceRoot.getFileObject(fileName);
423.1086 -
423.1087 -            assertNotNull(toCheck);
423.1088 -
423.1089 -            ensureCompilable(toCheck);
423.1090 -            return this;
423.1091 -        }
423.1092 -        /**Verify the content of the resulting file. Equivalent to {@code assertOutput("test/Test.java")}.
423.1093 -         *
423.1094 -         * This method will "normalize" whitespaces in the file: generally, all
423.1095 -         * whitespaces are reduced to a single space both in the given code and
423.1096 -         * the code read from the file, before the comparison.
423.1097 -         *
423.1098 -         * @param code expected content of the resulting file.
423.1099 -         * @return the wrapper itself
423.1100 -         * @throws AssertionError if the file does not have the correct content
423.1101 -         */
423.1102 -        public AppliedFix assertOutput(String code) throws Exception {
423.1103 -            return assertOutput("test/Test.java", code);
423.1104 -        }
423.1105 -        /**Verify the content of the given resulting file.
423.1106 -         *
423.1107 -         * This method will "normalize" whitespaces in the file: generally, all
423.1108 -         * whitespaces are reduced to a single space both in the given code and
423.1109 -         * the code read from the file, before the comparison.
423.1110 -         *
423.1111 -         * @param fileName the name of the file that should be verified
423.1112 -         * @param code expected content of the resulting file.
423.1113 -         * @return the wrapper itself
423.1114 -         * @throws AssertionError if the file does not have the correct content
423.1115 -         */
423.1116 -        public AppliedFix assertOutput(String fileName, String code) throws Exception {
423.1117 -            FileObject toCheck = sourceRoot.getFileObject(fileName);
423.1118 -
423.1119 -            assertNotNull("Required file: " + fileName + " not found", toCheck);
423.1120 -
423.1121 -            DataObject toCheckDO = DataObject.find(toCheck);
423.1122 -            EditorCookie ec = toCheckDO.getLookup().lookup(EditorCookie.class);
423.1123 -            Document toCheckDocument = ec.openDocument();
423.1124 -
423.1125 -            String realCode = toCheckDocument.getText(0, toCheckDocument.getLength());
423.1126 -
423.1127 -            //ignore whitespaces:
423.1128 -            realCode = reduceWhitespaces(realCode);
423.1129 -
423.1130 -            assertEquals("The output code does not match the expected code.", reduceWhitespaces(code), realCode);
423.1131 -
423.1132 -            return this;
423.1133 -        }
423.1134 -        
423.1135 -        private String reduceWhitespaces(String str) {
423.1136 -            StringBuilder result = new StringBuilder();
423.1137 -            int i = 0;
423.1138 -            boolean wasWhitespace = false;
423.1139 -            
423.1140 -            while (i < str.length()) {
423.1141 -                int codePoint = str.codePointAt(i);
423.1142 -                
423.1143 -                if (Character.isWhitespace(codePoint)) {
423.1144 -                    if (!wasWhitespace) {
423.1145 -                        result.append(" ");
423.1146 -                        wasWhitespace = true;
423.1147 -                    }
423.1148 -                } else {
423.1149 -                    result.appendCodePoint(codePoint);
423.1150 -                    wasWhitespace = false;
423.1151 -                }
423.1152 -                i += Character.charCount(codePoint);
423.1153 -            }
423.1154 -            
423.1155 -            return result.toString();
423.1156 -        }
423.1157 -        
423.1158 -        /**Verify the content of the resulting file. Equivalent to {@code assertVerbatimOutput("test/Test.java")}.
423.1159 -         *
423.1160 -         * This method will compare the content of the file exactly with the provided
423.1161 -         * code.
423.1162 -         *
423.1163 -         * @param fileName the name of the file that should be verified
423.1164 -         * @param code expected content of the resulting file.
423.1165 -         * @return the wrapper itself
423.1166 -         * @throws AssertionError if the result is not compilable
423.1167 -         */
423.1168 -        public AppliedFix assertVerbatimOutput(String code) throws Exception {
423.1169 -            return assertVerbatimOutput("test/Test.java", code);
423.1170 -        }
423.1171 -        /**Verify the content of the given resulting file.
423.1172 -         *
423.1173 -         * This method will compare the content of the file exactly with the provided
423.1174 -         * code.
423.1175 -         *
423.1176 -         * @param fileName the name of the file that should be verified
423.1177 -         * @param code expected content of the resulting file.
423.1178 -         * @return the wrapper itself
423.1179 -         * @throws AssertionError if the result is not compilable
423.1180 -         */
423.1181 -        public AppliedFix assertVerbatimOutput(String fileName, String code) throws Exception {
423.1182 -            FileObject toCheck = sourceRoot.getFileObject(fileName);
423.1183 -
423.1184 -            assertNotNull(toCheck);
423.1185 -
423.1186 -            DataObject toCheckDO = DataObject.find(toCheck);
423.1187 -            EditorCookie ec = toCheckDO.getLookup().lookup(EditorCookie.class);
423.1188 -            Document toCheckDocument = ec.openDocument();
423.1189 -
423.1190 -            String realCode = toCheckDocument.getText(0, toCheckDocument.getLength());
423.1191 -
423.1192 -            assertEquals("The output code does not match the expected code.", code, realCode);
423.1193 -
423.1194 -            return this;
423.1195 -        }
423.1196 -
423.1197 -        /**Return code after the fix has been applied.
423.1198 -         *
423.1199 -         * @return the code after the fix has been applied
423.1200 -         */
423.1201 -        public String getOutput() throws Exception {
423.1202 -            return getOutput("test/Test.java");
423.1203 -        }
423.1204 -
423.1205 -        /**Return code after the fix has been applied.
423.1206 -         *
423.1207 -         * @param fileName file for which the code should be returned
423.1208 -         * @return the code after the fix has been applied
423.1209 -         */
423.1210 -        public String getOutput(String fileName) throws Exception {
423.1211 -            FileObject toCheck = sourceRoot.getFileObject(fileName);
423.1212 -
423.1213 -            assertNotNull(toCheck);
423.1214 -
423.1215 -            DataObject toCheckDO = DataObject.find(toCheck);
423.1216 -            EditorCookie ec = toCheckDO.getLookup().lookup(EditorCookie.class);
423.1217 -            Document toCheckDocument = ec.openDocument();
423.1218 -
423.1219 -            return toCheckDocument.getText(0, toCheckDocument.getLength());
423.1220 -        }
423.1221 -    }
423.1222 -
423.1223 -    private static final Comparator<ErrorDescription> ERRORS_COMPARATOR = new Comparator<ErrorDescription> () {
423.1224 -
423.1225 -        public int compare (ErrorDescription e1, ErrorDescription e2) {
423.1226 -            return e1.getRange ().getBegin ().getOffset () - e2.getRange ().getBegin ().getOffset ();
423.1227 -        }
423.1228 -    };
423.1229 -
423.1230 -    static {
423.1231 -        System.setProperty("org.openide.util.Lookup", TestLookup.class.getName());
423.1232 -        Assert.assertEquals(TestLookup.class, Lookup.getDefault().getClass());
423.1233 -    }
423.1234 -
423.1235 -    //workdir computation (copied from NbTestCase):
423.1236 -    private static File getWorkDir() throws IOException {
423.1237 -        // now we have path, so if not available, create workdir
423.1238 -        File workdir = FileUtil.normalizeFile(new File(getWorkDirPath()));
423.1239 -        if (workdir.exists()) {
423.1240 -            if (!workdir.isDirectory()) {
423.1241 -                // work dir exists, but is not directory - this should not happen
423.1242 -                // trow exception
423.1243 -                throw new IOException("workdir exists, but is not a directory, workdir = " + workdir);
423.1244 -            } else {
423.1245 -                // everything looks correctly, return the path
423.1246 -                return workdir;
423.1247 -            }
423.1248 -        } else {
423.1249 -            // we need to create it
423.1250 -            boolean result = workdir.mkdirs();
423.1251 -            if (result == false) {
423.1252 -                // mkdirs() failed - throw an exception
423.1253 -                throw new IOException("workdir creation failed: " + workdir);
423.1254 -            } else {
423.1255 -                // everything looks ok - return path
423.1256 -                return workdir;
423.1257 -            }
423.1258 -        }
423.1259 -    }
423.1260 -
423.1261 -    private static String getWorkDirPath() {
423.1262 -        StackTraceElement caller = null;
423.1263 -        boolean seenItself = false;
423.1264 -        
423.1265 -        for (StackTraceElement e : new Exception().getStackTrace()) {
423.1266 -            if (HintTest.class.getName().equals(e.getClassName())) seenItself = true;
423.1267 -            if (seenItself && !HintTest.class.getName().equals(e.getClassName())) {
423.1268 -                caller = e;
423.1269 -                break;
423.1270 -            }
423.1271 -        }
423.1272 -        
423.1273 -        String name = caller != null ? caller.getMethodName() : "unknownTest";
423.1274 -        // start - PerformanceTestCase overrides getName() method and then
423.1275 -        // name can contain illegal characters
423.1276 -        String osName = System.getProperty("os.name");
423.1277 -        if (osName != null && osName.startsWith("Windows")) {
423.1278 -            char ntfsIllegal[] ={'"','/','\\','?','<','>','|',':'};
423.1279 -            for (int i=0; i<ntfsIllegal.length; i++) {
423.1280 -                name = name.replace(ntfsIllegal[i], '~');
423.1281 -            }
423.1282 -        }
423.1283 -        // end
423.1284 -        
423.1285 -        final String workDirPath = getWorkDirPathFromManager();
423.1286 -        
423.1287 -        // #94319 - shorten workdir path if the following is too long
423.1288 -        // "Manager.getWorkDirPath()+File.separator+getClass().getName()+File.separator+name"
423.1289 -        int len1 = workDirPath.length();
423.1290 -        String clazz = caller != null ? caller.getClassName() : "unknown.Class";
423.1291 -        int len2 = clazz.length();
423.1292 -        int len3 = name.length();
423.1293 -        
423.1294 -        int tooLong = Integer.getInteger("nbjunit.too.long", 100);
423.1295 -        if (len1 + len2 + len3 > tooLong) {
423.1296 -            clazz = abbrevDots(clazz);
423.1297 -            len2 = clazz.length();
423.1298 -        }
423.1299 -
423.1300 -        if (len1 + len2 + len3 > tooLong) {
423.1301 -            name = abbrevCapitals(name);
423.1302 -        }
423.1303 -        
423.1304 -        String p = workDirPath + File.separator + clazz + File.separator + name;
423.1305 -        String realP;
423.1306 -        
423.1307 -        for (int i = 0; ; i++) {
423.1308 -            realP = i == 0 ? p : p + "-" + i;
423.1309 -            if (usedPaths.add(realP)) {
423.1310 -                break;
423.1311 -            }
423.1312 -        }
423.1313 -        
423.1314 -        return realP;
423.1315 -    }
423.1316 -
423.1317 -    private static Set<String> usedPaths = new HashSet<String>();
423.1318 -    
423.1319 -    private static String abbrevDots(String dotted) {
423.1320 -        StringBuilder sb = new StringBuilder();
423.1321 -        String sep = "";
423.1322 -        for (String item : dotted.split("\\.")) {
423.1323 -            sb.append(sep);
423.1324 -            sb.append(item.charAt(0));
423.1325 -            sep = ".";
423.1326 -        }
423.1327 -        return sb.toString();
423.1328 -    }
423.1329 -
423.1330 -    private static String abbrevCapitals(String name) {
423.1331 -        if (name.startsWith("test")) {
423.1332 -            name = name.substring(4);
423.1333 -        }
423.1334 -        StringBuilder sb = new StringBuilder();
423.1335 -        for (int i = 0; i < name.length(); i++) {
423.1336 -            if (Character.isUpperCase(name.charAt(i))) {
423.1337 -                sb.append(Character.toLowerCase(name.charAt(i)));
423.1338 -            }
423.1339 -        }
423.1340 -        return sb.toString();
423.1341 -    }
423.1342 -
423.1343 -    private static final String JUNIT_PROPERTIES_FILENAME = "junit.properties";
423.1344 -    private static final String JUNIT_PROPERTIES_LOCATION_PROPERTY = "junit.properties.file";
423.1345 -    private static final String NBJUNIT_WORKDIR = "nbjunit.workdir";
423.1346 -    
423.1347 -    private static String getWorkDirPathFromManager() {
423.1348 -        String path = System.getProperty(NBJUNIT_WORKDIR);
423.1349 -                
423.1350 -        if (path == null) {            
423.1351 -            // try to get property from user's settings
423.1352 -            path = readProperties().getProperty(NBJUNIT_WORKDIR);
423.1353 -        }
423.1354 -        if (path != null) {
423.1355 -            path = path.replace('/', File.separatorChar);
423.1356 -        } else {
423.1357 -            // Fallback value, guaranteed to be defined.
423.1358 -            path = System.getProperty("java.io.tmpdir") + File.separatorChar + "tests-" + System.getProperty("user.name");
423.1359 -        }
423.1360 -        return path;
423.1361 -    }
423.1362 -
423.1363 -    private static Properties readProperties() {
423.1364 -        Properties result = new Properties();
423.1365 -        try {
423.1366 -            File propFile = getPreferencesFile();
423.1367 -            FileInputStream is = new FileInputStream(propFile);
423.1368 -            try {
423.1369 -                result.load(is);
423.1370 -            } finally {
423.1371 -                is.close();
423.1372 -            }
423.1373 -        }  catch (IOException e) {
423.1374 -        }
423.1375 -        
423.1376 -        return result;
423.1377 -    }
423.1378 -
423.1379 -    private static File getPreferencesFile() {
423.1380 -        String junitPropertiesLocation = System.getProperty(JUNIT_PROPERTIES_LOCATION_PROPERTY);
423.1381 -        if (junitPropertiesLocation != null) {
423.1382 -            File propertyFile = new File(junitPropertiesLocation);
423.1383 -            if (propertyFile.exists()) {
423.1384 -                return propertyFile;
423.1385 -            }
423.1386 -        }
423.1387 -        // property file was not found - lets fall back to defaults
423.1388 -        String home= System.getProperty("user.home");
423.1389 -        return new File(home, JUNIT_PROPERTIES_FILENAME);
423.1390 -    }
423.1391 -
423.1392 -    // private method for deleting a file/directory (and all its subdirectories/files)
423.1393 -    private static void deleteFile(File file) throws IOException {
423.1394 -        if (file.isDirectory() && file.equals(file.getCanonicalFile())) {
423.1395 -            // file is a directory - delete sub files first
423.1396 -            File files[] = file.listFiles();
423.1397 -            for (int i = 0; i < files.length; i++) {
423.1398 -                deleteFile(files[i]);
423.1399 -            }
423.1400 -            
423.1401 -        }
423.1402 -        // file is a File :-)
423.1403 -        boolean result = file.delete();
423.1404 -        if (result == false ) {
423.1405 -            // a problem has appeared
423.1406 -            throw new IOException("Cannot delete file, file = "+file.getPath());
423.1407 -        }
423.1408 -    }
423.1409 -    
423.1410 -    // private method for deleting every subfiles/subdirectories of a file object
423.1411 -    private static void deleteSubFiles(File file) throws IOException {
423.1412 -        File files[] = file.getCanonicalFile().listFiles();
423.1413 -        if (files != null) {
423.1414 -            for (File f : files) {
423.1415 -                deleteFile(f);
423.1416 -            }
423.1417 -        } else {
423.1418 -            // probably do nothing - file is not a directory
423.1419 -        }
423.1420 -    }
423.1421 -
423.1422 -    private static FileObject copyStringToFile (FileObject f, String content) throws Exception {
423.1423 -        OutputStream os = f.getOutputStream();
423.1424 -        os.write(content.getBytes("UTF-8"));
423.1425 -        os.close ();
423.1426 -
423.1427 -        return f;
423.1428 -    }
423.1429 -
423.1430 -}
   424.1 --- a/sandbox/java.hints/java.hints.test/src/org/netbeans/modules/parsing/impl/indexing/MimeTypes.java	Mon Dec 19 11:37:36 2016 +0100
   424.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   424.3 @@ -1,66 +0,0 @@
   424.4 -/*
   424.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   424.6 - *
   424.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
   424.8 - *
   424.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  424.10 - * Other names may be trademarks of their respective owners.
  424.11 - *
  424.12 - * The contents of this file are subject to the terms of either the GNU
  424.13 - * General Public License Version 2 only ("GPL") or the Common
  424.14 - * Development and Distribution License("CDDL") (collectively, the
  424.15 - * "License"). You may not use this file except in compliance with the
  424.16 - * License. You can obtain a copy of the License at
  424.17 - * http://www.netbeans.org/cddl-gplv2.html
  424.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  424.19 - * specific language governing permissions and limitations under the
  424.20 - * License.  When distributing the software, include this License Header
  424.21 - * Notice in each file and include the License file at
  424.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  424.23 - * particular file as subject to the "Classpath" exception as provided
  424.24 - * by Oracle in the GPL Version 2 section of the License file that
  424.25 - * accompanied this code. If applicable, add the following below the
  424.26 - * License Header, with the fields enclosed by brackets [] replaced by
  424.27 - * your own identifying information:
  424.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  424.29 - *
  424.30 - * If you wish your version of this file to be governed by only the CDDL
  424.31 - * or only the GPL Version 2, indicate your decision by adding
  424.32 - * "[Contributor] elects to include this software in this distribution
  424.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  424.34 - * single choice of license, a recipient has the option to distribute
  424.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  424.36 - * to extend the choice of license to its licensees as provided above.
  424.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  424.38 - * Version 2 license, then the option applies only if the new code is
  424.39 - * made subject to such option by the copyright holder.
  424.40 - *
  424.41 - * Contributor(s):
  424.42 - *
  424.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
  424.44 - */
  424.45 -package org.netbeans.modules.parsing.impl.indexing;
  424.46 -
  424.47 -import java.util.Set;
  424.48 -import org.netbeans.api.annotations.common.CheckForNull;
  424.49 -import org.netbeans.api.annotations.common.NonNull;
  424.50 -import org.openide.util.Parameters;
  424.51 -
  424.52 -/**Not an API!
  424.53 - *
  424.54 - * @author Tomas Zezula
  424.55 - */
  424.56 -public class MimeTypes {
  424.57 -
  424.58 -    private MimeTypes() {}
  424.59 -
  424.60 -    public static void setAllMimeTypes(@NonNull final Set<String> allMimeTypes) {
  424.61 -        Parameters.notNull("allMimeTypes", allMimeTypes);   //NOI18N
  424.62 -        Util.allMimeTypes = allMimeTypes;
  424.63 -    }
  424.64 -
  424.65 -    @CheckForNull
  424.66 -    public static Set<String> getAllMimeTypes() {
  424.67 -        return Util.allMimeTypes;
  424.68 -    }
  424.69 -}
   425.1 --- a/sandbox/java.hints/java.hints.test/test/unit/src/org/netbeans/modules/java/hints/test/api/HintTestTest.java	Mon Dec 19 11:37:36 2016 +0100
   425.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   425.3 @@ -1,336 +0,0 @@
   425.4 -/*
   425.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   425.6 - *
   425.7 - * Copyright 2012 Oracle and/or its affiliates. All rights reserved.
   425.8 - *
   425.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  425.10 - * Other names may be trademarks of their respective owners.
  425.11 - *
  425.12 - * The contents of this file are subject to the terms of either the GNU
  425.13 - * General Public License Version 2 only ("GPL") or the Common
  425.14 - * Development and Distribution License("CDDL") (collectively, the
  425.15 - * "License"). You may not use this file except in compliance with the
  425.16 - * License. You can obtain a copy of the License at
  425.17 - * http://www.netbeans.org/cddl-gplv2.html
  425.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  425.19 - * specific language governing permissions and limitations under the
  425.20 - * License.  When distributing the software, include this License Header
  425.21 - * Notice in each file and include the License file at
  425.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  425.23 - * particular file as subject to the "Classpath" exception as provided
  425.24 - * by Oracle in the GPL Version 2 section of the License file that
  425.25 - * accompanied this code. If applicable, add the following below the
  425.26 - * License Header, with the fields enclosed by brackets [] replaced by
  425.27 - * your own identifying information:
  425.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  425.29 - *
  425.30 - * If you wish your version of this file to be governed by only the CDDL
  425.31 - * or only the GPL Version 2, indicate your decision by adding
  425.32 - * "[Contributor] elects to include this software in this distribution
  425.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  425.34 - * single choice of license, a recipient has the option to distribute
  425.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  425.36 - * to extend the choice of license to its licensees as provided above.
  425.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  425.38 - * Version 2 license, then the option applies only if the new code is
  425.39 - * made subject to such option by the copyright holder.
  425.40 - *
  425.41 - * Contributor(s):
  425.42 - *
  425.43 - * Portions Copyrighted 2012 Sun Microsystems, Inc.
  425.44 - */
  425.45 -package org.netbeans.modules.java.hints.test.api;
  425.46 -
  425.47 -import com.sun.source.tree.Tree.Kind;
  425.48 -import com.sun.source.util.TreePath;
  425.49 -import java.io.ByteArrayOutputStream;
  425.50 -import java.io.InputStreamReader;
  425.51 -import java.io.OutputStream;
  425.52 -import java.io.OutputStreamWriter;
  425.53 -import java.io.Reader;
  425.54 -import java.io.Writer;
  425.55 -import javax.swing.text.Document;
  425.56 -import org.junit.Assert;
  425.57 -import org.junit.Test;
  425.58 -import org.netbeans.api.java.source.ClasspathInfo.PathKind;
  425.59 -import org.netbeans.api.java.source.CompilationInfo;
  425.60 -import org.netbeans.api.java.source.JavaSource;
  425.61 -import org.netbeans.spi.editor.hints.ChangeInfo;
  425.62 -import org.netbeans.spi.editor.hints.ErrorDescription;
  425.63 -import org.netbeans.spi.editor.hints.Fix;
  425.64 -import org.netbeans.spi.java.hints.ErrorDescriptionFactory;
  425.65 -import org.netbeans.spi.java.hints.Hint;
  425.66 -import org.netbeans.spi.java.hints.HintContext;
  425.67 -import org.netbeans.spi.java.hints.JavaFix;
  425.68 -import org.netbeans.spi.java.hints.JavaFix.TransformationContext;
  425.69 -import org.netbeans.spi.java.hints.TriggerTreeKind;
  425.70 -import org.openide.LifecycleManager;
  425.71 -import org.openide.cookies.EditorCookie;
  425.72 -import org.openide.filesystems.FileObject;
  425.73 -import org.openide.filesystems.FileUtil;
  425.74 -import org.openide.loaders.DataObject;
  425.75 -
  425.76 -/**
  425.77 - *
  425.78 - * @author lahvac
  425.79 - */
  425.80 -public class HintTestTest {
  425.81 -
  425.82 -    public HintTestTest() {
  425.83 -    }
  425.84 -
  425.85 -    @Test
  425.86 -    public void testNonJavaChanges() throws Exception {
  425.87 -        HintTest.create()
  425.88 -                .input("package test;\n" +
  425.89 -                       "public class Test { }\n")
  425.90 -                .input("test/test.txt", "1\n2\n", false)
  425.91 -                .run(NonJavaChanges.class)
  425.92 -                .findWarning("1:13-1:17:verifier:Test")
  425.93 -                .applyFix()
  425.94 -                .assertVerbatimOutput("test/test.txt", "2\n3\n");
  425.95 -    }
  425.96 -
  425.97 -    @Test
  425.98 -    public void test220070() throws Exception {
  425.99 -        HintTest.create()
 425.100 -                .input("package test;\n" +
 425.101 -                       "public class Test { }\n")
 425.102 -                .input("test/test.txt", "1\n2\n", false)
 425.103 -                .run(NonJavaChanges.class)
 425.104 -                .findWarning("1:13-1:17:verifier:Test")
 425.105 -                .applyFix()
 425.106 -                .assertOutput("test/test.txt", "2\r3\r");
 425.107 -    }
 425.108 -    
 425.109 -    @Test
 425.110 -    public void testNonJavaChangesOpenedInEditor() throws Exception {
 425.111 -        try {
 425.112 -            HintTest ht = HintTest.create()
 425.113 -                                  .input("package test;\n" +
 425.114 -                                         "public class Test { }\n")
 425.115 -                                  .input("test/test.txt", "1\n2\n", false);
 425.116 -            FileObject resource = ht.getSourceRoot().getFileObject("test/test.txt");
 425.117 -            DataObject od = DataObject.find(resource);
 425.118 -            EditorCookie ec = od.getLookup().lookup(EditorCookie.class);
 425.119 -            Document doc = ec.openDocument();
 425.120 -            doc.remove(0, doc.getLength());
 425.121 -            doc.insertString(0, "5\n6\n", null);
 425.122 -            ht.run(NonJavaChanges.class)
 425.123 -              .findWarning("1:13-1:17:verifier:Test")
 425.124 -              .applyFix(false)
 425.125 -              .assertVerbatimOutput("test/test.txt", "6\n7\n");
 425.126 -            Assert.assertEquals("1\n2\n", resource.asText("UTF-8"));
 425.127 -            Assert.assertEquals("6\n7\n", doc.getText(0, doc.getLength()));
 425.128 -        } finally {
 425.129 -            LifecycleManager.getDefault().saveAll();
 425.130 -        }
 425.131 -    }
 425.132 -
 425.133 -    @Hint(displayName="testingNonJavaChanges", description="testingNonJavaChanges", category="test")
 425.134 -    public static final class NonJavaChanges {
 425.135 -        @TriggerTreeKind(Kind.CLASS)
 425.136 -        public static ErrorDescription hint(HintContext ctx) {
 425.137 -            return ErrorDescriptionFactory.forName(ctx, ctx.getPath(), "Test", new TestingNonJavaChangesFix(ctx.getInfo(), ctx.getPath()).toEditorFix());
 425.138 -        }
 425.139 -    }
 425.140 -
 425.141 -    private static final class TestingNonJavaChangesFix extends JavaFix {
 425.142 -
 425.143 -        public TestingNonJavaChangesFix(CompilationInfo info, TreePath tp) {
 425.144 -            super(info, tp);
 425.145 -        }
 425.146 -
 425.147 -        @Override protected String getText() {
 425.148 -            return "Test";
 425.149 -        }
 425.150 -
 425.151 -        @Override protected void performRewrite(TransformationContext ctx) {
 425.152 -            try {
 425.153 -                FileObject resource = ctx.getWorkingCopy().getFileObject().getParent().getFileObject("test.txt");
 425.154 -                Assert.assertNotNull(resource);
 425.155 -                Reader r = new InputStreamReader(ctx.getResourceContent(resource), "UTF-8");
 425.156 -                ByteArrayOutputStream outData = new ByteArrayOutputStream();
 425.157 -                Writer w = new OutputStreamWriter(outData, "UTF-8");
 425.158 -                int read;
 425.159 -
 425.160 -                while ((read = r.read()) != -1) {
 425.161 -                    if (read != '\n') read++;
 425.162 -                    w.write(read);
 425.163 -                }
 425.164 -
 425.165 -                r.close();
 425.166 -                w.close();
 425.167 -
 425.168 -                OutputStream out = ctx.getResourceOutput(resource);
 425.169 -
 425.170 -                out.write(outData.toByteArray());
 425.171 -
 425.172 -                out.close();
 425.173 -            } catch (Exception ex) {
 425.174 -                throw new IllegalStateException(ex);
 425.175 -            }
 425.176 -        }
 425.177 -
 425.178 -    }
 425.179 -
 425.180 -    @Test
 425.181 -    public void testMeaningfullSourcePath() throws Exception {
 425.182 -        HintTest.create()
 425.183 -                .input("package test;\n" +
 425.184 -                       "public class Test { }\n")
 425.185 -                .run(MeaningfullSourcePath.class)
 425.186 -                .assertWarnings();
 425.187 -    }
 425.188 -
 425.189 -    @Hint(displayName="meaningfullSourcePath", description="meaningfullSourcePath", category="test")
 425.190 -    public static final class MeaningfullSourcePath {
 425.191 -        @TriggerTreeKind(Kind.CLASS)
 425.192 -        public static ErrorDescription hint(HintContext ctx) {
 425.193 -            if (ctx.getInfo().getClasspathInfo().getClassPath(PathKind.SOURCE).findOwnerRoot(ctx.getInfo().getFileObject()) == null) {
 425.194 -                return ErrorDescriptionFactory.forTree(ctx, ctx.getPath(), "Broken Source Path");
 425.195 -            }
 425.196 -
 425.197 -            return null;
 425.198 -        }
 425.199 -    }
 425.200 -
 425.201 -    @Test
 425.202 -    public void testCompilationClassPath() throws Exception {
 425.203 -        HintTest.create()
 425.204 -                .input("package test;\n" +
 425.205 -                       "public class Test { }\n")
 425.206 -                .classpath(FileUtil.getArchiveRoot(JavaSource.class.getProtectionDomain().getCodeSource().getLocation()))
 425.207 -                .run(CompilationClassPath.class)
 425.208 -                .assertWarnings();
 425.209 -    }
 425.210 -
 425.211 -    @Hint(displayName="compilationClassPath", description="compilationClassPath", category="test")
 425.212 -    public static final class CompilationClassPath {
 425.213 -        @TriggerTreeKind(Kind.CLASS)
 425.214 -        public static ErrorDescription hint(HintContext ctx) {
 425.215 -            FileObject clazz = ctx.getInfo().getClasspathInfo().getClassPath(PathKind.COMPILE).findResource("org/netbeans/api/java/source/JavaSource.class");
 425.216 -
 425.217 -            if (clazz == null) {
 425.218 -                return ErrorDescriptionFactory.forTree(ctx, ctx.getPath(), "Broken Compilation ClassPath");
 425.219 -            }
 425.220 -
 425.221 -            return null;
 425.222 -        }
 425.223 -    }
 425.224 -
 425.225 -    @Test
 425.226 -    public void testHintThrowsException() throws Exception {
 425.227 -        HintTest ht = HintTest.create()
 425.228 -                              .input("package test;\n" +
 425.229 -                                     "public class Test { }\n");
 425.230 -        try {
 425.231 -            ht.run(HintThrowsException.class);
 425.232 -            Assert.fail("No exception thrown");
 425.233 -        } catch (Exception ex) {
 425.234 -            //ok
 425.235 -            Assert.assertEquals(IllegalStateException.class, ex.getClass());
 425.236 -            Assert.assertNotNull(ex.getCause());
 425.237 -            Assert.assertEquals(NullPointerException.class, ex.getCause().getClass());
 425.238 -            Assert.assertEquals("a", ex.getCause().getMessage());
 425.239 -        }
 425.240 -    }
 425.241 -    
 425.242 -    @Hint(displayName="hintThrowsException", description="hintThrowsException", category="test")
 425.243 -    public static final class HintThrowsException {
 425.244 -        @TriggerTreeKind(Kind.CLASS)
 425.245 -        public static ErrorDescription hint(HintContext ctx) {
 425.246 -            throw new NullPointerException("a");
 425.247 -        }
 425.248 -    }
 425.249 -
 425.250 -    @Test
 425.251 -    public void testNonJavaFix() throws Exception {
 425.252 -        HintTest ht = HintTest.create()
 425.253 -                              .input("package test;\n" +
 425.254 -                                     "public class Test { }\n");
 425.255 -        try {
 425.256 -            ht.run(NonJavaFix.class)
 425.257 -              .findWarning("1:0-1:21:verifier:Test")
 425.258 -              .applyFix();
 425.259 -            Assert.fail("No exception thrown");
 425.260 -        } catch (AssertionError ae) {
 425.261 -            //ok
 425.262 -            Assert.assertEquals("The fix must be a JavaFix", ae.getMessage());
 425.263 -        }
 425.264 -    }
 425.265 -    
 425.266 -    @Hint(displayName="nonJavaFix", description="nonJavaFix", category="test")
 425.267 -    public static final class NonJavaFix {
 425.268 -        @TriggerTreeKind(Kind.CLASS)
 425.269 -        public static ErrorDescription hint(HintContext ctx) {
 425.270 -            return ErrorDescriptionFactory.forTree(ctx, ctx.getPath(), "Test", new Fix() {
 425.271 -                @Override public String getText() {
 425.272 -                    return "Fix";
 425.273 -                }
 425.274 -                @Override public ChangeInfo implement() throws Exception {
 425.275 -                    return null;
 425.276 -                }
 425.277 -            });
 425.278 -        }
 425.279 -    }
 425.280 -    
 425.281 -    @Test
 425.282 -    public void testNotRepeatableJavaFix() throws Exception {
 425.283 -        HintTest ht = HintTest.create()
 425.284 -                              .input("package test;\n" +
 425.285 -                                     "public class Test { }\n");
 425.286 -        try {
 425.287 -            ht.run(NotRepeatableJavaFix.class)
 425.288 -              .findWarning("1:0-1:21:verifier:Test")
 425.289 -              .applyFix();
 425.290 -            Assert.fail("No exception thrown");
 425.291 -        } catch (AssertionError ae) {
 425.292 -            //ok
 425.293 -            Assert.assertTrue(ae.getMessage().startsWith("The fix must be repeatable"));
 425.294 -        }
 425.295 -    }
 425.296 -    
 425.297 -    @Hint(displayName="notRepeatableJavaFix", description="notRepeatableJavaFix", category="test")
 425.298 -    public static final class NotRepeatableJavaFix {
 425.299 -        @TriggerTreeKind(Kind.CLASS)
 425.300 -        public static ErrorDescription hint(HintContext ctx) {
 425.301 -            Fix f = new JavaFix(ctx.getInfo(), ctx.getPath()) {
 425.302 -                private boolean wasRun;
 425.303 -                @Override protected String getText() {
 425.304 -                    return "Fix";
 425.305 -                }
 425.306 -                @Override protected void performRewrite(TransformationContext ctx) throws Exception {
 425.307 -                    if (wasRun) return ;
 425.308 -                    ctx.getWorkingCopy().rewrite(ctx.getPath().getLeaf(), ctx.getWorkingCopy().getTreeMaker().setLabel(ctx.getPath().getLeaf(), "Nue"));
 425.309 -                    wasRun = true;
 425.310 -                }
 425.311 -            }.toEditorFix();
 425.312 -            return ErrorDescriptionFactory.forTree(ctx, ctx.getPath(), "Test", f);
 425.313 -        }
 425.314 -    }
 425.315 -
 425.316 -    public void testSourcePathReady() throws Exception {
 425.317 -        HintTest.create()
 425.318 -                .input("test/Test1.java",
 425.319 -                       "package test;\n" +
 425.320 -                       "public class Test1 {\n" +
 425.321 -                       "    private final Test2 test2 = null;\n" +
 425.322 -                       "}\n")
 425.323 -                .input("test/Test2.java",
 425.324 -                       "package test;\n" +
 425.325 -                       "public class Test2 {\n" +
 425.326 -                       "    private final Test1 test1 = null;\n" +
 425.327 -                       "}\n")
 425.328 -                .runGlobal(NoOp.class)
 425.329 -                .assertWarnings();
 425.330 -    }
 425.331 -
 425.332 -    @Hint(displayName="noOp", description="noOp", category="test")
 425.333 -    public static final class NoOp {
 425.334 -        @TriggerTreeKind(Kind.CLASS)
 425.335 -        public static ErrorDescription hint(HintContext ctx) {
 425.336 -            return null;
 425.337 -        }
 425.338 -    }
 425.339 -}
   426.1 --- a/sandbox/java.hints/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   426.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   426.3 @@ -1,50 +0,0 @@
   426.4 -<?xml version="1.0" encoding="UTF-8"?>
   426.5 -<!--
   426.6 -*** GENERATED FROM project.xml - DO NOT EDIT  ***
   426.7 -***         EDIT ../build.xml INSTEAD         ***
   426.8 --->
   426.9 -<project name="java.hints-impl" basedir=".." xmlns:sproject="http://www.netbeans.org/ns/nb-module-suite-project/1">
  426.10 -    <fail message="Please build using Ant 1.7.1 or higher.">
  426.11 -        <condition>
  426.12 -            <not>
  426.13 -                <antversion atleast="1.7.1"/>
  426.14 -            </not>
  426.15 -        </condition>
  426.16 -    </fail>
  426.17 -    <property file="nbproject/private/platform-private.properties"/>
  426.18 -    <property file="nbproject/platform.properties"/>
  426.19 -    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-suite-project/1">
  426.20 -        <attribute name="name"/>
  426.21 -        <attribute name="value"/>
  426.22 -        <sequential>
  426.23 -            <property name="@{name}" value="${@{value}}"/>
  426.24 -        </sequential>
  426.25 -    </macrodef>
  426.26 -    <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-suite-project/1">
  426.27 -        <attribute name="property"/>
  426.28 -        <attribute name="value"/>
  426.29 -        <sequential>
  426.30 -            <property name="@{property}" value="@{value}"/>
  426.31 -        </sequential>
  426.32 -    </macrodef>
  426.33 -    <property file="${user.properties.file}"/>
  426.34 -    <sproject:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir"/>
  426.35 -    <sproject:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir"/>
  426.36 -    <sproject:evalprops property="cluster.path.evaluated" value="${cluster.path}"/>
  426.37 -    <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
  426.38 -        <condition>
  426.39 -            <not>
  426.40 -                <contains string="${cluster.path.evaluated}" substring="platform"/>
  426.41 -            </not>
  426.42 -        </condition>
  426.43 -    </fail>
  426.44 -    <ant antfile="nbproject/platform.xml"/>
  426.45 -    <fail message="Cannot find NetBeans build harness. ${line.separator}Check that nbplatform.${nbplatform.active}.netbeans.dest.dir and nbplatform.${nbplatform.active}.harness.dir are defined. ${line.separator}On a developer machine these are normally defined in ${user.properties.file}=${netbeans.user}/build.properties ${line.separator}but for automated builds you should pass these properties to Ant explicitly. ${line.separator}You may instead download the harness and platform: -Dbootstrap.url=.../tasks.jar -Dautoupdate.catalog.url=.../updates.xml">
  426.46 -        <condition>
  426.47 -            <not>
  426.48 -                <available file="${harness.dir}/suite.xml"/>
  426.49 -            </not>
  426.50 -        </condition>
  426.51 -    </fail>
  426.52 -    <import file="${harness.dir}/suite.xml"/>
  426.53 -</project>
   427.1 --- a/sandbox/java.hints/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   427.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   427.3 @@ -1,11 +0,0 @@
   427.4 -build.xml.data.CRC32=85cca5f7
   427.5 -build.xml.script.CRC32=25a1521a
   427.6 -build.xml.stylesheet.CRC32=eaf9f76a@2.58
   427.7 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   427.8 -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   427.9 -nbproject/build-impl.xml.data.CRC32=85cca5f7
  427.10 -nbproject/build-impl.xml.script.CRC32=82e0fe0b
  427.11 -nbproject/build-impl.xml.stylesheet.CRC32=0f381476@2.58
  427.12 -nbproject/platform.xml.data.CRC32=85cca5f7
  427.13 -nbproject/platform.xml.script.CRC32=6dcbd131
  427.14 -nbproject/platform.xml.stylesheet.CRC32=4e1f53d4@2.70
   428.1 --- a/sandbox/java.hints/nbproject/platform.properties	Mon Dec 19 11:37:36 2016 +0100
   428.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   428.3 @@ -1,19 +0,0 @@
   428.4 -cluster.path=\
   428.5 -    ${nbplatform.active.dir}/apisupport:\
   428.6 -    ${nbplatform.active.dir}/cnd:\
   428.7 -    ${nbplatform.active.dir}/dlight:\
   428.8 -    ${nbplatform.active.dir}/enterprise:\
   428.9 -    ${nbplatform.active.dir}/extide:\
  428.10 -    ${nbplatform.active.dir}/extra:\
  428.11 -    ${nbplatform.active.dir}/harness:\
  428.12 -    ${nbplatform.active.dir}/ide:\
  428.13 -    ${nbplatform.active.dir}/java:\
  428.14 -    ${nbplatform.active.dir}/nb:\
  428.15 -    ${nbplatform.active.dir}/platform:\
  428.16 -    ${nbplatform.active.dir}/profiler:\
  428.17 -    ${nbplatform.active.dir}/webcommon:\
  428.18 -    ${nbplatform.active.dir}/websvccommon:\
  428.19 -    ../remoting/common/build/cluster
  428.20 -extcluster.../remoting/common/build/cluster.javadoc=
  428.21 -extcluster.../remoting/common/build/cluster.sources=
  428.22 -nbplatform.active=default
   429.1 --- a/sandbox/java.hints/nbproject/platform.xml	Mon Dec 19 11:37:36 2016 +0100
   429.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   429.3 @@ -1,34 +0,0 @@
   429.4 -<?xml version="1.0" encoding="UTF-8"?>
   429.5 -<project name="platform" default="download" basedir="..">
   429.6 -    <condition property="download.required">
   429.7 -        <and>
   429.8 -            <not>
   429.9 -                <available file="${harness.dir}/suite.xml"/>
  429.10 -            </not>
  429.11 -            <isset property="bootstrap.url"/>
  429.12 -            <isset property="autoupdate.catalog.url"/>
  429.13 -        </and>
  429.14 -    </condition>
  429.15 -    <target name="download" if="download.required">
  429.16 -        <mkdir dir="${harness.dir}"/>
  429.17 -        <pathconvert pathsep="|" property="download.clusters">
  429.18 -            <mapper type="flatten"/>
  429.19 -            <path path="${cluster.path}"/>
  429.20 -        </pathconvert>
  429.21 -        <property name="disabled.modules" value=""/>
  429.22 -        <pathconvert property="module.includes" pathsep="">
  429.23 -            <mapper type="glob" from="${basedir}${file.separator}*" to="(?!^\Q*\E$)"/>
  429.24 -            <path>
  429.25 -                <filelist files="${disabled.modules}" dir="."/>
  429.26 -            </path>
  429.27 -        </pathconvert>
  429.28 -        <echo message="Downloading clusters ${download.clusters}"/>
  429.29 -        <property name="tasks.jar" location="${java.io.tmpdir}/tasks.jar"/>
  429.30 -        <get src="${bootstrap.url}" dest="${tasks.jar}" usetimestamp="true" verbose="true"/>
  429.31 -        <taskdef name="autoupdate" classname="org.netbeans.nbbuild.AutoUpdate" classpath="${tasks.jar}"/>
  429.32 -        <autoupdate installdir="${nbplatform.active.dir}" updatecenter="${autoupdate.catalog.url}">
  429.33 -            <modules includes="${module.includes}.*" clusters="${download.clusters}"/>
  429.34 -            <modules includes="org[.]netbeans[.]modules[.]apisupport[.]harness" clusters="harness"/>
  429.35 -        </autoupdate>
  429.36 -    </target>
  429.37 -</project>
   430.1 --- a/sandbox/java.hints/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   430.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   430.3 @@ -1,7 +0,0 @@
   430.4 -modules=\
   430.5 -    ${project.org.netbeans.spi.java.hints}:\
   430.6 -    ${project.org.netbeans.modules.java.hints.test}:\
   430.7 -    ${project.org.netbeans.modules.jackpot30.hintsimpl}
   430.8 -project.org.netbeans.modules.jackpot30.hintsimpl=hintsimpl
   430.9 -project.org.netbeans.modules.java.hints.test=java.hints.test
  430.10 -project.org.netbeans.spi.java.hints=spi.java.hints
   431.1 --- a/sandbox/java.hints/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   431.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   431.3 @@ -1,9 +0,0 @@
   431.4 -<?xml version="1.0" encoding="UTF-8"?>
   431.5 -<project xmlns="http://www.netbeans.org/ns/project/1">
   431.6 -    <type>org.netbeans.modules.apisupport.project.suite</type>
   431.7 -    <configuration>
   431.8 -        <data xmlns="http://www.netbeans.org/ns/nb-module-suite-project/1">
   431.9 -            <name>java.hints</name>
  431.10 -        </data>
  431.11 -    </configuration>
  431.12 -</project>
   432.1 --- a/sandbox/java.hints/spi.java.hints/apichanges.xml	Mon Dec 19 11:37:36 2016 +0100
   432.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   432.3 @@ -1,139 +0,0 @@
   432.4 -<?xml version="1.0" encoding="UTF-8"?>
   432.5 -<!--
   432.6 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   432.7 -
   432.8 -Copyright 2012 Oracle and/or its affiliates. All rights reserved.
   432.9 -
  432.10 -Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  432.11 -Other names may be trademarks of their respective owners.
  432.12 -
  432.13 -The contents of this file are subject to the terms of either the GNU
  432.14 -General Public License Version 2 only ("GPL") or the Common
  432.15 -Development and Distribution License("CDDL") (collectively, the
  432.16 -"License"). You may not use this file except in compliance with the
  432.17 -License. You can obtain a copy of the License at
  432.18 -http://www.netbeans.org/cddl-gplv2.html
  432.19 -or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  432.20 -specific language governing permissions and limitations under the
  432.21 -License.  When distributing the software, include this License Header
  432.22 -Notice in each file and include the License file at
  432.23 -nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  432.24 -particular file as subject to the "Classpath" exception as provided
  432.25 -by Oracle in the GPL Version 2 section of the License file that
  432.26 -accompanied this code. If applicable, add the following below the
  432.27 -License Header, with the fields enclosed by brackets [] replaced by
  432.28 -your own identifying information:
  432.29 -"Portions Copyrighted [year] [name of copyright owner]"
  432.30 -
  432.31 -If you wish your version of this file to be governed by only the CDDL
  432.32 -or only the GPL Version 2, indicate your decision by adding
  432.33 -"[Contributor] elects to include this software in this distribution
  432.34 -under the [CDDL or GPL Version 2] license." If you do not indicate a
  432.35 -single choice of license, a recipient has the option to distribute
  432.36 -your version of this file under either the CDDL, the GPL Version 2 or
  432.37 -to extend the choice of license to its licensees as provided above.
  432.38 -However, if you add GPL Version 2 code and therefore, elected the GPL
  432.39 -Version 2 license, then the option applies only if the new code is
  432.40 -made subject to such option by the copyright holder.
  432.41 -
  432.42 -Contributor(s):
  432.43 -
  432.44 -Portions Copyrighted 2012 Sun Microsystems, Inc.
  432.45 --->
  432.46 -<!DOCTYPE apichanges PUBLIC "-//NetBeans//DTD API changes list 1.0//EN" "../nbbuild/javadoctools/apichanges.dtd">
  432.47 -<apichanges>
  432.48 -    <apidefs>
  432.49 -        <apidef name="JavaHintsSPI">Java Hints SPI</apidef>
  432.50 -    </apidefs>
  432.51 -    <changes>
  432.52 -        <change id="ProjectHintsJava">
  432.53 -            <api name="JavaHintsSPI"/>
  432.54 -            <summary>Defining system filesystem folder for per-project Java hints customizers</summary>
  432.55 -            <version major="1" minor="16"/>
  432.56 -            <date day="24" month="4" year="2013"/>
  432.57 -            <author login="jlahoda"/>
  432.58 -            <compatibility addition="yes"/>
  432.59 -            <description>
  432.60 -                <p>
  432.61 -                    Defining <code>Project/hints/java-based</code> folder, where provider for
  432.62 -                    hints customizers for Java-based projects should be stored.
  432.63 -                </p>    
  432.64 -            </description>
  432.65 -<!--            <issue number="227959"/>-->
  432.66 -        </change>
  432.67 -        <change id="IntegerOption">
  432.68 -            <api name="JavaHintsSPI"/>
  432.69 -            <summary>Added support for integer options. Hints can be declared to appear only in inspect &amp; transform</summary>
  432.70 -            <version major="1" minor="14"/>
  432.71 -            <date day="3" month="4" year="2013"/>
  432.72 -            <author login="sdedic"/>
  432.73 -            <compatibility addition="yes"/>
  432.74 -            <description>
  432.75 -                <p>
  432.76 -                    Added declarative support for integer options. <code>@IntegerOption</code> can
  432.77 -                    be used with option name field, similar to <code>@BooleanOption</code>.
  432.78 -                </p>    
  432.79 -                <p>
  432.80 -                    An option was added to <code>Hint.Options</code>, so that hint can declare
  432.81 -                    to be only shown in Inspect &amp; transform dialog. Useful for computation-intensive
  432.82 -                    hints, which should only run on demand.
  432.83 -                </p>    
  432.84 -            </description>
  432.85 -            <class package="org.netbeans.spi.java.hints" name="IntegerOption"/>
  432.86 -            <class package="org.netbeans.spi.java.hints" name="Hint"/>
  432.87 -            <issue number="227822"/>
  432.88 -            <issue number="227959"/>
  432.89 -        </change>
  432.90 -        <change id="ErrorDescriptionFactory.forSpan">
  432.91 -            <api name="JavaHintsSPI"/>
  432.92 -            <summary>Introducing ErrorDescriptionFactory.forSpan.</summary>
  432.93 -            <version major="1" minor="9"/>
  432.94 -            <date day="19" month="12" year="2012"/>
  432.95 -            <author login="jlahoda"/>
  432.96 -            <compatibility addition="yes"/>
  432.97 -            <description>
  432.98 -                <p>
  432.99 -                    Added ErrorDescriptionFactory.forSpan to create the correct
 432.100 -                    Java-enhanced ErrorDescription from a span.
 432.101 -                </p>    
 432.102 -            </description>
 432.103 -            <class package="org.netbeans.spi.java.hints" name="ErrorDescriptionFactory"/>
 432.104 -            <issue number="223723"/>
 432.105 -        </change>
 432.106 -        <change id="TransformationSupport">
 432.107 -            <api name="JavaHintsSPI"/>
 432.108 -            <summary>Added support for using jackpot patterns from other modules (e.g. refactoring).</summary>
 432.109 -            <version major="1" minor="1"/>
 432.110 -            <date day="29" month="3" year="2012"/>
 432.111 -            <author login="jbecicka"/>
 432.112 -            <compatibility addition="yes"/>
 432.113 -            <description>
 432.114 -                <p>
 432.115 -                    Added support for using jackpot patterns from other modules (e.g. refactoring).
 432.116 -                </p>    
 432.117 -            </description>
 432.118 -            <class package="org.netbeans.spi.java.hints.support" name="TransformationSupport"/>
 432.119 -            <issue number="210262"/>
 432.120 -        </change>
 432.121 -    </changes>
 432.122 -    <htmlcontents>
 432.123 -        <head>
 432.124 -            <title>Change History for the Java Hints SPI</title>
 432.125 -            <link rel="stylesheet" href="prose.css" type="text/css"/>
 432.126 -        </head>
 432.127 -        <body>
 432.128 -            <p class="overviewlink">
 432.129 -                <a href="overview-summary.html">Overview</a>
 432.130 -            </p>
 432.131 -            <h1>Introduction</h1>
 432.132 -            <p>This document lists changes made to the Java Hints SPI.</p>
 432.133 -            
 432.134 -            <!-- The actual lists of changes, as summaries and details: -->
 432.135 -            <hr/>
 432.136 -            <standard-changelists module-code-name="$codebase"/>
 432.137 -            
 432.138 -            <hr/>
 432.139 -            <p>@FOOTER@</p>
 432.140 -        </body>
 432.141 -    </htmlcontents>
 432.142 -</apichanges>
   433.1 --- a/sandbox/java.hints/spi.java.hints/arch.xml	Mon Dec 19 11:37:36 2016 +0100
   433.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   433.3 @@ -1,1115 +0,0 @@
   433.4 -<?xml version="1.0" encoding="UTF-8"?>
   433.5 -<!DOCTYPE api-answers PUBLIC "-//NetBeans//DTD Arch Answers//EN" "../nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd" [
   433.6 -  <!ENTITY api-questions SYSTEM "../nbbuild/antsrc/org/netbeans/nbbuild/Arch-api-questions.xml">
   433.7 -]>
   433.8 -
   433.9 -<api-answers
  433.10 -  question-version="1.29"
  433.11 -  author="jlahoda@netbeans.org"
  433.12 ->
  433.13 -
  433.14 -  &api-questions;
  433.15 -
  433.16 -
  433.17 -<!--
  433.18 -        <question id="arch-overall" when="init">
  433.19 -            Describe the overall architecture. 
  433.20 -            <hint>
  433.21 -            What will be API for 
  433.22 -            <a href="http://openide.netbeans.org/tutorial/api-design.html#design.apiandspi">
  433.23 -                clients and what support API</a>? 
  433.24 -            What parts will be pluggable?
  433.25 -            How will plug-ins be registered? Please use <code>&lt;api type="export"/&gt;</code>
  433.26 -            to describe your general APIs and specify their
  433.27 -            <a href="http://openide.netbeans.org/tutorial/api-design.html#category-private">
  433.28 -            stability categories</a>.
  433.29 -            If possible please provide simple diagrams.
  433.30 -            </hint>
  433.31 -        </question>
  433.32 --->
  433.33 - <answer id="arch-overall">
  433.34 -  <p>
  433.35 -   <api type="export" category="devel" group="java" name="spi.java.hints">
  433.36 -       SPI to create custom Java hints, including code smell warnings, productivity tips, etc.
  433.37 -       Please see the Use Cases section for a guide on how to use this SPI.
  433.38 -   </api>
  433.39 -  </p>
  433.40 - </answer>
  433.41 -
  433.42 -
  433.43 -
  433.44 -<!--
  433.45 -        <question id="arch-quality" when="init">
  433.46 -            How will the <a href="http://www.netbeans.org/community/guidelines/q-evangelism.html">quality</a>
  433.47 -            of your code be tested and 
  433.48 -            how are future regressions going to be prevented?
  433.49 -            <hint>
  433.50 -            What kind of testing do
  433.51 -            you want to use? How much functionality, in which areas,
  433.52 -            should be covered by the tests? How you find out that your
  433.53 -            project was successful?
  433.54 -            </hint>
  433.55 -        </question>
  433.56 --->
  433.57 - <answer id="arch-quality">
  433.58 -  <p>
  433.59 -   XXX no answer for arch-quality
  433.60 -  </p>
  433.61 - </answer>
  433.62 -
  433.63 -
  433.64 -
  433.65 -<!--
  433.66 -        <question id="arch-time" when="init">
  433.67 -            What are the time estimates of the work?
  433.68 -            <hint>
  433.69 -            Please express your estimates of how long the design, implementation,
  433.70 -            stabilization are likely to last. How many people will be needed to
  433.71 -            implement this and what is the expected milestone by which the work should be 
  433.72 -            ready?
  433.73 -            </hint>
  433.74 -        </question>
  433.75 --->
  433.76 - <answer id="arch-time">
  433.77 -  <p>
  433.78 -   XXX no answer for arch-time
  433.79 -  </p>
  433.80 - </answer>
  433.81 -
  433.82 -
  433.83 -
  433.84 -<!--
  433.85 -        <question id="arch-usecases" when="init">
  433.86 -            <hint>
  433.87 -                Content of this answer will be displayed as part of page at
  433.88 -                http://www.netbeans.org/download/dev/javadoc/usecases.html 
  433.89 -                You can use tags &lt;usecase name="name&gt; regular html description &lt;/usecase&gt;
  433.90 -                and if you want to use an URL you can prefix if with @TOP@ to begin
  433.91 -                at the root of your javadoc
  433.92 -            </hint>
  433.93 -        
  433.94 -            Describe the main <a href="http://openide.netbeans.org/tutorial/api-design.html#usecase">
  433.95 -            use cases</a> of the new API. Who will use it under
  433.96 -            what circumstances? What kind of code would typically need to be written
  433.97 -            to use the module?
  433.98 -        </question>
  433.99 --->
 433.100 - <answer id="arch-usecases">
 433.101 -  <p>
 433.102 -   <usecase id="creating" name="Creating a new Java Hint">
 433.103 -       Simple way to create a new Java hint is as follows:
 433.104 -       <ul>
 433.105 -           <li>Create a new class, annotate it with the <a href="@TOP@/org/netbeans/spi/java/hints/Hint.html">@Hint</a>
 433.106 -           annotation to it.</li>
 433.107 -           <li>Create a <code>public static ErrorDescription hint(HintContext ctx) {}</code> method in the
 433.108 -           class. Annotate the method either with the <a href="@TOP@/org/netbeans/spi/java/hints/TriggerPattern.html">@TriggerPattern</a>
 433.109 -           annotation (strongly recommended), or with the <a href="@TOP@/org/netbeans/spi/java/hints/TriggerTreeKind.html">@TriggerTreeKind</a>.
 433.110 -           This method will be called when for parts of the code that match the given pattern, of for trees of the specified kinds.</li>
 433.111 -           <li>Perform whatever checks necessary to find out whether a warning should be produced at the given place, and produce the ErrorDescription if needed.</li>
 433.112 -       </ul>
 433.113 -       <br/>
 433.114 -       Tips:
 433.115 -       <ul>
 433.116 -           <li>Always use the java.hints' <a href="@TOP@/org/netbeans/spi/java/hints/ErrorDescriptionFactory.html">ErrorDescriptionFactory</a> to produce the resulting ErrorDescription.</li>
 433.117 -           <li>Never try to produce a custom suppress warnings "fix". Specify suppress warnings keys in the @Hint annotation.</li>
 433.118 -           <li>If an automated transformation is to be prodived from your hint, subclass <a href="@TOP@/org/netbeans/spi/java/hints/JavaFix.html">JavaFix</a> and
 433.119 -               use its <code>toEditorFix()</code> method to get the <code>Fix</code>, if the transformation is going to be used inside Inspect&amp;Transform.
 433.120 -           </li>
 433.121 -           <li>The name of the method is arbitrary, one hint can consist of more that one "triggered" method.</li>
 433.122 -       </ul>
 433.123 -   </usecase>
 433.124 -   <usecase id="no-class" name="Creating a new Java Hint Without a Class">
 433.125 -       For simple hints, it is possible to annotate the hint method with the <a href="@TOP@/org/netbeans/spi/java/hints/Hint.html">@Hint</a> annotation.
 433.126 -       The hint then consists of this sole method. Any number of such hints may be created in a single class.
 433.127 -   </usecase>
 433.128 -   <usecase id="testing" name="Creating a Tests for the Newly Created Java Hint">
 433.129 -       Creating automated tests for the hints is simple: create a test class, and use
 433.130 -       <a href="@TOP@/../org-netbeans-modules-java-hints-test/org/netbeans/modules/java/hints/test/api/HintTest.html">HintTest</a>
 433.131 -       to setup the test, run the hint and verify that its outcomes are correct.
 433.132 -       The tests automatically run with <code>test</code> branding, so create <code>Bundle_test.properties</code>, and add
 433.133 -       bundle keys into it for ErrorDescription and Fix display names, to isolate the test from changes in the production
 433.134 -       <code>Bundle.properties</code>.
 433.135 -   </usecase>
 433.136 -   <usecase id="adding-options" name="Adding options to a Java Hint">
 433.137 -       To add a simple boolean option to your hint, use <a href="@TOP@/org/netbeans/spi/java/hints/BooleanOption.html">@BooleanOption</a>.
 433.138 -   </usecase>
 433.139 -  </p>
 433.140 - </answer>
 433.141 -
 433.142 -
 433.143 -
 433.144 -<!--
 433.145 -        <question id="arch-what" when="init">
 433.146 -            What is this project good for?
 433.147 -            <hint>
 433.148 -            Please provide here a few lines describing the project, 
 433.149 -            what problem it should solve, provide links to documentation, 
 433.150 -            specifications, etc.
 433.151 -            </hint>
 433.152 -        </question>
 433.153 --->
 433.154 - <answer id="arch-what">
 433.155 -  <p>
 433.156 -   XXX no answer for arch-what
 433.157 -  </p>
 433.158 - </answer>
 433.159 -
 433.160 -
 433.161 -
 433.162 -<!--
 433.163 -        <question id="arch-where" when="impl">
 433.164 -            Where one can find sources for your module?
 433.165 -            <hint>
 433.166 -                Please provide link to the Hg web client at
 433.167 -                http://hg.netbeans.org/
 433.168 -                or just use tag defaultanswer generate='here'
 433.169 -            </hint>
 433.170 -        </question>
 433.171 --->
 433.172 - <answer id="arch-where">
 433.173 -  <defaultanswer generate='here' />
 433.174 - </answer>
 433.175 -
 433.176 -
 433.177 -
 433.178 -<!--
 433.179 -        <question id="compat-deprecation" when="init">
 433.180 -            How the introduction of your project influences functionality
 433.181 -            provided by previous version of the product?
 433.182 -            <hint>
 433.183 -            If you are planning to deprecate/remove/change any existing APIs,
 433.184 -            list them here accompanied with the reason explaining why you
 433.185 -            are doing so.
 433.186 -            </hint>
 433.187 -        </question>
 433.188 --->
 433.189 - <answer id="compat-deprecation">
 433.190 -  <p>
 433.191 -   XXX no answer for compat-deprecation
 433.192 -  </p>
 433.193 - </answer>
 433.194 -
 433.195 -
 433.196 -
 433.197 -<!--
 433.198 -        <question id="compat-i18n" when="impl">
 433.199 -            Is your module correctly internationalized?
 433.200 -            <hint>
 433.201 -            Correct internationalization means that it obeys instructions 
 433.202 -            at <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/i18n-branding.html">
 433.203 -            NetBeans I18N pages</a>.
 433.204 -            </hint>
 433.205 -        </question>
 433.206 --->
 433.207 - <answer id="compat-i18n">
 433.208 -  <p>
 433.209 -   XXX no answer for compat-i18n
 433.210 -  </p>
 433.211 - </answer>
 433.212 -
 433.213 -
 433.214 -
 433.215 -<!--
 433.216 -        <question id="compat-standards" when="init">
 433.217 -            Does the module implement or define any standards? Is the 
 433.218 -            implementation exact or does it deviate somehow?
 433.219 -        </question>
 433.220 --->
 433.221 - <answer id="compat-standards">
 433.222 -  <p>
 433.223 -   XXX no answer for compat-standards
 433.224 -  </p>
 433.225 - </answer>
 433.226 -
 433.227 -
 433.228 -
 433.229 -<!--
 433.230 -        <question id="compat-version" when="impl">
 433.231 -            Can your module coexist with earlier and future
 433.232 -            versions of itself? Can you correctly read all old settings? Will future
 433.233 -            versions be able to read your current settings? Can you read
 433.234 -            or politely ignore settings stored by a future version?
 433.235 -            
 433.236 -            <hint>
 433.237 -            Very helpful for reading settings is to store version number
 433.238 -            there, so future versions can decide whether how to read/convert
 433.239 -            the settings and older versions can ignore the new ones.
 433.240 -            </hint>
 433.241 -        </question>
 433.242 --->
 433.243 - <answer id="compat-version">
 433.244 -  <p>
 433.245 -   XXX no answer for compat-version
 433.246 -  </p>
 433.247 - </answer>
 433.248 -
 433.249 -
 433.250 -
 433.251 -<!--
 433.252 -        <question id="dep-jre" when="final">
 433.253 -            Which version of JRE do you need (1.2, 1.3, 1.4, etc.)?
 433.254 -            <hint>
 433.255 -            It is expected that if your module runs on 1.x that it will run 
 433.256 -            on 1.x+1 if no, state that please. Also describe here cases where
 433.257 -            you run different code on different versions of JRE and why.
 433.258 -            </hint>
 433.259 -        </question>
 433.260 --->
 433.261 - <answer id="dep-jre">
 433.262 -  <p>
 433.263 -   XXX no answer for dep-jre
 433.264 -  </p>
 433.265 - </answer>
 433.266 -
 433.267 -
 433.268 -
 433.269 -<!--
 433.270 -        <question id="dep-jrejdk" when="final">
 433.271 -            Do you require the JDK or is the JRE enough?
 433.272 -        </question>
 433.273 --->
 433.274 - <answer id="dep-jrejdk">
 433.275 -  <p>
 433.276 -   XXX no answer for dep-jrejdk
 433.277 -  </p>
 433.278 - </answer>
 433.279 -
 433.280 -
 433.281 -
 433.282 -<!--
 433.283 -        <question id="dep-nb" when="init">
 433.284 -            What other NetBeans projects and modules does this one depend on?
 433.285 -            <hint>
 433.286 -            Depending on other NetBeans projects influnces the ability of
 433.287 -            users of your work to customize their own branded version of
 433.288 -            NetBeans by enabling and disabling some modules. Too
 433.289 -            much dependencies restrict this kind of customization. If that
 433.290 -            is your case, then you may want to split your functionality into
 433.291 -            pieces of autoload, eager and regular modules which can be
 433.292 -            enabled independently. Usually the answer to this question
 433.293 -            is generated from your <code>project.xml</code> file, but
 433.294 -            if it is not guessed correctly, you can suppress it by
 433.295 -            specifying &lt;defaultanswer generate="none"/&gt; and
 433.296 -            write here your own. Please describe such projects as imported APIs using
 433.297 -            the <code>&lt;api name="identification" type="import or export" category="stable" url="where is the description" /&gt;</code>.
 433.298 -            By doing this information gets listed in the summary page of your
 433.299 -            javadoc.
 433.300 -            </hint>
 433.301 -        </question>
 433.302 --->
 433.303 - <answer id="dep-nb">
 433.304 -  <defaultanswer generate='here' />
 433.305 - </answer>
 433.306 -
 433.307 -
 433.308 -
 433.309 -<!--
 433.310 -        <question id="dep-non-nb" when="init">
 433.311 -            What other projects outside NetBeans does this one depend on?
 433.312 -            
 433.313 -            <hint>
 433.314 -            Depending on 3rd party libraries is always problematic,
 433.315 -            especially if they are not open source, as that complicates
 433.316 -            the licensing scheme of NetBeans. Please enumerate your
 433.317 -            external dependencies here, so it is correctly understood since
 433.318 -            the begining what are the legal implications of your project.
 433.319 -            Also please note that
 433.320 -            some non-NetBeans projects are packaged as NetBeans modules
 433.321 -            (see <a href="http://libs.netbeans.org/">libraries</a>) and
 433.322 -            it is preferred to use this approach when more modules may
 433.323 -            depend and share such third-party libraries.
 433.324 -            </hint>
 433.325 -        </question>
 433.326 --->
 433.327 - <answer id="dep-non-nb">
 433.328 -  <p>
 433.329 -   XXX no answer for dep-non-nb
 433.330 -  </p>
 433.331 - </answer>
 433.332 -
 433.333 -
 433.334 -
 433.335 -<!--
 433.336 -        <question id="dep-platform" when="init">
 433.337 -            On which platforms does your module run? Does it run in the same
 433.338 -            way on each?
 433.339 -            <hint>
 433.340 -            If you plan any dependency on OS or any usage of native code,
 433.341 -            please describe why you are doing so and describe how you envision
 433.342 -            to enforce the portability of your code.
 433.343 -            Please note that there is a support for <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html#how-os-specific">OS conditionally
 433.344 -            enabled modules</a> which together with autoload/eager modules
 433.345 -            can allow you to enable to provide the best OS aware support
 433.346 -            on certain OSes while providing compatibility bridge on the not
 433.347 -            supported ones.
 433.348 -            Also please list the supported
 433.349 -            OSes/HW platforms and mentioned the lovest version of JDK required
 433.350 -            for your project to run on. Also state whether JRE is enough or
 433.351 -            you really need JDK.
 433.352 -            </hint>
 433.353 -        </question>
 433.354 --->
 433.355 - <answer id="dep-platform">
 433.356 -  <p>
 433.357 -   XXX no answer for dep-platform
 433.358 -  </p>
 433.359 - </answer>
 433.360 -
 433.361 -
 433.362 -
 433.363 -<!--
 433.364 -        <question id="deploy-dependencies" when="final">
 433.365 -            What do other modules need to do to declare a dependency on this one,
 433.366 -            in addition to or instead of the normal module dependency declaration
 433.367 -            (e.g. tokens to require)?
 433.368 -            <hint>
 433.369 -                Provide a sample of the actual lines you would add to a module manifest
 433.370 -                to declare a dependency, for example OpenIDE-Module-Requires: some.token.
 433.371 -                If other modules should not depend on this module, or should just use a
 433.372 -                simple regular module dependency, you can just answer "nothing". If you
 433.373 -                intentionally expose a semistable API to clients using implementation
 433.374 -                dependencies, you should mention that here (but there is no need to give
 433.375 -                an example of usage).
 433.376 -            </hint>
 433.377 -        </question>
 433.378 --->
 433.379 - <answer id="deploy-dependencies">
 433.380 -  <p>
 433.381 -   XXX no answer for deploy-dependencies
 433.382 -  </p>
 433.383 - </answer>
 433.384 -
 433.385 -
 433.386 -
 433.387 -<!--
 433.388 -        <question id="deploy-jar" when="impl">
 433.389 -            Do you deploy just module JAR file(s) or other files as well?
 433.390 -            <hint>
 433.391 -            Usually a module consist of one JAR file (perhaps with Class-Path
 433.392 -            extensions) and also a configuration file that enables it. If you
 433.393 -            have any other files, use
 433.394 -            &lt;api group="java.io.File" name="yourname" type="export" category="friend"&gt;...&lt;/api&gt;
 433.395 -            to define the location, name and stability of your files (of course
 433.396 -            changing "yourname" and "friend" to suit your needs).
 433.397 -            
 433.398 -            If it uses more than one JAR, describe where they are located, how
 433.399 -            they refer to each other. 
 433.400 -            If it consist of module JAR(s) and other files, please describe
 433.401 -            what is their purpose, why other files are necessary. Please 
 433.402 -            make sure that installation/uninstallation leaves the system 
 433.403 -            in state as it was before installation.
 433.404 -            </hint>
 433.405 -        </question>
 433.406 --->
 433.407 - <answer id="deploy-jar">
 433.408 -  <p>
 433.409 -   XXX no answer for deploy-jar
 433.410 -  </p>
 433.411 - </answer>
 433.412 -
 433.413 -
 433.414 -
 433.415 -<!--
 433.416 -        <question id="deploy-nbm" when="impl">
 433.417 -            Can you deploy an NBM via the Update Center?
 433.418 -            <hint>
 433.419 -            If not why?
 433.420 -            </hint>
 433.421 -        </question>
 433.422 --->
 433.423 - <answer id="deploy-nbm">
 433.424 -  <p>
 433.425 -   XXX no answer for deploy-nbm
 433.426 -  </p>
 433.427 - </answer>
 433.428 -
 433.429 -
 433.430 -
 433.431 -<!--
 433.432 -        <question id="deploy-packages" when="init">
 433.433 -            Are packages of your module made inaccessible by not declaring them
 433.434 -            public?
 433.435 -            
 433.436 -            <hint>
 433.437 -            By default NetBeans build harness treats all packages are private.
 433.438 -            If you export some of them - either as public or friend packages,
 433.439 -            you should have a reason. If the reason is described elsewhere
 433.440 -            in this document, you can ignore this question.
 433.441 -            </hint>
 433.442 -        </question>
 433.443 --->
 433.444 - <answer id="deploy-packages">
 433.445 -  <p>
 433.446 -   XXX no answer for deploy-packages
 433.447 -  </p>
 433.448 - </answer>
 433.449 -
 433.450 -
 433.451 -
 433.452 -<!--
 433.453 -        <question id="deploy-shared" when="final">
 433.454 -            Do you need to be installed in the shared location only, or in the user directory only,
 433.455 -            or can your module be installed anywhere?
 433.456 -            <hint>
 433.457 -            Installation location shall not matter, if it does explain why.
 433.458 -            Consider also whether <code>InstalledFileLocator</code> can help.
 433.459 -            </hint>
 433.460 -        </question>
 433.461 --->
 433.462 - <answer id="deploy-shared">
 433.463 -  <p>
 433.464 -   XXX no answer for deploy-shared
 433.465 -  </p>
 433.466 - </answer>
 433.467 -
 433.468 -
 433.469 -
 433.470 -<!--
 433.471 -        <question id="exec-ant-tasks" when="impl">
 433.472 -            Do you define or register any ant tasks that other can use?
 433.473 -            
 433.474 -            <hint>
 433.475 -            If you provide an ant task that users can use, you need to be very
 433.476 -            careful about its syntax and behaviour, as it most likely forms an
 433.477 -	          API for end users and as there is a lot of end users, their reaction
 433.478 -            when such API gets broken can be pretty strong.
 433.479 -            </hint>
 433.480 -        </question>
 433.481 --->
 433.482 - <answer id="exec-ant-tasks">
 433.483 -  <p>
 433.484 -   XXX no answer for exec-ant-tasks
 433.485 -  </p>
 433.486 - </answer>
 433.487 -
 433.488 -
 433.489 -
 433.490 -<!--
 433.491 -        <question id="exec-classloader" when="impl">
 433.492 -            Does your code create its own class loader(s)?
 433.493 -            <hint>
 433.494 -            A bit unusual. Please explain why and what for.
 433.495 -            </hint>
 433.496 -        </question>
 433.497 --->
 433.498 - <answer id="exec-classloader">
 433.499 -  <p>
 433.500 -   XXX no answer for exec-classloader
 433.501 -  </p>
 433.502 - </answer>
 433.503 -
 433.504 -
 433.505 -
 433.506 -<!--
 433.507 -        <question id="exec-component" when="impl">
 433.508 -            Is execution of your code influenced by any (string) property
 433.509 -            of any of your components?
 433.510 -            
 433.511 -            <hint>
 433.512 -            Often <code>JComponent.getClientProperty</code>, <code>Action.getValue</code>
 433.513 -            or <code>PropertyDescriptor.getValue</code>, etc. are used to influence
 433.514 -            a behavior of some code. This of course forms an interface that should
 433.515 -            be documented. Also if one depends on some interface that an object
 433.516 -            implements (<code>component instanceof Runnable</code>) that forms an
 433.517 -            API as well.
 433.518 -            </hint>
 433.519 -        </question>
 433.520 --->
 433.521 - <answer id="exec-component">
 433.522 -  <p>
 433.523 -   XXX no answer for exec-component
 433.524 -  </p>
 433.525 - </answer>
 433.526 -
 433.527 -
 433.528 -
 433.529 -<!--
 433.530 -        <question id="exec-introspection" when="impl">
 433.531 -            Does your module use any kind of runtime type information (<code>instanceof</code>,
 433.532 -            work with <code>java.lang.Class</code>, etc.)?
 433.533 -            <hint>
 433.534 -            Check for cases when you have an object of type A and you also
 433.535 -            expect it to (possibly) be of type B and do some special action. That
 433.536 -            should be documented. The same applies on operations in meta-level
 433.537 -            (Class.isInstance(...), Class.isAssignableFrom(...), etc.).
 433.538 -            </hint>
 433.539 -        </question>
 433.540 --->
 433.541 - <answer id="exec-introspection">
 433.542 -  <p>
 433.543 -   XXX no answer for exec-introspection
 433.544 -  </p>
 433.545 - </answer>
 433.546 -
 433.547 -
 433.548 -
 433.549 -<!--
 433.550 -        <question id="exec-privateaccess" when="final">
 433.551 -            Are you aware of any other parts of the system calling some of 
 433.552 -            your methods by reflection?
 433.553 -            <hint>
 433.554 -            If so, describe the "contract" as an API. Likely private or friend one, but
 433.555 -            still API and consider rewrite of it.
 433.556 -            </hint>
 433.557 -        </question>
 433.558 --->
 433.559 - <answer id="exec-privateaccess">
 433.560 -  <p>
 433.561 -   XXX no answer for exec-privateaccess
 433.562 -  </p>
 433.563 - </answer>
 433.564 -
 433.565 -
 433.566 -
 433.567 -<!--
 433.568 -        <question id="exec-process" when="impl">
 433.569 -            Do you execute an external process from your module? How do you ensure
 433.570 -            that the result is the same on different platforms? Do you parse output?
 433.571 -            Do you depend on result code?
 433.572 -            <hint>
 433.573 -            If you feed an input, parse the output please declare that as an API.
 433.574 -            </hint>
 433.575 -        </question>
 433.576 --->
 433.577 - <answer id="exec-process">
 433.578 -  <p>
 433.579 -   XXX no answer for exec-process
 433.580 -  </p>
 433.581 - </answer>
 433.582 -
 433.583 -
 433.584 -
 433.585 -<!--
 433.586 -        <question id="exec-property" when="impl">
 433.587 -            Is execution of your code influenced by any environment or
 433.588 -            Java system (<code>System.getProperty</code>) property?
 433.589 -            On a similar note, is there something interesting that you
 433.590 -            pass to <code>java.util.logging.Logger</code>? Or do you observe
 433.591 -            what others log?
 433.592 -            <hint>
 433.593 -            If there is a property that can change the behavior of your 
 433.594 -            code, somebody will likely use it. You should describe what it does 
 433.595 -            and the <a href="http://openide.netbeans.org/tutorial/api-design.html#life">stability category</a>
 433.596 -            of this API. You may use
 433.597 -            <pre>
 433.598 -                &lt;api type="export" group="property" name="id" category="private" url="http://..."&gt;
 433.599 -                    description of the property, where it is used, what it influence, etc.
 433.600 -                &lt;/api&gt;            
 433.601 -            </pre>
 433.602 -            </hint>
 433.603 -        </question>
 433.604 --->
 433.605 - <answer id="exec-property">
 433.606 -  <p>
 433.607 -   XXX no answer for exec-property
 433.608 -  </p>
 433.609 - </answer>
 433.610 -
 433.611 -
 433.612 -
 433.613 -<!--
 433.614 -        <question id="exec-reflection" when="impl">
 433.615 -            Does your code use Java Reflection to execute other code?
 433.616 -            <hint>
 433.617 -            This usually indicates a missing or insufficient API in the other
 433.618 -            part of the system. If the other side is not aware of your dependency
 433.619 -            this contract can be easily broken.
 433.620 -            </hint>
 433.621 -        </question>
 433.622 --->
 433.623 - <answer id="exec-reflection">
 433.624 -  <p>
 433.625 -   XXX no answer for exec-reflection
 433.626 -  </p>
 433.627 - </answer>
 433.628 -
 433.629 -
 433.630 -
 433.631 -<!--
 433.632 -        <question id="exec-threading" when="init">
 433.633 -            What threading models, if any, does your module adhere to? How the
 433.634 -            project behaves with respect to threading?
 433.635 -            <hint>
 433.636 -                Is your API threadsafe? Can it be accessed from any threads or
 433.637 -                just from some dedicated ones? Any special relation to AWT and
 433.638 -                its Event Dispatch thread? Also
 433.639 -                if your module calls foreign APIs which have a specific threading model,
 433.640 -                indicate how you comply with the requirements for multithreaded access
 433.641 -                (synchronization, mutexes, etc.) applicable to those APIs.
 433.642 -                If your module defines any APIs, or has complex internal structures
 433.643 -                that might be used from multiple threads, declare how you protect
 433.644 -                data against concurrent access, race conditions, deadlocks, etc.,
 433.645 -                and whether such rules are enforced by runtime warnings, errors, assertions, etc.
 433.646 -                Examples: a class might be non-thread-safe (like Java Collections); might
 433.647 -                be fully thread-safe (internal locking); might require access through a mutex
 433.648 -                (and may or may not automatically acquire that mutex on behalf of a client method);
 433.649 -                might be able to run only in the event queue; etc.
 433.650 -                Also describe when any events are fired: synchronously, asynchronously, etc.
 433.651 -                Ideas: <a href="http://core.netbeans.org/proposals/threading/index.html#recommendations">Threading Recommendations</a> (in progress)
 433.652 -            </hint>
 433.653 -        </question>
 433.654 --->
 433.655 - <answer id="exec-threading">
 433.656 -  <p>
 433.657 -   XXX no answer for exec-threading
 433.658 -  </p>
 433.659 - </answer>
 433.660 -
 433.661 -
 433.662 -
 433.663 -<!--
 433.664 -        <question id="format-clipboard" when="impl">
 433.665 -            Which data flavors (if any) does your code read from or insert to
 433.666 -            the clipboard (by access to clipboard on means calling methods on <code>java.awt.datatransfer.Transferable</code>?
 433.667 -            
 433.668 -            <hint>
 433.669 -            Often Node's deal with clipboard by usage of <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>.
 433.670 -            Check your code for overriding these methods.
 433.671 -            </hint>
 433.672 -        </question>
 433.673 --->
 433.674 - <answer id="format-clipboard">
 433.675 -  <p>
 433.676 -   XXX no answer for format-clipboard
 433.677 -  </p>
 433.678 - </answer>
 433.679 -
 433.680 -
 433.681 -
 433.682 -<!--
 433.683 -        <question id="format-dnd" when="impl">
 433.684 -            Which protocols (if any) does your code understand during Drag &amp; Drop?
 433.685 -            <hint>
 433.686 -            Often Node's deal with clipboard by usage of <code>Node.drag, Node.getDropType</code>. 
 433.687 -            Check your code for overriding these methods. Btw. if they are not overridden, they
 433.688 -            by default delegate to <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>.
 433.689 -            </hint>
 433.690 -        </question>
 433.691 --->
 433.692 - <answer id="format-dnd">
 433.693 -  <p>
 433.694 -   XXX no answer for format-dnd
 433.695 -  </p>
 433.696 - </answer>
 433.697 -
 433.698 -
 433.699 -
 433.700 -<!--
 433.701 -        <question id="format-types" when="impl">
 433.702 -            Which protocols and file formats (if any) does your module read or write on disk,
 433.703 -            or transmit or receive over the network? Do you generate an ant build script?
 433.704 -            Can it be edited and modified? 
 433.705 -            
 433.706 -            <hint>
 433.707 -            <p>
 433.708 -            Files can be read and written by other programs, modules and users. If they influence
 433.709 -            your behaviour, make sure you either document the format or claim that it is a private
 433.710 -            api (using the &lt;api&gt; tag). 
 433.711 -            </p>
 433.712 -            
 433.713 -            <p>
 433.714 -            If you generate an ant build file, this is very likely going to be seen by end users and
 433.715 -            they will be attempted to edit it. You should be ready for that and provide here a link
 433.716 -            to documentation that you have for such purposes and also describe how you are going to
 433.717 -            understand such files during next release, when you (very likely) slightly change the 
 433.718 -            format.
 433.719 -            </p>
 433.720 -            </hint>
 433.721 -        </question>
 433.722 --->
 433.723 - <answer id="format-types">
 433.724 -  <p>
 433.725 -   XXX no answer for format-types
 433.726 -  </p>
 433.727 - </answer>
 433.728 -
 433.729 -
 433.730 -
 433.731 -<!--
 433.732 -        <question id="lookup-lookup" when="init">
 433.733 -            Does your module use <code>org.openide.util.Lookup</code>
 433.734 -            or any similar technology to find any components to communicate with? Which ones?
 433.735 -            
 433.736 -            <hint>
 433.737 -            NetBeans is build around a generic registry of services called
 433.738 -            lookup. It is preferable to use it for registration and discovery
 433.739 -            if possible. See
 433.740 -            <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-util/org/openide/util/lookup/doc-files/index.html">
 433.741 -            The Solution to Comunication Between Components
 433.742 -            </a>. If you do not plan to use lookup and insist usage
 433.743 -            of other solution, then please describe why it is not working for
 433.744 -            you.
 433.745 -            <br/>
 433.746 -            When filling the final version of your arch document, please
 433.747 -            describe the interfaces you are searching for, where 
 433.748 -            are defined, whether you are searching for just one or more of them,
 433.749 -            if the order is important, etc. Also classify the stability of such
 433.750 -            API contract. Use &lt;api group=&amp;lookup&amp; /&gt; tag, so
 433.751 -            your information gets listed in the summary page of your javadoc.
 433.752 -            </hint>
 433.753 -        </question>
 433.754 --->
 433.755 - <answer id="lookup-lookup">
 433.756 -  <p>
 433.757 -   XXX no answer for lookup-lookup
 433.758 -  </p>
 433.759 - </answer>
 433.760 -
 433.761 -
 433.762 -
 433.763 -<!--
 433.764 -        <question id="lookup-register" when="final">
 433.765 -            Do you register anything into lookup for other code to find?
 433.766 -            <hint>
 433.767 -            Do you register using layer file or using a declarative annotation such as <code>@ServiceProvider</code>?
 433.768 -            Who is supposed to find your component?
 433.769 -            </hint>
 433.770 -        </question>
 433.771 --->
 433.772 - <answer id="lookup-register">
 433.773 -  <p>
 433.774 -   XXX no answer for lookup-register
 433.775 -  </p>
 433.776 - </answer>
 433.777 -
 433.778 -
 433.779 -
 433.780 -<!--
 433.781 -        <question id="lookup-remove" when="final">
 433.782 -            Do you remove entries of other modules from lookup?
 433.783 -            <hint>
 433.784 -            Why? Of course, that is possible, but it can be dangerous. Is the module
 433.785 -            your are masking resource from aware of what you are doing?
 433.786 -            </hint>
 433.787 -        </question>
 433.788 --->
 433.789 - <answer id="lookup-remove">
 433.790 -  <p>
 433.791 -   XXX no answer for lookup-remove
 433.792 -  </p>
 433.793 - </answer>
 433.794 -
 433.795 -
 433.796 -
 433.797 -<!--
 433.798 -        <question id="perf-exit" when="final">
 433.799 -            Does your module run any code on exit?
 433.800 -        </question>
 433.801 --->
 433.802 - <answer id="perf-exit">
 433.803 -  <p>
 433.804 -   XXX no answer for perf-exit
 433.805 -  </p>
 433.806 - </answer>
 433.807 -
 433.808 -
 433.809 -
 433.810 -<!--
 433.811 -        <question id="perf-huge_dialogs" when="final">
 433.812 -            Does your module contain any dialogs or wizards with a large number of
 433.813 -            GUI controls such as combo boxes, lists, trees, or text areas?
 433.814 -        </question>
 433.815 --->
 433.816 - <answer id="perf-huge_dialogs">
 433.817 -  <p>
 433.818 -   XXX no answer for perf-huge_dialogs
 433.819 -  </p>
 433.820 - </answer>
 433.821 -
 433.822 -
 433.823 -
 433.824 -<!--
 433.825 -        <question id="perf-limit" when="init">
 433.826 -            Are there any hard-coded or practical limits in the number or size of
 433.827 -            elements your code can handle?
 433.828 -            <hint>
 433.829 -                Most of algorithms have increasing memory and speed complexity
 433.830 -                with respect to size of data they operate on. What is the critical
 433.831 -                part of your project that can be seen as a bottleneck with
 433.832 -                respect to speed or required memory? What are the practical
 433.833 -                sizes of data you tested your project with? What is your estimate
 433.834 -                of potential size of data that would cause visible performance
 433.835 -                problems? Is there some kind of check to detect such situation
 433.836 -                and prevent "hard" crashes - for example the CloneableEditorSupport
 433.837 -                checks for size of a file to be opened in editor
 433.838 -                and if it is larger than 1Mb it shows a dialog giving the
 433.839 -                user the right to decide - e.g. to cancel or commit suicide.
 433.840 -            </hint>
 433.841 -        </question>
 433.842 --->
 433.843 - <answer id="perf-limit">
 433.844 -  <p>
 433.845 -   XXX no answer for perf-limit
 433.846 -  </p>
 433.847 - </answer>
 433.848 -
 433.849 -
 433.850 -
 433.851 -<!--
 433.852 -        <question id="perf-mem" when="final">
 433.853 -            How much memory does your component consume? Estimate
 433.854 -            with a relation to the number of windows, etc.
 433.855 -        </question>
 433.856 --->
 433.857 - <answer id="perf-mem">
 433.858 -  <p>
 433.859 -   XXX no answer for perf-mem
 433.860 -  </p>
 433.861 - </answer>
 433.862 -
 433.863 -
 433.864 -
 433.865 -<!--
 433.866 -        <question id="perf-menus" when="final">
 433.867 -            Does your module use dynamically updated context menus, or
 433.868 -            context-sensitive actions with complicated and slow enablement logic?
 433.869 -            <hint>
 433.870 -                If you do a lot of tricks when adding actions to regular or context menus, you can significantly
 433.871 -                slow down display of the menu, even when the user is not using your action. Pay attention to
 433.872 -                actions you add to the main menu bar, and to context menus of foreign nodes or components. If
 433.873 -                the action is conditionally enabled, or changes its display dynamically, you need to check the
 433.874 -                impact on performance. In some cases it may be more appropriate to make a simple action that is
 433.875 -                always enabled but does more detailed checks in a dialog if it is actually run.
 433.876 -            </hint>
 433.877 -        </question>
 433.878 --->
 433.879 - <answer id="perf-menus">
 433.880 -  <p>
 433.881 -   XXX no answer for perf-menus
 433.882 -  </p>
 433.883 - </answer>
 433.884 -
 433.885 -
 433.886 -
 433.887 -<!--
 433.888 -        <question id="perf-progress" when="final">
 433.889 -            Does your module execute any long-running tasks?
 433.890 -            
 433.891 -            <hint>Long running tasks should never block 
 433.892 -            AWT thread as it badly hurts the UI
 433.893 -            <a href="http://performance.netbeans.org/responsiveness/issues.html">
 433.894 -            responsiveness</a>.
 433.895 -            Tasks like connecting over
 433.896 -            network, computing huge amount of data, compilation
 433.897 -            be done asynchronously (for example
 433.898 -            using <code>RequestProcessor</code>), definitively it should 
 433.899 -            not block AWT thread.
 433.900 -            </hint>
 433.901 -        </question>
 433.902 --->
 433.903 - <answer id="perf-progress">
 433.904 -  <p>
 433.905 -   XXX no answer for perf-progress
 433.906 -  </p>
 433.907 - </answer>
 433.908 -
 433.909 -
 433.910 -
 433.911 -<!--
 433.912 -        <question id="perf-scale" when="init">
 433.913 -            Which external criteria influence the performance of your
 433.914 -            program (size of file in editor, number of files in menu, 
 433.915 -            in source directory, etc.) and how well your code scales?
 433.916 -            <hint>
 433.917 -            Please include some estimates, there are other more detailed 
 433.918 -            questions to answer in later phases of implementation. 
 433.919 -            </hint>
 433.920 -        </question>
 433.921 --->
 433.922 - <answer id="perf-scale">
 433.923 -  <p>
 433.924 -   XXX no answer for perf-scale
 433.925 -  </p>
 433.926 - </answer>
 433.927 -
 433.928 -
 433.929 -
 433.930 -<!--
 433.931 -        <question id="perf-spi" when="init">
 433.932 -            How the performance of the plugged in code will be enforced?
 433.933 -            <hint>
 433.934 -            If you allow foreign code to be plugged into your own module, how
 433.935 -            do you enforce that it will behave correctly and quickly and will not
 433.936 -            negatively influence the performance of your own module?
 433.937 -            </hint>
 433.938 -        </question>
 433.939 --->
 433.940 - <answer id="perf-spi">
 433.941 -  <p>
 433.942 -   XXX no answer for perf-spi
 433.943 -  </p>
 433.944 - </answer>
 433.945 -
 433.946 -
 433.947 -
 433.948 -<!--
 433.949 -        <question id="perf-startup" when="final">
 433.950 -            Does your module run any code on startup?
 433.951 -        </question>
 433.952 --->
 433.953 - <answer id="perf-startup">
 433.954 -  <p>
 433.955 -   XXX no answer for perf-startup
 433.956 -  </p>
 433.957 - </answer>
 433.958 -
 433.959 -
 433.960 -
 433.961 -<!--
 433.962 -        <question id="perf-wakeup" when="final">
 433.963 -            Does any piece of your code wake up periodically and do something
 433.964 -            even when the system is otherwise idle (no user interaction)?
 433.965 -        </question>
 433.966 --->
 433.967 - <answer id="perf-wakeup">
 433.968 -  <p>
 433.969 -   XXX no answer for perf-wakeup
 433.970 -  </p>
 433.971 - </answer>
 433.972 -
 433.973 -
 433.974 -
 433.975 -<!--
 433.976 -        <question id="resources-file" when="final">
 433.977 -            Does your module use <code>java.io.File</code> directly?
 433.978 -            
 433.979 -            <hint>
 433.980 -            NetBeans provide a logical wrapper over plain files called 
 433.981 -            <code>org.openide.filesystems.FileObject</code> that
 433.982 -            provides uniform access to such resources and is the preferred
 433.983 -            way that should be used. But of course there can be situations when
 433.984 -            this is not suitable.
 433.985 -            </hint>
 433.986 -        </question>
 433.987 --->
 433.988 - <answer id="resources-file">
 433.989 -  <p>
 433.990 -   XXX no answer for resources-file
 433.991 -  </p>
 433.992 - </answer>
 433.993 -
 433.994 -
 433.995 -
 433.996 -<!--
 433.997 -        <question id="resources-layer" when="final">
 433.998 -            Does your module provide own layer? Does it create any files or
 433.999 -            folders in it? What it is trying to communicate by that and with which 
433.1000 -            components?
433.1001 -            
433.1002 -            <hint>
433.1003 -            NetBeans allows automatic and declarative installation of resources 
433.1004 -            by module layers. Module register files into appropriate places
433.1005 -            and other components use that information to perform their task
433.1006 -            (build menu, toolbar, window layout, list of templates, set of
433.1007 -            options, etc.). 
433.1008 -            </hint>
433.1009 -        </question>
433.1010 --->
433.1011 - <answer id="resources-layer">
433.1012 -  <p>
433.1013 -   XXX no answer for resources-layer
433.1014 -  </p>
433.1015 - </answer>
433.1016 -
433.1017 -
433.1018 -
433.1019 -<!--
433.1020 -        <question id="resources-mask" when="final">
433.1021 -            Does your module mask/hide/override any resources provided by other modules in
433.1022 -            their layers?
433.1023 -            
433.1024 -            <hint>
433.1025 -            If you mask a file provided by another module, you probably depend
433.1026 -            on that and do not want the other module to (for example) change
433.1027 -            the file's name. That module shall thus make that file available as an API
433.1028 -            of some stability category.
433.1029 -            </hint>
433.1030 -        </question>
433.1031 --->
433.1032 - <answer id="resources-mask">
433.1033 -  <p>
433.1034 -   XXX no answer for resources-mask
433.1035 -  </p>
433.1036 - </answer>
433.1037 -
433.1038 -
433.1039 -
433.1040 -<!--
433.1041 -        <question id="resources-preferences" when="final">
433.1042 -            Does your module uses preferences via Preferences API? Does your module use NbPreferences or
433.1043 -            or regular JDK Preferences ? Does it read, write or both ? 
433.1044 -            Does it share preferences with other modules ? If so, then why ?
433.1045 -            <hint>
433.1046 -                You may use
433.1047 -                    &lt;api type="export" group="preferences"
433.1048 -                    name="preference node name" category="private"&gt;
433.1049 -                    description of individual keys, where it is used, what it
433.1050 -                    influences, whether the module reads/write it, etc.
433.1051 -                    &lt;/api&gt;
433.1052 -                Due to XML ID restrictions, rather than /org/netbeans/modules/foo give the "name" as org.netbeans.modules.foo.
433.1053 -                Note that if you use NbPreferences this name will then be the same as the code name base of the module.
433.1054 -            </hint>
433.1055 -        </question>
433.1056 --->
433.1057 - <answer id="resources-preferences">
433.1058 -  <p>
433.1059 -   XXX no answer for resources-preferences
433.1060 -  </p>
433.1061 - </answer>
433.1062 -
433.1063 -
433.1064 -
433.1065 -<!--
433.1066 -        <question id="resources-read" when="final">
433.1067 -            Does your module read any resources from layers? For what purpose?
433.1068 -            
433.1069 -            <hint>
433.1070 -            As this is some kind of intermodule dependency, it is a kind of API.
433.1071 -            Please describe it and classify according to 
433.1072 -            <a href="http://openide.netbeans.org/tutorial/api-design.html#categories">
433.1073 -            common stability categories</a>.
433.1074 -            </hint>
433.1075 -        </question>
433.1076 --->
433.1077 - <answer id="resources-read">
433.1078 -  <p>
433.1079 -   XXX no answer for resources-read
433.1080 -  </p>
433.1081 - </answer>
433.1082 -
433.1083 -
433.1084 -
433.1085 -<!--
433.1086 -        <question id="security-grant" when="final">
433.1087 -            Does your code grant additional rights to some other code?
433.1088 -            <hint>Avoid using a class loader that adds extra
433.1089 -            permissions to loaded code unless really necessary.
433.1090 -            Also note that your API implementation
433.1091 -            can also expose unneeded permissions to enemy code by
433.1092 -            calling AccessController.doPrivileged().</hint>
433.1093 -        </question>
433.1094 --->
433.1095 - <answer id="security-grant">
433.1096 -  <p>
433.1097 -   XXX no answer for security-grant
433.1098 -  </p>
433.1099 - </answer>
433.1100 -
433.1101 -
433.1102 -
433.1103 -<!--
433.1104 -        <question id="security-policy" when="final">
433.1105 -            Does your functionality require modifications to the standard policy file?
433.1106 -            <hint>Your code might pass control to third-party code not
433.1107 -            coming from trusted domains. This could be code downloaded over the
433.1108 -            network or code coming from libraries that are not bundled
433.1109 -            with NetBeans. Which permissions need to be granted to which domains?</hint>
433.1110 -        </question>
433.1111 --->
433.1112 - <answer id="security-policy">
433.1113 -  <p>
433.1114 -   XXX no answer for security-policy
433.1115 -  </p>
433.1116 - </answer>
433.1117 -
433.1118 -</api-answers>
   434.1 --- a/sandbox/java.hints/spi.java.hints/build.xml	Mon Dec 19 11:37:36 2016 +0100
   434.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   434.3 @@ -1,8 +0,0 @@
   434.4 -<?xml version="1.0" encoding="UTF-8"?>
   434.5 -<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
   434.6 -<!-- for some information on what you could do (e.g. targets to override). -->
   434.7 -<!-- If you delete this file and reopen the project it will be recreated. -->
   434.8 -<project name="org.netbeans.spi.java.hints" default="netbeans" basedir=".">
   434.9 -    <description>Builds, tests, and runs the project org.netbeans.spi.java.hints.</description>
  434.10 -    <import file="nbproject/build-impl.xml"/>
  434.11 -</project>
   435.1 --- a/sandbox/java.hints/spi.java.hints/manifest.mf	Mon Dec 19 11:37:36 2016 +0100
   435.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   435.3 @@ -1,5 +0,0 @@
   435.4 -Manifest-Version: 1.0
   435.5 -OpenIDE-Module: org.netbeans.spi.java.hints
   435.6 -OpenIDE-Module-Implementation-Version: 11
   435.7 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/java/hints/spiimpl/Bundle.properties
   435.8 -
   436.1 --- a/sandbox/java.hints/spi.java.hints/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   436.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   436.3 @@ -1,45 +0,0 @@
   436.4 -<?xml version="1.0" encoding="UTF-8"?>
   436.5 -<!--
   436.6 -*** GENERATED FROM project.xml - DO NOT EDIT  ***
   436.7 -***         EDIT ../build.xml INSTEAD         ***
   436.8 --->
   436.9 -<project name="org.netbeans.spi.java.hints-impl" basedir="..">
  436.10 -    <fail message="Please build using Ant 1.7.1 or higher.">
  436.11 -        <condition>
  436.12 -            <not>
  436.13 -                <antversion atleast="1.7.1"/>
  436.14 -            </not>
  436.15 -        </condition>
  436.16 -    </fail>
  436.17 -    <property file="nbproject/private/suite-private.properties"/>
  436.18 -    <property file="nbproject/suite.properties"/>
  436.19 -    <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
  436.20 -    <property file="${suite.dir}/nbproject/private/platform-private.properties"/>
  436.21 -    <property file="${suite.dir}/nbproject/platform.properties"/>
  436.22 -    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
  436.23 -        <attribute name="name"/>
  436.24 -        <attribute name="value"/>
  436.25 -        <sequential>
  436.26 -            <property name="@{name}" value="${@{value}}"/>
  436.27 -        </sequential>
  436.28 -    </macrodef>
  436.29 -    <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
  436.30 -        <attribute name="property"/>
  436.31 -        <attribute name="value"/>
  436.32 -        <sequential>
  436.33 -            <property name="@{property}" value="@{value}"/>
  436.34 -        </sequential>
  436.35 -    </macrodef>
  436.36 -    <property file="${user.properties.file}"/>
  436.37 -    <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  436.38 -    <nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  436.39 -    <nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  436.40 -    <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
  436.41 -        <condition>
  436.42 -            <not>
  436.43 -                <contains string="${cluster.path.evaluated}" substring="platform"/>
  436.44 -            </not>
  436.45 -        </condition>
  436.46 -    </fail>
  436.47 -    <import file="${harness.dir}/build.xml"/>
  436.48 -</project>
   437.1 --- a/sandbox/java.hints/spi.java.hints/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   437.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   437.3 @@ -1,8 +0,0 @@
   437.4 -build.xml.data.CRC32=1b4fb019
   437.5 -build.xml.script.CRC32=caab83d9
   437.6 -build.xml.stylesheet.CRC32=a56c6a5b@2.70
   437.7 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   437.8 -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   437.9 -nbproject/build-impl.xml.data.CRC32=1b4fb019
  437.10 -nbproject/build-impl.xml.script.CRC32=7438bc77
  437.11 -nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.70
   438.1 --- a/sandbox/java.hints/spi.java.hints/nbproject/org-netbeans-spi-java-hints.sig	Mon Dec 19 11:37:36 2016 +0100
   438.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   438.3 @@ -1,276 +0,0 @@
   438.4 -#Signature file v4.1
   438.5 -#Version 1.10.1
   438.6 -
   438.7 -CLSS public abstract interface java.io.Serializable
   438.8 -
   438.9 -CLSS public abstract interface java.lang.Comparable<%0 extends java.lang.Object>
  438.10 -meth public abstract int compareTo({java.lang.Comparable%0})
  438.11 -
  438.12 -CLSS public abstract java.lang.Enum<%0 extends java.lang.Enum<{java.lang.Enum%0}>>
  438.13 -cons protected init(java.lang.String,int)
  438.14 -intf java.io.Serializable
  438.15 -intf java.lang.Comparable<{java.lang.Enum%0}>
  438.16 -meth protected final java.lang.Object clone() throws java.lang.CloneNotSupportedException
  438.17 -meth protected final void finalize()
  438.18 -meth public final boolean equals(java.lang.Object)
  438.19 -meth public final int compareTo({java.lang.Enum%0})
  438.20 -meth public final int hashCode()
  438.21 -meth public final int ordinal()
  438.22 -meth public final java.lang.Class<{java.lang.Enum%0}> getDeclaringClass()
  438.23 -meth public final java.lang.String name()
  438.24 -meth public java.lang.String toString()
  438.25 -meth public static <%0 extends java.lang.Enum<{%%0}>> {%%0} valueOf(java.lang.Class<{%%0}>,java.lang.String)
  438.26 -supr java.lang.Object
  438.27 -hfds name,ordinal
  438.28 -
  438.29 -CLSS public java.lang.Object
  438.30 -cons public init()
  438.31 -meth protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
  438.32 -meth protected void finalize() throws java.lang.Throwable
  438.33 -meth public boolean equals(java.lang.Object)
  438.34 -meth public final java.lang.Class<?> getClass()
  438.35 -meth public final void notify()
  438.36 -meth public final void notifyAll()
  438.37 -meth public final void wait() throws java.lang.InterruptedException
  438.38 -meth public final void wait(long) throws java.lang.InterruptedException
  438.39 -meth public final void wait(long,int) throws java.lang.InterruptedException
  438.40 -meth public int hashCode()
  438.41 -meth public java.lang.String toString()
  438.42 -
  438.43 -CLSS public abstract interface java.lang.annotation.Annotation
  438.44 -meth public abstract boolean equals(java.lang.Object)
  438.45 -meth public abstract int hashCode()
  438.46 -meth public abstract java.lang.Class<? extends java.lang.annotation.Annotation> annotationType()
  438.47 -meth public abstract java.lang.String toString()
  438.48 -
  438.49 -CLSS public abstract interface !annotation java.lang.annotation.Documented
  438.50 - anno 0 java.lang.annotation.Documented()
  438.51 - anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME)
  438.52 - anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE])
  438.53 -intf java.lang.annotation.Annotation
  438.54 -
  438.55 -CLSS public abstract interface !annotation java.lang.annotation.Retention
  438.56 - anno 0 java.lang.annotation.Documented()
  438.57 - anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME)
  438.58 - anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE])
  438.59 -intf java.lang.annotation.Annotation
  438.60 -meth public abstract java.lang.annotation.RetentionPolicy value()
  438.61 -
  438.62 -CLSS public abstract interface !annotation java.lang.annotation.Target
  438.63 - anno 0 java.lang.annotation.Documented()
  438.64 - anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME)
  438.65 - anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE])
  438.66 -intf java.lang.annotation.Annotation
  438.67 -meth public abstract java.lang.annotation.ElementType[] value()
  438.68 -
  438.69 -CLSS public abstract interface !annotation org.netbeans.spi.java.hints.BooleanOption
  438.70 - anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=SOURCE)
  438.71 - anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[FIELD])
  438.72 -intf java.lang.annotation.Annotation
  438.73 -meth public abstract boolean defaultValue()
  438.74 -meth public abstract java.lang.String displayName()
  438.75 -meth public abstract java.lang.String tooltip()
  438.76 -
  438.77 -CLSS public abstract interface !annotation org.netbeans.spi.java.hints.ConstraintVariableType
  438.78 - anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[])
  438.79 -intf java.lang.annotation.Annotation
  438.80 -meth public abstract java.lang.String type()
  438.81 -meth public abstract java.lang.String variable()
  438.82 -
  438.83 -CLSS public abstract interface org.netbeans.spi.java.hints.CustomizerProvider
  438.84 -meth public abstract javax.swing.JComponent getCustomizer(java.util.prefs.Preferences)
  438.85 - anno 0 org.netbeans.api.annotations.common.NonNull()
  438.86 - anno 1 org.netbeans.api.annotations.common.NonNull()
  438.87 -
  438.88 -CLSS public org.netbeans.spi.java.hints.ErrorDescriptionFactory
  438.89 -meth public !varargs static org.netbeans.spi.editor.hints.ErrorDescription forName(org.netbeans.spi.java.hints.HintContext,com.sun.source.tree.Tree,java.lang.String,org.netbeans.spi.editor.hints.Fix[])
  438.90 -meth public !varargs static org.netbeans.spi.editor.hints.ErrorDescription forName(org.netbeans.spi.java.hints.HintContext,com.sun.source.util.TreePath,java.lang.String,org.netbeans.spi.editor.hints.Fix[])
  438.91 -meth public !varargs static org.netbeans.spi.editor.hints.ErrorDescription forSpan(org.netbeans.spi.java.hints.HintContext,int,int,java.lang.String,org.netbeans.spi.editor.hints.Fix[])
  438.92 -meth public !varargs static org.netbeans.spi.editor.hints.ErrorDescription forTree(org.netbeans.spi.java.hints.HintContext,com.sun.source.tree.Tree,java.lang.String,org.netbeans.spi.editor.hints.Fix[])
  438.93 -meth public !varargs static org.netbeans.spi.editor.hints.ErrorDescription forTree(org.netbeans.spi.java.hints.HintContext,com.sun.source.util.TreePath,java.lang.String,org.netbeans.spi.editor.hints.Fix[])
  438.94 -supr java.lang.Object
  438.95 -hfds DECLARATION
  438.96 -hcls DisableConfigure,FixImpl,InspectFix,TopLevelConfigureFix
  438.97 -
  438.98 -CLSS public abstract interface !annotation org.netbeans.spi.java.hints.Hint
  438.99 - anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=SOURCE)
 438.100 - anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE, METHOD])
 438.101 -innr public final static !enum Kind
 438.102 -innr public final static !enum Options
 438.103 -intf java.lang.annotation.Annotation
 438.104 -meth public abstract !hasdefault boolean enabled()
 438.105 -meth public abstract !hasdefault java.lang.Class<? extends org.netbeans.spi.java.hints.CustomizerProvider> customizerProvider()
 438.106 -meth public abstract !hasdefault java.lang.String id()
 438.107 -meth public abstract !hasdefault java.lang.String[] suppressWarnings()
 438.108 -meth public abstract !hasdefault org.netbeans.spi.editor.hints.Severity severity()
 438.109 -meth public abstract !hasdefault org.netbeans.spi.java.hints.Hint$Kind hintKind()
 438.110 -meth public abstract !hasdefault org.netbeans.spi.java.hints.Hint$Options[] options()
 438.111 -meth public abstract java.lang.String category()
 438.112 -meth public abstract java.lang.String description()
 438.113 -meth public abstract java.lang.String displayName()
 438.114 -
 438.115 -CLSS public final static !enum org.netbeans.spi.java.hints.Hint$Kind
 438.116 - outer org.netbeans.spi.java.hints.Hint
 438.117 -fld public final static org.netbeans.spi.java.hints.Hint$Kind ACTION
 438.118 -fld public final static org.netbeans.spi.java.hints.Hint$Kind INSPECTION
 438.119 -meth public static org.netbeans.spi.java.hints.Hint$Kind valueOf(java.lang.String)
 438.120 -meth public static org.netbeans.spi.java.hints.Hint$Kind[] values()
 438.121 -supr java.lang.Enum<org.netbeans.spi.java.hints.Hint$Kind>
 438.122 -
 438.123 -CLSS public final static !enum org.netbeans.spi.java.hints.Hint$Options
 438.124 - outer org.netbeans.spi.java.hints.Hint
 438.125 -fld public final static org.netbeans.spi.java.hints.Hint$Options NO_BATCH
 438.126 -fld public final static org.netbeans.spi.java.hints.Hint$Options QUERY
 438.127 -meth public static org.netbeans.spi.java.hints.Hint$Options valueOf(java.lang.String)
 438.128 -meth public static org.netbeans.spi.java.hints.Hint$Options[] values()
 438.129 -supr java.lang.Enum<org.netbeans.spi.java.hints.Hint$Options>
 438.130 -
 438.131 -CLSS public org.netbeans.spi.java.hints.HintContext
 438.132 -innr public final static !enum MessageKind
 438.133 -meth public boolean isBulkMode()
 438.134 -meth public boolean isCanceled()
 438.135 -meth public com.sun.source.util.TreePath getPath()
 438.136 -meth public int getCaretLocation()
 438.137 -meth public java.util.Map<java.lang.String,com.sun.source.util.TreePath> getVariables()
 438.138 -meth public java.util.Map<java.lang.String,java.lang.String> getVariableNames()
 438.139 -meth public java.util.Map<java.lang.String,java.util.Collection<? extends com.sun.source.util.TreePath>> getMultiVariables()
 438.140 -meth public java.util.Map<java.lang.String,javax.lang.model.type.TypeMirror> getConstraints()
 438.141 -meth public java.util.prefs.Preferences getPreferences()
 438.142 -meth public org.netbeans.api.java.source.CompilationInfo getInfo()
 438.143 -meth public org.netbeans.spi.editor.hints.Severity getSeverity()
 438.144 -meth public void reportMessage(org.netbeans.spi.java.hints.HintContext$MessageKind,java.lang.String)
 438.145 -supr java.lang.Object
 438.146 -hfds bulkMode,cancel,caret,constraints,info,messages,metadata,multiVariables,path,preferences,severity,variableNames,variables
 438.147 -
 438.148 -CLSS public final static !enum org.netbeans.spi.java.hints.HintContext$MessageKind
 438.149 - outer org.netbeans.spi.java.hints.HintContext
 438.150 -fld public final static org.netbeans.spi.java.hints.HintContext$MessageKind ERROR
 438.151 -fld public final static org.netbeans.spi.java.hints.HintContext$MessageKind WARNING
 438.152 -meth public static org.netbeans.spi.java.hints.HintContext$MessageKind valueOf(java.lang.String)
 438.153 -meth public static org.netbeans.spi.java.hints.HintContext$MessageKind[] values()
 438.154 -supr java.lang.Enum<org.netbeans.spi.java.hints.HintContext$MessageKind>
 438.155 -
 438.156 -CLSS public final !enum org.netbeans.spi.java.hints.HintSeverity
 438.157 -fld public final static org.netbeans.spi.java.hints.HintSeverity CURRENT_LINE_WARNING
 438.158 -fld public final static org.netbeans.spi.java.hints.HintSeverity ERROR
 438.159 -fld public final static org.netbeans.spi.java.hints.HintSeverity WARNING
 438.160 -meth public org.netbeans.spi.editor.hints.Severity toEditorSeverity()
 438.161 -meth public static org.netbeans.spi.java.hints.HintSeverity valueOf(java.lang.String)
 438.162 -meth public static org.netbeans.spi.java.hints.HintSeverity[] values()
 438.163 -supr java.lang.Enum<org.netbeans.spi.java.hints.HintSeverity>
 438.164 -
 438.165 -CLSS public abstract org.netbeans.spi.java.hints.JavaFix
 438.166 -cons protected init(org.netbeans.api.java.source.CompilationInfo,com.sun.source.util.TreePath)
 438.167 - anno 1 org.netbeans.api.annotations.common.NonNull()
 438.168 - anno 2 org.netbeans.api.annotations.common.NonNull()
 438.169 -cons protected init(org.netbeans.api.java.source.TreePathHandle)
 438.170 - anno 1 org.netbeans.api.annotations.common.NonNull()
 438.171 -innr public final static TransformationContext
 438.172 -meth protected abstract java.lang.String getText()
 438.173 - anno 0 org.netbeans.api.annotations.common.NonNull()
 438.174 -meth protected abstract void performRewrite(org.netbeans.spi.java.hints.JavaFix$TransformationContext) throws java.lang.Exception
 438.175 - anno 1 org.netbeans.api.annotations.common.NonNull()
 438.176 -meth public final org.netbeans.spi.editor.hints.Fix toEditorFix()
 438.177 -supr java.lang.Object
 438.178 -hfds LOG,handle,options
 438.179 -
 438.180 -CLSS public final static org.netbeans.spi.java.hints.JavaFix$TransformationContext
 438.181 - outer org.netbeans.spi.java.hints.JavaFix
 438.182 -meth public com.sun.source.util.TreePath getPath()
 438.183 - anno 0 org.netbeans.api.annotations.common.NonNull()
 438.184 -meth public java.io.InputStream getResourceContent(org.openide.filesystems.FileObject) throws java.io.IOException
 438.185 - anno 0 org.netbeans.api.annotations.common.NonNull()
 438.186 - anno 1 org.netbeans.api.annotations.common.NonNull()
 438.187 -meth public java.io.OutputStream getResourceOutput(org.openide.filesystems.FileObject) throws java.io.IOException
 438.188 - anno 0 org.netbeans.api.annotations.common.NonNull()
 438.189 - anno 1 org.netbeans.api.annotations.common.NonNull()
 438.190 -meth public org.netbeans.api.java.source.WorkingCopy getWorkingCopy()
 438.191 - anno 0 org.netbeans.api.annotations.common.NonNull()
 438.192 -supr java.lang.Object
 438.193 -hfds canShowUI,fileChanges,path,resourceContentChanges,workingCopy
 438.194 -
 438.195 -CLSS public org.netbeans.spi.java.hints.JavaFixUtilities
 438.196 -cons public init()
 438.197 -meth public static boolean requiresParenthesis(com.sun.source.tree.Tree,com.sun.source.tree.Tree,com.sun.source.tree.Tree)
 438.198 -meth public static org.netbeans.spi.editor.hints.Fix removeFromParent(org.netbeans.spi.java.hints.HintContext,java.lang.String,com.sun.source.util.TreePath)
 438.199 -meth public static org.netbeans.spi.editor.hints.Fix rewriteFix(org.netbeans.spi.java.hints.HintContext,java.lang.String,com.sun.source.util.TreePath,java.lang.String)
 438.200 -supr java.lang.Object
 438.201 -hfds NUMBER_LITERAL_KINDS,OPERATOR_PRIORITIES,SPEC_VERSION
 438.202 -hcls JavaFixRealImpl,MoveFile,RemoveFromParent,ReplaceParameters
 438.203 -
 438.204 -CLSS public org.netbeans.spi.java.hints.MatcherUtilities
 438.205 -cons public init()
 438.206 -meth public static boolean matches(org.netbeans.spi.java.hints.HintContext,com.sun.source.util.TreePath,java.lang.String)
 438.207 - anno 1 org.netbeans.api.annotations.common.NonNull()
 438.208 - anno 2 org.netbeans.api.annotations.common.NonNull()
 438.209 - anno 3 org.netbeans.api.annotations.common.NonNull()
 438.210 -meth public static boolean matches(org.netbeans.spi.java.hints.HintContext,com.sun.source.util.TreePath,java.lang.String,boolean)
 438.211 - anno 1 org.netbeans.api.annotations.common.NonNull()
 438.212 - anno 2 org.netbeans.api.annotations.common.NonNull()
 438.213 - anno 3 org.netbeans.api.annotations.common.NonNull()
 438.214 -meth public static boolean matches(org.netbeans.spi.java.hints.HintContext,com.sun.source.util.TreePath,java.lang.String,java.util.Map<java.lang.String,com.sun.source.util.TreePath>,java.util.Map<java.lang.String,java.util.Collection<? extends com.sun.source.util.TreePath>>,java.util.Map<java.lang.String,java.lang.String>)
 438.215 - anno 1 org.netbeans.api.annotations.common.NonNull()
 438.216 - anno 2 org.netbeans.api.annotations.common.NonNull()
 438.217 - anno 3 org.netbeans.api.annotations.common.NonNull()
 438.218 -meth public static boolean matches(org.netbeans.spi.java.hints.HintContext,java.util.Collection<? extends com.sun.source.util.TreePath>,java.lang.String,java.util.Map<java.lang.String,com.sun.source.util.TreePath>,java.util.Map<java.lang.String,java.util.Collection<? extends com.sun.source.util.TreePath>>,java.util.Map<java.lang.String,java.lang.String>)
 438.219 - anno 1 org.netbeans.api.annotations.common.NonNull()
 438.220 - anno 2 org.netbeans.api.annotations.common.NonNull()
 438.221 - anno 3 org.netbeans.api.annotations.common.NonNull()
 438.222 -supr java.lang.Object
 438.223 -
 438.224 -CLSS public abstract interface !annotation org.netbeans.spi.java.hints.TriggerPattern
 438.225 - anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=SOURCE)
 438.226 - anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[METHOD])
 438.227 -intf java.lang.annotation.Annotation
 438.228 -meth public abstract !hasdefault org.netbeans.spi.java.hints.ConstraintVariableType[] constraints()
 438.229 -meth public abstract java.lang.String value()
 438.230 -
 438.231 -CLSS public abstract interface !annotation org.netbeans.spi.java.hints.TriggerPatterns
 438.232 - anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=SOURCE)
 438.233 - anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[METHOD])
 438.234 -intf java.lang.annotation.Annotation
 438.235 -meth public abstract org.netbeans.spi.java.hints.TriggerPattern[] value()
 438.236 -
 438.237 -CLSS public abstract interface !annotation org.netbeans.spi.java.hints.TriggerTreeKind
 438.238 - anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=SOURCE)
 438.239 - anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[METHOD])
 438.240 -intf java.lang.annotation.Annotation
 438.241 -meth public abstract com.sun.source.tree.Tree$Kind[] value()
 438.242 -
 438.243 -CLSS public abstract interface !annotation org.netbeans.spi.java.hints.UseOptions
 438.244 - anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=SOURCE)
 438.245 - anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[METHOD])
 438.246 -intf java.lang.annotation.Annotation
 438.247 -meth public abstract java.lang.String[] value()
 438.248 -
 438.249 -CLSS public final org.netbeans.spi.java.hints.support.FixFactory
 438.250 -meth public final static org.netbeans.spi.editor.hints.Fix addModifiersFix(org.netbeans.api.java.source.CompilationInfo,com.sun.source.util.TreePath,java.util.Set<javax.lang.model.element.Modifier>,java.lang.String)
 438.251 -meth public final static org.netbeans.spi.editor.hints.Fix changeModifiersFix(org.netbeans.api.java.source.CompilationInfo,com.sun.source.util.TreePath,java.util.Set<javax.lang.model.element.Modifier>,java.util.Set<javax.lang.model.element.Modifier>,java.lang.String)
 438.252 -meth public final static org.netbeans.spi.editor.hints.Fix removeModifiersFix(org.netbeans.api.java.source.CompilationInfo,com.sun.source.util.TreePath,java.util.Set<javax.lang.model.element.Modifier>,java.lang.String)
 438.253 -supr java.lang.Object
 438.254 -hcls ChangeModifiersFixImpl
 438.255 -
 438.256 -CLSS public final org.netbeans.spi.java.hints.support.TransformationSupport
 438.257 -innr public abstract interface static Transformer
 438.258 -meth public java.util.Collection<? extends org.netbeans.api.java.source.ModificationResult> processAllProjects()
 438.259 - anno 0 org.netbeans.api.annotations.common.NonNull()
 438.260 -meth public org.netbeans.spi.java.hints.support.TransformationSupport setCancel(java.util.concurrent.atomic.AtomicBoolean)
 438.261 - anno 0 org.netbeans.api.annotations.common.NonNull()
 438.262 - anno 1 org.netbeans.api.annotations.common.NonNull()
 438.263 -meth public static org.netbeans.spi.java.hints.support.TransformationSupport create(java.lang.String)
 438.264 - anno 0 org.netbeans.api.annotations.common.NonNull()
 438.265 - anno 1 org.netbeans.api.annotations.common.NonNull()
 438.266 -meth public static org.netbeans.spi.java.hints.support.TransformationSupport create(java.lang.String,org.netbeans.spi.java.hints.support.TransformationSupport$Transformer)
 438.267 - anno 0 org.netbeans.api.annotations.common.NonNull()
 438.268 - anno 1 org.netbeans.api.annotations.common.NonNull()
 438.269 - anno 2 org.netbeans.api.annotations.common.NonNull()
 438.270 -meth public void transformTreePath(org.netbeans.api.java.source.WorkingCopy,com.sun.source.util.TreePath)
 438.271 - anno 1 org.netbeans.api.annotations.common.NonNull()
 438.272 - anno 2 org.netbeans.api.annotations.common.NonNull()
 438.273 -supr java.lang.Object
 438.274 -hfds cancel,jackpotPattern,transformer
 438.275 -
 438.276 -CLSS public abstract interface static org.netbeans.spi.java.hints.support.TransformationSupport$Transformer
 438.277 - outer org.netbeans.spi.java.hints.support.TransformationSupport
 438.278 -meth public abstract void transform(org.netbeans.api.java.source.WorkingCopy,org.netbeans.api.java.source.matching.Occurrence)
 438.279 -
   439.1 --- a/sandbox/java.hints/spi.java.hints/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   439.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   439.3 @@ -1,7 +0,0 @@
   439.4 -is.autoload=true
   439.5 -javac.source=1.7
   439.6 -javac.compilerargs=-Xlint -Xlint:-serial
   439.7 -spec.version.base=2.0.0
   439.8 -requires.nb.javac=true
   439.9 -javadoc.arch=${basedir}/arch.xml
  439.10 -javadoc.apichanges=${basedir}/apichanges.xml
   440.1 --- a/sandbox/java.hints/spi.java.hints/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   440.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   440.3 @@ -1,480 +0,0 @@
   440.4 -<?xml version="1.0" encoding="UTF-8"?>
   440.5 -<project xmlns="http://www.netbeans.org/ns/project/1">
   440.6 -    <type>org.netbeans.modules.apisupport.project</type>
   440.7 -    <configuration>
   440.8 -        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
   440.9 -            <code-name-base>org.netbeans.spi.java.hints</code-name-base>
  440.10 -            <suite-component/>
  440.11 -            <module-dependencies>
  440.12 -                <dependency>
  440.13 -                    <code-name-base>org.netbeans.api.annotations.common</code-name-base>
  440.14 -                    <build-prerequisite/>
  440.15 -                    <compile-dependency/>
  440.16 -                    <run-dependency>
  440.17 -                        <release-version>1</release-version>
  440.18 -                        <specification-version>1.4</specification-version>
  440.19 -                    </run-dependency>
  440.20 -                </dependency>
  440.21 -                <dependency>
  440.22 -                    <code-name-base>org.netbeans.api.java</code-name-base>
  440.23 -                    <build-prerequisite/>
  440.24 -                    <compile-dependency/>
  440.25 -                    <run-dependency>
  440.26 -                        <release-version>1</release-version>
  440.27 -                        <specification-version>1.18</specification-version>
  440.28 -                    </run-dependency>
  440.29 -                </dependency>
  440.30 -                <dependency>
  440.31 -                    <code-name-base>org.netbeans.api.java.classpath</code-name-base>
  440.32 -                    <build-prerequisite/>
  440.33 -                    <compile-dependency/>
  440.34 -                    <run-dependency>
  440.35 -                        <release-version>1</release-version>
  440.36 -                        <specification-version>1.24</specification-version>
  440.37 -                    </run-dependency>
  440.38 -                </dependency>
  440.39 -                <dependency>
  440.40 -                    <code-name-base>org.netbeans.api.progress</code-name-base>
  440.41 -                    <build-prerequisite/>
  440.42 -                    <compile-dependency/>
  440.43 -                    <run-dependency>
  440.44 -                        <release-version>1</release-version>
  440.45 -                        <specification-version>1.16</specification-version>
  440.46 -                    </run-dependency>
  440.47 -                </dependency>
  440.48 -                <dependency>
  440.49 -                    <code-name-base>org.netbeans.api.progress.nb</code-name-base>
  440.50 -                    <build-prerequisite/>
  440.51 -                    <compile-dependency/>
  440.52 -                    <run-dependency>
  440.53 -                        <specification-version>1.45</specification-version>
  440.54 -                    </run-dependency>
  440.55 -                </dependency>
  440.56 -                <dependency>
  440.57 -                    <code-name-base>org.netbeans.lib.nbjavac</code-name-base>
  440.58 -                    <build-prerequisite/>
  440.59 -                    <compile-dependency/>
  440.60 -                    <run-dependency>
  440.61 -                        <implementation-version/>
  440.62 -                    </run-dependency>
  440.63 -                </dependency>
  440.64 -                <dependency>
  440.65 -                    <code-name-base>org.netbeans.libs.javacapi</code-name-base>
  440.66 -                    <build-prerequisite/>
  440.67 -                    <compile-dependency/>
  440.68 -                    <run-dependency>
  440.69 -                        <specification-version>8.0</specification-version>
  440.70 -                    </run-dependency>
  440.71 -                </dependency>
  440.72 -                <dependency>
  440.73 -                    <code-name-base>org.netbeans.libs.javacimpl</code-name-base>
  440.74 -                    <build-prerequisite/>
  440.75 -                    <compile-dependency/>
  440.76 -                    <run-dependency>
  440.77 -                        <release-version>1</release-version>
  440.78 -                        <implementation-version/>
  440.79 -                    </run-dependency>
  440.80 -                </dependency>
  440.81 -                <dependency>
  440.82 -                    <code-name-base>org.netbeans.libs.lucene</code-name-base>
  440.83 -                    <build-prerequisite/>
  440.84 -                    <compile-dependency/>
  440.85 -                    <run-dependency>
  440.86 -                        <release-version>3</release-version>
  440.87 -                        <specification-version>3.0</specification-version>
  440.88 -                    </run-dependency>
  440.89 -                </dependency>
  440.90 -                <dependency>
  440.91 -                    <code-name-base>org.netbeans.modules.code.analysis</code-name-base>
  440.92 -                    <build-prerequisite/>
  440.93 -                    <compile-dependency/>
  440.94 -                    <run-dependency>
  440.95 -                        <release-version>0</release-version>
  440.96 -                        <specification-version>1.8</specification-version>
  440.97 -                    </run-dependency>
  440.98 -                </dependency>
  440.99 -                <dependency>
 440.100 -                    <code-name-base>org.netbeans.modules.editor</code-name-base>
 440.101 -                    <build-prerequisite/>
 440.102 -                    <compile-dependency/>
 440.103 -                    <run-dependency>
 440.104 -                        <release-version>3</release-version>
 440.105 -                        <specification-version>1.53</specification-version>
 440.106 -                    </run-dependency>
 440.107 -                </dependency>
 440.108 -                <dependency>
 440.109 -                    <code-name-base>org.netbeans.modules.editor.errorstripe.api</code-name-base>
 440.110 -                    <build-prerequisite/>
 440.111 -                    <compile-dependency/>
 440.112 -                    <run-dependency>
 440.113 -                        <release-version>1</release-version>
 440.114 -                        <specification-version>2.3</specification-version>
 440.115 -                    </run-dependency>
 440.116 -                </dependency>
 440.117 -                <dependency>
 440.118 -                    <code-name-base>org.netbeans.modules.editor.lib</code-name-base>
 440.119 -                    <build-prerequisite/>
 440.120 -                    <compile-dependency/>
 440.121 -                    <run-dependency>
 440.122 -                        <release-version>3</release-version>
 440.123 -                        <specification-version>3.1</specification-version>
 440.124 -                    </run-dependency>
 440.125 -                </dependency>
 440.126 -                <dependency>
 440.127 -                    <code-name-base>org.netbeans.modules.editor.lib2</code-name-base>
 440.128 -                    <build-prerequisite/>
 440.129 -                    <compile-dependency/>
 440.130 -                    <run-dependency>
 440.131 -                        <release-version>1</release-version>
 440.132 -                        <specification-version>1.8</specification-version>
 440.133 -                    </run-dependency>
 440.134 -                </dependency>
 440.135 -                <dependency>
 440.136 -                    <code-name-base>org.netbeans.modules.editor.mimelookup</code-name-base>
 440.137 -                    <build-prerequisite/>
 440.138 -                    <compile-dependency/>
 440.139 -                    <run-dependency>
 440.140 -                        <release-version>1</release-version>
 440.141 -                        <specification-version>1.15</specification-version>
 440.142 -                    </run-dependency>
 440.143 -                </dependency>
 440.144 -                <dependency>
 440.145 -                    <code-name-base>org.netbeans.modules.editor.settings</code-name-base>
 440.146 -                    <build-prerequisite/>
 440.147 -                    <compile-dependency/>
 440.148 -                    <run-dependency>
 440.149 -                        <release-version>1</release-version>
 440.150 -                        <specification-version>1.28</specification-version>
 440.151 -                    </run-dependency>
 440.152 -                </dependency>
 440.153 -                <dependency>
 440.154 -                    <code-name-base>org.netbeans.modules.editor.util</code-name-base>
 440.155 -                    <build-prerequisite/>
 440.156 -                    <compile-dependency/>
 440.157 -                    <run-dependency>
 440.158 -                        <release-version>1</release-version>
 440.159 -                        <specification-version>1.33</specification-version>
 440.160 -                    </run-dependency>
 440.161 -                </dependency>
 440.162 -                <dependency>
 440.163 -                    <code-name-base>org.netbeans.modules.java.lexer</code-name-base>
 440.164 -                    <build-prerequisite/>
 440.165 -                    <compile-dependency/>
 440.166 -                    <run-dependency>
 440.167 -                        <release-version>1</release-version>
 440.168 -                        <specification-version>1.0</specification-version>
 440.169 -                    </run-dependency>
 440.170 -                </dependency>
 440.171 -                <dependency>
 440.172 -                    <code-name-base>org.netbeans.modules.java.platform</code-name-base>
 440.173 -                    <build-prerequisite/>
 440.174 -                    <compile-dependency/>
 440.175 -                    <run-dependency>
 440.176 -                        <release-version>1</release-version>
 440.177 -                        <specification-version>1.16</specification-version>
 440.178 -                    </run-dependency>
 440.179 -                </dependency>
 440.180 -                <dependency>
 440.181 -                    <code-name-base>org.netbeans.modules.java.project</code-name-base>
 440.182 -                    <build-prerequisite/>
 440.183 -                    <compile-dependency/>
 440.184 -                    <run-dependency>
 440.185 -                        <release-version>1</release-version>
 440.186 -                        <specification-version>1.41</specification-version>
 440.187 -                    </run-dependency>
 440.188 -                </dependency>
 440.189 -                <dependency>
 440.190 -                    <code-name-base>org.netbeans.modules.java.source</code-name-base>
 440.191 -                    <build-prerequisite/>
 440.192 -                    <compile-dependency/>
 440.193 -                    <run-dependency>
 440.194 -                        <implementation-version/>
 440.195 -                    </run-dependency>
 440.196 -                </dependency>
 440.197 -                <dependency>
 440.198 -                    <code-name-base>org.netbeans.modules.java.source.base</code-name-base>
 440.199 -                    <build-prerequisite/>
 440.200 -                    <compile-dependency/>
 440.201 -                    <run-dependency>
 440.202 -                        <implementation-version/>
 440.203 -                    </run-dependency>
 440.204 -                </dependency>
 440.205 -                <dependency>
 440.206 -                    <code-name-base>org.netbeans.modules.lexer</code-name-base>
 440.207 -                    <build-prerequisite/>
 440.208 -                    <compile-dependency/>
 440.209 -                    <run-dependency>
 440.210 -                        <release-version>2</release-version>
 440.211 -                        <specification-version>1.25</specification-version>
 440.212 -                    </run-dependency>
 440.213 -                </dependency>
 440.214 -                <dependency>
 440.215 -                    <code-name-base>org.netbeans.modules.options.api</code-name-base>
 440.216 -                    <build-prerequisite/>
 440.217 -                    <compile-dependency/>
 440.218 -                    <run-dependency>
 440.219 -                        <release-version>1</release-version>
 440.220 -                        <specification-version>1.5</specification-version>
 440.221 -                    </run-dependency>
 440.222 -                </dependency>
 440.223 -                <dependency>
 440.224 -                    <code-name-base>org.netbeans.modules.options.editor</code-name-base>
 440.225 -                    <build-prerequisite/>
 440.226 -                    <compile-dependency/>
 440.227 -                    <run-dependency>
 440.228 -                        <release-version>1</release-version>
 440.229 -                        <specification-version>1.28</specification-version>
 440.230 -                    </run-dependency>
 440.231 -                </dependency>
 440.232 -                <dependency>
 440.233 -                    <code-name-base>org.netbeans.modules.parsing.api</code-name-base>
 440.234 -                    <build-prerequisite/>
 440.235 -                    <compile-dependency/>
 440.236 -                    <run-dependency>
 440.237 -                        <release-version>1</release-version>
 440.238 -                        <implementation-version/>
 440.239 -                    </run-dependency>
 440.240 -                </dependency>
 440.241 -                <dependency>
 440.242 -                    <code-name-base>org.netbeans.modules.projectapi</code-name-base>
 440.243 -                    <build-prerequisite/>
 440.244 -                    <compile-dependency/>
 440.245 -                    <run-dependency>
 440.246 -                        <release-version>1</release-version>
 440.247 -                        <specification-version>1.42</specification-version>
 440.248 -                    </run-dependency>
 440.249 -                </dependency>
 440.250 -                <dependency>
 440.251 -                    <code-name-base>org.netbeans.modules.queries</code-name-base>
 440.252 -                    <build-prerequisite/>
 440.253 -                    <compile-dependency/>
 440.254 -                    <run-dependency>
 440.255 -                        <release-version>1</release-version>
 440.256 -                        <specification-version>1.18</specification-version>
 440.257 -                    </run-dependency>
 440.258 -                </dependency>
 440.259 -                <dependency>
 440.260 -                    <code-name-base>org.netbeans.modules.refactoring.api</code-name-base>
 440.261 -                    <build-prerequisite/>
 440.262 -                    <compile-dependency/>
 440.263 -                    <run-dependency>
 440.264 -                        <specification-version>1.23</specification-version>
 440.265 -                    </run-dependency>
 440.266 -                </dependency>
 440.267 -                <dependency>
 440.268 -                    <code-name-base>org.netbeans.spi.editor.hints</code-name-base>
 440.269 -                    <build-prerequisite/>
 440.270 -                    <compile-dependency/>
 440.271 -                    <run-dependency>
 440.272 -                        <release-version>0-1</release-version>
 440.273 -                        <specification-version>1.22</specification-version>
 440.274 -                    </run-dependency>
 440.275 -                </dependency>
 440.276 -                <dependency>
 440.277 -                    <code-name-base>org.openide.actions</code-name-base>
 440.278 -                    <build-prerequisite/>
 440.279 -                    <compile-dependency/>
 440.280 -                    <run-dependency>
 440.281 -                        <specification-version>6.15</specification-version>
 440.282 -                    </run-dependency>
 440.283 -                </dependency>
 440.284 -                <dependency>
 440.285 -                    <code-name-base>org.openide.awt</code-name-base>
 440.286 -                    <build-prerequisite/>
 440.287 -                    <compile-dependency/>
 440.288 -                    <run-dependency>
 440.289 -                        <specification-version>6.10</specification-version>
 440.290 -                    </run-dependency>
 440.291 -                </dependency>
 440.292 -                <dependency>
 440.293 -                    <code-name-base>org.openide.dialogs</code-name-base>
 440.294 -                    <build-prerequisite/>
 440.295 -                    <compile-dependency/>
 440.296 -                    <run-dependency>
 440.297 -                        <specification-version>7.0</specification-version>
 440.298 -                    </run-dependency>
 440.299 -                </dependency>
 440.300 -                <dependency>
 440.301 -                    <code-name-base>org.openide.explorer</code-name-base>
 440.302 -                    <build-prerequisite/>
 440.303 -                    <compile-dependency/>
 440.304 -                    <run-dependency>
 440.305 -                        <specification-version>6.22</specification-version>
 440.306 -                    </run-dependency>
 440.307 -                </dependency>
 440.308 -                <dependency>
 440.309 -                    <code-name-base>org.openide.filesystems</code-name-base>
 440.310 -                    <build-prerequisite/>
 440.311 -                    <compile-dependency/>
 440.312 -                    <run-dependency>
 440.313 -                        <specification-version>7.19</specification-version>
 440.314 -                    </run-dependency>
 440.315 -                </dependency>
 440.316 -                <dependency>
 440.317 -                    <code-name-base>org.openide.loaders</code-name-base>
 440.318 -                    <build-prerequisite/>
 440.319 -                    <compile-dependency/>
 440.320 -                    <run-dependency/>
 440.321 -                </dependency>
 440.322 -                <dependency>
 440.323 -                    <code-name-base>org.openide.modules</code-name-base>
 440.324 -                    <build-prerequisite/>
 440.325 -                    <compile-dependency/>
 440.326 -                    <run-dependency>
 440.327 -                        <specification-version>7.3</specification-version>
 440.328 -                    </run-dependency>
 440.329 -                </dependency>
 440.330 -                <dependency>
 440.331 -                    <code-name-base>org.openide.nodes</code-name-base>
 440.332 -                    <build-prerequisite/>
 440.333 -                    <compile-dependency/>
 440.334 -                    <run-dependency>
 440.335 -                        <specification-version>6.2</specification-version>
 440.336 -                    </run-dependency>
 440.337 -                </dependency>
 440.338 -                <dependency>
 440.339 -                    <code-name-base>org.openide.text</code-name-base>
 440.340 -                    <build-prerequisite/>
 440.341 -                    <compile-dependency/>
 440.342 -                    <run-dependency>
 440.343 -                        <specification-version>6.16</specification-version>
 440.344 -                    </run-dependency>
 440.345 -                </dependency>
 440.346 -                <dependency>
 440.347 -                    <code-name-base>org.openide.util</code-name-base>
 440.348 -                    <build-prerequisite/>
 440.349 -                    <compile-dependency/>
 440.350 -                    <run-dependency>
 440.351 -                        <specification-version>8.32</specification-version>
 440.352 -                    </run-dependency>
 440.353 -                </dependency>
 440.354 -                <dependency>
 440.355 -                    <code-name-base>org.openide.util.lookup</code-name-base>
 440.356 -                    <build-prerequisite/>
 440.357 -                    <compile-dependency/>
 440.358 -                    <run-dependency>
 440.359 -                        <specification-version>8.0</specification-version>
 440.360 -                    </run-dependency>
 440.361 -                </dependency>
 440.362 -                <dependency>
 440.363 -                    <code-name-base>org.openide.windows</code-name-base>
 440.364 -                    <build-prerequisite/>
 440.365 -                    <compile-dependency/>
 440.366 -                    <run-dependency>
 440.367 -                        <specification-version>6.16</specification-version>
 440.368 -                    </run-dependency>
 440.369 -                </dependency>
 440.370 -            </module-dependencies>
 440.371 -            <test-dependencies>
 440.372 -                <test-type>
 440.373 -                    <name>unit</name>
 440.374 -                    <test-dependency>
 440.375 -                        <code-name-base>org.netbeans.core</code-name-base>
 440.376 -                        <compile-dependency/>
 440.377 -                    </test-dependency>
 440.378 -                    <test-dependency>
 440.379 -                        <code-name-base>org.netbeans.insane</code-name-base>
 440.380 -                        <compile-dependency/>
 440.381 -                    </test-dependency>
 440.382 -                    <test-dependency>
 440.383 -                        <code-name-base>org.netbeans.libs.freemarker</code-name-base>
 440.384 -                        <recursive/>
 440.385 -                        <compile-dependency/>
 440.386 -                    </test-dependency>
 440.387 -                    <test-dependency>
 440.388 -                        <code-name-base>org.netbeans.libs.junit4</code-name-base>
 440.389 -                        <compile-dependency/>
 440.390 -                    </test-dependency>
 440.391 -                    <test-dependency>
 440.392 -                        <code-name-base>org.netbeans.modules.classfile</code-name-base>
 440.393 -                    </test-dependency>
 440.394 -                    <test-dependency>
 440.395 -                        <code-name-base>org.netbeans.modules.defaults</code-name-base>
 440.396 -                    </test-dependency>
 440.397 -                    <test-dependency>
 440.398 -                        <code-name-base>org.netbeans.modules.editor</code-name-base>
 440.399 -                        <test/>
 440.400 -                    </test-dependency>
 440.401 -                    <test-dependency>
 440.402 -                        <code-name-base>org.netbeans.modules.editor.mimelookup</code-name-base>
 440.403 -                        <compile-dependency/>
 440.404 -                        <test/>
 440.405 -                    </test-dependency>
 440.406 -                    <test-dependency>
 440.407 -                        <code-name-base>org.netbeans.modules.editor.settings</code-name-base>
 440.408 -                    </test-dependency>
 440.409 -                    <test-dependency>
 440.410 -                        <code-name-base>org.netbeans.modules.editor.settings.storage</code-name-base>
 440.411 -                    </test-dependency>
 440.412 -                    <test-dependency>
 440.413 -                        <code-name-base>org.netbeans.modules.editor.util</code-name-base>
 440.414 -                    </test-dependency>
 440.415 -                    <test-dependency>
 440.416 -                        <code-name-base>org.netbeans.modules.jackpot30.test.borrowed</code-name-base>
 440.417 -                        <compile-dependency/>
 440.418 -                    </test-dependency>
 440.419 -                    <test-dependency>
 440.420 -                        <code-name-base>org.netbeans.modules.java.editor</code-name-base>
 440.421 -                        <recursive/>
 440.422 -                        <compile-dependency/>
 440.423 -                    </test-dependency>
 440.424 -                    <test-dependency>
 440.425 -                        <code-name-base>org.netbeans.modules.java.hints</code-name-base>
 440.426 -                        <compile-dependency/>
 440.427 -                    </test-dependency>
 440.428 -                    <test-dependency>
 440.429 -                        <code-name-base>org.netbeans.modules.java.hints.declarative</code-name-base>
 440.430 -                        <compile-dependency/>
 440.431 -                    </test-dependency>
 440.432 -                    <test-dependency>
 440.433 -                        <code-name-base>org.netbeans.modules.java.source</code-name-base>
 440.434 -                        <compile-dependency/>
 440.435 -                        <test/>
 440.436 -                    </test-dependency>
 440.437 -                    <test-dependency>
 440.438 -                        <code-name-base>org.netbeans.modules.masterfs</code-name-base>
 440.439 -                    </test-dependency>
 440.440 -                    <test-dependency>
 440.441 -                        <code-name-base>org.netbeans.modules.nbjunit</code-name-base>
 440.442 -                        <compile-dependency/>
 440.443 -                    </test-dependency>
 440.444 -                    <test-dependency>
 440.445 -                        <code-name-base>org.netbeans.modules.parsing.api</code-name-base>
 440.446 -                        <compile-dependency/>
 440.447 -                        <test/>
 440.448 -                    </test-dependency>
 440.449 -                    <test-dependency>
 440.450 -                        <code-name-base>org.netbeans.modules.parsing.nb</code-name-base>
 440.451 -                        <compile-dependency/>
 440.452 -                    </test-dependency>
 440.453 -                    <test-dependency>
 440.454 -                        <code-name-base>org.netbeans.modules.progress.ui</code-name-base>
 440.455 -                    </test-dependency>
 440.456 -                    <test-dependency>
 440.457 -                        <code-name-base>org.netbeans.modules.projectapi.nb</code-name-base>
 440.458 -                        <compile-dependency/>
 440.459 -                    </test-dependency>
 440.460 -                    <test-dependency>
 440.461 -                        <code-name-base>org.netbeans.modules.projectui</code-name-base>
 440.462 -                    </test-dependency>
 440.463 -                    <test-dependency>
 440.464 -                        <code-name-base>org.openide.util</code-name-base>
 440.465 -                        <compile-dependency/>
 440.466 -                        <test/>
 440.467 -                    </test-dependency>
 440.468 -                    <test-dependency>
 440.469 -                        <code-name-base>org.openide.util.lookup</code-name-base>
 440.470 -                        <compile-dependency/>
 440.471 -                        <test/>
 440.472 -                    </test-dependency>
 440.473 -                </test-type>
 440.474 -            </test-dependencies>
 440.475 -            <public-packages>
 440.476 -                <package>org.netbeans.spi.java.hints</package>
 440.477 -                <package>org.netbeans.spi.java.hints.annotations</package>
 440.478 -                <package>org.netbeans.spi.java.hints.matching</package>
 440.479 -                <package>org.netbeans.spi.java.hints.support</package>
 440.480 -            </public-packages>
 440.481 -        </data>
 440.482 -    </configuration>
 440.483 -</project>
   441.1 --- a/sandbox/java.hints/spi.java.hints/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   441.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   441.3 @@ -1,1 +0,0 @@
   441.4 -suite.dir=${basedir}/..
   442.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/jackpot/spi/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   442.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   442.3 @@ -1,42 +0,0 @@
   442.4 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   442.5 -#
   442.6 -# Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   442.7 -#
   442.8 -# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   442.9 -# Other names may be trademarks of their respective owners.
  442.10 -#
  442.11 -# The contents of this file are subject to the terms of either the GNU
  442.12 -# General Public License Version 2 only ("GPL") or the Common
  442.13 -# Development and Distribution License("CDDL") (collectively, the
  442.14 -# "License"). You may not use this file except in compliance with the
  442.15 -# License. You can obtain a copy of the License at
  442.16 -# http://www.netbeans.org/cddl-gplv2.html
  442.17 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  442.18 -# specific language governing permissions and limitations under the
  442.19 -# License.  When distributing the software, include this License Header
  442.20 -# Notice in each file and include the License file at
  442.21 -# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  442.22 -# particular file as subject to the "Classpath" exception as provided
  442.23 -# by Oracle in the GPL Version 2 section of the License file that
  442.24 -# accompanied this code. If applicable, add the following below the
  442.25 -# License Header, with the fields enclosed by brackets [] replaced by
  442.26 -# your own identifying information:
  442.27 -# "Portions Copyrighted [year] [name of copyright owner]"
  442.28 -#
  442.29 -# Contributor(s):
  442.30 -#
  442.31 -# The Original Software is NetBeans. The Initial Developer of the Original
  442.32 -# Software is Sun Microsystems, Inc. Portions Copyright 2008-2009 Sun
  442.33 -# Microsystems, Inc. All Rights Reserved.
  442.34 -#
  442.35 -# If you wish your version of this file to be governed by only the CDDL
  442.36 -# or only the GPL Version 2, indicate your decision by adding
  442.37 -# "[Contributor] elects to include this software in this distribution
  442.38 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
  442.39 -# single choice of license, a recipient has the option to distribute
  442.40 -# your version of this file under either the CDDL, the GPL Version 2 or
  442.41 -# to extend the choice of license to its licensees as provided above.
  442.42 -# However, if you add GPL Version 2 code and therefore, elected the GPL
  442.43 -# Version 2 license, then the option applies only if the new code is
  442.44 -# made subject to such option by the copyright holder.
  442.45 -LBL_UpdateDependencyQuestion=Update dependency on module {0} to specification version {1}?
  442.46 \ No newline at end of file
   443.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/jackpot/spi/HintsRunner.java	Mon Dec 19 11:37:36 2016 +0100
   443.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   443.3 @@ -1,69 +0,0 @@
   443.4 -/*
   443.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   443.6 - *
   443.7 - * Copyright 2009-2010 Oracle and/or its affiliates. All rights reserved.
   443.8 - *
   443.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  443.10 - * Other names may be trademarks of their respective owners.
  443.11 - *
  443.12 - * The contents of this file are subject to the terms of either the GNU
  443.13 - * General Public License Version 2 only ("GPL") or the Common
  443.14 - * Development and Distribution License("CDDL") (collectively, the
  443.15 - * "License"). You may not use this file except in compliance with the
  443.16 - * License. You can obtain a copy of the License at
  443.17 - * http://www.netbeans.org/cddl-gplv2.html
  443.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  443.19 - * specific language governing permissions and limitations under the
  443.20 - * License.  When distributing the software, include this License Header
  443.21 - * Notice in each file and include the License file at
  443.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  443.23 - * particular file as subject to the "Classpath" exception as provided
  443.24 - * by Oracle in the GPL Version 2 section of the License file that
  443.25 - * accompanied this code. If applicable, add the following below the
  443.26 - * License Header, with the fields enclosed by brackets [] replaced by
  443.27 - * your own identifying information:
  443.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  443.29 - *
  443.30 - * If you wish your version of this file to be governed by only the CDDL
  443.31 - * or only the GPL Version 2, indicate your decision by adding
  443.32 - * "[Contributor] elects to include this software in this distribution
  443.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  443.34 - * single choice of license, a recipient has the option to distribute
  443.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  443.36 - * to extend the choice of license to its licensees as provided above.
  443.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  443.38 - * Version 2 license, then the option applies only if the new code is
  443.39 - * made subject to such option by the copyright holder.
  443.40 - *
  443.41 - * Contributor(s):
  443.42 - *
  443.43 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  443.44 - */
  443.45 -
  443.46 -package org.netbeans.modules.java.hints.jackpot.spi;
  443.47 -
  443.48 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
  443.49 -import com.sun.source.util.TreePath;
  443.50 -import java.util.LinkedList;
  443.51 -import java.util.List;
  443.52 -import java.util.Map;
  443.53 -import java.util.concurrent.atomic.AtomicBoolean;
  443.54 -import org.netbeans.api.annotations.common.CheckForNull;
  443.55 -import org.netbeans.api.java.source.CompilationInfo;
  443.56 -import org.netbeans.modules.java.hints.spiimpl.MessageImpl;
  443.57 -import org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker;
  443.58 -import org.netbeans.modules.java.hints.spiimpl.options.HintsSettings;
  443.59 -import org.netbeans.spi.editor.hints.ErrorDescription;
  443.60 -
  443.61 -/**XXX: probably unused
  443.62 - *
  443.63 - * @author lahvac
  443.64 - */
  443.65 -public class HintsRunner {
  443.66 -
  443.67 -    @CheckForNull
  443.68 -    public static Map<HintDescription, List<ErrorDescription>> computeErrors(CompilationInfo info, Iterable<? extends HintDescription> hints, AtomicBoolean cancel) {
  443.69 -        return new HintsInvoker(HintsSettings.getSettingsFor(info.getFileObject()), cancel).computeHints(info, new TreePath(info.getCompilationUnit()), hints, new LinkedList<MessageImpl>());
  443.70 -    }
  443.71 -
  443.72 -}
   444.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/jackpot/spi/PatternConvertor.java	Mon Dec 19 11:37:36 2016 +0100
   444.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   444.3 @@ -1,113 +0,0 @@
   444.4 -/*
   444.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   444.6 - *
   444.7 - * Copyright 2009-2011 Sun Microsystems, Inc. All rights reserved.
   444.8 - *
   444.9 - * The contents of this file are subject to the terms of either the GNU
  444.10 - * General Public License Version 2 only ("GPL") or the Common
  444.11 - * Development and Distribution License("CDDL") (collectively, the
  444.12 - * "License"). You may not use this file except in compliance with the
  444.13 - * License. You can obtain a copy of the License at
  444.14 - * http://www.netbeans.org/cddl-gplv2.html
  444.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  444.16 - * specific language governing permissions and limitations under the
  444.17 - * License.  When distributing the software, include this License Header
  444.18 - * Notice in each file and include the License file at
  444.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  444.20 - * particular file as subject to the "Classpath" exception as provided
  444.21 - * by Sun in the GPL Version 2 section of the License file that
  444.22 - * accompanied this code. If applicable, add the following below the
  444.23 - * License Header, with the fields enclosed by brackets [] replaced by
  444.24 - * your own identifying information:
  444.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  444.26 - *
  444.27 - * If you wish your version of this file to be governed by only the CDDL
  444.28 - * or only the GPL Version 2, indicate your decision by adding
  444.29 - * "[Contributor] elects to include this software in this distribution
  444.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  444.31 - * single choice of license, a recipient has the option to distribute
  444.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  444.33 - * to extend the choice of license to its licensees as provided above.
  444.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  444.35 - * Version 2 license, then the option applies only if the new code is
  444.36 - * made subject to such option by the copyright holder.
  444.37 - *
  444.38 - * Contributor(s):
  444.39 - *
  444.40 - * Portions Copyrighted 2009-2011 Sun Microsystems, Inc.
  444.41 - */
  444.42 -
  444.43 -package org.netbeans.modules.java.hints.jackpot.spi;
  444.44 -
  444.45 -import org.netbeans.modules.java.hints.providers.spi.HintDescriptionFactory;
  444.46 -import org.netbeans.spi.java.hints.HintContext;
  444.47 -import java.util.ArrayList;
  444.48 -import java.util.Collection;
  444.49 -import java.util.Collections;
  444.50 -import org.netbeans.api.annotations.common.CheckForNull;
  444.51 -import org.netbeans.api.annotations.common.NonNull;
  444.52 -import org.netbeans.modules.java.hints.providers.spi.HintDescription.Worker;
  444.53 -import org.netbeans.modules.java.hints.providers.spi.Trigger.PatternDescription;
  444.54 -import org.netbeans.spi.java.hints.ErrorDescriptionFactory;
  444.55 -import org.netbeans.spi.editor.hints.ErrorDescription;
  444.56 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
  444.57 -import org.openide.util.Lookup;
  444.58 -
  444.59 -/**XXX: big hack?
  444.60 - *
  444.61 - * @author lahvac
  444.62 - */
  444.63 -public abstract class PatternConvertor {
  444.64 -
  444.65 -    protected abstract @CheckForNull Iterable<? extends HintDescription> parseString(@NonNull String code);
  444.66 -
  444.67 -    public static @CheckForNull Iterable<? extends HintDescription> create(@NonNull String code) {
  444.68 -        Collection<String> patterns = new ArrayList<String>();
  444.69 -        
  444.70 -        //XXX:
  444.71 -        if (code.contains(";;")) {
  444.72 -            PatternConvertor c = Lookup.getDefault().lookup(PatternConvertor.class);
  444.73 -
  444.74 -            if (c != null) {
  444.75 -                return c.parseString(code);
  444.76 -            }
  444.77 -
  444.78 -            for (String s : code.split(";;")) {
  444.79 -                s = s.trim();
  444.80 -                if (s.isEmpty()) {
  444.81 -                    continue;
  444.82 -                }
  444.83 -                
  444.84 -                patterns.add(s);
  444.85 -            }
  444.86 -        } else {
  444.87 -            patterns.add(code);
  444.88 -        }
  444.89 -
  444.90 -        Collection<HintDescription> result = new ArrayList<HintDescription>(patterns.size());
  444.91 -
  444.92 -        for (String pattern : patterns) {
  444.93 -            PatternDescription pd = PatternDescription.create(pattern, Collections.<String, String>emptyMap());
  444.94 -
  444.95 -            HintDescription desc = HintDescriptionFactory.create()
  444.96 -    //                                                     .setDisplayName("Pattern Matches")
  444.97 -                                                         .setTrigger(pd)
  444.98 -                                                         .setWorker(new WorkerImpl())
  444.99 -                                                         .produce();
 444.100 -            
 444.101 -            result.add(desc);
 444.102 -        }
 444.103 -
 444.104 -        return result;
 444.105 -    }
 444.106 -
 444.107 -    private static final class WorkerImpl implements Worker {
 444.108 -
 444.109 -        public Collection<? extends ErrorDescription> createErrors(HintContext ctx) {
 444.110 -            ErrorDescription ed = ErrorDescriptionFactory.forTree(ctx, ctx.getPath(), "Found pattern occurrence");
 444.111 -
 444.112 -            return Collections.singleton(ed);
 444.113 -        }
 444.114 -        
 444.115 -    }
 444.116 -}
   445.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/jackpot/spi/ProjectDependencyUpgrader.java	Mon Dec 19 11:37:36 2016 +0100
   445.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   445.3 @@ -1,64 +0,0 @@
   445.4 -/*
   445.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   445.6 - *
   445.7 - * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
   445.8 - *
   445.9 - * The contents of this file are subject to the terms of either the GNU
  445.10 - * General Public License Version 2 only ("GPL") or the Common
  445.11 - * Development and Distribution License("CDDL") (collectively, the
  445.12 - * "License"). You may not use this file except in compliance with the
  445.13 - * License. You can obtain a copy of the License at
  445.14 - * http://www.netbeans.org/cddl-gplv2.html
  445.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  445.16 - * specific language governing permissions and limitations under the
  445.17 - * License.  When distributing the software, include this License Header
  445.18 - * Notice in each file and include the License file at
  445.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  445.20 - * particular file as subject to the "Classpath" exception as provided
  445.21 - * by Sun in the GPL Version 2 section of the License file that
  445.22 - * accompanied this code. If applicable, add the following below the
  445.23 - * License Header, with the fields enclosed by brackets [] replaced by
  445.24 - * your own identifying information:
  445.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  445.26 - *
  445.27 - * If you wish your version of this file to be governed by only the CDDL
  445.28 - * or only the GPL Version 2, indicate your decision by adding
  445.29 - * "[Contributor] elects to include this software in this distribution
  445.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  445.31 - * single choice of license, a recipient has the option to distribute
  445.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  445.33 - * to extend the choice of license to its licensees as provided above.
  445.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  445.35 - * Version 2 license, then the option applies only if the new code is
  445.36 - * made subject to such option by the copyright holder.
  445.37 - *
  445.38 - * Contributor(s):
  445.39 - *
  445.40 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  445.41 - */
  445.42 -package org.netbeans.modules.java.hints.jackpot.spi;
  445.43 -
  445.44 -import org.netbeans.api.project.Project;
  445.45 -import org.openide.DialogDisplayer;
  445.46 -import org.openide.NotifyDescriptor;
  445.47 -import org.openide.filesystems.FileObject;
  445.48 -import org.openide.modules.SpecificationVersion;
  445.49 -
  445.50 -/**
  445.51 - *
  445.52 - * @author lahvac
  445.53 - */
  445.54 -public abstract class ProjectDependencyUpgrader {
  445.55 -
  445.56 -    public abstract boolean ensureDependency(Project p, FileObject dep, SpecificationVersion spec, boolean canShowUI);
  445.57 -    public abstract boolean ensureDependency(Project p, String specification, boolean b);
  445.58 -
  445.59 -    protected final boolean showDependencyUpgradeDialog(Project p, String dep, SpecificationVersion currentDependency, SpecificationVersion spec, boolean newDepenency, boolean canShowUI) {
  445.60 -        if (!canShowUI) return true;
  445.61 -        
  445.62 -        NotifyDescriptor nd = new NotifyDescriptor.Confirmation("New version: " + spec, "Update spec version.", NotifyDescriptor.YES_NO_OPTION);
  445.63 -
  445.64 -        return DialogDisplayer.getDefault().notify(nd) == NotifyDescriptor.YES_OPTION;
  445.65 -    }
  445.66 -
  445.67 -}
   446.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/code/CodeHintProviderImpl.java	Mon Dec 19 11:37:36 2016 +0100
   446.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   446.3 @@ -1,475 +0,0 @@
   446.4 -/*
   446.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   446.6 - *
   446.7 - * Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   446.8 - *
   446.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  446.10 - * Other names may be trademarks of their respective owners.
  446.11 - *
  446.12 - * The contents of this file are subject to the terms of either the GNU
  446.13 - * General Public License Version 2 only ("GPL") or the Common
  446.14 - * Development and Distribution License("CDDL") (collectively, the
  446.15 - * "License"). You may not use this file except in compliance with the
  446.16 - * License. You can obtain a copy of the License at
  446.17 - * http://www.netbeans.org/cddl-gplv2.html
  446.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  446.19 - * specific language governing permissions and limitations under the
  446.20 - * License.  When distributing the software, include this License Header
  446.21 - * Notice in each file and include the License file at
  446.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  446.23 - * particular file as subject to the "Classpath" exception as provided
  446.24 - * by Oracle in the GPL Version 2 section of the License file that
  446.25 - * accompanied this code. If applicable, add the following below the
  446.26 - * License Header, with the fields enclosed by brackets [] replaced by
  446.27 - * your own identifying information:
  446.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  446.29 - *
  446.30 - * If you wish your version of this file to be governed by only the CDDL
  446.31 - * or only the GPL Version 2, indicate your decision by adding
  446.32 - * "[Contributor] elects to include this software in this distribution
  446.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  446.34 - * single choice of license, a recipient has the option to distribute
  446.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  446.36 - * to extend the choice of license to its licensees as provided above.
  446.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  446.38 - * Version 2 license, then the option applies only if the new code is
  446.39 - * made subject to such option by the copyright holder.
  446.40 - *
  446.41 - * Contributor(s):
  446.42 - *
  446.43 - * Portions Copyrighted 2008-2010 Sun Microsystems, Inc.
  446.44 - */
  446.45 -
  446.46 -package org.netbeans.modules.java.hints.providers.code;
  446.47 -
  446.48 -import com.sun.source.tree.Tree.Kind;
  446.49 -import java.lang.annotation.Annotation;
  446.50 -import java.lang.reflect.InvocationTargetException;
  446.51 -import java.lang.reflect.Method;
  446.52 -import java.util.ArrayList;
  446.53 -import java.util.Arrays;
  446.54 -import java.util.Collection;
  446.55 -import java.util.Collections;
  446.56 -import java.util.EnumSet;
  446.57 -import java.util.HashMap;
  446.58 -import java.util.HashSet;
  446.59 -import java.util.LinkedList;
  446.60 -import java.util.List;
  446.61 -import java.util.Map;
  446.62 -import java.util.Set;
  446.63 -import java.util.concurrent.atomic.AtomicReference;
  446.64 -import java.util.logging.Level;
  446.65 -import java.util.logging.Logger;
  446.66 -import java.util.prefs.Preferences;
  446.67 -import javax.swing.JComponent;
  446.68 -import javax.swing.JPanel;
  446.69 -import org.netbeans.modules.java.hints.providers.code.FSWrapper.ClassWrapper;
  446.70 -import org.netbeans.modules.java.hints.providers.code.FSWrapper.FieldWrapper;
  446.71 -import org.netbeans.modules.java.hints.providers.code.FSWrapper.MethodWrapper;
  446.72 -import org.netbeans.modules.java.hints.providers.code.ReflectiveCustomizerProvider.OptionDescriptor;
  446.73 -import org.netbeans.spi.java.hints.CustomizerProvider;
  446.74 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
  446.75 -import org.netbeans.modules.java.hints.providers.spi.HintDescription.Worker;
  446.76 -import org.netbeans.modules.java.hints.providers.spi.HintDescriptionFactory;
  446.77 -import org.netbeans.modules.java.hints.providers.spi.HintMetadata;
  446.78 -import org.netbeans.modules.java.hints.providers.spi.HintMetadata.Options;
  446.79 -import org.netbeans.modules.java.hints.providers.spi.HintProvider;
  446.80 -import org.netbeans.modules.java.hints.providers.spi.Trigger.DecisionTrigger;
  446.81 -import org.netbeans.modules.java.hints.providers.spi.Trigger.Kinds;
  446.82 -import org.netbeans.modules.java.hints.providers.spi.Trigger.PatternDescription;
  446.83 -import org.netbeans.spi.editor.hints.ErrorDescription;
  446.84 -import org.netbeans.spi.editor.hints.Severity;
  446.85 -import org.netbeans.spi.java.hints.BooleanOption;
  446.86 -import org.netbeans.spi.java.hints.ConstraintVariableType;
  446.87 -import org.netbeans.spi.java.hints.Hint;
  446.88 -import org.netbeans.spi.java.hints.IntegerOption;
  446.89 -import org.netbeans.spi.java.hints.TriggerDecision;
  446.90 -import org.netbeans.spi.java.hints.TriggerPattern;
  446.91 -import org.netbeans.spi.java.hints.TriggerPatterns;
  446.92 -import org.netbeans.spi.java.hints.TriggerTreeKind;
  446.93 -import org.netbeans.spi.java.hints.UseOptions;
  446.94 -import org.openide.util.Exceptions;
  446.95 -import org.openide.util.Lookup;
  446.96 -import org.openide.util.NbCollections;
  446.97 -import org.openide.util.lookup.ServiceProvider;
  446.98 -
  446.99 -/**
 446.100 - *
 446.101 - * @author lahvac
 446.102 - */
 446.103 -@ServiceProvider(service=HintProvider.class)
 446.104 -public class CodeHintProviderImpl implements HintProvider {
 446.105 -
 446.106 -    private static final Logger LOG = Logger.getLogger(WorkerImpl.class.getName());
 446.107 -    
 446.108 -    public Map<HintMetadata, ? extends Collection<? extends HintDescription>> computeHints() {
 446.109 -        return computeHints(findLoader(), "META-INF/nb-hints/hints");
 446.110 -    }
 446.111 -
 446.112 -    private Map<HintMetadata, ? extends Collection<? extends HintDescription>> computeHints(ClassLoader l, String path) {
 446.113 -        Map<HintMetadata, Collection<HintDescription>> result = new HashMap<HintMetadata, Collection<HintDescription>>();
 446.114 -        
 446.115 -        for (ClassWrapper c : FSWrapper.listClasses()) {
 446.116 -            try {
 446.117 -                processClass(c, result);
 446.118 -            } catch (ThreadDeath td) {
 446.119 -                throw td;
 446.120 -            } catch (Throwable t) {
 446.121 -                Exceptions.printStackTrace(t);
 446.122 -            }
 446.123 -        }
 446.124 -
 446.125 -        return result;
 446.126 -    }
 446.127 -
 446.128 -    static ClassLoader findLoader() {
 446.129 -        ClassLoader l = Lookup.getDefault().lookup(ClassLoader.class);
 446.130 -
 446.131 -        if (l == null) {
 446.132 -            return CodeHintProviderImpl.class.getClassLoader();
 446.133 -        }
 446.134 -
 446.135 -        return l;
 446.136 -    }
 446.137 -
 446.138 -    public static void processClass(ClassWrapper clazz, Map<HintMetadata, Collection<HintDescription>> result) throws SecurityException {
 446.139 -        Hint metadata = clazz.getAnnotation(Hint.class);
 446.140 -        HintMetadata hm;
 446.141 -        
 446.142 -        if (metadata != null) {
 446.143 -            String id = metadata.id();
 446.144 -
 446.145 -            if (id == null || id.length() == 0) {
 446.146 -                id = clazz.getName();
 446.147 -            }
 446.148 -            hm = fromAnnotation(id, clazz, null, metadata);
 446.149 -        } else {
 446.150 -            hm = null;
 446.151 -        }
 446.152 -        
 446.153 -        for (MethodWrapper m : clazz.getMethods()) {
 446.154 -            Hint localMetadataAnnotation = m.getAnnotation(Hint.class);
 446.155 -            HintMetadata localMetadata;
 446.156 -
 446.157 -            if (localMetadataAnnotation != null) {
 446.158 -                String localID = localMetadataAnnotation.id();
 446.159 -
 446.160 -                if (localID == null || localID.length() == 0) {
 446.161 -                    localID = clazz.getName() + "." + m.getName();
 446.162 -                }
 446.163 -
 446.164 -                localMetadata = fromAnnotation(localID, clazz, m, localMetadataAnnotation);
 446.165 -            } else {
 446.166 -                localMetadata = hm;
 446.167 -            }
 446.168 -
 446.169 -            if (localMetadata != null) {
 446.170 -                processMethod(result, m, localMetadata);
 446.171 -            }
 446.172 -        }
 446.173 -    }
 446.174 -
 446.175 -    private static HintMetadata fromAnnotation(String id, ClassWrapper clazz, MethodWrapper method, Hint metadata) {
 446.176 -        HintMetadata hm = HintMetadata.Builder.create(id)
 446.177 -                                              .setDescription(metadata.displayName(), metadata.description())
 446.178 -                                              .setCategory(metadata.category())
 446.179 -                                              .setEnabled(metadata.enabled())
 446.180 -                                              .setSeverity(metadata.severity())
 446.181 -                                              .setKind(metadata.hintKind())
 446.182 -                                              .setCustomizerProvider(createCustomizerProvider(clazz, method, id, metadata))
 446.183 -                                              .addSuppressWarnings(metadata.suppressWarnings())
 446.184 -                                              .addOptions(Options.fromHintOptions(metadata.options()).toArray(new Options[0]))
 446.185 -                                              .build();
 446.186 -        return hm;
 446.187 -    }
 446.188 -
 446.189 -    private static CustomizerProvider createCustomizerProvider(ClassWrapper clazz, MethodWrapper method, String id, Hint hint) {
 446.190 -        Class<? extends CustomizerProvider> customizerClass = hint.customizerProvider();
 446.191 -
 446.192 -        if (customizerClass != CustomizerProvider.class) {
 446.193 -            return new DelegatingCustomizerProvider(customizerClass);
 446.194 -        }
 446.195 -
 446.196 -        Set<String> allowedOptions = null;
 446.197 -
 446.198 -        if (method != null) {
 446.199 -            UseOptions useOptions = method.getAnnotation(UseOptions.class);
 446.200 -
 446.201 -            if (useOptions == null) return null;
 446.202 -
 446.203 -            allowedOptions = new HashSet<String>(Arrays.asList(useOptions.value()));
 446.204 -        }
 446.205 -
 446.206 -        List<OptionDescriptor> declarativeOptions = new ArrayList<OptionDescriptor>();
 446.207 -
 446.208 -        for (FieldWrapper fw : clazz.getFields()) {
 446.209 -            BooleanOption option = fw.getAnnotation(BooleanOption.class);
 446.210 -            IntegerOption iOption = fw.getAnnotation(IntegerOption.class);
 446.211 -            
 446.212 -            String key = fw.getConstantValue();
 446.213 -
 446.214 -            if (key == null) continue;
 446.215 -            if (allowedOptions != null && !allowedOptions.contains(key)) continue;
 446.216 -            
 446.217 -            Object defValue;
 446.218 -            String displayName;
 446.219 -            String tooltip;
 446.220 -            if (option != null) {
 446.221 -                defValue = option.defaultValue();
 446.222 -                displayName = option.displayName();
 446.223 -                tooltip = option.tooltip();
 446.224 -            } else if (iOption != null) {
 446.225 -                defValue = iOption.defaultValue();
 446.226 -                displayName = iOption.displayName();
 446.227 -                tooltip = iOption.tooltip();
 446.228 -            } else {
 446.229 -                return null;
 446.230 -            }
 446.231 -            
 446.232 -            declarativeOptions.add(
 446.233 -                new OptionDescriptor(
 446.234 -                    key, 
 446.235 -                    defValue,
 446.236 -                    displayName,
 446.237 -                    tooltip,
 446.238 -                    option != null ? option : iOption)
 446.239 -            );
 446.240 -        }
 446.241 -
 446.242 -        return !declarativeOptions.isEmpty() ? new ReflectiveCustomizerProvider(clazz.getName(), id, declarativeOptions) : null;
 446.243 -    }
 446.244 -    
 446.245 -    static void processMethod(Map<HintMetadata, Collection<HintDescription>> hints, MethodWrapper m, HintMetadata metadata) {
 446.246 -        //XXX: combinations of TriggerTreeKind and TriggerPattern?
 446.247 -        processTreeKindHint(hints, m, metadata);
 446.248 -        processPatternHint(hints, m, metadata);
 446.249 -        processDecisionHint(hints, m, metadata);
 446.250 -    }
 446.251 -    
 446.252 -    private static void processTreeKindHint(Map<HintMetadata, Collection<HintDescription>> hints, MethodWrapper m, HintMetadata metadata) {
 446.253 -        TriggerTreeKind kindTrigger = m.getAnnotation(TriggerTreeKind.class);
 446.254 -
 446.255 -        if (kindTrigger == null) {
 446.256 -            return ;
 446.257 -        }
 446.258 -
 446.259 -        Worker w = new WorkerImpl(m.getClazz().getName(), m.getName());
 446.260 -
 446.261 -        Set<Kind> kinds = EnumSet.noneOf(Kind.class);
 446.262 -        
 446.263 -        kinds.addAll(Arrays.asList(kindTrigger.value()));
 446.264 -
 446.265 -        addHint(hints, metadata, HintDescriptionFactory.create()
 446.266 -                                                       .setTrigger(new Kinds(kinds))
 446.267 -                                                       .setWorker(w)
 446.268 -                                                       .setMetadata(metadata)
 446.269 -                                                       .produce());
 446.270 -    }
 446.271 -    
 446.272 -    private static void processPatternHint(Map<HintMetadata, Collection<HintDescription>> hints, MethodWrapper m, HintMetadata metadata) {
 446.273 -        TriggerPattern patternTrigger = m.getAnnotation(TriggerPattern.class);
 446.274 -
 446.275 -        if (patternTrigger != null) {
 446.276 -            processPatternHint(hints, patternTrigger, m, metadata);
 446.277 -            return ;
 446.278 -        }
 446.279 -
 446.280 -        TriggerPatterns patternTriggers = m.getAnnotation(TriggerPatterns.class);
 446.281 -
 446.282 -        if (patternTriggers != null) {
 446.283 -            for (TriggerPattern pattern : patternTriggers.value()) {
 446.284 -                processPatternHint(hints, pattern, m, metadata);
 446.285 -            }
 446.286 -            return ;
 446.287 -        }
 446.288 -    }
 446.289 -
 446.290 -    private static void processPatternHint(Map<HintMetadata, Collection<HintDescription>> hints, TriggerPattern patternTrigger, MethodWrapper m, HintMetadata metadata) {
 446.291 -        String pattern = patternTrigger.value();
 446.292 -        Map<String, String> constraints = new HashMap<String, String>();
 446.293 -
 446.294 -        for (ConstraintVariableType c : patternTrigger.constraints()) {
 446.295 -            constraints.put(c.variable(), c.type());
 446.296 -        }
 446.297 -
 446.298 -        PatternDescription pd = PatternDescription.create(pattern, constraints);
 446.299 -
 446.300 -        addHint(hints, metadata, HintDescriptionFactory.create()
 446.301 -                                                       .setTrigger(pd)
 446.302 -                                                       .setWorker(new WorkerImpl(m.getClazz().getName(), m.getName()))
 446.303 -                                                       .setMetadata(metadata)
 446.304 -                                                       .produce());
 446.305 -    }
 446.306 -
 446.307 -    private static void processDecisionHint(Map<HintMetadata, Collection<HintDescription>> hints, MethodWrapper m, HintMetadata metadata) {
 446.308 -        TriggerDecision decisionTrigger = m.getAnnotation(TriggerDecision.class);
 446.309 -
 446.310 -        if (decisionTrigger == null) {
 446.311 -            return ;
 446.312 -        }
 446.313 -
 446.314 -        Worker w = new WorkerImpl(m.getClazz().getName(), m.getName());
 446.315 -
 446.316 -        addHint(hints, metadata, HintDescriptionFactory.create()
 446.317 -                                                       .setTrigger(new DecisionTrigger(decisionTrigger.value()))
 446.318 -                                                       .setWorker(w)
 446.319 -                                                       .setMetadata(metadata)
 446.320 -                                                       .produce());
 446.321 -    }
 446.322 -    
 446.323 -    private static void addHint(Map<HintMetadata, Collection<HintDescription>> hints, HintMetadata metadata, HintDescription hint) {
 446.324 -        Collection<HintDescription> list = hints.get(metadata);
 446.325 -
 446.326 -        if (list == null) {
 446.327 -            hints.put(metadata, list = new LinkedList<HintDescription>());
 446.328 -        }
 446.329 -
 446.330 -        list.add(hint);
 446.331 -    }
 446.332 -
 446.333 -    //accessed by tests:
 446.334 -    static final class WorkerImpl implements Worker {
 446.335 -
 446.336 -        private final String className;
 446.337 -        private final String methodName;
 446.338 -
 446.339 -        public WorkerImpl(String className, String methodName) {
 446.340 -            this.className = className;
 446.341 -            this.methodName = methodName;
 446.342 -        }
 446.343 -
 446.344 -        private final AtomicReference<Method> methodRef = new AtomicReference<Method>();
 446.345 -
 446.346 -        public Collection<? extends ErrorDescription> createErrors(org.netbeans.spi.java.hints.HintContext ctx) {
 446.347 -            try {
 446.348 -                Method method = methodRef.get();
 446.349 -
 446.350 -                if (method == null) {
 446.351 -                    methodRef.set(method = getMethod());
 446.352 -                }
 446.353 -                
 446.354 -                Object result = method.invoke(null, ctx);
 446.355 -
 446.356 -                if (result == null) {
 446.357 -                    return null;
 446.358 -                }
 446.359 -
 446.360 -                if (result instanceof Iterable) {
 446.361 -                    List<ErrorDescription> out = new LinkedList<ErrorDescription>();
 446.362 -
 446.363 -                    for (ErrorDescription ed : NbCollections.iterable(NbCollections.checkedIteratorByFilter(((Iterable) result).iterator(), ErrorDescription.class, false))) {
 446.364 -                        out.add(ed);
 446.365 -                    }
 446.366 -
 446.367 -                    return out;
 446.368 -                }
 446.369 -
 446.370 -                if (result instanceof ErrorDescription) {
 446.371 -                    return Collections.singletonList((ErrorDescription) result);
 446.372 -                }
 446.373 -
 446.374 -                //XXX: log if result was ignored...
 446.375 -            } catch (IllegalAccessException ex) {
 446.376 -                Exceptions.printStackTrace(ex);
 446.377 -            } catch (IllegalArgumentException ex) {
 446.378 -                Exceptions.printStackTrace(ex);
 446.379 -            } catch (ClassNotFoundException ex) {
 446.380 -                Exceptions.printStackTrace(ex);
 446.381 -            } catch (NoSuchMethodException ex) {
 446.382 -                Exceptions.printStackTrace(ex);
 446.383 -            } catch (InvocationTargetException ex) {
 446.384 -                LOG.log(Level.INFO, className + "." + methodName, ex);
 446.385 -                //so that the exceptions are categorized better:
 446.386 -                Exceptions.printStackTrace(ex.getCause());
 446.387 -            }
 446.388 -
 446.389 -            return null;
 446.390 -        }
 446.391 -
 446.392 -        //used by tests:
 446.393 -        Method getMethod() throws NoSuchMethodException, ClassNotFoundException {
 446.394 -            return FSWrapper.resolveMethod(className, methodName);
 446.395 -        }
 446.396 -
 446.397 -    }
 446.398 -
 446.399 -    private static final class EmptyHintMetadataDescription implements Hint {
 446.400 -
 446.401 -        public String id() {
 446.402 -            return "";
 446.403 -        }
 446.404 -
 446.405 -        public String category() {
 446.406 -            return "general";
 446.407 -        }
 446.408 -
 446.409 -        public boolean enabled() {
 446.410 -            return true;
 446.411 -        }
 446.412 -
 446.413 -        public Severity severity() {
 446.414 -            return Severity.VERIFIER;
 446.415 -        }
 446.416 -
 446.417 -        private static final String[] EMPTY_SW = new String[0];
 446.418 -        
 446.419 -        public String[] suppressWarnings() {
 446.420 -            return EMPTY_SW;
 446.421 -        }
 446.422 -
 446.423 -        public Class<? extends Annotation> annotationType() {
 446.424 -            return Hint.class;
 446.425 -        }
 446.426 -
 446.427 -        public Class<? extends CustomizerProvider> customizerProvider() {
 446.428 -            return CustomizerProvider.class;
 446.429 -        }
 446.430 -
 446.431 -        public Kind hintKind() {
 446.432 -            return Kind.INSPECTION;
 446.433 -        }
 446.434 -
 446.435 -        private static final Options[] EMPTY_OPTIONS = new Options[0];
 446.436 -
 446.437 -        public Options[] options() {
 446.438 -            return EMPTY_OPTIONS;
 446.439 -        }
 446.440 -
 446.441 -        @Override public String displayName() {
 446.442 -            return "";
 446.443 -        }
 446.444 -
 446.445 -        @Override public String description() {
 446.446 -            return "";
 446.447 -        }
 446.448 -
 446.449 -    }
 446.450 -
 446.451 -    private static final class DelegatingCustomizerProvider implements CustomizerProvider {
 446.452 -
 446.453 -        private final Class<? extends CustomizerProvider> component;
 446.454 -
 446.455 -        public DelegatingCustomizerProvider(Class<? extends CustomizerProvider> component) {
 446.456 -            this.component = component;
 446.457 -        }
 446.458 -
 446.459 -        @Override
 446.460 -        public JComponent getCustomizer(Preferences prefs) {
 446.461 -            try {
 446.462 -                return component.newInstance().getCustomizer(prefs);
 446.463 -            } catch (SecurityException ex) {
 446.464 -                Exceptions.printStackTrace(ex);
 446.465 -            } catch (InstantiationException ex) {
 446.466 -                Exceptions.printStackTrace(ex);
 446.467 -            } catch (IllegalAccessException ex) {
 446.468 -                Exceptions.printStackTrace(ex);
 446.469 -            } catch (IllegalArgumentException ex) {
 446.470 -                Exceptions.printStackTrace(ex);
 446.471 -            }
 446.472 -
 446.473 -            return new JPanel();
 446.474 -        }
 446.475 -
 446.476 -    }
 446.477 -
 446.478 -}
   447.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/code/FSWrapper.java	Mon Dec 19 11:37:36 2016 +0100
   447.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   447.3 @@ -1,319 +0,0 @@
   447.4 -/*
   447.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   447.6 - *
   447.7 - * Copyright 2010-2011 Oracle and/or its affiliates. All rights reserved.
   447.8 - *
   447.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  447.10 - * Other names may be trademarks of their respective owners.
  447.11 - *
  447.12 - * The contents of this file are subject to the terms of either the GNU
  447.13 - * General Public License Version 2 only ("GPL") or the Common
  447.14 - * Development and Distribution License("CDDL") (collectively, the
  447.15 - * "License"). You may not use this file except in compliance with the
  447.16 - * License. You can obtain a copy of the License at
  447.17 - * http://www.netbeans.org/cddl-gplv2.html
  447.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  447.19 - * specific language governing permissions and limitations under the
  447.20 - * License.  When distributing the software, include this License Header
  447.21 - * Notice in each file and include the License file at
  447.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  447.23 - * particular file as subject to the "Classpath" exception as provided
  447.24 - * by Oracle in the GPL Version 2 section of the License file that
  447.25 - * accompanied this code. If applicable, add the following below the
  447.26 - * License Header, with the fields enclosed by brackets [] replaced by
  447.27 - * your own identifying information:
  447.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  447.29 - *
  447.30 - * If you wish your version of this file to be governed by only the CDDL
  447.31 - * or only the GPL Version 2, indicate your decision by adding
  447.32 - * "[Contributor] elects to include this software in this distribution
  447.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  447.34 - * single choice of license, a recipient has the option to distribute
  447.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  447.36 - * to extend the choice of license to its licensees as provided above.
  447.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  447.38 - * Version 2 license, then the option applies only if the new code is
  447.39 - * made subject to such option by the copyright holder.
  447.40 - *
  447.41 - * Contributor(s):
  447.42 - *
  447.43 - * Portions Copyrighted 2010-2011 Sun Microsystems, Inc.
  447.44 - */
  447.45 -
  447.46 -package org.netbeans.modules.java.hints.providers.code;
  447.47 -
  447.48 -import java.lang.annotation.Annotation;
  447.49 -import java.lang.reflect.Array;
  447.50 -import java.lang.reflect.InvocationHandler;
  447.51 -import java.lang.reflect.Method;
  447.52 -import java.lang.reflect.Proxy;
  447.53 -import java.util.HashMap;
  447.54 -import java.util.LinkedList;
  447.55 -import java.util.List;
  447.56 -import java.util.Map;
  447.57 -import java.util.logging.Level;
  447.58 -import java.util.logging.Logger;
  447.59 -import org.netbeans.spi.java.hints.HintContext;
  447.60 -import org.openide.filesystems.FileObject;
  447.61 -import org.openide.filesystems.FileUtil;
  447.62 -import org.openide.util.Exceptions;
  447.63 -
  447.64 -/**
  447.65 - *
  447.66 - * @author lahvac
  447.67 - */
  447.68 -public class FSWrapper {
  447.69 -
  447.70 -    public static Iterable<? extends ClassWrapper> listClasses() {
  447.71 -        ClassLoader loader = FSWrapper.class.getClassLoader();
  447.72 -
  447.73 -        if (loader == null) {
  447.74 -            loader = ClassLoader.getSystemClassLoader();
  447.75 -        }
  447.76 -
  447.77 -        List<ClassWrapper> result = new LinkedList<ClassWrapper>();
  447.78 -        FileObject main = FileUtil.getConfigFile("org-netbeans-modules-java-hints/code-hints/");
  447.79 -
  447.80 -        if (main != null) {
  447.81 -            for (FileObject c : main.getChildren()) {
  447.82 -                result.add(new ClassWrapper(loader, c));
  447.83 -            }
  447.84 -        }
  447.85 -
  447.86 -        return result;
  447.87 -    }
  447.88 -
  447.89 -    public static Method resolveMethod(String className, String methodName) throws NoSuchMethodException, ClassNotFoundException {
  447.90 -        Class<?> clazz = CodeHintProviderImpl.findLoader().loadClass(className);
  447.91 -
  447.92 -        return clazz.getDeclaredMethod(methodName, HintContext.class);
  447.93 -    }
  447.94 -
  447.95 -    public static class AnnotatableWrapper {
  447.96 -        protected final ClassLoader loader;
  447.97 -        protected final FileObject folder;
  447.98 -        protected AnnotatableWrapper(ClassLoader loader, FileObject folder) {
  447.99 -            this.loader = loader;
 447.100 -            this.folder = folder;
 447.101 -        }
 447.102 -
 447.103 -        private final Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
 447.104 -
 447.105 -        public synchronized <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
 447.106 -            if (!this.annotations.containsKey(annotationClass)) {
 447.107 -                FileObject f = folder.getFileObject(annotationClass.getName().replace('.', '-') + ".annotation");
 447.108 -                T result = null;
 447.109 -
 447.110 -                if (f != null) {
 447.111 -                    try {
 447.112 -                        Annotation a = loadAnnotation(loader, f);
 447.113 -
 447.114 -                        result = annotationClass.cast(a);
 447.115 -                    } catch (ClassNotFoundException ex) {
 447.116 -                        Exceptions.printStackTrace(ex);
 447.117 -                    }
 447.118 -                }
 447.119 -
 447.120 -                this.annotations.put(annotationClass, result);
 447.121 -            }
 447.122 -
 447.123 -            return annotationClass.cast(this.annotations.get(annotationClass));
 447.124 -        }
 447.125 -    }
 447.126 -
 447.127 -    public static class ClassWrapper extends AnnotatableWrapper {
 447.128 -        private final String className;
 447.129 -        public ClassWrapper(ClassLoader loader, FileObject folder) {
 447.130 -            super(loader, folder);
 447.131 -            className = folder.getName().replace('-', '.');
 447.132 -        }
 447.133 -
 447.134 -        private Iterable<? extends MethodWrapper> methods;
 447.135 -
 447.136 -        public synchronized Iterable<? extends MethodWrapper> getMethods() {
 447.137 -            if (this.methods == null) {
 447.138 -                List<MethodWrapper> methods = new LinkedList<MethodWrapper>();
 447.139 -
 447.140 -                for (FileObject c : folder.getChildren()) {
 447.141 -                    if (c.getExt().equals("method")) {
 447.142 -                        methods.add(new MethodWrapper(loader, c, this));
 447.143 -                    }
 447.144 -                }
 447.145 -
 447.146 -                this.methods = methods;
 447.147 -            }
 447.148 -
 447.149 -            return this.methods;
 447.150 -        }
 447.151 -
 447.152 -        private Iterable<? extends FieldWrapper> fields;
 447.153 -
 447.154 -        public synchronized Iterable<? extends FieldWrapper> getFields() {
 447.155 -            if (this.fields == null) {
 447.156 -                List<FieldWrapper> fields = new LinkedList<FieldWrapper>();
 447.157 -
 447.158 -                for (FileObject c : folder.getChildren()) {
 447.159 -                    if (c.getExt().equals("field")) {
 447.160 -                        fields.add(new FieldWrapper(loader, c, this));
 447.161 -                    }
 447.162 -                }
 447.163 -
 447.164 -                this.fields = fields;
 447.165 -            }
 447.166 -
 447.167 -            return this.fields;
 447.168 -        }
 447.169 -
 447.170 -        public String getName() {
 447.171 -            return className;
 447.172 -        }
 447.173 -
 447.174 -        private Class<?> clazz;
 447.175 -        public synchronized Class<?> getDeclaredClass() {
 447.176 -            if (clazz != null) {
 447.177 -                return clazz;
 447.178 -            }
 447.179 -
 447.180 -            try {
 447.181 -                return this.clazz = loader.loadClass(className);
 447.182 -            } catch (ClassNotFoundException ex) {
 447.183 -                Exceptions.printStackTrace(ex);
 447.184 -            }
 447.185 -
 447.186 -            return null; //XXX
 447.187 -        }
 447.188 -    }
 447.189 -
 447.190 -    public static class MethodWrapper extends AnnotatableWrapper {
 447.191 -        private final ClassWrapper clazz;
 447.192 -        public MethodWrapper(ClassLoader loader, FileObject folder, ClassWrapper clazz) {
 447.193 -            super(loader, folder);
 447.194 -            this.clazz = clazz;
 447.195 -        }
 447.196 -
 447.197 -        ClassWrapper getClazz() {
 447.198 -            return clazz;
 447.199 -        }
 447.200 -        
 447.201 -        String getName() {
 447.202 -            return folder.getName();
 447.203 -        }
 447.204 -    }
 447.205 -
 447.206 -    public static class FieldWrapper extends AnnotatableWrapper {
 447.207 -        private final ClassWrapper clazz;
 447.208 -        public FieldWrapper(ClassLoader loader, FileObject folder, ClassWrapper clazz) {
 447.209 -            super(loader, folder);
 447.210 -            this.clazz = clazz;
 447.211 -        }
 447.212 -
 447.213 -        ClassWrapper getClazz() {
 447.214 -            return clazz;
 447.215 -        }
 447.216 -
 447.217 -        String getName() {
 447.218 -            return folder.getName();
 447.219 -        }
 447.220 -
 447.221 -        String getConstantValue() {
 447.222 -            Object constantValue = folder.getAttribute("constantValue");
 447.223 -
 447.224 -            if (constantValue instanceof String) {
 447.225 -                return (String) constantValue;
 447.226 -            }
 447.227 -
 447.228 -            return null;
 447.229 -        }
 447.230 -    }
 447.231 -
 447.232 -    private static final Object MARKER = new Object();
 447.233 -    
 447.234 -    private static Object computeAttributeValue(ClassLoader loader, FileObject folder, String attributeName, Class<?> returnType, Object defaulValue) throws ClassNotFoundException {
 447.235 -        Object result = folder.getAttribute(attributeName);
 447.236 -
 447.237 -        if (result == null) {
 447.238 -            FileObject embedded = folder.getFileObject(attributeName);
 447.239 -
 447.240 -            if (embedded == null) {
 447.241 -                result = defaulValue;
 447.242 -            } else {
 447.243 -                if (returnType.isArray()) {
 447.244 -                    List<Object> items = new LinkedList<Object>();
 447.245 -                    int c = 0;
 447.246 -
 447.247 -                    while (true) {
 447.248 -                        Object val = computeAttributeValue(loader, embedded, "item" + c, returnType.getComponentType(), MARKER);
 447.249 -
 447.250 -                        if (val == MARKER) {
 447.251 -                            break;
 447.252 -                        }
 447.253 -
 447.254 -                        items.add(val);
 447.255 -                        c++;
 447.256 -                    }
 447.257 -
 447.258 -                    Object res = Array.newInstance(returnType.getComponentType(), items.size());
 447.259 -                    int ci = 0;
 447.260 -
 447.261 -                    for (Object i : items) {
 447.262 -                        Array.set(res, ci++, i);
 447.263 -                    }
 447.264 -
 447.265 -                    result = res;
 447.266 -                } else if (returnType.isAnnotation()) {
 447.267 -                    result = loadAnnotation(loader, embedded.getChildren()[0]);
 447.268 -                }
 447.269 -            }
 447.270 -        } else {
 447.271 -            if (returnType.isEnum()) {
 447.272 -                String fqn = (String) result;
 447.273 -                int lastDot = fqn.lastIndexOf('.');
 447.274 -                Class<? extends Enum> enumClass = (Class<? extends Enum>) loader.loadClass(fqn.substring(0, lastDot));
 447.275 -
 447.276 -                result = Enum.valueOf(enumClass, fqn.substring(lastDot + 1));
 447.277 -            } else if (returnType == Class.class) {
 447.278 -                String fqn = (String) result;
 447.279 -
 447.280 -                try {
 447.281 -                    result = loader.loadClass(fqn);
 447.282 -                } catch (ClassNotFoundException ex) {
 447.283 -                    Logger.getLogger(FSWrapper.class.getName()).log(Level.FINE, null, ex);
 447.284 -                    result = CodeHintProviderImpl.findLoader().loadClass(fqn);
 447.285 -                }
 447.286 -            }
 447.287 -        }
 447.288 -
 447.289 -        return result;
 447.290 -    }
 447.291 -
 447.292 -    
 447.293 -    private static <T extends Annotation> T loadAnnotation(ClassLoader l, FileObject annotationFolder) throws ClassNotFoundException {
 447.294 -        Class<?> clazz = l.loadClass(annotationFolder.getName().replace('-', '.'));
 447.295 -
 447.296 -        return (T) Proxy.newProxyInstance(l, new Class[] {clazz}, new InvocationHandlerImpl(l, annotationFolder));
 447.297 -    }
 447.298 -    
 447.299 -    private static final class InvocationHandlerImpl implements InvocationHandler {
 447.300 -
 447.301 -        private final ClassLoader loader;
 447.302 -        private final FileObject folder;
 447.303 -        private final Map<String, Object> attributes = new HashMap<String, Object>();
 447.304 -
 447.305 -        public InvocationHandlerImpl(ClassLoader loader, FileObject folder) {
 447.306 -            this.loader = loader;
 447.307 -            this.folder = folder;
 447.308 -        }
 447.309 -
 447.310 -        public synchronized Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
 447.311 -            if (!attributes.containsKey(method.getName())) {
 447.312 -                Object result = computeAttributeValue(loader, folder, method.getName(), method.getReturnType(), method.getDefaultValue());
 447.313 -
 447.314 -                attributes.put(method.getName(), result);
 447.315 -            }
 447.316 -
 447.317 -            return attributes.get(method.getName());
 447.318 -        }
 447.319 -
 447.320 -    }
 447.321 -
 447.322 -}
   448.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/code/ReflectiveCustomizerProvider.java	Mon Dec 19 11:37:36 2016 +0100
   448.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   448.3 @@ -1,261 +0,0 @@
   448.4 -/*
   448.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   448.6 - *
   448.7 - * Copyright 2012 Oracle and/or its affiliates. All rights reserved.
   448.8 - *
   448.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  448.10 - * Other names may be trademarks of their respective owners.
  448.11 - *
  448.12 - * The contents of this file are subject to the terms of either the GNU
  448.13 - * General Public License Version 2 only ("GPL") or the Common
  448.14 - * Development and Distribution License("CDDL") (collectively, the
  448.15 - * "License"). You may not use this file except in compliance with the
  448.16 - * License. You can obtain a copy of the License at
  448.17 - * http://www.netbeans.org/cddl-gplv2.html
  448.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  448.19 - * specific language governing permissions and limitations under the
  448.20 - * License.  When distributing the software, include this License Header
  448.21 - * Notice in each file and include the License file at
  448.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  448.23 - * particular file as subject to the "Classpath" exception as provided
  448.24 - * by Oracle in the GPL Version 2 section of the License file that
  448.25 - * accompanied this code. If applicable, add the following below the
  448.26 - * License Header, with the fields enclosed by brackets [] replaced by
  448.27 - * your own identifying information:
  448.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  448.29 - *
  448.30 - * If you wish your version of this file to be governed by only the CDDL
  448.31 - * or only the GPL Version 2, indicate your decision by adding
  448.32 - * "[Contributor] elects to include this software in this distribution
  448.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  448.34 - * single choice of license, a recipient has the option to distribute
  448.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  448.36 - * to extend the choice of license to its licensees as provided above.
  448.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  448.38 - * Version 2 license, then the option applies only if the new code is
  448.39 - * made subject to such option by the copyright holder.
  448.40 - *
  448.41 - * Contributor(s):
  448.42 - *
  448.43 - * Portions Copyrighted 2012 Sun Microsystems, Inc.
  448.44 - */
  448.45 -package org.netbeans.modules.java.hints.providers.code;
  448.46 -
  448.47 -import java.awt.GridBagConstraints;
  448.48 -import java.awt.GridBagLayout;
  448.49 -import java.awt.Insets;
  448.50 -import java.awt.event.ActionEvent;
  448.51 -import java.awt.event.ActionListener;
  448.52 -import java.util.List;
  448.53 -import java.util.prefs.Preferences;
  448.54 -import javax.swing.JCheckBox;
  448.55 -import javax.swing.JComponent;
  448.56 -import javax.swing.JFormattedTextField;
  448.57 -import javax.swing.JLabel;
  448.58 -import javax.swing.JPanel;
  448.59 -import javax.swing.JSpinner;
  448.60 -import javax.swing.SpinnerNumberModel;
  448.61 -import javax.swing.event.ChangeEvent;
  448.62 -import javax.swing.event.ChangeListener;
  448.63 -import javax.swing.text.NumberFormatter;
  448.64 -import org.netbeans.spi.java.hints.BooleanOption;
  448.65 -import org.netbeans.spi.java.hints.CustomizerProvider;
  448.66 -import org.netbeans.spi.java.hints.IntegerOption;
  448.67 -import org.openide.util.Exceptions;
  448.68 -
  448.69 -/**
  448.70 - *
  448.71 - * @author lahvac
  448.72 - */
  448.73 -public class ReflectiveCustomizerProvider implements CustomizerProvider {
  448.74 -    private final String hintClassName;
  448.75 -    private final String hintId;
  448.76 -    private final List<OptionDescriptor> options;
  448.77 -
  448.78 -    public ReflectiveCustomizerProvider(String hintClassName, String hintId, List<OptionDescriptor> options) {
  448.79 -        this.hintClassName = hintClassName;
  448.80 -        this.hintId = hintId;
  448.81 -        this.options = options;
  448.82 -    }
  448.83 -
  448.84 -    @Override
  448.85 -    public JComponent getCustomizer(Preferences prefs) {
  448.86 -        return new CustomizerImpl(prefs, hintClassName, hintId, options);
  448.87 -    }
  448.88 -
  448.89 -    private static final class CustomizerImpl extends JPanel {
  448.90 -        private int row;
  448.91 -        
  448.92 -        public CustomizerImpl(Preferences prefs, String hintClassName, String hintId, List<OptionDescriptor> options) {
  448.93 -            try {
  448.94 -                setLayout(new GridBagLayout());
  448.95 -                row = 0;
  448.96 -                
  448.97 -                for (OptionDescriptor option : options) {
  448.98 -                    if (option.parameters instanceof IntegerOption) {
  448.99 -                        createIntegerOption(option, prefs);
 448.100 -                    }
 448.101 -                }
 448.102 -
 448.103 -                for (OptionDescriptor option : options) {
 448.104 -                    if (option.parameters instanceof BooleanOption) {
 448.105 -                        createBooleanOption(option, prefs);
 448.106 -                    }
 448.107 -                }
 448.108 -
 448.109 -                GridBagConstraints constraints = new GridBagConstraints();
 448.110 -
 448.111 -                constraints.anchor = GridBagConstraints.NORTHWEST;
 448.112 -                constraints.fill = GridBagConstraints.BOTH;
 448.113 -                constraints.gridheight = 1;
 448.114 -                constraints.gridwidth = GridBagConstraints.REMAINDER;
 448.115 -                constraints.gridx = 0;
 448.116 -                constraints.gridy = row++;
 448.117 -                constraints.weightx = 1;
 448.118 -                constraints.weighty = 1;
 448.119 -
 448.120 -                add(new JPanel(), constraints);
 448.121 -            } catch (IllegalArgumentException ex) {
 448.122 -                Exceptions.printStackTrace(ex);
 448.123 -            } catch (SecurityException ex) {
 448.124 -                Exceptions.printStackTrace(ex);
 448.125 -            }
 448.126 -        }
 448.127 -        
 448.128 -        private void createIntegerOption(OptionDescriptor option, Preferences prefs) {
 448.129 -            IntegerOption iopt = (IntegerOption)option.parameters;
 448.130 -            JLabel l = new JLabel();
 448.131 -            org.openide.awt.Mnemonics.setLocalizedText(l, option.displayName + ":");
 448.132 -            
 448.133 -            GridBagConstraints constraints = new GridBagConstraints();
 448.134 -            constraints.anchor = GridBagConstraints.WEST;
 448.135 -            constraints.fill = GridBagConstraints.NONE;
 448.136 -            constraints.gridheight = 1;
 448.137 -            constraints.gridwidth = 1;
 448.138 -            constraints.gridx = 0;
 448.139 -            constraints.gridy = row;
 448.140 -            constraints.weightx = 0;
 448.141 -            constraints.weighty = 0;
 448.142 -            constraints.insets = new Insets(0, 0, 0, 8);
 448.143 -            
 448.144 -            add(l, constraints);
 448.145 -            
 448.146 -            JComponent field;
 448.147 -            int val = prefs.getInt(option.preferencesKey, ((Integer)option.defaultValue).intValue());
 448.148 -            if (iopt.step() > 0) {
 448.149 -                val = Math.min(iopt.maxValue(), Math.max(iopt.minValue(), val));
 448.150 -                JSpinner spinner = new JSpinner(
 448.151 -                        new SpinnerNumberModel(val, iopt.minValue(), iopt.maxValue(), iopt.step()));
 448.152 -                spinner.addChangeListener(new ActionListenerImpl(option.preferencesKey, prefs));
 448.153 -                field = spinner;
 448.154 -            } else {
 448.155 -                NumberFormatter nf = new NumberFormatter();
 448.156 -                nf.setValueClass(Integer.class);
 448.157 -                nf.setMaximum(iopt.maxValue());
 448.158 -                nf.setMinimum(iopt.minValue());
 448.159 -                JFormattedTextField formatted = new JFormattedTextField(nf);
 448.160 -                field = formatted;
 448.161 -            }
 448.162 -            if (option.tooltip != null && !option.tooltip.isEmpty()) {
 448.163 -                field.setToolTipText(option.tooltip);
 448.164 -            }
 448.165 -            constraints = new GridBagConstraints();
 448.166 -            constraints.anchor = GridBagConstraints.WEST;
 448.167 -            constraints.fill = GridBagConstraints.HORIZONTAL;
 448.168 -            constraints.gridheight = 1;
 448.169 -            constraints.gridwidth = 1;
 448.170 -            constraints.gridx = 1;
 448.171 -            constraints.gridy = row;
 448.172 -            constraints.weightx = 0;
 448.173 -            constraints.weighty = 0;
 448.174 -            
 448.175 -            add(field, constraints);
 448.176 -
 448.177 -            constraints = new GridBagConstraints();
 448.178 -            constraints.anchor = GridBagConstraints.WEST;
 448.179 -            constraints.fill = GridBagConstraints.HORIZONTAL;
 448.180 -            constraints.gridheight = 1;
 448.181 -            constraints.gridwidth = GridBagConstraints.REMAINDER;
 448.182 -            constraints.gridx = 2;
 448.183 -            constraints.gridy = row++;
 448.184 -            constraints.weightx = 1;
 448.185 -            constraints.weighty = 0;
 448.186 -            
 448.187 -            add(new JPanel(), constraints);
 448.188 -        }
 448.189 -        
 448.190 -        private JComponent createBooleanOption(OptionDescriptor option, Preferences prefs)  {
 448.191 -            JCheckBox checkBox = new JCheckBox();
 448.192 -
 448.193 -            org.openide.awt.Mnemonics.setLocalizedText(checkBox, option.displayName);
 448.194 -            checkBox.setToolTipText(option.tooltip);
 448.195 -            checkBox.addActionListener(new ActionListenerImpl(option.preferencesKey, prefs));
 448.196 -
 448.197 -            checkBox.setSelected(prefs.getBoolean(option.preferencesKey, 
 448.198 -                    Boolean.TRUE == option.defaultValue));
 448.199 -            GridBagConstraints constraints = new GridBagConstraints();
 448.200 -
 448.201 -            constraints.anchor = GridBagConstraints.WEST;
 448.202 -            constraints.fill = GridBagConstraints.NONE;
 448.203 -            constraints.gridheight = 1;
 448.204 -            constraints.gridwidth = 2;
 448.205 -            constraints.gridx = 0;
 448.206 -            constraints.gridy = row++;
 448.207 -            constraints.weightx = 0;
 448.208 -            constraints.weighty = 0;
 448.209 -
 448.210 -            add(checkBox, constraints);
 448.211 -            return checkBox;
 448.212 -        }
 448.213 -                
 448.214 -        
 448.215 -        private static final class ActionListenerImpl implements ActionListener, ChangeListener {
 448.216 -            private final String key;
 448.217 -            private final Preferences prefs;
 448.218 -
 448.219 -            public ActionListenerImpl(String key, Preferences prefs) {
 448.220 -                this.key = key;
 448.221 -                this.prefs = prefs;
 448.222 -            }
 448.223 -
 448.224 -            @Override
 448.225 -            public void actionPerformed(ActionEvent e) {
 448.226 -                JCheckBox checkBox = ((JCheckBox)e.getSource());
 448.227 -                prefs.putBoolean(key, checkBox.isSelected());
 448.228 -            }
 448.229 -
 448.230 -            @Override
 448.231 -            public void stateChanged(ChangeEvent e) {
 448.232 -                Integer i = (Integer)((JSpinner)e.getSource()).getValue();
 448.233 -                prefs.putInt(key, i);
 448.234 -            }
 448.235 -
 448.236 -        }
 448.237 -        
 448.238 -    }
 448.239 -
 448.240 -    public static final class OptionDescriptor {
 448.241 -        public final String preferencesKey;
 448.242 -        public final Object defaultValue;
 448.243 -        public final String displayName;
 448.244 -        public final String tooltip;
 448.245 -        /**
 448.246 -         * The original Annotation object, type-specific parameters.
 448.247 -         */
 448.248 -        public final Object parameters;
 448.249 -
 448.250 -        public OptionDescriptor(
 448.251 -                String preferencesKey, 
 448.252 -                Object defaultValue, 
 448.253 -                String displayName, String tooltip, 
 448.254 -                Object parameters) {
 448.255 -            this.preferencesKey = preferencesKey;
 448.256 -            this.defaultValue = defaultValue;
 448.257 -            this.displayName = displayName;
 448.258 -            this.tooltip = tooltip;
 448.259 -            this.parameters = parameters;
 448.260 -        }
 448.261 -
 448.262 -    }
 448.263 -
 448.264 -}
   449.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/spi/ClassPathBasedHintProvider.java	Mon Dec 19 11:37:36 2016 +0100
   449.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   449.3 @@ -1,57 +0,0 @@
   449.4 -/*
   449.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   449.6 - *
   449.7 - * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
   449.8 - *
   449.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  449.10 - * Other names may be trademarks of their respective owners.
  449.11 - *
  449.12 - * The contents of this file are subject to the terms of either the GNU
  449.13 - * General Public License Version 2 only ("GPL") or the Common
  449.14 - * Development and Distribution License("CDDL") (collectively, the
  449.15 - * "License"). You may not use this file except in compliance with the
  449.16 - * License. You can obtain a copy of the License at
  449.17 - * http://www.netbeans.org/cddl-gplv2.html
  449.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  449.19 - * specific language governing permissions and limitations under the
  449.20 - * License.  When distributing the software, include this License Header
  449.21 - * Notice in each file and include the License file at
  449.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  449.23 - * particular file as subject to the "Classpath" exception as provided
  449.24 - * by Oracle in the GPL Version 2 section of the License file that
  449.25 - * accompanied this code. If applicable, add the following below the
  449.26 - * License Header, with the fields enclosed by brackets [] replaced by
  449.27 - * your own identifying information:
  449.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  449.29 - *
  449.30 - * If you wish your version of this file to be governed by only the CDDL
  449.31 - * or only the GPL Version 2, indicate your decision by adding
  449.32 - * "[Contributor] elects to include this software in this distribution
  449.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  449.34 - * single choice of license, a recipient has the option to distribute
  449.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  449.36 - * to extend the choice of license to its licensees as provided above.
  449.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  449.38 - * Version 2 license, then the option applies only if the new code is
  449.39 - * made subject to such option by the copyright holder.
  449.40 - *
  449.41 - * Contributor(s):
  449.42 - *
  449.43 - * Portions Copyrighted 2009 Sun Microsystems, Inc.
  449.44 - */
  449.45 -
  449.46 -package org.netbeans.modules.java.hints.providers.spi;
  449.47 -
  449.48 -import java.util.Collection;
  449.49 -import org.netbeans.api.java.classpath.ClassPath;
  449.50 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
  449.51 -
  449.52 -/**
  449.53 - * XXX: this is another ugly hack!
  449.54 - * @author lahvac
  449.55 - */
  449.56 -public interface ClassPathBasedHintProvider {
  449.57 -
  449.58 -    public Collection<? extends HintDescription> computeHints(ClassPath cp);
  449.59 -
  449.60 -}
   450.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/spi/ElementBasedHintProvider.java	Mon Dec 19 11:37:36 2016 +0100
   450.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   450.3 @@ -1,57 +0,0 @@
   450.4 -/*
   450.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   450.6 - *
   450.7 - * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
   450.8 - *
   450.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  450.10 - * Other names may be trademarks of their respective owners.
  450.11 - *
  450.12 - * The contents of this file are subject to the terms of either the GNU
  450.13 - * General Public License Version 2 only ("GPL") or the Common
  450.14 - * Development and Distribution License("CDDL") (collectively, the
  450.15 - * "License"). You may not use this file except in compliance with the
  450.16 - * License. You can obtain a copy of the License at
  450.17 - * http://www.netbeans.org/cddl-gplv2.html
  450.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  450.19 - * specific language governing permissions and limitations under the
  450.20 - * License.  When distributing the software, include this License Header
  450.21 - * Notice in each file and include the License file at
  450.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  450.23 - * particular file as subject to the "Classpath" exception as provided
  450.24 - * by Oracle in the GPL Version 2 section of the License file that
  450.25 - * accompanied this code. If applicable, add the following below the
  450.26 - * License Header, with the fields enclosed by brackets [] replaced by
  450.27 - * your own identifying information:
  450.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  450.29 - *
  450.30 - * If you wish your version of this file to be governed by only the CDDL
  450.31 - * or only the GPL Version 2, indicate your decision by adding
  450.32 - * "[Contributor] elects to include this software in this distribution
  450.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  450.34 - * single choice of license, a recipient has the option to distribute
  450.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  450.36 - * to extend the choice of license to its licensees as provided above.
  450.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  450.38 - * Version 2 license, then the option applies only if the new code is
  450.39 - * made subject to such option by the copyright holder.
  450.40 - *
  450.41 - * Contributor(s):
  450.42 - *
  450.43 - * Portions Copyrighted 2009 Sun Microsystems, Inc.
  450.44 - */
  450.45 -
  450.46 -package org.netbeans.modules.java.hints.providers.spi;
  450.47 -
  450.48 -import java.util.Collection;
  450.49 -import org.netbeans.api.java.source.CompilationInfo;
  450.50 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
  450.51 -
  450.52 -/**
  450.53 - * XXX: this is an ugly hack!
  450.54 - * @author lahvac
  450.55 - */
  450.56 -public interface ElementBasedHintProvider {
  450.57 -
  450.58 -    public Collection<? extends HintDescription> computeHints(CompilationInfo info);
  450.59 -
  450.60 -}
   451.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/spi/HintDescription.java	Mon Dec 19 11:37:36 2016 +0100
   451.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   451.3 @@ -1,127 +0,0 @@
   451.4 -/*
   451.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   451.6 - *
   451.7 - * Copyright 2009-2010 Oracle and/or its affiliates. All rights reserved.
   451.8 - *
   451.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  451.10 - * Other names may be trademarks of their respective owners.
  451.11 - *
  451.12 - * The contents of this file are subject to the terms of either the GNU
  451.13 - * General Public License Version 2 only ("GPL") or the Common
  451.14 - * Development and Distribution License("CDDL") (collectively, the
  451.15 - * "License"). You may not use this file except in compliance with the
  451.16 - * License. You can obtain a copy of the License at
  451.17 - * http://www.netbeans.org/cddl-gplv2.html
  451.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  451.19 - * specific language governing permissions and limitations under the
  451.20 - * License.  When distributing the software, include this License Header
  451.21 - * Notice in each file and include the License file at
  451.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  451.23 - * particular file as subject to the "Classpath" exception as provided
  451.24 - * by Oracle in the GPL Version 2 section of the License file that
  451.25 - * accompanied this code. If applicable, add the following below the
  451.26 - * License Header, with the fields enclosed by brackets [] replaced by
  451.27 - * your own identifying information:
  451.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  451.29 - *
  451.30 - * If you wish your version of this file to be governed by only the CDDL
  451.31 - * or only the GPL Version 2, indicate your decision by adding
  451.32 - * "[Contributor] elects to include this software in this distribution
  451.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  451.34 - * single choice of license, a recipient has the option to distribute
  451.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  451.36 - * to extend the choice of license to its licensees as provided above.
  451.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  451.38 - * Version 2 license, then the option applies only if the new code is
  451.39 - * made subject to such option by the copyright holder.
  451.40 - *
  451.41 - * Contributor(s):
  451.42 - *
  451.43 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  451.44 - */
  451.45 -
  451.46 -package org.netbeans.modules.java.hints.providers.spi;
  451.47 -
  451.48 -import java.util.Collection;
  451.49 -import java.util.Collections;
  451.50 -import java.util.HashSet;
  451.51 -import java.util.Set;
  451.52 -import org.netbeans.modules.java.hints.providers.spi.HintMetadata.Options;
  451.53 -import org.netbeans.spi.editor.hints.ErrorDescription;
  451.54 -import org.netbeans.spi.java.hints.HintContext;
  451.55 -
  451.56 -/**
  451.57 - *
  451.58 - * @author Jan Lahoda
  451.59 - */
  451.60 -public final class HintDescription {
  451.61 -
  451.62 -    private final HintMetadata metadata;
  451.63 -    private final Trigger trigger;
  451.64 -    private final Worker worker;
  451.65 -    private final AdditionalQueryConstraints additionalConstraints;
  451.66 -    private final String hintText;
  451.67 -    private final Set<Options> options;
  451.68 -
  451.69 -    private HintDescription(HintMetadata metadata, Trigger trigger, Worker worker, AdditionalQueryConstraints additionalConstraints, String hintText, Set<Options> options) {
  451.70 -        this.metadata = metadata;
  451.71 -        this.trigger = trigger;
  451.72 -        this.worker = worker;
  451.73 -        this.additionalConstraints = additionalConstraints;
  451.74 -        this.hintText = hintText;
  451.75 -        this.options = options;
  451.76 -    }
  451.77 -
  451.78 -    static HintDescription create(HintMetadata metadata, Trigger trigger, Worker worker, AdditionalQueryConstraints additionalConstraints, String hintText, Set<Options> options) {
  451.79 -        return new HintDescription(metadata, trigger, worker, additionalConstraints, hintText, options);
  451.80 -    }
  451.81 -
  451.82 -    @Override
  451.83 -    public String toString() {
  451.84 -        return "[HintDescription:" + trigger + "]";
  451.85 -    }
  451.86 -
  451.87 -    public AdditionalQueryConstraints getAdditionalConstraints() {
  451.88 -        return additionalConstraints;
  451.89 -    }
  451.90 -
  451.91 -    public String getHintText() {
  451.92 -        return hintText;
  451.93 -    }
  451.94 -
  451.95 -    public HintMetadata getMetadata() {
  451.96 -        return metadata;
  451.97 -    }
  451.98 -
  451.99 -    public Trigger getTrigger() {
 451.100 -        return trigger;
 451.101 -    }
 451.102 -
 451.103 -    public Worker getWorker() {
 451.104 -        return worker;
 451.105 -    }
 451.106 -
 451.107 -    public Set<Options> getOptions() {
 451.108 -        return options;
 451.109 -    }
 451.110 -
 451.111 -    public static interface Worker {
 451.112 -
 451.113 -        public Collection<? extends ErrorDescription> createErrors(HintContext ctx);
 451.114 -
 451.115 -    }
 451.116 -
 451.117 -    public static final class AdditionalQueryConstraints {
 451.118 -        public final Set<String> requiredErasedTypes;
 451.119 -
 451.120 -        public AdditionalQueryConstraints(Set<String> requiredErasedTypes) {
 451.121 -            this.requiredErasedTypes = Collections.unmodifiableSet(new HashSet<String>(requiredErasedTypes));
 451.122 -        }
 451.123 -
 451.124 -        private static final AdditionalQueryConstraints EMPTY = new AdditionalQueryConstraints(Collections.<String>emptySet());
 451.125 -        public static AdditionalQueryConstraints empty() {
 451.126 -            return EMPTY;
 451.127 -        }
 451.128 -    }
 451.129 -
 451.130 -}
   452.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/spi/HintDescriptionFactory.java	Mon Dec 19 11:37:36 2016 +0100
   452.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   452.3 @@ -1,127 +0,0 @@
   452.4 -/*
   452.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   452.6 - *
   452.7 - * Copyright 2009-2010 Oracle and/or its affiliates. All rights reserved.
   452.8 - *
   452.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  452.10 - * Other names may be trademarks of their respective owners.
  452.11 - *
  452.12 - * The contents of this file are subject to the terms of either the GNU
  452.13 - * General Public License Version 2 only ("GPL") or the Common
  452.14 - * Development and Distribution License("CDDL") (collectively, the
  452.15 - * "License"). You may not use this file except in compliance with the
  452.16 - * License. You can obtain a copy of the License at
  452.17 - * http://www.netbeans.org/cddl-gplv2.html
  452.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  452.19 - * specific language governing permissions and limitations under the
  452.20 - * License.  When distributing the software, include this License Header
  452.21 - * Notice in each file and include the License file at
  452.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  452.23 - * particular file as subject to the "Classpath" exception as provided
  452.24 - * by Oracle in the GPL Version 2 section of the License file that
  452.25 - * accompanied this code. If applicable, add the following below the
  452.26 - * License Header, with the fields enclosed by brackets [] replaced by
  452.27 - * your own identifying information:
  452.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  452.29 - *
  452.30 - * If you wish your version of this file to be governed by only the CDDL
  452.31 - * or only the GPL Version 2, indicate your decision by adding
  452.32 - * "[Contributor] elects to include this software in this distribution
  452.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  452.34 - * single choice of license, a recipient has the option to distribute
  452.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  452.36 - * to extend the choice of license to its licensees as provided above.
  452.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  452.38 - * Version 2 license, then the option applies only if the new code is
  452.39 - * made subject to such option by the copyright holder.
  452.40 - *
  452.41 - * Contributor(s):
  452.42 - *
  452.43 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  452.44 - */
  452.45 -
  452.46 -package org.netbeans.modules.java.hints.providers.spi;
  452.47 -
  452.48 -import java.util.Arrays;
  452.49 -import java.util.Collections;
  452.50 -import java.util.EnumSet;
  452.51 -import java.util.Set;
  452.52 -import org.netbeans.api.annotations.common.NonNull;
  452.53 -import org.netbeans.modules.java.hints.providers.spi.HintDescription.AdditionalQueryConstraints;
  452.54 -import org.netbeans.modules.java.hints.providers.spi.HintDescription.Worker;
  452.55 -import org.netbeans.modules.java.hints.providers.spi.HintMetadata.Options;
  452.56 -
  452.57 -/**
  452.58 - *
  452.59 - * @author lahvac
  452.60 - */
  452.61 -public class HintDescriptionFactory {
  452.62 -
  452.63 -    private       HintMetadata metadata;
  452.64 -    private       Trigger trigger;
  452.65 -    private       Worker worker;
  452.66 -    private       AdditionalQueryConstraints additionalConstraints;
  452.67 -    private       String hintText;
  452.68 -    private       Set<Options> options;
  452.69 -    private       boolean finished;
  452.70 -
  452.71 -    private HintDescriptionFactory() {
  452.72 -    }
  452.73 -
  452.74 -    public static HintDescriptionFactory create() {
  452.75 -        return new HintDescriptionFactory();
  452.76 -    }
  452.77 -
  452.78 -    /**TODO: move to create?
  452.79 -     *
  452.80 -     * @param metadata
  452.81 -     * @return
  452.82 -     */
  452.83 -    public HintDescriptionFactory setMetadata(HintMetadata metadata) {
  452.84 -        this.metadata = metadata;
  452.85 -        return this;
  452.86 -    }
  452.87 -
  452.88 -    public HintDescriptionFactory setTrigger(Trigger trigger) {
  452.89 -        if (this.trigger != null) {
  452.90 -            throw new IllegalStateException(this.trigger.toString());
  452.91 -        }
  452.92 -
  452.93 -        this.trigger = trigger;
  452.94 -        return this;
  452.95 -    }
  452.96 -
  452.97 -    public HintDescriptionFactory setWorker(Worker worker) {
  452.98 -        this.worker = worker;
  452.99 -        return this;
 452.100 -    }
 452.101 -
 452.102 -    public HintDescriptionFactory setAdditionalConstraints(AdditionalQueryConstraints additionalConstraints) {
 452.103 -        this.additionalConstraints = additionalConstraints;
 452.104 -        return this;
 452.105 -    }
 452.106 -
 452.107 -    public HintDescriptionFactory setHintText(@NonNull String hintText) {
 452.108 -        this.hintText = hintText;
 452.109 -        return this;
 452.110 -    }
 452.111 -
 452.112 -    public HintDescriptionFactory addOptions(Options... options) {
 452.113 -        if (this.options == null) {
 452.114 -            this.options = EnumSet.noneOf(Options.class);
 452.115 -        }
 452.116 -        this.options.addAll(Arrays.asList(options));
 452.117 -        return this;
 452.118 -    }
 452.119 -        
 452.120 -    public HintDescription produce() {
 452.121 -        if (metadata == null) {
 452.122 -            metadata = HintMetadata.Builder.create("no-id").addOptions(Options.NON_GUI).build();
 452.123 -        }
 452.124 -        if (this.additionalConstraints == null) {
 452.125 -            this.additionalConstraints = AdditionalQueryConstraints.empty();
 452.126 -        }
 452.127 -        return HintDescription.create(metadata, trigger, worker, additionalConstraints, hintText, options != null ? options : Collections.<Options>emptySet());
 452.128 -    }
 452.129 -    
 452.130 -}
   453.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/spi/HintMetadata.java	Mon Dec 19 11:37:36 2016 +0100
   453.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   453.3 @@ -1,224 +0,0 @@
   453.4 -/*
   453.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   453.6 - *
   453.7 - * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
   453.8 - *
   453.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  453.10 - * Other names may be trademarks of their respective owners.
  453.11 - *
  453.12 - * The contents of this file are subject to the terms of either the GNU
  453.13 - * General Public License Version 2 only ("GPL") or the Common
  453.14 - * Development and Distribution License("CDDL") (collectively, the
  453.15 - * "License"). You may not use this file except in compliance with the
  453.16 - * License. You can obtain a copy of the License at
  453.17 - * http://www.netbeans.org/cddl-gplv2.html
  453.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  453.19 - * specific language governing permissions and limitations under the
  453.20 - * License.  When distributing the software, include this License Header
  453.21 - * Notice in each file and include the License file at
  453.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  453.23 - * particular file as subject to the "Classpath" exception as provided
  453.24 - * by Oracle in the GPL Version 2 section of the License file that
  453.25 - * accompanied this code. If applicable, add the following below the
  453.26 - * License Header, with the fields enclosed by brackets [] replaced by
  453.27 - * your own identifying information:
  453.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  453.29 - *
  453.30 - * If you wish your version of this file to be governed by only the CDDL
  453.31 - * or only the GPL Version 2, indicate your decision by adding
  453.32 - * "[Contributor] elects to include this software in this distribution
  453.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  453.34 - * single choice of license, a recipient has the option to distribute
  453.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  453.36 - * to extend the choice of license to its licensees as provided above.
  453.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  453.38 - * Version 2 license, then the option applies only if the new code is
  453.39 - * made subject to such option by the copyright holder.
  453.40 - *
  453.41 - * Contributor(s):
  453.42 - *
  453.43 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  453.44 - */
  453.45 -
  453.46 -package org.netbeans.modules.java.hints.providers.spi;
  453.47 -
  453.48 -import java.util.ArrayList;
  453.49 -import java.util.Arrays;
  453.50 -import java.util.Collection;
  453.51 -import java.util.EnumSet;
  453.52 -import java.util.HashSet;
  453.53 -import java.util.MissingResourceException;
  453.54 -import java.util.ResourceBundle;
  453.55 -import java.util.Set;
  453.56 -import java.util.logging.Level;
  453.57 -import java.util.logging.Logger;
  453.58 -import org.netbeans.spi.editor.hints.Severity;
  453.59 -import org.netbeans.spi.java.hints.CustomizerProvider;
  453.60 -import org.netbeans.spi.java.hints.Hint;
  453.61 -import org.openide.util.NbBundle;
  453.62 -
  453.63 -/**
  453.64 - *
  453.65 - * @author lahvac
  453.66 - */
  453.67 -public class HintMetadata {
  453.68 -
  453.69 -    public final String id;
  453.70 -    public final String displayName;
  453.71 -    public final String description;
  453.72 -    public final String category;
  453.73 -    public final boolean enabled;
  453.74 -    public final Hint.Kind kind;
  453.75 -    public final Severity severity;
  453.76 -    public final Collection<? extends String> suppressWarnings;
  453.77 -    public final CustomizerProvider customizer;
  453.78 -    public final boolean showInTaskList = false;
  453.79 -    public final Set<Options> options;
  453.80 -
  453.81 -    HintMetadata(String id, String displayName, String description, String category, boolean enabled, Hint.Kind kind, Severity severity, Collection<? extends String> suppressWarnings, CustomizerProvider customizer, Set<Options> options) {
  453.82 -        this.id = id;
  453.83 -        this.displayName = displayName;
  453.84 -        this.description = description;
  453.85 -        this.category = category;
  453.86 -        this.enabled = enabled;
  453.87 -        this.kind = kind;
  453.88 -        this.severity = severity;
  453.89 -        this.suppressWarnings = suppressWarnings;
  453.90 -        this.customizer = customizer;
  453.91 -        this.options = options;
  453.92 -    }
  453.93 -
  453.94 -    @Override
  453.95 -    public String toString() {
  453.96 -        return this.displayName;
  453.97 -    }
  453.98 -
  453.99 -    private static String lookup(ResourceBundle bundle, String key, String def) {
 453.100 -        try {
 453.101 -            return bundle != null ? bundle.getString(key) : def;
 453.102 -        } catch (MissingResourceException mre) {
 453.103 -            Logger.getLogger(HintMetadata.class.getName()).log(Level.FINE, null, mre);
 453.104 -            return def;
 453.105 -        }
 453.106 -    }
 453.107 -
 453.108 -    public static final class Builder {
 453.109 -        private final String id;
 453.110 -        private String displayName;
 453.111 -        private String description;
 453.112 -        private String category;
 453.113 -        private boolean enabled;
 453.114 -        private Hint.Kind kind;
 453.115 -        private Severity severity;
 453.116 -        private final Collection<String> suppressWarnings = new ArrayList<String>();
 453.117 -        private CustomizerProvider customizer;
 453.118 -        private final Set<Options> options = EnumSet.noneOf(Options.class);
 453.119 -
 453.120 -        private Builder(String id) {
 453.121 -            this.id = id;
 453.122 -            this.displayName = "";
 453.123 -            this.description = "";
 453.124 -            this.category = "";
 453.125 -            this.enabled = true;
 453.126 -            this.kind = Hint.Kind.INSPECTION;
 453.127 -            this.severity = Severity.VERIFIER;
 453.128 -        }
 453.129 -
 453.130 -        public static Builder create(String id) {
 453.131 -            return new Builder(id);
 453.132 -        }
 453.133 -
 453.134 -        public Builder setDescription(String displayName, String description) {
 453.135 -            this.displayName = displayName;
 453.136 -            this.description = description;
 453.137 -            return this;
 453.138 -        }
 453.139 -
 453.140 -        public Builder setBundle(ResourceBundle bundle) {
 453.141 -            return setBundle(bundle, null, null);
 453.142 -        }
 453.143 -
 453.144 -        public Builder setBundle(ResourceBundle bundle, String fallbackDisplayName, String fallbackDescription) {
 453.145 -            if (fallbackDisplayName == null) fallbackDisplayName = "No Display Name";
 453.146 -            if (fallbackDescription == null) fallbackDescription = "No Description";
 453.147 -            
 453.148 -            this.displayName = lookup(bundle, "DN_" + id.replace('$', '.'), fallbackDisplayName);
 453.149 -            this.description = lookup(bundle, "DESC_" + id.replace('$', '.'), fallbackDescription);
 453.150 -            return this;
 453.151 -        }
 453.152 -
 453.153 -        public Builder setBundle(String bundleForFQN) {
 453.154 -            ResourceBundle bundle;
 453.155 -
 453.156 -            try {
 453.157 -                int lastDot = bundleForFQN.lastIndexOf('.');
 453.158 -
 453.159 -                assert lastDot >= 0;
 453.160 -
 453.161 -                bundle = NbBundle.getBundle(bundleForFQN.substring(0, lastDot + 1) + "Bundle");
 453.162 -            } catch (MissingResourceException mre) {
 453.163 -                Logger.getLogger(HintMetadata.class.getName()).log(Level.FINE, null, mre);
 453.164 -                bundle = null;
 453.165 -            }
 453.166 -            return setBundle(bundle);
 453.167 -        }
 453.168 -
 453.169 -        public Builder setCategory(String category) {
 453.170 -            this.category = category;
 453.171 -            return this;
 453.172 -        }
 453.173 -
 453.174 -        public Builder setEnabled(boolean enabled) {
 453.175 -            this.enabled = enabled;
 453.176 -            return this;
 453.177 -        }
 453.178 -
 453.179 -        public Builder setKind(Hint.Kind kind) {
 453.180 -            this.kind = kind;
 453.181 -            return this;
 453.182 -        }
 453.183 -
 453.184 -        public Builder setSeverity(Severity severity) {
 453.185 -            this.severity = severity;
 453.186 -            return this;
 453.187 -        }
 453.188 -
 453.189 -
 453.190 -        public Builder addSuppressWarnings(String... keys) {
 453.191 -            this.suppressWarnings.addAll(Arrays.asList(keys));
 453.192 -            return this;
 453.193 -        }
 453.194 -
 453.195 -        public Builder setCustomizerProvider(CustomizerProvider customizer) {
 453.196 -            this.customizer = customizer;
 453.197 -            return this;
 453.198 -        }
 453.199 -
 453.200 -        public Builder addOptions(Options... options) {
 453.201 -            this.options.addAll(Arrays.asList(options));
 453.202 -            return this;
 453.203 -        }
 453.204 -
 453.205 -        public HintMetadata build() {
 453.206 -            return new HintMetadata(id, displayName, description, category, enabled, kind, severity, suppressWarnings, customizer, options);
 453.207 -        }
 453.208 -
 453.209 -    }
 453.210 -
 453.211 -    public enum Options {
 453.212 -        NON_GUI,
 453.213 -        QUERY,
 453.214 -        NO_BATCH,
 453.215 -        HEAVY;
 453.216 -
 453.217 -        public static Set<Options> fromHintOptions(Hint.Options... options) {
 453.218 -            Set<Options> result = new HashSet<Options>();
 453.219 -
 453.220 -            for (Hint.Options opt : options) {
 453.221 -                result.add(valueOf(opt.name()));
 453.222 -            }
 453.223 -
 453.224 -            return result;
 453.225 -        }
 453.226 -    }
 453.227 -}
   454.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/spi/HintProvider.java	Mon Dec 19 11:37:36 2016 +0100
   454.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   454.3 @@ -1,54 +0,0 @@
   454.4 -/*
   454.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   454.6 - *
   454.7 - * Copyright 2009-2010 Oracle and/or its affiliates. All rights reserved.
   454.8 - *
   454.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  454.10 - * Other names may be trademarks of their respective owners.
  454.11 - *
  454.12 - * The contents of this file are subject to the terms of either the GNU
  454.13 - * General Public License Version 2 only ("GPL") or the Common
  454.14 - * Development and Distribution License("CDDL") (collectively, the
  454.15 - * "License"). You may not use this file except in compliance with the
  454.16 - * License. You can obtain a copy of the License at
  454.17 - * http://www.netbeans.org/cddl-gplv2.html
  454.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  454.19 - * specific language governing permissions and limitations under the
  454.20 - * License.  When distributing the software, include this License Header
  454.21 - * Notice in each file and include the License file at
  454.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  454.23 - * particular file as subject to the "Classpath" exception as provided
  454.24 - * by Oracle in the GPL Version 2 section of the License file that
  454.25 - * accompanied this code. If applicable, add the following below the
  454.26 - * License Header, with the fields enclosed by brackets [] replaced by
  454.27 - * your own identifying information:
  454.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  454.29 - *
  454.30 - * If you wish your version of this file to be governed by only the CDDL
  454.31 - * or only the GPL Version 2, indicate your decision by adding
  454.32 - * "[Contributor] elects to include this software in this distribution
  454.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  454.34 - * single choice of license, a recipient has the option to distribute
  454.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  454.36 - * to extend the choice of license to its licensees as provided above.
  454.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  454.38 - * Version 2 license, then the option applies only if the new code is
  454.39 - * made subject to such option by the copyright holder.
  454.40 - *
  454.41 - * Contributor(s):
  454.42 - *
  454.43 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  454.44 - */
  454.45 -
  454.46 -package org.netbeans.modules.java.hints.providers.spi;
  454.47 -
  454.48 -import java.util.Collection;
  454.49 -import java.util.Map;
  454.50 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
  454.51 -import org.netbeans.modules.java.hints.providers.spi.HintMetadata;
  454.52 -
  454.53 -public interface HintProvider {
  454.54 -
  454.55 -    public Map<HintMetadata, ? extends Collection<? extends HintDescription>> computeHints();
  454.56 -
  454.57 -}
   455.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/spi/PositionRefresherHelper.java	Mon Dec 19 11:37:36 2016 +0100
   455.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   455.3 @@ -1,105 +0,0 @@
   455.4 -/*
   455.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   455.6 - *
   455.7 - * Copyright 2012 Oracle and/or its affiliates. All rights reserved.
   455.8 - *
   455.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  455.10 - * Other names may be trademarks of their respective owners.
  455.11 - *
  455.12 - * The contents of this file are subject to the terms of either the GNU
  455.13 - * General Public License Version 2 only ("GPL") or the Common
  455.14 - * Development and Distribution License("CDDL") (collectively, the
  455.15 - * "License"). You may not use this file except in compliance with the
  455.16 - * License. You can obtain a copy of the License at
  455.17 - * http://www.netbeans.org/cddl-gplv2.html
  455.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  455.19 - * specific language governing permissions and limitations under the
  455.20 - * License.  When distributing the software, include this License Header
  455.21 - * Notice in each file and include the License file at
  455.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  455.23 - * particular file as subject to the "Classpath" exception as provided
  455.24 - * by Oracle in the GPL Version 2 section of the License file that
  455.25 - * accompanied this code. If applicable, add the following below the
  455.26 - * License Header, with the fields enclosed by brackets [] replaced by
  455.27 - * your own identifying information:
  455.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  455.29 - *
  455.30 - * If you wish your version of this file to be governed by only the CDDL
  455.31 - * or only the GPL Version 2, indicate your decision by adding
  455.32 - * "[Contributor] elects to include this software in this distribution
  455.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  455.34 - * single choice of license, a recipient has the option to distribute
  455.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  455.36 - * to extend the choice of license to its licensees as provided above.
  455.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  455.38 - * Version 2 license, then the option applies only if the new code is
  455.39 - * made subject to such option by the copyright holder.
  455.40 - *
  455.41 - * Contributor(s):
  455.42 - *
  455.43 - * Portions Copyrighted 2012 Sun Microsystems, Inc.
  455.44 - */
  455.45 -package org.netbeans.modules.java.hints.providers.spi;
  455.46 -
  455.47 -import java.util.List;
  455.48 -import javax.swing.text.Document;
  455.49 -import org.netbeans.api.annotations.common.CheckForNull;
  455.50 -import org.netbeans.api.java.source.CompilationInfo;
  455.51 -import org.netbeans.lib.editor.util.swing.DocumentUtilities;
  455.52 -import org.netbeans.spi.editor.hints.Context;
  455.53 -import org.netbeans.spi.editor.hints.ErrorDescription;
  455.54 -import org.netbeans.modules.java.hints.providers.spi.PositionRefresherHelper.DocumentVersion;
  455.55 -
  455.56 -/**TODO: should be public?
  455.57 - *
  455.58 - * @author lahvac
  455.59 - */
  455.60 -public abstract class PositionRefresherHelper<V extends DocumentVersion> {
  455.61 -
  455.62 -    private final Object documentKey = new Object();
  455.63 -    private final String key;
  455.64 -
  455.65 -    protected PositionRefresherHelper(String key) {
  455.66 -        this.key = key;
  455.67 -    }
  455.68 -
  455.69 -    protected abstract boolean isUpToDate(Context context, Document doc, V oldVersion);
  455.70 -    /**XXX: should be protected*/public abstract @CheckForNull List<ErrorDescription> getErrorDescriptionsAt(CompilationInfo info, Context context, Document doc) throws Exception;
  455.71 -
  455.72 -    protected final void setVersion(Document doc, V version) {
  455.73 -        if (doc != null) {
  455.74 -            doc.putProperty(documentKey, version);
  455.75 -        }
  455.76 -    }
  455.77 -
  455.78 -    protected @CheckForNull V getUpToDateDocumentVersion(Context context, Document doc) {
  455.79 -        V oldVersion = (V) doc.getProperty(documentKey);
  455.80 -
  455.81 -        if (oldVersion == null) return null;
  455.82 -
  455.83 -        if (((DocumentVersion) oldVersion).version != DocumentUtilities.getDocumentVersion(doc)) return null;
  455.84 -        
  455.85 -        return oldVersion;
  455.86 -    }
  455.87 -    
  455.88 -    /**XXX*/ public boolean upToDateCheck(Context context, Document doc) {
  455.89 -        V oldVersion = getUpToDateDocumentVersion(context, doc);
  455.90 -
  455.91 -        if (oldVersion == null) return false;
  455.92 -
  455.93 -        return isUpToDate(context, doc, oldVersion);
  455.94 -    }
  455.95 -
  455.96 -    /**XXX*/ public String getKey() {
  455.97 -        return key;
  455.98 -    }
  455.99 -
 455.100 -    public static class DocumentVersion {
 455.101 -        private final long version;
 455.102 -
 455.103 -        public DocumentVersion(Document doc) {
 455.104 -            this.version = doc != null ? DocumentUtilities.getDocumentVersion(doc) : 0;
 455.105 -        }
 455.106 -
 455.107 -    }
 455.108 -}
   456.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/providers/spi/Trigger.java	Mon Dec 19 11:37:36 2016 +0100
   456.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   456.3 @@ -1,171 +0,0 @@
   456.4 -/*
   456.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   456.6 - *
   456.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
   456.8 - *
   456.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  456.10 - * Other names may be trademarks of their respective owners.
  456.11 - *
  456.12 - * The contents of this file are subject to the terms of either the GNU
  456.13 - * General Public License Version 2 only ("GPL") or the Common
  456.14 - * Development and Distribution License("CDDL") (collectively, the
  456.15 - * "License"). You may not use this file except in compliance with the
  456.16 - * License. You can obtain a copy of the License at
  456.17 - * http://www.netbeans.org/cddl-gplv2.html
  456.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  456.19 - * specific language governing permissions and limitations under the
  456.20 - * License.  When distributing the software, include this License Header
  456.21 - * Notice in each file and include the License file at
  456.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  456.23 - * particular file as subject to the "Classpath" exception as provided
  456.24 - * by Oracle in the GPL Version 2 section of the License file that
  456.25 - * accompanied this code. If applicable, add the following below the
  456.26 - * License Header, with the fields enclosed by brackets [] replaced by
  456.27 - * your own identifying information:
  456.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  456.29 - *
  456.30 - * If you wish your version of this file to be governed by only the CDDL
  456.31 - * or only the GPL Version 2, indicate your decision by adding
  456.32 - * "[Contributor] elects to include this software in this distribution
  456.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  456.34 - * single choice of license, a recipient has the option to distribute
  456.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  456.36 - * to extend the choice of license to its licensees as provided above.
  456.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  456.38 - * Version 2 license, then the option applies only if the new code is
  456.39 - * made subject to such option by the copyright holder.
  456.40 - *
  456.41 - * Contributor(s):
  456.42 - *
  456.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
  456.44 - */
  456.45 -package org.netbeans.modules.java.hints.providers.spi;
  456.46 -
  456.47 -import com.sun.source.tree.Tree.Kind;
  456.48 -import java.util.Arrays;
  456.49 -import java.util.Map;
  456.50 -import java.util.Set;
  456.51 -import org.netbeans.api.java.source.matching.Pattern;
  456.52 -import org.netbeans.spi.java.hints.Decision;
  456.53 -import org.openide.util.Parameters;
  456.54 -
  456.55 -/**A base class for triggers.
  456.56 - *
  456.57 - * @author lahvac
  456.58 - */
  456.59 -public abstract class Trigger {
  456.60 -
  456.61 -    Trigger() {}
  456.62 -
  456.63 -    /**Invoke the given hint's worker on the specified {@link Tree.Kind}(s).
  456.64 -     *
  456.65 -     */
  456.66 -    public static final class Kinds extends Trigger {
  456.67 -        private final Set<Kind> kinds;
  456.68 -
  456.69 -        /**Create the trigger for the specified set of {@link Tree.Kind}s.
  456.70 -         *
  456.71 -         * @param kinds on which the hint's worker should be invoked.
  456.72 -         */
  456.73 -        public Kinds(Set<Kind> kinds) {
  456.74 -            this.kinds = kinds;
  456.75 -        }
  456.76 -
  456.77 -        public Iterable<? extends Kind> getKinds() {
  456.78 -            return kinds;
  456.79 -        }
  456.80 -
  456.81 -        @Override
  456.82 -        public String toString() {
  456.83 -            return kinds.toString();
  456.84 -        }
  456.85 -    }
  456.86 -
  456.87 -    /**Invoke the hint's worker on tree nodes that match the given pattern.
  456.88 -     *
  456.89 -     */
  456.90 -    public static final class PatternDescription extends Trigger {
  456.91 -
  456.92 -        private final String pattern;
  456.93 -        private final Map<String, String> constraints;
  456.94 -        private final Iterable<? extends String> imports;
  456.95 -
  456.96 -        private PatternDescription(String pattern, Map<String, String> constraints, String... imports) {
  456.97 -            this.pattern = pattern;
  456.98 -            this.constraints = constraints;
  456.99 -            this.imports = Arrays.asList(imports);
 456.100 -        }
 456.101 -
 456.102 -        /** Create the trigger to invoke the hint's worker on tree nodes that match the given pattern.
 456.103 -         *
 456.104 -         * @param pattern which will be interpreted as a pattern with free variables ({@link Pattern#createPatternWithFreeVariables(com.sun.source.util.TreePath, java.util.Map) }.
 456.105 -         * @param constraints are expected to be mapping from a free variable name to the expected type.
 456.106 -         * @param XXX: document the imports
 456.107 -         * @return the created trigger.
 456.108 -         */
 456.109 -        public static PatternDescription create(String pattern, Map<String, String> constraints, String... imports) {
 456.110 -            Parameters.notNull("pattern", pattern);
 456.111 -            Parameters.notNull("constraints", constraints);
 456.112 -            Parameters.notNull("imports", imports);
 456.113 -
 456.114 -            return new PatternDescription(pattern, constraints, imports);
 456.115 -        }
 456.116 -
 456.117 -        @Override
 456.118 -        public boolean equals(Object obj) {
 456.119 -            if (obj == null) {
 456.120 -                return false;
 456.121 -            }
 456.122 -            if (getClass() != obj.getClass()) {
 456.123 -                return false;
 456.124 -            }
 456.125 -            final PatternDescription other = (PatternDescription) obj;
 456.126 -            if ((this.pattern == null) ? (other.pattern != null) : !this.pattern.equals(other.pattern)) {
 456.127 -                return false;
 456.128 -            }
 456.129 -            if (this.constraints != other.constraints && (this.constraints == null || !this.constraints.equals(other.constraints))) {
 456.130 -                return false;
 456.131 -            }
 456.132 -            return true;
 456.133 -        }
 456.134 -
 456.135 -        @Override
 456.136 -        public int hashCode() {
 456.137 -            int hash = 7;
 456.138 -            hash = 71 * hash + (this.pattern != null ? this.pattern.hashCode() : 0);
 456.139 -            hash = 71 * hash + (this.constraints != null ? this.constraints.hashCode() : 0);
 456.140 -            return hash;
 456.141 -        }
 456.142 -
 456.143 -        public String getPattern() {
 456.144 -            return pattern;
 456.145 -        }
 456.146 -
 456.147 -        public Map<String, String> getConstraints() {
 456.148 -            return constraints;
 456.149 -        }
 456.150 -
 456.151 -        public Iterable<? extends String> getImports() {
 456.152 -            return imports;
 456.153 -        }
 456.154 -
 456.155 -        @Override
 456.156 -        public String toString() {
 456.157 -            return pattern;
 456.158 -        }
 456.159 -
 456.160 -    }
 456.161 -    
 456.162 -    public static final class DecisionTrigger extends Trigger {
 456.163 -        private final Class<? extends Decision> decisionClass;
 456.164 -
 456.165 -        public DecisionTrigger(Class<? extends Decision> decisionClass) {
 456.166 -            this.decisionClass = decisionClass;
 456.167 -        }
 456.168 -
 456.169 -        public Class<? extends Decision> getDecisionClass() {
 456.170 -            return decisionClass;
 456.171 -        }
 456.172 -    }
 456.173 -
 456.174 -}
   457.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   457.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   457.3 @@ -1,4 +0,0 @@
   457.4 -OpenIDE-Module-Name=Java Hints SPI
   457.5 -
   457.6 -#refresh hints
   457.7 -Refresh_hints=Refresh Hints
   458.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/Hacks.java	Mon Dec 19 11:37:36 2016 +0100
   458.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   458.3 @@ -1,219 +0,0 @@
   458.4 -/*
   458.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   458.6 - *
   458.7 - * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
   458.8 - *
   458.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  458.10 - * Other names may be trademarks of their respective owners.
  458.11 - *
  458.12 - * The contents of this file are subject to the terms of either the GNU
  458.13 - * General Public License Version 2 only ("GPL") or the Common
  458.14 - * Development and Distribution License("CDDL") (collectively, the
  458.15 - * "License"). You may not use this file except in compliance with the
  458.16 - * License. You can obtain a copy of the License at
  458.17 - * http://www.netbeans.org/cddl-gplv2.html
  458.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  458.19 - * specific language governing permissions and limitations under the
  458.20 - * License.  When distributing the software, include this License Header
  458.21 - * Notice in each file and include the License file at
  458.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  458.23 - * particular file as subject to the "Classpath" exception as provided
  458.24 - * by Oracle in the GPL Version 2 section of the License file that
  458.25 - * accompanied this code. If applicable, add the following below the
  458.26 - * License Header, with the fields enclosed by brackets [] replaced by
  458.27 - * your own identifying information:
  458.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  458.29 - *
  458.30 - * If you wish your version of this file to be governed by only the CDDL
  458.31 - * or only the GPL Version 2, indicate your decision by adding
  458.32 - * "[Contributor] elects to include this software in this distribution
  458.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  458.34 - * single choice of license, a recipient has the option to distribute
  458.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  458.36 - * to extend the choice of license to its licensees as provided above.
  458.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  458.38 - * Version 2 license, then the option applies only if the new code is
  458.39 - * made subject to such option by the copyright holder.
  458.40 - *
  458.41 - * Contributor(s):
  458.42 - *
  458.43 - * Portions Copyrighted 2009 Sun Microsystems, Inc.
  458.44 - */
  458.45 -
  458.46 -package org.netbeans.modules.java.hints.spiimpl;
  458.47 -
  458.48 -import com.sun.source.tree.BlockTree;
  458.49 -import com.sun.source.tree.CompilationUnitTree;
  458.50 -import com.sun.source.tree.MethodTree;
  458.51 -import com.sun.source.tree.Scope;
  458.52 -import com.sun.source.tree.Tree;
  458.53 -import com.sun.source.util.TreePath;
  458.54 -import com.sun.source.util.TreePathScanner;
  458.55 -import com.sun.tools.javac.api.JavacTaskImpl;
  458.56 -import com.sun.tools.javac.code.Symbol.ClassSymbol;
  458.57 -import com.sun.tools.javac.comp.AttrContext;
  458.58 -import com.sun.tools.javac.comp.Enter;
  458.59 -import com.sun.tools.javac.comp.Env;
  458.60 -import com.sun.tools.javac.main.JavaCompiler;
  458.61 -import com.sun.tools.javac.tree.JCTree;
  458.62 -import com.sun.tools.javac.tree.JCTree.JCErroneous;
  458.63 -import com.sun.tools.javac.util.Context;
  458.64 -import com.sun.tools.javac.util.Log;
  458.65 -import java.io.File;
  458.66 -import java.io.IOException;
  458.67 -import javax.lang.model.element.Element;
  458.68 -import javax.lang.model.element.TypeElement;
  458.69 -import javax.lang.model.element.VariableElement;
  458.70 -import javax.lang.model.type.TypeMirror;
  458.71 -import javax.tools.JavaFileObject;
  458.72 -import org.netbeans.api.annotations.common.CheckForNull;
  458.73 -import org.netbeans.api.annotations.common.NonNull;
  458.74 -import org.netbeans.api.java.source.CompilationInfo;
  458.75 -import org.netbeans.api.java.source.TreeUtilities;
  458.76 -import org.netbeans.modules.java.hints.providers.spi.HintMetadata;
  458.77 -import org.netbeans.modules.java.source.JavaSourceAccessor;
  458.78 -import org.netbeans.modules.java.source.parsing.FileObjects;
  458.79 -import org.openide.util.Exceptions;
  458.80 -
  458.81 -/**
  458.82 - *
  458.83 - * @author lahvac
  458.84 - */
  458.85 -public class Hacks {
  458.86 -
  458.87 -    //XXX: copied from Utilities, for declarative hints, different import management:
  458.88 -    private static long inc;
  458.89 -
  458.90 -    public static Scope constructScope(CompilationInfo info, String... importedClasses) {
  458.91 -        StringBuilder clazz = new StringBuilder();
  458.92 -
  458.93 -        clazz.append("package $$;\n");
  458.94 -
  458.95 -        for (String i : importedClasses) {
  458.96 -            clazz.append("import ").append(i).append(";\n");
  458.97 -        }
  458.98 -
  458.99 -        clazz.append("public class $").append(inc++).append("{");
 458.100 -
 458.101 -        clazz.append("private void test() {\n");
 458.102 -        clazz.append("}\n");
 458.103 -        clazz.append("}\n");
 458.104 -
 458.105 -        JavacTaskImpl jti = JavaSourceAccessor.getINSTANCE().getJavacTask(info);
 458.106 -        Context context = jti.getContext();
 458.107 -
 458.108 -        JavaCompiler jc = JavaCompiler.instance(context);
 458.109 -        Log.instance(context).nerrors = 0;
 458.110 -
 458.111 -        JavaFileObject jfo = FileObjects.memoryFileObject("$$", "$", new File("/tmp/t.java").toURI(), System.currentTimeMillis(), clazz.toString());
 458.112 -        boolean oldSkipAPs = jc.skipAnnotationProcessing;
 458.113 -
 458.114 -        try {
 458.115 -            jc.skipAnnotationProcessing = true;
 458.116 -
 458.117 -            Iterable<? extends CompilationUnitTree> parsed = jti.parse(jfo);
 458.118 -            CompilationUnitTree cut = parsed.iterator().next();
 458.119 -
 458.120 -            jti.analyze(jti.enter(parsed));
 458.121 -
 458.122 -            return new ScannerImpl().scan(cut, info);
 458.123 -        } catch (IOException ex) {
 458.124 -            Exceptions.printStackTrace(ex);
 458.125 -            return null;
 458.126 -        } finally {
 458.127 -            jc.skipAnnotationProcessing = oldSkipAPs;
 458.128 -        }
 458.129 -    }
 458.130 -
 458.131 -    private static final class ScannerImpl extends TreePathScanner<Scope, CompilationInfo> {
 458.132 -
 458.133 -        @Override
 458.134 -        public Scope visitBlock(BlockTree node, CompilationInfo p) {
 458.135 -            return p.getTrees().getScope(getCurrentPath());
 458.136 -        }
 458.137 -
 458.138 -        @Override
 458.139 -        public Scope visitMethod(MethodTree node, CompilationInfo p) {
 458.140 -            if (node.getReturnType() == null) {
 458.141 -                return null;
 458.142 -            }
 458.143 -            return super.visitMethod(node, p);
 458.144 -        }
 458.145 -
 458.146 -        @Override
 458.147 -        public Scope reduce(Scope r1, Scope r2) {
 458.148 -            return r1 != null ? r1 : r2;
 458.149 -        }
 458.150 -
 458.151 -    }
 458.152 -
 458.153 -
 458.154 -    public static Tree createRenameTree(@NonNull Tree originalTree, @NonNull String newName) {
 458.155 -        return new RenameTree(originalTree, newName);
 458.156 -    }
 458.157 -
 458.158 -    public static final class RenameTree extends JCErroneous {
 458.159 -
 458.160 -        public final Tree originalTree;
 458.161 -        public final String newName;
 458.162 -
 458.163 -        public RenameTree(@NonNull Tree originalTree, @NonNull String newName) {
 458.164 -            super(com.sun.tools.javac.util.List.<JCTree>nil());
 458.165 -            this.originalTree = originalTree;
 458.166 -            this.newName = newName;
 458.167 -        }
 458.168 -
 458.169 -    }
 458.170 -
 458.171 -    public static @CheckForNull TypeMirror parseFQNType(@NonNull CompilationInfo info, @NonNull String spec) {
 458.172 -        if (spec.length() == 0) {
 458.173 -            return null;
 458.174 -        }
 458.175 -        
 458.176 -        TypeElement jlObject = info.getElements().getTypeElement("java.lang.Object");
 458.177 -        
 458.178 -        //XXX:
 458.179 -        TypeElement scope;
 458.180 -
 458.181 -        if (info.getTopLevelElements().isEmpty()) {
 458.182 -            scope = jlObject;
 458.183 -        } else {
 458.184 -            scope = info.getTopLevelElements().iterator().next();
 458.185 -        }
 458.186 -        //XXX end
 458.187 -        
 458.188 -        return info.getTreeUtilities().parseType(spec, /*XXX: jlObject*/scope);
 458.189 -    }
 458.190 -
 458.191 -    public static VariableElement attributeThis(CompilationInfo info, TreePath tp) {
 458.192 -        //XXX:
 458.193 -        while (tp != null) {
 458.194 -            if (TreeUtilities.CLASS_TREE_KINDS.contains(tp.getLeaf().getKind())) {
 458.195 -                Element currentElement = info.getTrees().getElement(tp);
 458.196 -
 458.197 -                if (currentElement == null || !(currentElement instanceof ClassSymbol)) return null;
 458.198 -
 458.199 -                Enter enter = Enter.instance(JavaSourceAccessor.getINSTANCE().getJavacTask(info).getContext());
 458.200 -                Env<AttrContext> env = enter.getEnv((ClassSymbol) currentElement);
 458.201 -
 458.202 -                if (env == null) return null;
 458.203 -
 458.204 -                for (Element el : env.info.getLocalElements()) {
 458.205 -                    if (el.getSimpleName().contentEquals("this")) {
 458.206 -                        return (VariableElement) el;
 458.207 -                    }
 458.208 -                }
 458.209 -
 458.210 -                return null;
 458.211 -            }
 458.212 -
 458.213 -            tp = tp.getParentPath();
 458.214 -        }
 458.215 -
 458.216 -        return null;
 458.217 -    }
 458.218 -    
 458.219 -    public static interface InspectAndTransformOpener {
 458.220 -        public void openIAT(HintMetadata hm);
 458.221 -    }
 458.222 -}
   459.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/JackpotTrees.java	Mon Dec 19 11:37:36 2016 +0100
   459.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   459.3 @@ -1,246 +0,0 @@
   459.4 -/*
   459.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   459.6 - *
   459.7 - * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
   459.8 - *
   459.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  459.10 - * Other names may be trademarks of their respective owners.
  459.11 - *
  459.12 - * The contents of this file are subject to the terms of either the GNU
  459.13 - * General Public License Version 2 only ("GPL") or the Common
  459.14 - * Development and Distribution License("CDDL") (collectively, the
  459.15 - * "License"). You may not use this file except in compliance with the
  459.16 - * License. You can obtain a copy of the License at
  459.17 - * http://www.netbeans.org/cddl-gplv2.html
  459.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  459.19 - * specific language governing permissions and limitations under the
  459.20 - * License.  When distributing the software, include this License Header
  459.21 - * Notice in each file and include the License file at
  459.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  459.23 - * particular file as subject to the "Classpath" exception as provided
  459.24 - * by Oracle in the GPL Version 2 section of the License file that
  459.25 - * accompanied this code. If applicable, add the following below the
  459.26 - * License Header, with the fields enclosed by brackets [] replaced by
  459.27 - * your own identifying information:
  459.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  459.29 - *
  459.30 - * If you wish your version of this file to be governed by only the CDDL
  459.31 - * or only the GPL Version 2, indicate your decision by adding
  459.32 - * "[Contributor] elects to include this software in this distribution
  459.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  459.34 - * single choice of license, a recipient has the option to distribute
  459.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  459.36 - * to extend the choice of license to its licensees as provided above.
  459.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  459.38 - * Version 2 license, then the option applies only if the new code is
  459.39 - * made subject to such option by the copyright holder.
  459.40 - *
  459.41 - * Contributor(s):
  459.42 - *
  459.43 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  459.44 - */
  459.45 -
  459.46 -package org.netbeans.modules.java.hints.spiimpl;
  459.47 -
  459.48 -import com.sun.source.tree.IdentifierTree;
  459.49 -import com.sun.source.tree.TreeVisitor;
  459.50 -import com.sun.tools.javac.code.Symbol.VarSymbol;
  459.51 -import com.sun.tools.javac.code.Symtab;
  459.52 -import com.sun.tools.javac.tree.JCTree;
  459.53 -import com.sun.tools.javac.tree.JCTree.JCAnnotation;
  459.54 -import com.sun.tools.javac.tree.JCTree.JCBlock;
  459.55 -import com.sun.tools.javac.tree.JCTree.JCCase;
  459.56 -import com.sun.tools.javac.tree.JCTree.JCCatch;
  459.57 -import com.sun.tools.javac.tree.JCTree.JCModifiers;
  459.58 -import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
  459.59 -import com.sun.tools.javac.tree.TreeMaker;
  459.60 -import com.sun.tools.javac.util.Context;
  459.61 -import com.sun.tools.javac.util.List;
  459.62 -import com.sun.tools.javac.util.Name;
  459.63 -
  459.64 -
  459.65 -/**
  459.66 - *
  459.67 - * @author lahvac
  459.68 - */
  459.69 -public class JackpotTrees {
  459.70 -    public static class AnnotationWildcard extends JCAnnotation implements IdentifierTree {
  459.71 -
  459.72 -        private final Name ident;
  459.73 -        private final JCIdent jcIdent;
  459.74 -
  459.75 -        public AnnotationWildcard(Name ident, JCIdent jcIdent) {
  459.76 -            super(Tag.ANNOTATION, jcIdent, List.<JCExpression>nil());
  459.77 -            this.ident = ident;
  459.78 -            this.jcIdent = jcIdent;
  459.79 -        }
  459.80 -
  459.81 -        public Name getName() {
  459.82 -            return ident;
  459.83 -        }
  459.84 -
  459.85 -        @Override
  459.86 -        public Kind getKind() {
  459.87 -            return Kind.IDENTIFIER;
  459.88 -        }
  459.89 -
  459.90 -        @Override
  459.91 -        public void accept(Visitor v) {
  459.92 -            v.visitIdent(jcIdent);
  459.93 -        }
  459.94 -
  459.95 -        @Override
  459.96 -        public <R, D> R accept(TreeVisitor<R, D> v, D d) {
  459.97 -            return v.visitIdentifier(this, d);
  459.98 -        }
  459.99 -
 459.100 -        @Override
 459.101 -        public String toString() {
 459.102 -            return ident.toString();
 459.103 -        }
 459.104 -
 459.105 -    }
 459.106 -    
 459.107 -    public static class CatchWildcard extends JCCatch implements IdentifierTree {
 459.108 -
 459.109 -        private final Name ident;
 459.110 -        private final JCIdent jcIdent;
 459.111 -
 459.112 -        public CatchWildcard(Context ctx, Name ident, JCIdent jcIdent) {
 459.113 -            super(new FakeVariable(ctx, ident, jcIdent), TreeMaker.instance(ctx).Block(0, List.<JCStatement>nil()));
 459.114 -            this.ident = ident;
 459.115 -            this.jcIdent = jcIdent;
 459.116 -        }
 459.117 -
 459.118 -        public Name getName() {
 459.119 -            return ident;
 459.120 -        }
 459.121 -
 459.122 -        @Override
 459.123 -        public Kind getKind() {
 459.124 -            return Kind.IDENTIFIER;
 459.125 -        }
 459.126 -
 459.127 -        @Override
 459.128 -        public void accept(Visitor v) {
 459.129 -            v.visitIdent(jcIdent);
 459.130 -        }
 459.131 -
 459.132 -        @Override
 459.133 -        public <R, D> R accept(TreeVisitor<R, D> v, D d) {
 459.134 -            return v.visitIdentifier(this, d);
 459.135 -        }
 459.136 -
 459.137 -        @Override
 459.138 -        public String toString() {
 459.139 -            return "catch " + ident.toString();
 459.140 -        }
 459.141 -
 459.142 -    }
 459.143 -    
 459.144 -    public static class VariableWildcard extends FakeVariable implements IdentifierTree {
 459.145 -
 459.146 -        private final Name ident;
 459.147 -
 459.148 -        public VariableWildcard(Context ctx, Name ident, JCIdent jcIdent) {
 459.149 -            super(ctx, ident, jcIdent);
 459.150 -            this.ident = ident;
 459.151 -        }
 459.152 -
 459.153 -        public Name getName() {
 459.154 -            return ident;
 459.155 -        }
 459.156 -
 459.157 -        @Override
 459.158 -        public Kind getKind() {
 459.159 -            return Kind.IDENTIFIER;
 459.160 -        }
 459.161 -
 459.162 -        @Override
 459.163 -        public <R, D> R accept(TreeVisitor<R, D> v, D d) {
 459.164 -            return v.visitIdentifier(this, d);
 459.165 -        }
 459.166 -
 459.167 -        @Override
 459.168 -        public String toString() {
 459.169 -            return ident.toString();
 459.170 -        }
 459.171 -    }
 459.172 -
 459.173 -    private static class FakeVariable extends JCVariableDecl {
 459.174 -        
 459.175 -        private final JCIdent jcIdent;
 459.176 -
 459.177 -        public FakeVariable(Context ctx, Name ident, JCIdent jcIdent) {
 459.178 -            super(new FakeModifiers(), ident, createType(ctx), null, null);
 459.179 -            this.sym = new VarSymbol(0, name, type, Symtab.instance(ctx).errSymbol);
 459.180 -            this.type = vartype.type;
 459.181 -            this.jcIdent = jcIdent;
 459.182 -        }
 459.183 -
 459.184 -        private static JCErroneous createType(Context ctx) {
 459.185 -            JCErroneous err = new JCErroneous(List.<JCTree>nil()) {};
 459.186 -
 459.187 -            err.type = Symtab.instance(ctx).errType;
 459.188 -
 459.189 -            return err;
 459.190 -        }
 459.191 -
 459.192 -        @Override
 459.193 -        public void accept(Visitor v) {
 459.194 -            v.visitIdent(jcIdent);
 459.195 -        }
 459.196 -
 459.197 -    }
 459.198 -
 459.199 -    private static class FakeModifiers extends JCModifiers {
 459.200 -        public FakeModifiers() {
 459.201 -            super(0, List.<JCAnnotation>nil());
 459.202 -        }
 459.203 -    }
 459.204 -
 459.205 -    public static class CaseWildcard extends JCCase implements IdentifierTree {
 459.206 -
 459.207 -        private final Name ident;
 459.208 -        private final JCIdent jcIdent;
 459.209 -
 459.210 -        public CaseWildcard(Context ctx, Name ident, JCIdent jcIdent) {
 459.211 -            super(jcIdent, List.<JCStatement>nil());
 459.212 -            this.ident = ident;
 459.213 -            this.jcIdent = jcIdent;
 459.214 -        }
 459.215 -
 459.216 -        public Name getName() {
 459.217 -            return ident;
 459.218 -        }
 459.219 -
 459.220 -        @Override
 459.221 -        public Kind getKind() {
 459.222 -            return Kind.IDENTIFIER;
 459.223 -        }
 459.224 -
 459.225 -        @Override
 459.226 -        public void accept(Visitor v) {
 459.227 -            v.visitIdent(jcIdent);
 459.228 -        }
 459.229 -
 459.230 -        @Override
 459.231 -        public <R, D> R accept(TreeVisitor<R, D> v, D d) {
 459.232 -            return v.visitIdentifier(this, d);
 459.233 -        }
 459.234 -
 459.235 -        @Override
 459.236 -        public String toString() {
 459.237 -            return "case " + ident.toString();
 459.238 -        }
 459.239 -
 459.240 -    }
 459.241 -    
 459.242 -    public static class FakeBlock extends JCBlock {
 459.243 -
 459.244 -        public FakeBlock(long flags, List<JCStatement> stats) {
 459.245 -            super(flags, stats);
 459.246 -        }
 459.247 -        
 459.248 -    }
 459.249 -}
   460.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/JavaFixImpl.java	Mon Dec 19 11:37:36 2016 +0100
   460.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   460.3 @@ -1,146 +0,0 @@
   460.4 -/*
   460.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   460.6 - *
   460.7 - * Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   460.8 - *
   460.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  460.10 - * Other names may be trademarks of their respective owners.
  460.11 - *
  460.12 - * The contents of this file are subject to the terms of either the GNU
  460.13 - * General Public License Version 2 only ("GPL") or the Common
  460.14 - * Development and Distribution License("CDDL") (collectively, the
  460.15 - * "License"). You may not use this file except in compliance with the
  460.16 - * License. You can obtain a copy of the License at
  460.17 - * http://www.netbeans.org/cddl-gplv2.html
  460.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  460.19 - * specific language governing permissions and limitations under the
  460.20 - * License.  When distributing the software, include this License Header
  460.21 - * Notice in each file and include the License file at
  460.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  460.23 - * particular file as subject to the "Classpath" exception as provided
  460.24 - * by Oracle in the GPL Version 2 section of the License file that
  460.25 - * accompanied this code. If applicable, add the following below the
  460.26 - * License Header, with the fields enclosed by brackets [] replaced by
  460.27 - * your own identifying information:
  460.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  460.29 - *
  460.30 - * If you wish your version of this file to be governed by only the CDDL
  460.31 - * or only the GPL Version 2, indicate your decision by adding
  460.32 - * "[Contributor] elects to include this software in this distribution
  460.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  460.34 - * single choice of license, a recipient has the option to distribute
  460.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  460.36 - * to extend the choice of license to its licensees as provided above.
  460.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  460.38 - * Version 2 license, then the option applies only if the new code is
  460.39 - * made subject to such option by the copyright holder.
  460.40 - *
  460.41 - * Contributor(s):
  460.42 - *
  460.43 - * Portions Copyrighted 2008-2009 Sun Microsystems, Inc.
  460.44 - */
  460.45 -
  460.46 -package org.netbeans.modules.java.hints.spiimpl;
  460.47 -
  460.48 -import com.sun.source.util.TreePath;
  460.49 -import java.util.ArrayList;
  460.50 -import java.util.Collection;
  460.51 -import java.util.Collections;
  460.52 -import java.util.HashMap;
  460.53 -import java.util.IdentityHashMap;
  460.54 -import java.util.List;
  460.55 -import java.util.Map;
  460.56 -import java.util.Set;
  460.57 -import javax.lang.model.type.TypeMirror;
  460.58 -import org.netbeans.api.java.source.CompilationInfo;
  460.59 -import org.netbeans.api.java.source.JavaSource;
  460.60 -import org.netbeans.api.java.source.JavaSource.Phase;
  460.61 -import org.netbeans.api.java.source.ModificationResult.Difference;
  460.62 -import org.netbeans.api.java.source.Task;
  460.63 -import org.netbeans.api.java.source.WorkingCopy;
  460.64 -import org.netbeans.api.project.Project;
  460.65 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchUtilities;
  460.66 -import org.netbeans.modules.java.source.JavaSourceAccessor;
  460.67 -import org.netbeans.modules.refactoring.spi.RefactoringElementImplementation;
  460.68 -import org.netbeans.spi.editor.hints.ChangeInfo;
  460.69 -import org.netbeans.spi.editor.hints.Fix;
  460.70 -import org.netbeans.spi.java.hints.HintContext;
  460.71 -import org.netbeans.spi.java.hints.JavaFix;
  460.72 -import org.openide.filesystems.FileObject;
  460.73 -import org.openide.util.Exceptions;
  460.74 -
  460.75 -/**TODO: move to better package
  460.76 - *
  460.77 - * @author Jan Lahoda
  460.78 - */
  460.79 -public final class JavaFixImpl implements Fix {
  460.80 -
  460.81 -    public final JavaFix jf;
  460.82 -
  460.83 -    public JavaFixImpl(JavaFix jf) {
  460.84 -        this.jf = jf;
  460.85 -    }
  460.86 -
  460.87 -    public String getText() {
  460.88 -        return Accessor.INSTANCE.getText(jf);
  460.89 -    }
  460.90 -
  460.91 -    public ChangeInfo implement() throws Exception {
  460.92 -        FileObject file = Accessor.INSTANCE.getFile(jf);
  460.93 -        
  460.94 -        BatchUtilities.fixDependencies(file, Collections.singletonList(jf), new IdentityHashMap<Project, Set<String>>());
  460.95 -
  460.96 -        JavaSource js = JavaSource.forFileObject(file);
  460.97 -
  460.98 -        js.runModificationTask(new Task<WorkingCopy>() {
  460.99 -            public void run(WorkingCopy wc) throws Exception {
 460.100 -                if (wc.toPhase(Phase.RESOLVED).compareTo(Phase.RESOLVED) < 0) {
 460.101 -                    return;
 460.102 -                }
 460.103 -
 460.104 -                Map<FileObject, byte[]> resourceContentChanges = new HashMap<FileObject, byte[]>();
 460.105 -                Accessor.INSTANCE.process(jf, wc, true, resourceContentChanges, /*Ignored in editor:*/new ArrayList<RefactoringElementImplementation>());
 460.106 -                Map<FileObject, List<Difference>> resourceContentDiffs = new HashMap<FileObject, List<Difference>>();
 460.107 -                BatchUtilities.addResourceContentChanges(resourceContentChanges, resourceContentDiffs);
 460.108 -                JavaSourceAccessor.getINSTANCE().createModificationResult(resourceContentDiffs, Collections.<Object, int[]>emptyMap()).commit();
 460.109 -            }
 460.110 -        }).commit();
 460.111 -
 460.112 -        return null;
 460.113 -    }
 460.114 -
 460.115 -    @Override
 460.116 -    public boolean equals(Object obj) {
 460.117 -        if (obj instanceof JavaFixImpl) {
 460.118 -            return jf.equals(((JavaFixImpl)obj).jf);
 460.119 -        }
 460.120 -        return super.equals(obj);
 460.121 -    }
 460.122 -
 460.123 -    @Override
 460.124 -    public int hashCode() {
 460.125 -        return jf.hashCode();
 460.126 -    }
 460.127 -
 460.128 -    public static abstract class Accessor {
 460.129 -
 460.130 -        static {
 460.131 -            try {
 460.132 -                Class.forName(JavaFix.class.getCanonicalName(), true, JavaFix.class.getClassLoader());
 460.133 -            } catch (ClassNotFoundException ex) {
 460.134 -                Exceptions.printStackTrace(ex);
 460.135 -            }
 460.136 -        }
 460.137 -        
 460.138 -        public static Accessor INSTANCE;
 460.139 -
 460.140 -        public abstract String getText(JavaFix jf);
 460.141 -        public abstract ChangeInfo process(JavaFix jf, WorkingCopy wc, boolean canShowUI, Map<FileObject, byte[]> resourceContent, Collection<? super RefactoringElementImplementation> fileChanges) throws Exception;
 460.142 -        public abstract FileObject getFile(JavaFix jf);
 460.143 -        public abstract Map<String, String> getOptions(JavaFix jf);
 460.144 -        public abstract Fix rewriteFix(CompilationInfo info, String displayName, TreePath what, final String to, Map<String, TreePath> parameters, Map<String, Collection<? extends TreePath>> parametersMulti, final Map<String, String> parameterNames, Map<String, TypeMirror> constraints, Map<String, String> options, String... imports);
 460.145 -        public abstract Fix createSuppressWarningsFix(CompilationInfo compilationInfo, TreePath treePath, String... keys);
 460.146 -        public abstract List<Fix> createSuppressWarnings(CompilationInfo compilationInfo, TreePath treePath, String... keys);
 460.147 -        public abstract List<Fix> resolveDefaultFixes(HintContext ctx, Fix... provided);
 460.148 -    }
 460.149 -}
   461.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/JavaHintsPositionRefresher.java	Mon Dec 19 11:37:36 2016 +0100
   461.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   461.3 @@ -1,161 +0,0 @@
   461.4 -/*
   461.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   461.6 - *
   461.7 - * Copyright 2009-2010 Oracle and/or its affiliates. All rights reserved.
   461.8 - *
   461.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  461.10 - * Other names may be trademarks of their respective owners.
  461.11 - *
  461.12 - * The contents of this file are subject to the terms of either the GNU
  461.13 - * General Public License Version 2 only ("GPL") or the Common
  461.14 - * Development and Distribution License("CDDL") (collectively, the
  461.15 - * "License"). You may not use this file except in compliance with the
  461.16 - * License. You can obtain a copy of the License at
  461.17 - * http://www.netbeans.org/cddl-gplv2.html
  461.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  461.19 - * specific language governing permissions and limitations under the
  461.20 - * License.  When distributing the software, include this License Header
  461.21 - * Notice in each file and include the License file at
  461.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  461.23 - * particular file as subject to the "Classpath" exception as provided
  461.24 - * by Oracle in the GPL Version 2 section of the License file that
  461.25 - * accompanied this code. If applicable, add the following below the
  461.26 - * License Header, with the fields enclosed by brackets [] replaced by
  461.27 - * your own identifying information:
  461.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  461.29 - *
  461.30 - * If you wish your version of this file to be governed by only the CDDL
  461.31 - * or only the GPL Version 2, indicate your decision by adding
  461.32 - * "[Contributor] elects to include this software in this distribution
  461.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  461.34 - * single choice of license, a recipient has the option to distribute
  461.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  461.36 - * to extend the choice of license to its licensees as provided above.
  461.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  461.38 - * Version 2 license, then the option applies only if the new code is
  461.39 - * made subject to such option by the copyright holder.
  461.40 - *
  461.41 - * Contributor(s):
  461.42 - *
  461.43 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  461.44 - */
  461.45 -
  461.46 -package org.netbeans.modules.java.hints.spiimpl;
  461.47 -
  461.48 -import java.io.IOException;
  461.49 -import java.util.ArrayList;
  461.50 -import java.util.Collections;
  461.51 -import java.util.HashMap;
  461.52 -import java.util.Iterator;
  461.53 -import java.util.List;
  461.54 -import java.util.Map;
  461.55 -import java.util.logging.Level;
  461.56 -import java.util.logging.Logger;
  461.57 -import javax.swing.text.Document;
  461.58 -import org.netbeans.api.editor.mimelookup.MimeLookup;
  461.59 -import org.netbeans.api.editor.mimelookup.MimeRegistration;
  461.60 -import org.netbeans.api.java.source.CompilationController;
  461.61 -import org.netbeans.api.java.source.JavaSource;
  461.62 -import org.netbeans.api.java.source.JavaSource.Phase;
  461.63 -import org.netbeans.api.java.source.Task;
  461.64 -import org.netbeans.api.progress.ProgressUtils;
  461.65 -import org.netbeans.spi.editor.hints.Context;
  461.66 -import org.netbeans.spi.editor.hints.ErrorDescription;
  461.67 -import org.netbeans.spi.editor.hints.PositionRefresher;
  461.68 -import org.netbeans.modules.java.hints.providers.spi.PositionRefresherHelper;
  461.69 -import org.openide.util.Exceptions;
  461.70 -import org.openide.util.NbBundle;
  461.71 -
  461.72 -/**
  461.73 - * Refreshes all Java Hints on current line upon Alt-Enter or mouseclick
  461.74 - * @author Max Sauer
  461.75 - */
  461.76 -@MimeRegistration(mimeType="text/x-java", service=PositionRefresher.class)
  461.77 -public class JavaHintsPositionRefresher implements PositionRefresher {
  461.78 -
  461.79 -    private static final Logger LOG = Logger.getLogger(JavaHintsPositionRefresher.class.getName());
  461.80 -
  461.81 -    @Override
  461.82 -    public Map<String, List<ErrorDescription>> getErrorDescriptionsAt(final Context context, final Document doc) {
  461.83 -        final List<PositionRefresherHelper> refreshers = new ArrayList<PositionRefresherHelper>(MimeLookup.getLookup("text/x-java").lookupAll(PositionRefresherHelper.class));
  461.84 -
  461.85 -        for (Iterator<PositionRefresherHelper> it = refreshers.iterator(); it.hasNext();) {
  461.86 -            PositionRefresherHelper h = it.next();
  461.87 -
  461.88 -            if (h.upToDateCheck(context, doc)) {
  461.89 -                LOG.log(Level.FINE, "Not computing warnings for {0}, results are up-to-date.", h.getKey());
  461.90 -                it.remove();
  461.91 -            } else {
  461.92 -                LOG.log(Level.FINE, "Will compute warnings for {0}, results not up-to-date.", h.getKey());
  461.93 -            }
  461.94 -        }
  461.95 -
  461.96 -        if (refreshers.isEmpty()) return Collections.emptyMap();
  461.97 -        
  461.98 -        final JavaSource js = JavaSource.forDocument(doc);
  461.99 -
 461.100 -        if (js == null) {
 461.101 -            LOG.log(Level.FINE, "No JavaSource associated to: {0}", new Object[] {doc, doc.getProperty(Document.StreamDescriptionProperty)});
 461.102 -            return Collections.emptyMap();
 461.103 -        }
 461.104 -
 461.105 -        final Map<String, List<ErrorDescription>> eds = new HashMap<String, List<ErrorDescription>>();
 461.106 -
 461.107 -        Runnable r = new Runnable() {
 461.108 -
 461.109 -            public void run() {
 461.110 -                try {
 461.111 -                    js.runUserActionTask(new RefreshTask(eds, refreshers, context, doc), true);
 461.112 -                } catch (IOException ex) {
 461.113 -                    Exceptions.printStackTrace(ex);
 461.114 -                }
 461.115 -            }
 461.116 -        };
 461.117 -        
 461.118 -        ProgressUtils.runOffEventDispatchThread(r, NbBundle.getMessage(JavaHintsPositionRefresher.class, "Refresh_hints"), context.getCancel(), false); // NOI18N
 461.119 -
 461.120 -        return eds;
 461.121 -    }
 461.122 -
 461.123 -
 461.124 -    private class RefreshTask implements Task<CompilationController> {
 461.125 -
 461.126 -        private final Map<String, List<ErrorDescription>> eds;
 461.127 -        private final List<PositionRefresherHelper> refreshers;
 461.128 -        private final Context ctx;
 461.129 -        private final Document doc;
 461.130 -
 461.131 -        public RefreshTask(Map<String, List<ErrorDescription>> eds, List<PositionRefresherHelper> refreshers, Context ctx, Document doc) {
 461.132 -            this.eds = eds;
 461.133 -            this.refreshers = refreshers;
 461.134 -            this.ctx = ctx;
 461.135 -            this.doc = doc;
 461.136 -        }
 461.137 -
 461.138 -        public void run(CompilationController controller) throws Exception {
 461.139 -            if (controller.toPhase(JavaSource.Phase.RESOLVED).compareTo(Phase.RESOLVED) < 0) {
 461.140 -                return ;
 461.141 -            }
 461.142 -
 461.143 -            Document doc = controller.getDocument();
 461.144 -
 461.145 -            if (doc == null) {
 461.146 -                return;
 461.147 -            }
 461.148 -
 461.149 -            for (PositionRefresherHelper h : refreshers) {
 461.150 -                if (ctx.isCanceled()) {
 461.151 -                    return;
 461.152 -                }
 461.153 -                
 461.154 -                List errors = h.getErrorDescriptionsAt(controller, ctx, doc);
 461.155 -                
 461.156 -                if (errors == null) continue;
 461.157 -                
 461.158 -                eds.put(h.getKey(), errors);
 461.159 -            }
 461.160 -        }
 461.161 -        
 461.162 -    }
 461.163 -
 461.164 -}
   462.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/MessageImpl.java	Mon Dec 19 11:37:36 2016 +0100
   462.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   462.3 @@ -1,61 +0,0 @@
   462.4 -/*
   462.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   462.6 - *
   462.7 - * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
   462.8 - *
   462.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  462.10 - * Other names may be trademarks of their respective owners.
  462.11 - *
  462.12 - * The contents of this file are subject to the terms of either the GNU
  462.13 - * General Public License Version 2 only ("GPL") or the Common
  462.14 - * Development and Distribution License("CDDL") (collectively, the
  462.15 - * "License"). You may not use this file except in compliance with the
  462.16 - * License. You can obtain a copy of the License at
  462.17 - * http://www.netbeans.org/cddl-gplv2.html
  462.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  462.19 - * specific language governing permissions and limitations under the
  462.20 - * License.  When distributing the software, include this License Header
  462.21 - * Notice in each file and include the License file at
  462.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  462.23 - * particular file as subject to the "Classpath" exception as provided
  462.24 - * by Oracle in the GPL Version 2 section of the License file that
  462.25 - * accompanied this code. If applicable, add the following below the
  462.26 - * License Header, with the fields enclosed by brackets [] replaced by
  462.27 - * your own identifying information:
  462.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  462.29 - *
  462.30 - * If you wish your version of this file to be governed by only the CDDL
  462.31 - * or only the GPL Version 2, indicate your decision by adding
  462.32 - * "[Contributor] elects to include this software in this distribution
  462.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  462.34 - * single choice of license, a recipient has the option to distribute
  462.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  462.36 - * to extend the choice of license to its licensees as provided above.
  462.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  462.38 - * Version 2 license, then the option applies only if the new code is
  462.39 - * made subject to such option by the copyright holder.
  462.40 - *
  462.41 - * Contributor(s):
  462.42 - *
  462.43 - * Portions Copyrighted 2009 Sun Microsystems, Inc.
  462.44 - */
  462.45 -
  462.46 -package org.netbeans.modules.java.hints.spiimpl;
  462.47 -
  462.48 -import org.netbeans.spi.java.hints.HintContext.MessageKind;
  462.49 -
  462.50 -/**
  462.51 - *
  462.52 - * @author lahvacc
  462.53 - */
  462.54 -public class MessageImpl {
  462.55 -
  462.56 -    public final MessageKind kind;
  462.57 -    public final String text;
  462.58 -
  462.59 -    public MessageImpl(MessageKind kind, String text) {
  462.60 -        this.kind = kind;
  462.61 -        this.text = text;
  462.62 -    }
  462.63 -
  462.64 -}
   463.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/RulesManager.java	Mon Dec 19 11:37:36 2016 +0100
   463.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   463.3 @@ -1,68 +0,0 @@
   463.4 -/*
   463.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   463.6 - *
   463.7 - * Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   463.8 - *
   463.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  463.10 - * Other names may be trademarks of their respective owners.
  463.11 - *
  463.12 - * The contents of this file are subject to the terms of either the GNU
  463.13 - * General Public License Version 2 only ("GPL") or the Common
  463.14 - * Development and Distribution License("CDDL") (collectively, the
  463.15 - * "License"). You may not use this file except in compliance with the
  463.16 - * License. You can obtain a copy of the License at
  463.17 - * http://www.netbeans.org/cddl-gplv2.html
  463.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  463.19 - * specific language governing permissions and limitations under the
  463.20 - * License.  When distributing the software, include this License Header
  463.21 - * Notice in each file and include the License file at
  463.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  463.23 - * particular file as subject to the "Classpath" exception as provided
  463.24 - * by Oracle in the GPL Version 2 section of the License file that
  463.25 - * accompanied this code. If applicable, add the following below the
  463.26 - * License Header, with the fields enclosed by brackets [] replaced by
  463.27 - * your own identifying information:
  463.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  463.29 - *
  463.30 - * If you wish your version of this file to be governed by only the CDDL
  463.31 - * or only the GPL Version 2, indicate your decision by adding
  463.32 - * "[Contributor] elects to include this software in this distribution
  463.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  463.34 - * single choice of license, a recipient has the option to distribute
  463.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  463.36 - * to extend the choice of license to its licensees as provided above.
  463.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  463.38 - * Version 2 license, then the option applies only if the new code is
  463.39 - * made subject to such option by the copyright holder.
  463.40 - *
  463.41 - * Contributor(s):
  463.42 - *
  463.43 - * Portions Copyrighted 2008-2010 Sun Microsystems, Inc.
  463.44 - */
  463.45 -
  463.46 -package org.netbeans.modules.java.hints.spiimpl;
  463.47 -
  463.48 -import java.util.Collection;
  463.49 -import java.util.Map;
  463.50 -import java.util.concurrent.atomic.AtomicBoolean;
  463.51 -import org.netbeans.api.annotations.common.NullAllowed;
  463.52 -import org.netbeans.api.java.classpath.ClassPath;
  463.53 -import org.netbeans.api.java.source.CompilationInfo;
  463.54 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
  463.55 -import org.netbeans.modules.java.hints.providers.spi.HintMetadata;
  463.56 -import org.openide.util.Lookup;
  463.57 -
  463.58 -/**
  463.59 - *
  463.60 - * @author lahvac
  463.61 - */
  463.62 -public abstract class RulesManager {
  463.63 -
  463.64 -    public static RulesManager getInstance() {
  463.65 -        return Lookup.getDefault().lookup(RulesManager.class);
  463.66 -    }
  463.67 -
  463.68 -    public abstract Map<HintMetadata, ? extends Collection<? extends HintDescription>> readHints(@NullAllowed CompilationInfo info, @NullAllowed Collection<? extends ClassPath> from, @NullAllowed AtomicBoolean cancel);
  463.69 -    public abstract void reload(); //XXX
  463.70 -    
  463.71 -}
   464.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/RulesManagerImpl.java	Mon Dec 19 11:37:36 2016 +0100
   464.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   464.3 @@ -1,140 +0,0 @@
   464.4 -/*
   464.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   464.6 - *
   464.7 - * Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   464.8 - *
   464.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  464.10 - * Other names may be trademarks of their respective owners.
  464.11 - *
  464.12 - * The contents of this file are subject to the terms of either the GNU
  464.13 - * General Public License Version 2 only ("GPL") or the Common
  464.14 - * Development and Distribution License("CDDL") (collectively, the
  464.15 - * "License"). You may not use this file except in compliance with the
  464.16 - * License. You can obtain a copy of the License at
  464.17 - * http://www.netbeans.org/cddl-gplv2.html
  464.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  464.19 - * specific language governing permissions and limitations under the
  464.20 - * License.  When distributing the software, include this License Header
  464.21 - * Notice in each file and include the License file at
  464.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  464.23 - * particular file as subject to the "Classpath" exception as provided
  464.24 - * by Oracle in the GPL Version 2 section of the License file that
  464.25 - * accompanied this code. If applicable, add the following below the
  464.26 - * License Header, with the fields enclosed by brackets [] replaced by
  464.27 - * your own identifying information:
  464.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  464.29 - *
  464.30 - * If you wish your version of this file to be governed by only the CDDL
  464.31 - * or only the GPL Version 2, indicate your decision by adding
  464.32 - * "[Contributor] elects to include this software in this distribution
  464.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  464.34 - * single choice of license, a recipient has the option to distribute
  464.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  464.36 - * to extend the choice of license to its licensees as provided above.
  464.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  464.38 - * Version 2 license, then the option applies only if the new code is
  464.39 - * made subject to such option by the copyright holder.
  464.40 - *
  464.41 - * Contributor(s):
  464.42 - *
  464.43 - * Portions Copyrighted 2008-2010 Sun Microsystems, Inc.
  464.44 - */
  464.45 -
  464.46 -package org.netbeans.modules.java.hints.spiimpl;
  464.47 -
  464.48 -import java.util.ArrayList;
  464.49 -import java.util.Collection;
  464.50 -import java.util.Collections;
  464.51 -import java.util.HashMap;
  464.52 -import java.util.LinkedList;
  464.53 -import java.util.Map;
  464.54 -import java.util.Map.Entry;
  464.55 -import java.util.concurrent.atomic.AtomicBoolean;
  464.56 -import org.netbeans.api.java.classpath.ClassPath;
  464.57 -import org.netbeans.api.java.source.ClasspathInfo;
  464.58 -import org.netbeans.api.java.source.ClasspathInfo.PathKind;
  464.59 -import org.netbeans.api.java.source.CompilationInfo;
  464.60 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
  464.61 -import org.netbeans.modules.java.hints.providers.spi.HintMetadata;
  464.62 -import org.netbeans.modules.java.hints.providers.spi.ClassPathBasedHintProvider;
  464.63 -import org.netbeans.modules.java.hints.providers.spi.ElementBasedHintProvider;
  464.64 -import org.netbeans.modules.java.hints.providers.spi.HintProvider;
  464.65 -import org.netbeans.spi.java.classpath.support.ClassPathSupport;
  464.66 -import org.openide.util.Lookup;
  464.67 -import org.openide.util.lookup.ServiceProvider;
  464.68 -
  464.69 -/**
  464.70 - *
  464.71 - * @author lahvac
  464.72 - */
  464.73 -@ServiceProvider(service=RulesManager.class)
  464.74 -public class RulesManagerImpl extends RulesManager {
  464.75 -
  464.76 -    private final Map<HintMetadata, Collection<HintDescription>> globalHints = new HashMap<HintMetadata, Collection<HintDescription>>();
  464.77 -
  464.78 -    public RulesManagerImpl() {
  464.79 -        reload();
  464.80 -    }
  464.81 -    
  464.82 -    @Override
  464.83 -    public void reload() {
  464.84 -        globalHints.clear();
  464.85 -
  464.86 -        for (HintProvider p : Lookup.getDefault().lookupAll(HintProvider.class)) {
  464.87 -            Map<HintMetadata, ? extends Collection<? extends HintDescription>> pHints = p.computeHints();
  464.88 -
  464.89 -            if (pHints != null) {
  464.90 -                for (Entry<HintMetadata, ? extends Collection<? extends HintDescription>> e : pHints.entrySet()) {
  464.91 -                    globalHints.put(e.getKey(), new ArrayList<HintDescription>(e.getValue()));
  464.92 -                }
  464.93 -            }
  464.94 -        }
  464.95 -    }
  464.96 -
  464.97 -    @Override
  464.98 -    public Map<HintMetadata, ? extends Collection<? extends HintDescription>> readHints(CompilationInfo info, Collection<? extends ClassPath> from, AtomicBoolean cancel) {
  464.99 -        Map<HintMetadata, Collection<HintDescription>> result = new HashMap<HintMetadata, Collection<HintDescription>>(globalHints);
 464.100 -
 464.101 -        if (info != null) {
 464.102 -            for (ElementBasedHintProvider provider : Lookup.getDefault().lookupAll(ElementBasedHintProvider.class)) {
 464.103 -                sortByMetadata(provider.computeHints(info), result);
 464.104 -            }
 464.105 -        }
 464.106 -
 464.107 -        if (from == null) {
 464.108 -            if (info != null) {
 464.109 -                ClasspathInfo cpInfo = info.getClasspathInfo();
 464.110 -                LinkedList<ClassPath> cps = new LinkedList<ClassPath>();
 464.111 -
 464.112 -                cps.add(cpInfo.getClassPath(PathKind.BOOT));
 464.113 -                cps.add(cpInfo.getClassPath(PathKind.COMPILE));
 464.114 -                cps.add(cpInfo.getClassPath(PathKind.SOURCE));
 464.115 -
 464.116 -                from = cps;
 464.117 -            } else {
 464.118 -                from = Collections.emptyList();
 464.119 -            }
 464.120 -        }
 464.121 -
 464.122 -        ClassPath compound = ClassPathSupport.createProxyClassPath(from.toArray(new ClassPath[0]));
 464.123 -
 464.124 -        for (ClassPathBasedHintProvider p : Lookup.getDefault().lookupAll(ClassPathBasedHintProvider.class)) {
 464.125 -            sortByMetadata(p.computeHints(compound), result);
 464.126 -        }
 464.127 -
 464.128 -        return result;
 464.129 -    }
 464.130 -
 464.131 -    public static void sortByMetadata(Collection<? extends HintDescription> listedHints, Map<HintMetadata, Collection<HintDescription>> into) {
 464.132 -        for (HintDescription hd : listedHints) {
 464.133 -            Collection<HintDescription> h = into.get(hd.getMetadata());
 464.134 -
 464.135 -            if (h == null) {
 464.136 -                into.put(hd.getMetadata(), h = new ArrayList<HintDescription>());
 464.137 -            }
 464.138 -
 464.139 -            h.add(hd);
 464.140 -        }
 464.141 -    }
 464.142 -
 464.143 -}
   465.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/SPIAccessor.java	Mon Dec 19 11:37:36 2016 +0100
   465.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   465.3 @@ -1,86 +0,0 @@
   465.4 -/*
   465.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   465.6 - *
   465.7 - * Copyright 2012 Oracle and/or its affiliates. All rights reserved.
   465.8 - *
   465.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  465.10 - * Other names may be trademarks of their respective owners.
  465.11 - *
  465.12 - * The contents of this file are subject to the terms of either the GNU
  465.13 - * General Public License Version 2 only ("GPL") or the Common
  465.14 - * Development and Distribution License("CDDL") (collectively, the
  465.15 - * "License"). You may not use this file except in compliance with the
  465.16 - * License. You can obtain a copy of the License at
  465.17 - * http://www.netbeans.org/cddl-gplv2.html
  465.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  465.19 - * specific language governing permissions and limitations under the
  465.20 - * License.  When distributing the software, include this License Header
  465.21 - * Notice in each file and include the License file at
  465.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  465.23 - * particular file as subject to the "Classpath" exception as provided
  465.24 - * by Oracle in the GPL Version 2 section of the License file that
  465.25 - * accompanied this code. If applicable, add the following below the
  465.26 - * License Header, with the fields enclosed by brackets [] replaced by
  465.27 - * your own identifying information:
  465.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  465.29 - *
  465.30 - * If you wish your version of this file to be governed by only the CDDL
  465.31 - * or only the GPL Version 2, indicate your decision by adding
  465.32 - * "[Contributor] elects to include this software in this distribution
  465.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  465.34 - * single choice of license, a recipient has the option to distribute
  465.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  465.36 - * to extend the choice of license to its licensees as provided above.
  465.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  465.38 - * Version 2 license, then the option applies only if the new code is
  465.39 - * made subject to such option by the copyright holder.
  465.40 - *
  465.41 - * Contributor(s):
  465.42 - *
  465.43 - * Portions Copyrighted 2012 Sun Microsystems, Inc.
  465.44 - */
  465.45 -package org.netbeans.modules.java.hints.spiimpl;
  465.46 -
  465.47 -import com.sun.source.util.TreePath;
  465.48 -import java.util.Collection;
  465.49 -import java.util.Map;
  465.50 -import java.util.concurrent.atomic.AtomicBoolean;
  465.51 -import javax.lang.model.type.TypeMirror;
  465.52 -import org.netbeans.api.java.source.CompilationInfo;
  465.53 -import org.netbeans.modules.java.hints.providers.spi.HintMetadata;
  465.54 -import org.netbeans.modules.java.hints.spiimpl.hints.GlobalProcessingContext;
  465.55 -import org.netbeans.modules.java.hints.spiimpl.options.HintsSettings;
  465.56 -import org.netbeans.spi.java.hints.HintContext;
  465.57 -import org.openide.util.Exceptions;
  465.58 -
  465.59 -/**
  465.60 - *
  465.61 - * @author lahvac
  465.62 - */
  465.63 -public abstract class SPIAccessor {
  465.64 -
  465.65 -    private static volatile SPIAccessor accessor;
  465.66 -
  465.67 -    public static synchronized SPIAccessor getINSTANCE() {
  465.68 -        if (accessor == null) {
  465.69 -            try {
  465.70 -                Class.forName(HintContext.class.getName(), true, HintContext.class.getClassLoader());
  465.71 -                assert accessor != null;
  465.72 -            } catch (ClassNotFoundException e) {
  465.73 -                Exceptions.printStackTrace(e);
  465.74 -            }
  465.75 -        }
  465.76 -        return accessor;
  465.77 -    }
  465.78 -
  465.79 -    public static void setINSTANCE(SPIAccessor instance) {
  465.80 -        assert instance != null;
  465.81 -        accessor = instance;
  465.82 -    }
  465.83 -
  465.84 -    public abstract HintContext createHintContext(CompilationInfo info, HintsSettings settings, HintMetadata metadata, GlobalProcessingContext globalContext, TreePath path, Map<String, TreePath> variables, Map<String, Collection<? extends TreePath>> multiVariables, Map<String, String> variableNames, Map<String, TypeMirror> constraints, Collection<? super MessageImpl> problems, boolean bulkMode, AtomicBoolean cancel, int caret);
  465.85 -    public abstract HintContext createHintContext(CompilationInfo info, HintsSettings settings, HintMetadata metadata, GlobalProcessingContext globalContext, TreePath path, Map<String, TreePath> variables, Map<String, Collection<? extends TreePath>> multiVariables, Map<String, String> variableNames);
  465.86 -    public abstract HintMetadata getHintMetadata(HintContext ctx);
  465.87 -    public abstract HintsSettings getHintSettings(HintContext ctx);
  465.88 -
  465.89 -}
   466.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/SyntheticFix.java	Mon Dec 19 11:37:36 2016 +0100
   466.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   466.3 @@ -1,46 +0,0 @@
   466.4 -/*
   466.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   466.6 - *
   466.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
   466.8 - *
   466.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  466.10 - * Other names may be trademarks of their respective owners.
  466.11 - *
  466.12 - * The contents of this file are subject to the terms of either the GNU
  466.13 - * General Public License Version 2 only ("GPL") or the Common Development and
  466.14 - * Distribution License("CDDL") (collectively, the "License"). You may not use
  466.15 - * this file except in compliance with the License. You can obtain a copy of
  466.16 - * the License at http://www.netbeans.org/cddl-gplv2.html or
  466.17 - * nbbuild/licenses/CDDL-GPL-2-CP. See the License for the specific language
  466.18 - * governing permissions and limitations under the License. When distributing
  466.19 - * the software, include this License Header Notice in each file and include
  466.20 - * the License file at nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
  466.21 - * particular file as subject to the "Classpath" exception as provided by
  466.22 - * Oracle in the GPL Version 2 section of the License file that accompanied
  466.23 - * this code. If applicable, add the following below the License Header, with
  466.24 - * the fields enclosed by brackets [] replaced by your own identifying
  466.25 - * information: "Portions Copyrighted [year] [name of copyright owner]"
  466.26 - *
  466.27 - * If you wish your version of this file to be governed by only the CDDL or
  466.28 - * only the GPL Version 2, indicate your decision by adding "[Contributor]
  466.29 - * elects to include this software in this distribution under the [CDDL or GPL
  466.30 - * Version 2] license." If you do not indicate a single choice of license, a
  466.31 - * recipient has the option to distribute your version of this file under
  466.32 - * either the CDDL, the GPL Version 2 or to extend the choice of license to its
  466.33 - * licensees as provided above. However, if you add GPL Version 2 code and
  466.34 - * therefore, elected the GPL Version 2 license, then the option applies only
  466.35 - * if the new code is made subject to such option by the copyright holder.
  466.36 - *
  466.37 - * Contributor(s):
  466.38 - *
  466.39 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
  466.40 - */
  466.41 -package org.netbeans.modules.java.hints.spiimpl;
  466.42 -
  466.43 -/**
  466.44 - *
  466.45 - * @author lahvac
  466.46 - */
  466.47 -public interface SyntheticFix {
  466.48 -
  466.49 -}
   467.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/Utilities.java	Mon Dec 19 11:37:36 2016 +0100
   467.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   467.3 @@ -1,1554 +0,0 @@
   467.4 -/*
   467.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   467.6 - *
   467.7 - * Copyright 2008-2010 Sun Microsystems, Inc. All rights reserved.
   467.8 - *
   467.9 - * The contents of this file are subject to the terms of either the GNU
  467.10 - * General Public License Version 2 only ("GPL") or the Common
  467.11 - * Development and Distribution License("CDDL") (collectively, the
  467.12 - * "License"). You may not use this file except in compliance with the
  467.13 - * License. You can obtain a copy of the License at
  467.14 - * http://www.netbeans.org/cddl-gplv2.html
  467.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  467.16 - * specific language governing permissions and limitations under the
  467.17 - * License.  When distributing the software, include this License Header
  467.18 - * Notice in each file and include the License file at
  467.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  467.20 - * particular file as subject to the "Classpath" exception as provided
  467.21 - * by Sun in the GPL Version 2 section of the License file that
  467.22 - * accompanied this code. If applicable, add the following below the
  467.23 - * License Header, with the fields enclosed by brackets [] replaced by
  467.24 - * your own identifying information:
  467.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  467.26 - *
  467.27 - * If you wish your version of this file to be governed by only the CDDL
  467.28 - * or only the GPL Version 2, indicate your decision by adding
  467.29 - * "[Contributor] elects to include this software in this distribution
  467.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  467.31 - * single choice of license, a recipient has the option to distribute
  467.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  467.33 - * to extend the choice of license to its licensees as provided above.
  467.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  467.35 - * Version 2 license, then the option applies only if the new code is
  467.36 - * made subject to such option by the copyright holder.
  467.37 - *
  467.38 - * Contributor(s):
  467.39 - *
  467.40 - * Portions Copyrighted 2008-2010 Sun Microsystems, Inc.
  467.41 - */
  467.42 -
  467.43 -package org.netbeans.modules.java.hints.spiimpl;
  467.44 -
  467.45 -import com.sun.source.tree.AnnotationTree;
  467.46 -import com.sun.source.tree.AssignmentTree;
  467.47 -import com.sun.source.tree.BlockTree;
  467.48 -import com.sun.source.tree.ClassTree;
  467.49 -import com.sun.source.tree.CompilationUnitTree;
  467.50 -import com.sun.source.tree.ExpressionStatementTree;
  467.51 -import com.sun.source.tree.ExpressionTree;
  467.52 -import com.sun.source.tree.IdentifierTree;
  467.53 -import com.sun.source.tree.ImportTree;
  467.54 -import com.sun.source.tree.LiteralTree;
  467.55 -import com.sun.source.tree.MemberSelectTree;
  467.56 -import com.sun.source.tree.MethodInvocationTree;
  467.57 -import com.sun.source.tree.MethodTree;
  467.58 -import com.sun.source.tree.ModifiersTree;
  467.59 -import com.sun.source.tree.NewArrayTree;
  467.60 -import com.sun.source.tree.NewClassTree;
  467.61 -import com.sun.source.tree.Scope;
  467.62 -import com.sun.source.tree.StatementTree;
  467.63 -import com.sun.source.tree.SwitchTree;
  467.64 -import com.sun.source.tree.Tree;
  467.65 -import com.sun.source.tree.Tree.Kind;
  467.66 -import com.sun.source.tree.TypeParameterTree;
  467.67 -import com.sun.source.tree.VariableTree;
  467.68 -import com.sun.source.util.SourcePositions;
  467.69 -import com.sun.source.util.TreePath;
  467.70 -import com.sun.source.util.TreePathScanner;
  467.71 -import com.sun.source.util.TreeScanner;
  467.72 -import com.sun.source.util.Trees;
  467.73 -import com.sun.tools.javac.api.JavacScope;
  467.74 -import com.sun.tools.javac.api.JavacTaskImpl;
  467.75 -import com.sun.tools.javac.api.JavacTrees;
  467.76 -import com.sun.tools.javac.code.Flags;
  467.77 -import com.sun.tools.javac.code.Symtab;
  467.78 -import com.sun.tools.javac.code.Type;
  467.79 -import com.sun.tools.javac.comp.Attr;
  467.80 -import com.sun.tools.javac.comp.AttrContext;
  467.81 -import com.sun.tools.javac.comp.Env;
  467.82 -import com.sun.tools.javac.comp.Todo;
  467.83 -import com.sun.tools.javac.main.JavaCompiler;
  467.84 -import com.sun.tools.javac.parser.JavacParser;
  467.85 -import com.sun.tools.javac.parser.Lexer;
  467.86 -import com.sun.tools.javac.parser.Parser;
  467.87 -import com.sun.tools.javac.parser.ParserFactory;
  467.88 -import com.sun.tools.javac.parser.Scanner;
  467.89 -import com.sun.tools.javac.parser.ScannerFactory;
  467.90 -import com.sun.tools.javac.parser.Tokens.Token;
  467.91 -import com.sun.tools.javac.parser.Tokens.TokenKind;
  467.92 -import com.sun.tools.javac.tree.JCTree;
  467.93 -import com.sun.tools.javac.tree.JCTree.JCCase;
  467.94 -import com.sun.tools.javac.tree.JCTree.JCCatch;
  467.95 -import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
  467.96 -import com.sun.tools.javac.tree.JCTree.JCExpression;
  467.97 -import com.sun.tools.javac.tree.JCTree.JCFieldAccess;
  467.98 -import com.sun.tools.javac.tree.JCTree.JCIdent;
  467.99 -import com.sun.tools.javac.tree.JCTree.JCMethodDecl;
 467.100 -import com.sun.tools.javac.tree.JCTree.JCModifiers;
 467.101 -import com.sun.tools.javac.tree.JCTree.JCStatement;
 467.102 -import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
 467.103 -import com.sun.tools.javac.util.Context;
 467.104 -import com.sun.tools.javac.util.JCDiagnostic;
 467.105 -import com.sun.tools.javac.util.ListBuffer;
 467.106 -import com.sun.tools.javac.util.Log;
 467.107 -import com.sun.tools.javac.util.Names;
 467.108 -import com.sun.tools.javadoc.Messager;
 467.109 -import java.io.File;
 467.110 -import java.io.IOException;
 467.111 -import java.net.URI;
 467.112 -import java.nio.CharBuffer;
 467.113 -import java.util.Arrays;
 467.114 -import java.util.Collection;
 467.115 -import java.util.Collections;
 467.116 -import java.util.EnumSet;
 467.117 -import java.util.HashMap;
 467.118 -import java.util.HashSet;
 467.119 -import java.util.Iterator;
 467.120 -import java.util.LinkedList;
 467.121 -import java.util.List;
 467.122 -import java.util.Locale;
 467.123 -import java.util.Map;
 467.124 -import java.util.Map.Entry;
 467.125 -import java.util.Set;
 467.126 -import java.util.concurrent.atomic.AtomicBoolean;
 467.127 -import javax.lang.model.element.AnnotationMirror;
 467.128 -import javax.lang.model.element.AnnotationValue;
 467.129 -import javax.lang.model.element.AnnotationValueVisitor;
 467.130 -import javax.lang.model.element.Element;
 467.131 -import javax.lang.model.element.ElementKind;
 467.132 -import javax.lang.model.element.ExecutableElement;
 467.133 -import javax.lang.model.element.Modifier;
 467.134 -import javax.lang.model.element.Name;
 467.135 -import javax.lang.model.element.TypeElement;
 467.136 -import javax.lang.model.element.VariableElement;
 467.137 -import javax.lang.model.type.TypeKind;
 467.138 -import javax.lang.model.type.TypeMirror;
 467.139 -import javax.lang.model.util.Elements;
 467.140 -import javax.tools.Diagnostic;
 467.141 -import javax.tools.JavaCompiler.CompilationTask;
 467.142 -import javax.tools.JavaFileObject;
 467.143 -import javax.tools.SimpleJavaFileObject;
 467.144 -import org.netbeans.api.annotations.common.CheckForNull;
 467.145 -import org.netbeans.api.annotations.common.NonNull;
 467.146 -import org.netbeans.api.java.classpath.ClassPath;
 467.147 -import org.netbeans.api.java.platform.JavaPlatform;
 467.148 -import org.netbeans.api.java.platform.JavaPlatformManager;
 467.149 -import org.netbeans.api.java.queries.SourceForBinaryQuery;
 467.150 -import org.netbeans.api.java.queries.SourceForBinaryQuery.Result2;
 467.151 -import org.netbeans.api.java.source.ClasspathInfo;
 467.152 -import org.netbeans.api.java.source.CompilationInfo;
 467.153 -import org.netbeans.api.java.source.CompilationInfo.CacheClearPolicy;
 467.154 -import org.netbeans.api.java.source.SourceUtils;
 467.155 -import org.netbeans.api.java.source.TreeMaker;
 467.156 -import org.netbeans.modules.java.hints.providers.spi.ClassPathBasedHintProvider;
 467.157 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
 467.158 -import org.netbeans.modules.java.hints.providers.spi.Trigger.PatternDescription;
 467.159 -import org.netbeans.modules.java.hints.spiimpl.JackpotTrees.CatchWildcard;
 467.160 -import org.netbeans.modules.java.hints.spiimpl.JackpotTrees.VariableWildcard;
 467.161 -import org.netbeans.modules.java.source.JavaSourceAccessor;
 467.162 -import org.netbeans.modules.java.source.builder.TreeFactory;
 467.163 -import org.netbeans.lib.nbjavac.services.CancelService;
 467.164 -import org.netbeans.lib.nbjavac.services.NBParserFactory.NBJavacParser;
 467.165 -import org.netbeans.lib.nbjavac.services.NBParserFactory;
 467.166 -import org.netbeans.lib.nbjavac.services.NBResolve;
 467.167 -import org.netbeans.modules.java.hints.spiimpl.JackpotTrees.AnnotationWildcard;
 467.168 -import org.netbeans.modules.java.hints.spiimpl.JackpotTrees.FakeBlock;
 467.169 -import org.netbeans.modules.java.source.parsing.FileObjects;
 467.170 -import org.netbeans.modules.java.source.pretty.ImportAnalysis2;
 467.171 -import org.netbeans.modules.java.source.transform.ImmutableTreeTranslator;
 467.172 -import org.netbeans.spi.editor.hints.Severity;
 467.173 -import org.netbeans.spi.java.classpath.support.ClassPathSupport;
 467.174 -import org.openide.filesystems.FileObject;
 467.175 -import org.openide.filesystems.FileUtil;
 467.176 -import org.openide.util.Lookup;
 467.177 -import org.openide.util.NbCollections;
 467.178 -import org.openide.util.lookup.ServiceProvider;
 467.179 -
 467.180 -/**
 467.181 - *
 467.182 - * @author Jan Lahoda
 467.183 - */
 467.184 -public class Utilities {
 467.185 -
 467.186 -    private Utilities() {}
 467.187 -    
 467.188 -    public static Set<Severity> disableErrors(FileObject file) {
 467.189 -        if (file.getAttribute(DISABLE_ERRORS) != null) {
 467.190 -            return EnumSet.allOf(Severity.class);
 467.191 -        }
 467.192 -        if (!file.canWrite() && FileUtil.getArchiveFile(file) != null) {
 467.193 -            return EnumSet.allOf(Severity.class);
 467.194 -        }
 467.195 -
 467.196 -        return EnumSet.noneOf(Severity.class);
 467.197 -    }
 467.198 -
 467.199 -    private static final String DISABLE_ERRORS = "disable-java-errors";
 467.200 -    
 467.201 -
 467.202 -    public static <E> Iterable<E> checkedIterableByFilter(final Iterable raw, final Class<E> type, final boolean strict) {
 467.203 -        return new Iterable<E>() {
 467.204 -            public Iterator<E> iterator() {
 467.205 -                return NbCollections.checkedIteratorByFilter(raw.iterator(), type, strict);
 467.206 -            }
 467.207 -        };
 467.208 -    }
 467.209 -    
 467.210 -//    public static AnnotationTree constructConstraint(WorkingCopy wc, String name, TypeMirror tm) {
 467.211 -//        TreeMaker make = wc.getTreeMaker();
 467.212 -//        ExpressionTree variable = prepareAssignment(make, "variable", make.Literal(name));
 467.213 -//        ExpressionTree type     = prepareAssignment(make, "type", make.MemberSelect((ExpressionTree) make.Type(wc.getTypes().erasure(tm)), "class"));
 467.214 -//        TypeElement constraint  = wc.getElements().getTypeElement(Annotations.CONSTRAINT.toFQN());
 467.215 -//
 467.216 -//        return make.Annotation(make.QualIdent(constraint), Arrays.asList(variable, type));
 467.217 -//    }
 467.218 -
 467.219 -    public static ExpressionTree prepareAssignment(TreeMaker make, String name, ExpressionTree value) {
 467.220 -        return make.Assignment(make.Identifier(name), value);
 467.221 -    }
 467.222 -
 467.223 -    public static ExpressionTree findValue(AnnotationTree m, String name) {
 467.224 -        for (ExpressionTree et : m.getArguments()) {
 467.225 -            if (et.getKind() == Kind.ASSIGNMENT) {
 467.226 -                AssignmentTree at = (AssignmentTree) et;
 467.227 -                String varName = ((IdentifierTree) at.getVariable()).getName().toString();
 467.228 -
 467.229 -                if (varName.equals(name)) {
 467.230 -                    return at.getExpression();
 467.231 -                }
 467.232 -            }
 467.233 -
 467.234 -            if (et instanceof LiteralTree/*XXX*/ && "value".equals(name)) {
 467.235 -                return et;
 467.236 -            }
 467.237 -        }
 467.238 -
 467.239 -        return null;
 467.240 -    }
 467.241 -
 467.242 -    public static List<AnnotationTree> findArrayValue(AnnotationTree at, String name) {
 467.243 -        ExpressionTree fixesArray = findValue(at, name);
 467.244 -        List<AnnotationTree> fixes = new LinkedList<AnnotationTree>();
 467.245 -
 467.246 -        if (fixesArray != null && fixesArray.getKind() == Kind.NEW_ARRAY) {
 467.247 -            NewArrayTree trees = (NewArrayTree) fixesArray;
 467.248 -
 467.249 -            for (ExpressionTree fix : trees.getInitializers()) {
 467.250 -                if (fix.getKind() == Kind.ANNOTATION) {
 467.251 -                    fixes.add((AnnotationTree) fix);
 467.252 -                }
 467.253 -            }
 467.254 -        }
 467.255 -
 467.256 -        if (fixesArray != null && fixesArray.getKind() == Kind.ANNOTATION) {
 467.257 -            fixes.add((AnnotationTree) fixesArray);
 467.258 -        }
 467.259 -        
 467.260 -        return fixes;
 467.261 -    }
 467.262 -
 467.263 -    public static boolean isPureMemberSelect(Tree mst, boolean allowVariables) {
 467.264 -        switch (mst.getKind()) {
 467.265 -            case IDENTIFIER: return allowVariables || ((IdentifierTree) mst).getName().charAt(0) != '$';
 467.266 -            case MEMBER_SELECT: return isPureMemberSelect(((MemberSelectTree) mst).getExpression(), allowVariables);
 467.267 -            default: return false;
 467.268 -        }
 467.269 -    }
 467.270 -
 467.271 -    public static Map<String, Collection<HintDescription>> sortOutHints(Iterable<? extends HintDescription> hints, Map<String, Collection<HintDescription>> output) {
 467.272 -        for (HintDescription d : hints) {
 467.273 -            Collection<HintDescription> h = output.get(d.getMetadata().displayName);
 467.274 -
 467.275 -            if (h == null) {
 467.276 -                output.put(d.getMetadata().displayName, h = new LinkedList<HintDescription>());
 467.277 -            }
 467.278 -
 467.279 -            h.add(d);
 467.280 -        }
 467.281 -
 467.282 -        return output;
 467.283 -    }
 467.284 -
 467.285 -    public static List<HintDescription> listAllHints(Set<ClassPath> cps) {
 467.286 -        List<HintDescription> result = new LinkedList<HintDescription>();
 467.287 -
 467.288 -        for (Collection<? extends HintDescription> hints : RulesManager.getInstance().readHints(null, cps, new AtomicBoolean()).values()) {
 467.289 -            for (HintDescription hd : hints) {
 467.290 -                if (!(hd.getTrigger() instanceof PatternDescription)) continue; //TODO: only pattern based hints are currently supported
 467.291 -                result.add(hd);
 467.292 -            }
 467.293 -        }
 467.294 -
 467.295 -        result.addAll(listClassPathHints(Collections.<ClassPath>emptySet(), cps));
 467.296 -
 467.297 -        return result;
 467.298 -    }
 467.299 -
 467.300 -    public static List<HintDescription> listClassPathHints(Set<ClassPath> sourceCPs, Set<ClassPath> binaryCPs) {
 467.301 -        List<HintDescription> result = new LinkedList<HintDescription>();
 467.302 -        Set<FileObject> roots = new HashSet<FileObject>();
 467.303 -
 467.304 -        for (ClassPath cp : binaryCPs) {
 467.305 -            for (FileObject r : cp.getRoots()) {
 467.306 -                Result2 src = SourceForBinaryQuery.findSourceRoots2(r.toURL());
 467.307 -
 467.308 -                if (src != null && src.preferSources()) {
 467.309 -                    roots.addAll(Arrays.asList(src.getRoots()));
 467.310 -                } else {
 467.311 -                    roots.add(r);
 467.312 -                }
 467.313 -            }
 467.314 -        }
 467.315 -
 467.316 -        Set<ClassPath> cps = new HashSet<ClassPath>(sourceCPs);
 467.317 -
 467.318 -        cps.add(ClassPathSupport.createClassPath(roots.toArray(new FileObject[0])));
 467.319 -
 467.320 -        ClassPath cp = ClassPathSupport.createProxyClassPath(cps.toArray(new ClassPath[0]));
 467.321 -
 467.322 -        for (ClassPathBasedHintProvider p : Lookup.getDefault().lookupAll(ClassPathBasedHintProvider.class)) {
 467.323 -            result.addAll(p.computeHints(cp));
 467.324 -        }
 467.325 -
 467.326 -        return result;
 467.327 -    }
 467.328 -    
 467.329 -    public static Tree parseAndAttribute(CompilationInfo info, String pattern, Scope scope) {
 467.330 -        return parseAndAttribute(info, pattern, scope, null);
 467.331 -    }
 467.332 -
 467.333 -    public static Tree parseAndAttribute(CompilationInfo info, String pattern, Scope scope, Collection<Diagnostic<? extends JavaFileObject>> errors) {
 467.334 -        return parseAndAttribute(info, JavaSourceAccessor.getINSTANCE().getJavacTask(info), pattern, scope, errors);
 467.335 -    }
 467.336 -
 467.337 -    public static Tree parseAndAttribute(CompilationInfo info, String pattern, Scope scope, SourcePositions[] sourcePositions, Collection<Diagnostic<? extends JavaFileObject>> errors) {
 467.338 -        return parseAndAttribute(info, JavaSourceAccessor.getINSTANCE().getJavacTask(info), pattern, scope, sourcePositions, errors);
 467.339 -    }
 467.340 -
 467.341 -    public static Tree parseAndAttribute(JavacTaskImpl jti, String pattern) {
 467.342 -        return parseAndAttribute(jti, pattern, null);
 467.343 -    }
 467.344 -
 467.345 -    public static Tree parseAndAttribute(JavacTaskImpl jti, String pattern, Collection<Diagnostic<? extends JavaFileObject>> errors) {
 467.346 -        return parseAndAttribute(null, jti, pattern, null, errors);
 467.347 -    }
 467.348 -
 467.349 -    public static Tree parseAndAttribute(JavacTaskImpl jti, String pattern, SourcePositions[] sourcePositions, Collection<Diagnostic<? extends JavaFileObject>> errors) {
 467.350 -        return parseAndAttribute(null, jti, pattern, null, sourcePositions, errors);
 467.351 -    }
 467.352 -
 467.353 -    private static Tree parseAndAttribute(CompilationInfo info, JavacTaskImpl jti, String pattern, Scope scope, Collection<Diagnostic<? extends JavaFileObject>> errors) {
 467.354 -        return parseAndAttribute(info, jti, pattern, scope, new SourcePositions[1], errors);
 467.355 -    }
 467.356 -
 467.357 -    private static Tree parseAndAttribute(CompilationInfo info, JavacTaskImpl jti, String pattern, Scope scope, SourcePositions[] sourcePositions, Collection<Diagnostic<? extends JavaFileObject>> errors) {
 467.358 -        Context c = jti.getContext();
 467.359 -        TreeFactory make = TreeFactory.instance(c);
 467.360 -        List<Diagnostic<? extends JavaFileObject>> patternTreeErrors = new LinkedList<Diagnostic<? extends JavaFileObject>>();
 467.361 -        Tree toAttribute;
 467.362 -        Tree patternTree = toAttribute = !isStatement(pattern) ? parseExpression(c, pattern, true, sourcePositions, patternTreeErrors) : null;
 467.363 -        int offset = 0;
 467.364 -        boolean expression = true;
 467.365 -        boolean classMember = false;
 467.366 -
 467.367 -        if (pattern.startsWith("case ")) {//XXX: should be a lexer token
 467.368 -            List<Diagnostic<? extends JavaFileObject>> currentPatternTreeErrors = new LinkedList<Diagnostic<? extends JavaFileObject>>();
 467.369 -            Tree switchTree = parseStatement(c, "switch ($$foo) {" + pattern + "}", sourcePositions, currentPatternTreeErrors);
 467.370 -
 467.371 -            offset = "switch ($$foo) {".length();
 467.372 -            patternTreeErrors = currentPatternTreeErrors;
 467.373 -            patternTree = toAttribute = ((SwitchTree) switchTree).getCases().get(0);
 467.374 -        }
 467.375 -
 467.376 -        if (patternTree == null || isErrorTree(patternTree)) {
 467.377 -            SourcePositions[] currentPatternTreePositions = new SourcePositions[1];
 467.378 -            List<Diagnostic<? extends JavaFileObject>> currentPatternTreeErrors = new LinkedList<Diagnostic<? extends JavaFileObject>>();
 467.379 -            Tree currentPatternTree = parseStatement(c, "{" + pattern + "}", currentPatternTreePositions, currentPatternTreeErrors);
 467.380 -
 467.381 -            assert currentPatternTree.getKind() == Kind.BLOCK : currentPatternTree.getKind();
 467.382 -
 467.383 -            List<? extends StatementTree> statements = ((BlockTree) currentPatternTree).getStatements();
 467.384 -
 467.385 -            if (statements.size() == 1) {
 467.386 -                currentPatternTree = statements.get(0);
 467.387 -            } else {
 467.388 -                com.sun.tools.javac.util.List<JCStatement> newStatements = com.sun.tools.javac.util.List.<JCStatement>nil();
 467.389 -
 467.390 -                if (!statements.isEmpty() && !Utilities.isMultistatementWildcardTree(statements.get(0)))
 467.391 -                    newStatements = newStatements.append((JCStatement) make.ExpressionStatement(make.Identifier("$$1$")));
 467.392 -                for (StatementTree st : statements) {
 467.393 -                    newStatements = newStatements.append((JCStatement) st);
 467.394 -                }
 467.395 -                if (!statements.isEmpty() && !Utilities.isMultistatementWildcardTree(statements.get(statements.size() - 1)))
 467.396 -                    newStatements = newStatements.append((JCStatement) make.ExpressionStatement(make.Identifier("$$2$")));
 467.397 -
 467.398 -                currentPatternTree = new FakeBlock(0L, newStatements);
 467.399 -            }
 467.400 -
 467.401 -            if (!currentPatternTreeErrors.isEmpty() || containsError(currentPatternTree)) {
 467.402 -                //maybe a class member?
 467.403 -                SourcePositions[] classPatternTreePositions = new SourcePositions[1];
 467.404 -                List<Diagnostic<? extends JavaFileObject>> classPatternTreeErrors = new LinkedList<Diagnostic<? extends JavaFileObject>>();
 467.405 -                Tree classPatternTree = parseExpression(c, "new Object() {" + pattern + "}", false, classPatternTreePositions, classPatternTreeErrors);
 467.406 -
 467.407 -                if (!containsError(classPatternTree)) {
 467.408 -                    sourcePositions[0] = classPatternTreePositions[0];
 467.409 -                    offset = "new Object() {".length();
 467.410 -                    patternTreeErrors = classPatternTreeErrors;
 467.411 -                    patternTree = toAttribute = classPatternTree;
 467.412 -                    classMember = true;
 467.413 -                } else {
 467.414 -                    offset = 1;
 467.415 -                    sourcePositions[0] = currentPatternTreePositions[0];
 467.416 -                    VariableTree var;
 467.417 -                    Names names = Names.instance(jti.getContext());
 467.418 -                    if (currentPatternTree.getKind() == Kind.VARIABLE && (var = ((VariableTree) currentPatternTree)).getType().getKind() == Kind.ERRONEOUS && var.getName() == names.error && var.getInitializer() == null && var.getModifiers().getAnnotations().size() == 1 && !containsError(var.getModifiers().getAnnotations().get(0))) {
 467.419 -                        patternTreeErrors = currentPatternTreeErrors; //TODO: the errors are incorrect
 467.420 -                        toAttribute = currentPatternTree;
 467.421 -                        patternTree = var.getModifiers().getAnnotations().get(0);
 467.422 -                    } else {
 467.423 -                        patternTreeErrors = currentPatternTreeErrors;
 467.424 -                        patternTree = toAttribute = currentPatternTree;
 467.425 -                    }
 467.426 -                }
 467.427 -            } else {
 467.428 -                sourcePositions[0] = currentPatternTreePositions[0];
 467.429 -                offset = 1;
 467.430 -                patternTreeErrors = currentPatternTreeErrors;
 467.431 -                patternTree = toAttribute = currentPatternTree;
 467.432 -            }
 467.433 -
 467.434 -            expression = false;
 467.435 -        }
 467.436 -
 467.437 -        if (scope != null) {
 467.438 -            TypeMirror type = attributeTree(jti, toAttribute, scope, patternTreeErrors);
 467.439 -
 467.440 -            if (isError(type) && expression) {
 467.441 -                //maybe type?
 467.442 -                if (Utilities.isPureMemberSelect(patternTree, false)) {
 467.443 -                    SourcePositions[] varPositions = new SourcePositions[1];
 467.444 -                    List<Diagnostic<? extends JavaFileObject>> varErrors = new LinkedList<Diagnostic<? extends JavaFileObject>>();
 467.445 -                    Tree var = parseExpression(c, pattern + ".Class.class;", false, varPositions, varErrors);
 467.446 -
 467.447 -                    attributeTree(jti, var, scope, varErrors);
 467.448 -
 467.449 -                    ExpressionTree typeTree = ((MemberSelectTree) ((MemberSelectTree) var).getExpression()).getExpression();
 467.450 -                    final Symtab symtab = Symtab.instance(c);
 467.451 -                    final Elements el = jti.getElements();
 467.452 -                    final Trees trees = JavacTrees.instance(c);
 467.453 -                    CompilationUnitTree cut = ((JavacScope) scope).getEnv().toplevel;
 467.454 -                    final boolean[] found = new boolean[1];
 467.455 -
 467.456 -                    new TreePathScanner<Void, Void>() {
 467.457 -                        @Override public Void visitMemberSelect(MemberSelectTree node, Void p) {
 467.458 -                            Element currentElement = trees.getElement(getCurrentPath());
 467.459 -
 467.460 -                            if (!isError(currentElement)) {
 467.461 -                                if (currentElement.getKind() == ElementKind.PACKAGE && el.getPackageElement(node.toString()) == null) {
 467.462 -                                    ((JCFieldAccess) node).sym = symtab.errSymbol;
 467.463 -                                    ((JCFieldAccess) node).type = symtab.errType;
 467.464 -                                } else {
 467.465 -                                    found[0] = true;
 467.466 -                                    return null;
 467.467 -                                }
 467.468 -                            }
 467.469 -
 467.470 -                            return super.visitMemberSelect(node, p);
 467.471 -                        }
 467.472 -                        @Override public Void visitIdentifier(IdentifierTree node, Void p) {
 467.473 -                            Element currentElement = trees.getElement(getCurrentPath());
 467.474 -
 467.475 -                            if (!isError(currentElement)) {
 467.476 -                                if (currentElement.getKind() == ElementKind.PACKAGE && el.getPackageElement(node.toString()) == null) {
 467.477 -                                    ((JCIdent) node).sym = symtab.errSymbol;
 467.478 -                                    ((JCIdent) node).type = symtab.errType;
 467.479 -                                } else {
 467.480 -                                    found[0] = true;
 467.481 -                                    return null;
 467.482 -                                }
 467.483 -                            }
 467.484 -                            return super.visitIdentifier(node, p);
 467.485 -                        }
 467.486 -
 467.487 -                    }.scan(new TreePath(new TreePath(cut), typeTree), null);
 467.488 -
 467.489 -                    if (found[0]) {
 467.490 -                        sourcePositions[0] = varPositions[0];
 467.491 -                        offset = 0;
 467.492 -                        patternTreeErrors = varErrors;
 467.493 -                        patternTree = typeTree;
 467.494 -                    }
 467.495 -                }
 467.496 -            }
 467.497 -        }
 467.498 -
 467.499 -        if (classMember) {
 467.500 -            List<? extends Tree> members = ((NewClassTree) patternTree).getClassBody().getMembers();
 467.501 -            
 467.502 -            int syntheticOffset = !members.isEmpty() && members.get(0).getKind() == Kind.METHOD && (((JCMethodDecl) members.get(0)).mods.flags & Flags.GENERATEDCONSTR) != 0 ? 1 : 0;
 467.503 -
 467.504 -            if (members.size() > 1 + syntheticOffset) {
 467.505 -                ModifiersTree mt = make.Modifiers(EnumSet.noneOf(Modifier.class));
 467.506 -                List<Tree> newMembers = new LinkedList<Tree>();
 467.507 -
 467.508 -                newMembers.add(make.ExpressionStatement(make.Identifier("$$1$")));
 467.509 -                newMembers.addAll(members.subList(syntheticOffset, members.size()));
 467.510 -
 467.511 -                patternTree = make.Class(mt, "$", Collections.<TypeParameterTree>emptyList(), null, Collections.<Tree>emptyList(), newMembers);
 467.512 -            } else {
 467.513 -                patternTree = members.get(0 + syntheticOffset);
 467.514 -            }
 467.515 -        }
 467.516 -
 467.517 -        if (errors != null) {
 467.518 -            for (Diagnostic<? extends JavaFileObject> d : patternTreeErrors) {
 467.519 -                errors.add(new OffsetDiagnostic<JavaFileObject>(d, -offset));
 467.520 -            }
 467.521 -        }
 467.522 -
 467.523 -        sourcePositions[0] = new OffsetSourcePositions(sourcePositions[0], -offset);
 467.524 -        
 467.525 -        return patternTree;
 467.526 -    }
 467.527 -
 467.528 -    static boolean isError(Element el) {
 467.529 -        return (el == null || (el.getKind() == ElementKind.CLASS) && isError(((TypeElement) el).asType()));
 467.530 -    }
 467.531 -
 467.532 -    private static boolean isError(TypeMirror type) {
 467.533 -        return type == null || type.getKind() == TypeKind.ERROR;
 467.534 -    }
 467.535 -
 467.536 -    private static boolean isStatement(String pattern) {
 467.537 -        return pattern.trim().endsWith(";");
 467.538 -    }
 467.539 -
 467.540 -    private static boolean isErrorTree(Tree t) {
 467.541 -        return t.getKind() == Kind.ERRONEOUS || (t.getKind() == Kind.IDENTIFIER && ((IdentifierTree) t).getName().contentEquals("<error>")); //TODO: <error>...
 467.542 -    }
 467.543 -    
 467.544 -    private static boolean containsError(Tree t) {
 467.545 -        return new TreeScanner<Boolean, Void>() {
 467.546 -            @Override
 467.547 -            public Boolean scan(Tree node, Void p) {
 467.548 -                if (node != null && isErrorTree(node)) {
 467.549 -                    return true;
 467.550 -                }
 467.551 -                return super.scan(node, p) ==Boolean.TRUE;
 467.552 -            }
 467.553 -            @Override
 467.554 -            public Boolean reduce(Boolean r1, Boolean r2) {
 467.555 -                return r1 == Boolean.TRUE || r2 == Boolean.TRUE;
 467.556 -            }
 467.557 -        }.scan(t, null);
 467.558 -    }
 467.559 -
 467.560 -    private static JCStatement parseStatement(Context context, CharSequence stmt, SourcePositions[] pos, final List<Diagnostic<? extends JavaFileObject>> errors) {
 467.561 -        if (stmt == null || (pos != null && pos.length != 1))
 467.562 -            throw new IllegalArgumentException();
 467.563 -        JavaCompiler compiler = JavaCompiler.instance(context);
 467.564 -        JavaFileObject prev = compiler.log.useSource(new DummyJFO());
 467.565 -        Log.DiagnosticHandler discardHandler = new Log.DiscardDiagnosticHandler(compiler.log) {
 467.566 -            @Override
 467.567 -            public void report(JCDiagnostic diag) {
 467.568 -                errors.add(diag);
 467.569 -            }            
 467.570 -        };
 467.571 -        try {
 467.572 -            CharBuffer buf = CharBuffer.wrap((stmt+"\u0000").toCharArray(), 0, stmt.length());
 467.573 -            ParserFactory factory = ParserFactory.instance(context);
 467.574 -            ScannerFactory scannerFactory = ScannerFactory.instance(context);
 467.575 -            Names names = Names.instance(context);
 467.576 -            Parser parser = new JackpotJavacParser(context, (NBParserFactory) factory, scannerFactory.newScanner(buf, false), false, false, CancelService.instance(context), names);
 467.577 -            if (parser instanceof JavacParser) {
 467.578 -                if (pos != null)
 467.579 -                    pos[0] = new ParserSourcePositions((JavacParser)parser);
 467.580 -                return parser.parseStatement();
 467.581 -            }
 467.582 -            return null;
 467.583 -        } finally {
 467.584 -            compiler.log.useSource(prev);
 467.585 -            compiler.log.popDiagnosticHandler(discardHandler);
 467.586 -        }
 467.587 -    }
 467.588 -
 467.589 -    private static JCExpression parseExpression(Context context, CharSequence expr, boolean onlyFullInput, SourcePositions[] pos, final List<Diagnostic<? extends JavaFileObject>> errors) {
 467.590 -        if (expr == null || (pos != null && pos.length != 1))
 467.591 -            throw new IllegalArgumentException();
 467.592 -        JavaCompiler compiler = JavaCompiler.instance(context);
 467.593 -        JavaFileObject prev = compiler.log.useSource(new DummyJFO());
 467.594 -        Log.DiagnosticHandler discardHandler = new Log.DiscardDiagnosticHandler(compiler.log) {
 467.595 -            @Override
 467.596 -            public void report(JCDiagnostic diag) {
 467.597 -                errors.add(diag);
 467.598 -            }            
 467.599 -        };
 467.600 -        try {
 467.601 -            CharBuffer buf = CharBuffer.wrap((expr+"\u0000").toCharArray(), 0, expr.length());
 467.602 -            ParserFactory factory = ParserFactory.instance(context);
 467.603 -            ScannerFactory scannerFactory = ScannerFactory.instance(context);
 467.604 -            Names names = Names.instance(context);
 467.605 -            Scanner scanner = scannerFactory.newScanner(buf, false);
 467.606 -            Parser parser = new JackpotJavacParser(context, (NBParserFactory) factory, scanner, false, false, CancelService.instance(context), names);
 467.607 -            if (parser instanceof JavacParser) {
 467.608 -                if (pos != null)
 467.609 -                    pos[0] = new ParserSourcePositions((JavacParser)parser);
 467.610 -                JCExpression result = parser.parseExpression();
 467.611 -
 467.612 -                if (!onlyFullInput || scanner.token().kind == TokenKind.EOF) {
 467.613 -                    return result;
 467.614 -                }
 467.615 -            }
 467.616 -            return null;
 467.617 -        } finally {
 467.618 -            compiler.log.useSource(prev);
 467.619 -            compiler.log.popDiagnosticHandler(discardHandler);
 467.620 -        }
 467.621 -    }
 467.622 -
 467.623 -    private static TypeMirror attributeTree(JavacTaskImpl jti, Tree tree, Scope scope, final List<Diagnostic<? extends JavaFileObject>> errors) {
 467.624 -        Log log = Log.instance(jti.getContext());
 467.625 -        JavaFileObject prev = log.useSource(new DummyJFO());
 467.626 -        Log.DiagnosticHandler discardHandler = new Log.DiscardDiagnosticHandler(log) {
 467.627 -            @Override
 467.628 -            public void report(JCDiagnostic diag) {
 467.629 -                errors.add(diag);
 467.630 -            }            
 467.631 -        };
 467.632 -        NBResolve resolve = NBResolve.instance(jti.getContext());
 467.633 -        resolve.disableAccessibilityChecks();
 467.634 -        try {
 467.635 -            Attr attr = Attr.instance(jti.getContext());
 467.636 -            Env<AttrContext> env = ((JavacScope) scope).getEnv();
 467.637 -            if (tree instanceof JCExpression)
 467.638 -                return attr.attribExpr((JCTree) tree,env, Type.noType);
 467.639 -            return attr.attribStat((JCTree) tree,env);
 467.640 -        } finally {
 467.641 -            log.useSource(prev);
 467.642 -            log.popDiagnosticHandler(discardHandler);
 467.643 -            resolve.restoreAccessbilityChecks();
 467.644 -        }
 467.645 -    }
 467.646 -
 467.647 -    public static @CheckForNull CharSequence getWildcardTreeName(@NonNull Tree t) {
 467.648 -        if (t.getKind() == Kind.EXPRESSION_STATEMENT && ((ExpressionStatementTree) t).getExpression().getKind() == Kind.IDENTIFIER) {
 467.649 -            IdentifierTree identTree = (IdentifierTree) ((ExpressionStatementTree) t).getExpression();
 467.650 -            
 467.651 -            return identTree.getName().toString();
 467.652 -        }
 467.653 -
 467.654 -        if (t.getKind() == Kind.IDENTIFIER) {
 467.655 -            IdentifierTree identTree = (IdentifierTree) t;
 467.656 -            String name = identTree.getName().toString();
 467.657 -
 467.658 -            if (name.startsWith("$")) {
 467.659 -                return name;
 467.660 -            }
 467.661 -        }
 467.662 -        
 467.663 -        if (t.getKind() == Kind.TYPE_PARAMETER) {
 467.664 -            String name = ((TypeParameterTree) t).getName().toString();
 467.665 -
 467.666 -            if (name.startsWith("$")) {
 467.667 -                return name;
 467.668 -            }
 467.669 -        }
 467.670 -
 467.671 -        return null;
 467.672 -    }
 467.673 -
 467.674 -    public static boolean isMultistatementWildcard(@NonNull CharSequence name) {
 467.675 -        return name.charAt(name.length() - 1) == '$';
 467.676 -    }
 467.677 -
 467.678 -    public static boolean isMultistatementWildcardTree(Tree tree) {
 467.679 -        CharSequence name = Utilities.getWildcardTreeName(tree);
 467.680 -
 467.681 -        return name != null && Utilities.isMultistatementWildcard(name);
 467.682 -    }
 467.683 -
 467.684 -    private static long inc;
 467.685 -
 467.686 -    public static Scope constructScope(CompilationInfo info, Map<String, TypeMirror> constraints) {
 467.687 -        return constructScope(info, constraints, Collections.<String>emptyList());
 467.688 -    }
 467.689 -
 467.690 -    public static Scope constructScope(CompilationInfo info, Map<String, TypeMirror> constraints, Iterable<? extends String> auxiliaryImports) {
 467.691 -        ScopeDescription desc = new ScopeDescription(constraints, auxiliaryImports);
 467.692 -        Scope result = (Scope) info.getCachedValue(desc);
 467.693 -
 467.694 -        if (result != null) return result;
 467.695 -        
 467.696 -        StringBuilder clazz = new StringBuilder();
 467.697 -
 467.698 -        clazz.append("package $;");
 467.699 -
 467.700 -        for (String i : auxiliaryImports) {
 467.701 -            clazz.append(i);
 467.702 -        }
 467.703 -
 467.704 -        long count = inc++;
 467.705 -
 467.706 -        clazz.append("public class $" + count + "{");
 467.707 -
 467.708 -        for (Entry<String, TypeMirror> e : constraints.entrySet()) {
 467.709 -            if (e.getValue() != null) {
 467.710 -                clazz.append("private ");
 467.711 -                clazz.append(e.getValue().toString()); //XXX
 467.712 -                clazz.append(" ");
 467.713 -                clazz.append(e.getKey());
 467.714 -                clazz.append(";\n");
 467.715 -            }
 467.716 -        }
 467.717 -
 467.718 -        clazz.append("private void test() {\n");
 467.719 -        clazz.append("}\n");
 467.720 -        clazz.append("}\n");
 467.721 -
 467.722 -        JavacTaskImpl jti = JavaSourceAccessor.getINSTANCE().getJavacTask(info);
 467.723 -        Context context = jti.getContext();
 467.724 -        JavaCompiler compiler = JavaCompiler.instance(context);
 467.725 -        Log log = Log.instance(context);
 467.726 -        NBResolve resolve = NBResolve.instance(context);
 467.727 -        Log.DiagnosticHandler discardHandler = new Log.DiscardDiagnosticHandler(compiler.log);
 467.728 -
 467.729 -        JavaFileObject jfo = FileObjects.memoryFileObject("$", "$", new File("/tmp/$" + count + ".java").toURI(), System.currentTimeMillis(), clazz.toString());
 467.730 -
 467.731 -        boolean oldSkipAPs = compiler.skipAnnotationProcessing;
 467.732 -
 467.733 -        try {
 467.734 -            compiler.skipAnnotationProcessing = true;
 467.735 -            resolve.disableAccessibilityChecks();
 467.736 -            
 467.737 -            JCCompilationUnit cut = compiler.parse(jfo);
 467.738 -
 467.739 -            compiler.enterTrees(com.sun.tools.javac.util.List.of(cut));
 467.740 -
 467.741 -            Todo todo = compiler.todo;
 467.742 -            ListBuffer<Env<AttrContext>> defer = new ListBuffer<>();
 467.743 -            
 467.744 -            while (todo.peek() != null) {
 467.745 -                Env<AttrContext> env = todo.remove();
 467.746 -
 467.747 -                if (env.toplevel == cut)
 467.748 -                    compiler.attribute(env);
 467.749 -                else
 467.750 -                    defer = defer.append(env);
 467.751 -            }
 467.752 -
 467.753 -            todo.addAll(defer);
 467.754 -
 467.755 -            Scope res = new ScannerImpl().scan(cut, info);
 467.756 -
 467.757 -            info.putCachedValue(desc, res, CacheClearPolicy.ON_SIGNATURE_CHANGE);
 467.758 -
 467.759 -            return res;
 467.760 -        } finally {
 467.761 -            resolve.restoreAccessbilityChecks();
 467.762 -            log.popDiagnosticHandler(discardHandler);
 467.763 -            compiler.skipAnnotationProcessing = oldSkipAPs;
 467.764 -        }
 467.765 -    }
 467.766 -
 467.767 -    private static final class ScannerImpl extends TreePathScanner<Scope, CompilationInfo> {
 467.768 -
 467.769 -        @Override
 467.770 -        public Scope visitBlock(BlockTree node, CompilationInfo p) {
 467.771 -            return p.getTrees().getScope(getCurrentPath());
 467.772 -        }
 467.773 -
 467.774 -        @Override
 467.775 -        public Scope visitMethod(MethodTree node, CompilationInfo p) {
 467.776 -            if (node.getReturnType() == null) {
 467.777 -                return null;
 467.778 -            }
 467.779 -            return super.visitMethod(node, p);
 467.780 -        }
 467.781 -
 467.782 -        @Override
 467.783 -        public Scope reduce(Scope r1, Scope r2) {
 467.784 -            return r1 != null ? r1 : r2;
 467.785 -        }
 467.786 -
 467.787 -    }
 467.788 -
 467.789 -    private static final class ScopeDescription {
 467.790 -        private final Map<String, TypeMirror> constraints;
 467.791 -        private final Iterable<? extends String> auxiliaryImports;
 467.792 -
 467.793 -        public ScopeDescription(Map<String, TypeMirror> constraints, Iterable<? extends String> auxiliaryImports) {
 467.794 -            this.constraints = constraints;
 467.795 -            this.auxiliaryImports = auxiliaryImports;
 467.796 -        }
 467.797 -
 467.798 -        @Override
 467.799 -        public boolean equals(Object obj) {
 467.800 -            if (obj == null) {
 467.801 -                return false;
 467.802 -            }
 467.803 -            if (getClass() != obj.getClass()) {
 467.804 -                return false;
 467.805 -            }
 467.806 -            final ScopeDescription other = (ScopeDescription) obj;
 467.807 -            if (this.constraints != other.constraints && (this.constraints == null || !this.constraints.equals(other.constraints))) {
 467.808 -                return false;
 467.809 -            }
 467.810 -            if (this.auxiliaryImports != other.auxiliaryImports && (this.auxiliaryImports == null || !this.auxiliaryImports.equals(other.auxiliaryImports))) {
 467.811 -                return false;
 467.812 -            }
 467.813 -            return true;
 467.814 -        }
 467.815 -
 467.816 -        @Override
 467.817 -        public int hashCode() {
 467.818 -            int hash = 7;
 467.819 -            hash = 47 * hash + (this.constraints != null ? this.constraints.hashCode() : 0);
 467.820 -            hash = 47 * hash + (this.auxiliaryImports != null ? this.auxiliaryImports.hashCode() : 0);
 467.821 -            return hash;
 467.822 -        }
 467.823 -
 467.824 -    }
 467.825 -
 467.826 -//    private static Scope constructScope2(CompilationInfo info, Map<String, TypeMirror> constraints) {
 467.827 -//        JavacScope s = (JavacScope) info.getTrees().getScope(new TreePath(info.getCompilationUnit()));
 467.828 -//        Env<AttrContext> env = s.getEnv();
 467.829 -//
 467.830 -//        env = env.dup(env.tree);
 467.831 -//
 467.832 -//        env.info.
 467.833 -//    }
 467.834 -
 467.835 -    public static String toHumanReadableTime(double d) {
 467.836 -        StringBuilder result = new StringBuilder();
 467.837 -        long inSeconds = (long) (d / 1000);
 467.838 -        int seconds = (int) (inSeconds % 60);
 467.839 -        long inMinutes = inSeconds / 60;
 467.840 -        int minutes = (int) (inMinutes % 60);
 467.841 -        long inHours = inMinutes / 60;
 467.842 -
 467.843 -        if (inHours > 0) {
 467.844 -            result.append(inHours);
 467.845 -            result.append("h");
 467.846 -        }
 467.847 -
 467.848 -        if (minutes > 0) {
 467.849 -            result.append(minutes);
 467.850 -            result.append("m");
 467.851 -        }
 467.852 -        
 467.853 -        result.append(seconds);
 467.854 -        result.append("s");
 467.855 -
 467.856 -        return result.toString();
 467.857 -    }
 467.858 -
 467.859 -    public static ClasspathInfo createUniversalCPInfo() {
 467.860 -        return Lookup.getDefault().lookup(SPI.class).createUniversalCPInfo();
 467.861 -    }
 467.862 -
 467.863 -    @SuppressWarnings("deprecation")
 467.864 -    public static void waitScanFinished() throws InterruptedException {
 467.865 -        SourceUtils.waitScanFinished();
 467.866 -    }
 467.867 -
 467.868 -    public static Set<? extends String> findSuppressedWarnings(CompilationInfo info, TreePath path) {
 467.869 -        //TODO: cache?
 467.870 -        Set<String> keys = new HashSet<String>();
 467.871 -
 467.872 -        while (path != null) {
 467.873 -            Tree leaf = path.getLeaf();
 467.874 -
 467.875 -            switch (leaf.getKind()) {
 467.876 -                case METHOD:
 467.877 -                    handleSuppressWarnings(info, path, ((MethodTree) leaf).getModifiers(), keys);
 467.878 -                    break;
 467.879 -                case CLASS:
 467.880 -                    handleSuppressWarnings(info, path, ((ClassTree) leaf).getModifiers(), keys);
 467.881 -                    break;
 467.882 -                case VARIABLE:
 467.883 -                    handleSuppressWarnings(info, path, ((VariableTree) leaf).getModifiers(), keys);
 467.884 -                    break;
 467.885 -            }
 467.886 -
 467.887 -            path = path.getParentPath();
 467.888 -        }
 467.889 -
 467.890 -        return Collections.unmodifiableSet(keys);
 467.891 -    }
 467.892 -
 467.893 -    private static void handleSuppressWarnings(CompilationInfo info, TreePath path, ModifiersTree modifiers, final Set<String> keys) {
 467.894 -        Element el = info.getTrees().getElement(path);
 467.895 -
 467.896 -        if (el == null) {
 467.897 -            return ;
 467.898 -        }
 467.899 -
 467.900 -        for (AnnotationMirror am : el.getAnnotationMirrors()) {
 467.901 -            Name fqn = ((TypeElement) am.getAnnotationType().asElement()).getQualifiedName();
 467.902 -            
 467.903 -            if (!fqn.contentEquals("java.lang.SuppressWarnings")) {
 467.904 -                continue;
 467.905 -            }
 467.906 -
 467.907 -            for (Entry<? extends ExecutableElement, ? extends AnnotationValue> e : am.getElementValues().entrySet()) {
 467.908 -                if (!e.getKey().getSimpleName().contentEquals("value"))
 467.909 -                    continue;
 467.910 -
 467.911 -                e.getValue().accept(new AnnotationValueVisitor<Void, Void>() {
 467.912 -                    public Void visit(AnnotationValue av, Void p) {
 467.913 -                        av.accept(this, p);
 467.914 -                        return null;
 467.915 -                    }
 467.916 -                    public Void visit(AnnotationValue av) {
 467.917 -                        av.accept(this, null);
 467.918 -                        return null;
 467.919 -                    }
 467.920 -                    public Void visitBoolean(boolean b, Void p) {
 467.921 -                        return null;
 467.922 -                    }
 467.923 -                    public Void visitByte(byte b, Void p) {
 467.924 -                        return null;
 467.925 -                    }
 467.926 -                    public Void visitChar(char c, Void p) {
 467.927 -                        return null;
 467.928 -                    }
 467.929 -                    public Void visitDouble(double d, Void p) {
 467.930 -                        return null;
 467.931 -                    }
 467.932 -                    public Void visitFloat(float f, Void p) {
 467.933 -                        return null;
 467.934 -                    }
 467.935 -                    public Void visitInt(int i, Void p) {
 467.936 -                        return null;
 467.937 -                    }
 467.938 -                    public Void visitLong(long i, Void p) {
 467.939 -                        return null;
 467.940 -                    }
 467.941 -                    public Void visitShort(short s, Void p) {
 467.942 -                        return null;
 467.943 -                    }
 467.944 -                    public Void visitString(String s, Void p) {
 467.945 -                        keys.add(s);
 467.946 -                        return null;
 467.947 -                    }
 467.948 -                    public Void visitType(TypeMirror t, Void p) {
 467.949 -                        return null;
 467.950 -                    }
 467.951 -                    public Void visitEnumConstant(VariableElement c, Void p) {
 467.952 -                        return null;
 467.953 -                    }
 467.954 -                    public Void visitAnnotation(AnnotationMirror a, Void p) {
 467.955 -                        return null;
 467.956 -                    }
 467.957 -                    public Void visitArray(List<? extends AnnotationValue> vals, Void p) {
 467.958 -                        for (AnnotationValue av : vals) {
 467.959 -                            av.accept(this, p);
 467.960 -                        }
 467.961 -                        return null;
 467.962 -                    }
 467.963 -                    public Void visitUnknown(AnnotationValue av, Void p) {
 467.964 -                        return null;
 467.965 -                    }
 467.966 -                }, null);
 467.967 -            }
 467.968 -        }
 467.969 -    }
 467.970 -
 467.971 -    public static Tree generalizePattern(CompilationInfo info, TreePath original) {
 467.972 -        return generalizePattern(JavaSourceAccessor.getINSTANCE().getJavacTask(info), original);
 467.973 -    }
 467.974 -
 467.975 -    public static Tree generalizePattern(CompilationTask task, TreePath original) {
 467.976 -        JavacTaskImpl jti = (JavacTaskImpl) task;
 467.977 -        com.sun.tools.javac.util.Context c = jti.getContext();
 467.978 -        TreeFactory make = TreeFactory.instance(c);
 467.979 -        Trees javacTrees = Trees.instance(task);
 467.980 -        GeneralizePattern gp = new GeneralizePattern(javacTrees, make);
 467.981 -
 467.982 -        gp.scan(original, null);
 467.983 -
 467.984 -        GeneralizePatternITT itt = new GeneralizePatternITT(gp.tree2Variable);
 467.985 -
 467.986 -        itt.attach(c, new NoImports(c), null);
 467.987 -
 467.988 -        return itt.translate(original.getLeaf());
 467.989 -    }
 467.990 -
 467.991 -    public static Tree generalizePattern(CompilationInfo info, TreePath original, int firstStatement, int lastStatement) {
 467.992 -        JavacTaskImpl jti = JavaSourceAccessor.getINSTANCE().getJavacTask(info);
 467.993 -        com.sun.tools.javac.util.Context c = jti.getContext();
 467.994 -        TreeFactory make = TreeFactory.instance(c);
 467.995 -        Tree translated = Utilities.generalizePattern(jti, original);
 467.996 -
 467.997 -        assert translated.getKind() == Kind.BLOCK;
 467.998 -
 467.999 -        List<StatementTree> newStatements = new LinkedList<StatementTree>();
467.1000 -        BlockTree block = (BlockTree) translated;
467.1001 -
467.1002 -        if (firstStatement != lastStatement) {
467.1003 -            newStatements.add(make.ExpressionStatement(make.Identifier("$s0$")));
467.1004 -            newStatements.addAll(block.getStatements().subList(firstStatement, lastStatement + 1));
467.1005 -            newStatements.add(make.ExpressionStatement(make.Identifier("$s1$")));
467.1006 -
467.1007 -            translated = make.Block(newStatements, block.isStatic());
467.1008 -        } else {
467.1009 -            translated = block.getStatements().get(firstStatement);
467.1010 -        }
467.1011 -
467.1012 -        return translated;
467.1013 -    }
467.1014 -
467.1015 -    public interface SPI {
467.1016 -        public ClasspathInfo createUniversalCPInfo();
467.1017 -    }
467.1018 -
467.1019 -    @ServiceProvider(service=SPI.class)
467.1020 -    public static final class NbSPIImpl implements SPI {
467.1021 -
467.1022 -        public ClasspathInfo createUniversalCPInfo() {
467.1023 -            JavaPlatform select = JavaPlatform.getDefault();
467.1024 -
467.1025 -            if (select.getSpecification().getVersion() != null) {
467.1026 -                for (JavaPlatform p : JavaPlatformManager.getDefault().getInstalledPlatforms()) {
467.1027 -                    if (!"j2se".equals(p.getSpecification().getName()) || p.getSpecification().getVersion() == null) continue;
467.1028 -                    if (p.getSpecification().getVersion().compareTo(select.getSpecification().getVersion()) > 0) {
467.1029 -                        select = p;
467.1030 -                    }
467.1031 -                }
467.1032 -            }
467.1033 -
467.1034 -            return ClasspathInfo.create(select.getBootstrapLibraries(), ClassPath.EMPTY, ClassPath.EMPTY);
467.1035 -        }
467.1036 -
467.1037 -    }
467.1038 -    
467.1039 -    private static final class GeneralizePattern extends TreePathScanner<Void, Void> {
467.1040 -
467.1041 -        public final Map<Tree, Tree> tree2Variable = new HashMap<Tree, Tree>();
467.1042 -        private final Map<Element, String> element2Variable = new HashMap<Element, String>();
467.1043 -        private final Trees javacTrees;
467.1044 -        private final TreeFactory make;
467.1045 -
467.1046 -        private int currentVariableIndex = 0;
467.1047 -
467.1048 -        public GeneralizePattern(Trees javacTrees, TreeFactory make) {
467.1049 -            this.javacTrees = javacTrees;
467.1050 -            this.make = make;
467.1051 -        }
467.1052 -
467.1053 -        private @NonNull String getVariable(@NonNull Element el) {
467.1054 -            String var = element2Variable.get(el);
467.1055 -
467.1056 -            if (var == null) {
467.1057 -                element2Variable.put(el, var = "$" + currentVariableIndex++);
467.1058 -            }
467.1059 -
467.1060 -            return var;
467.1061 -        }
467.1062 -
467.1063 -        private boolean shouldBeGeneralized(@NonNull Element el) {
467.1064 -            if (el.getModifiers().contains(Modifier.PRIVATE)) {
467.1065 -                return true;
467.1066 -            }
467.1067 -
467.1068 -            switch (el.getKind()) {
467.1069 -                case LOCAL_VARIABLE:
467.1070 -                case EXCEPTION_PARAMETER:
467.1071 -                case PARAMETER:
467.1072 -                    return true;
467.1073 -            }
467.1074 -
467.1075 -            return false;
467.1076 -        }
467.1077 -
467.1078 -        @Override
467.1079 -        public Void visitIdentifier(IdentifierTree node, Void p) {
467.1080 -            Element e = javacTrees.getElement(getCurrentPath());
467.1081 -
467.1082 -            if (e != null && shouldBeGeneralized(e)) {
467.1083 -                tree2Variable.put(node, make.Identifier(getVariable(e)));
467.1084 -            }
467.1085 -
467.1086 -            return super.visitIdentifier(node, p);
467.1087 -        }
467.1088 -
467.1089 -        @Override
467.1090 -        public Void visitVariable(VariableTree node, Void p) {
467.1091 -            Element e = javacTrees.getElement(getCurrentPath());
467.1092 -
467.1093 -            if (e != null && shouldBeGeneralized(e)) {
467.1094 -                VariableTree nue = make.Variable(node.getModifiers(), getVariable(e), node.getType(), node.getInitializer());
467.1095 -
467.1096 -                tree2Variable.put(node, nue);
467.1097 -            }
467.1098 -
467.1099 -            return super.visitVariable(node, p);
467.1100 -        }
467.1101 -
467.1102 -        @Override
467.1103 -        public Void visitNewClass(NewClassTree node, Void p) {
467.1104 -            //XXX:
467.1105 -            if (node.getEnclosingExpression() != null) {
467.1106 -                tree2Variable.put(node, make.Identifier("$" + currentVariableIndex++));
467.1107 -                return null;
467.1108 -            }
467.1109 -
467.1110 -            NewClassTree nue = make.NewClass(node.getEnclosingExpression(), Collections.<ExpressionTree>singletonList(make.Identifier("$" + currentVariableIndex++ + "$")), make.Identifier("$" + currentVariableIndex++), Collections.<ExpressionTree>singletonList(make.Identifier("$" + currentVariableIndex++ + "$")), null);
467.1111 -
467.1112 -            tree2Variable.put(node, nue);
467.1113 -
467.1114 -            return null;
467.1115 -        }
467.1116 -
467.1117 -    }
467.1118 -
467.1119 -    private static final class GeneralizePatternITT extends ImmutableTreeTranslator {
467.1120 -
467.1121 -        private final Map<Tree, Tree> tree2Variable;
467.1122 -
467.1123 -        public GeneralizePatternITT(Map<Tree, Tree> tree2Variable) {
467.1124 -            super(null);
467.1125 -            this.tree2Variable = tree2Variable;
467.1126 -        }
467.1127 -
467.1128 -        @Override
467.1129 -        public Tree translate(Tree tree) {
467.1130 -            Tree var = tree2Variable.remove(tree);
467.1131 -
467.1132 -            if (var != null) {
467.1133 -                return super.translate(var);
467.1134 -            }
467.1135 -
467.1136 -            return super.translate(tree);
467.1137 -        }
467.1138 -
467.1139 -    }
467.1140 -
467.1141 -    private static final class NoImports extends ImportAnalysis2 {
467.1142 -
467.1143 -        public NoImports(Context env) {
467.1144 -            super(env);
467.1145 -        }
467.1146 -
467.1147 -        @Override
467.1148 -        public void classEntered(ClassTree clazz) {}
467.1149 -
467.1150 -        @Override
467.1151 -        public void enterVisibleThroughClasses(ClassTree clazz) {}
467.1152 -
467.1153 -        @Override
467.1154 -        public void classLeft() {}
467.1155 -
467.1156 -        @Override
467.1157 -        public ExpressionTree resolveImport(MemberSelectTree orig, Element element) {
467.1158 -            return orig;
467.1159 -        }
467.1160 -
467.1161 -        @Override
467.1162 -        public void setCompilationUnit(CompilationUnitTree cut) {}
467.1163 -
467.1164 -        @Override
467.1165 -        public void setImports(List<? extends ImportTree> importsToAdd) {}
467.1166 -
467.1167 -        @Override
467.1168 -        public Set<? extends Element> getImports() {
467.1169 -            return Collections.emptySet();
467.1170 -        }
467.1171 -
467.1172 -        @Override
467.1173 -        public void setPackage(ExpressionTree packageNameTree) {}
467.1174 -
467.1175 -    }
467.1176 -
467.1177 -    public static long patternValue(Tree pattern) {
467.1178 -        class VisitorImpl extends TreeScanner<Void, Void> {
467.1179 -            private int value;
467.1180 -            @Override
467.1181 -            public Void scan(Tree node, Void p) {
467.1182 -                if (node != null) value++;
467.1183 -                return super.scan(node, p);
467.1184 -            }
467.1185 -            @Override
467.1186 -            public Void visitIdentifier(IdentifierTree node, Void p) {
467.1187 -                if (node.getName().toString().startsWith("$")) value--;
467.1188 -                
467.1189 -                return super.visitIdentifier(node, p);
467.1190 -            }
467.1191 -            @Override
467.1192 -            public Void visitNewClass(NewClassTree node, Void p) {
467.1193 -                return null;
467.1194 -            }
467.1195 -        }
467.1196 -
467.1197 -        VisitorImpl vi = new VisitorImpl();
467.1198 -
467.1199 -        vi.scan(pattern, null);
467.1200 -
467.1201 -        return vi.value;
467.1202 -    }
467.1203 -
467.1204 -    public static boolean containsMultistatementTrees(List<? extends Tree> statements) {
467.1205 -        for (Tree t : statements) {
467.1206 -            if (Utilities.isMultistatementWildcardTree(t)) {
467.1207 -                return true;
467.1208 -            }
467.1209 -        }
467.1210 -
467.1211 -        return false;
467.1212 -    }
467.1213 -
467.1214 -    public static boolean isJavadocSupported(CompilationInfo info) {
467.1215 -        Context c = JavaSourceAccessor.getINSTANCE().getJavacTask(info).getContext();
467.1216 -
467.1217 -        try {
467.1218 -        return c.get(Log.logKey) instanceof Messager;
467.1219 -        } catch (NoClassDefFoundError e) {
467.1220 -            return false;
467.1221 -        }
467.1222 -    }
467.1223 -
467.1224 -    private static class JackpotJavacParser extends NBJavacParser {
467.1225 -
467.1226 -        private final Context ctx;
467.1227 -        private final com.sun.tools.javac.util.Name dollar;
467.1228 -        public JackpotJavacParser(Context ctx, NBParserFactory fac,
467.1229 -                         Lexer S,
467.1230 -                         boolean keepDocComments,
467.1231 -                         boolean keepLineMap,
467.1232 -                         CancelService cancelService,
467.1233 -                         Names names) {
467.1234 -            super(fac, S, keepDocComments, keepLineMap, true, cancelService);
467.1235 -            this.ctx = ctx;
467.1236 -            this.dollar = names.fromString("$");
467.1237 -        }
467.1238 -
467.1239 -        @Override
467.1240 -        protected JCModifiers modifiersOpt(JCModifiers partial) {
467.1241 -            if (token.kind == TokenKind.IDENTIFIER) {
467.1242 -                String ident = token.name().toString();
467.1243 -
467.1244 -                if (Utilities.isMultistatementWildcard(ident)) {
467.1245 -                    com.sun.tools.javac.util.Name name = token.name();
467.1246 -
467.1247 -                    nextToken();
467.1248 -                    
467.1249 -                    JCModifiers result = super.modifiersOpt(partial);
467.1250 -                    
467.1251 -                    result.annotations = result.annotations.prepend(new AnnotationWildcard(name, F.Ident(name)));
467.1252 -
467.1253 -                    return result;
467.1254 -                }
467.1255 -            }
467.1256 -
467.1257 -            return super.modifiersOpt(partial);
467.1258 -        }
467.1259 -
467.1260 -        @Override
467.1261 -        public JCVariableDecl formalParameter(boolean lambdaParam) {
467.1262 -            if (token.kind == TokenKind.IDENTIFIER) {
467.1263 -                if (token.name().startsWith(dollar)) {
467.1264 -                    com.sun.tools.javac.util.Name name = token.name();
467.1265 -
467.1266 -                    Token peeked = S.token(1);
467.1267 -
467.1268 -                    if (peeked.kind == TokenKind.COMMA || peeked.kind == TokenKind.RPAREN) {
467.1269 -                        nextToken();
467.1270 -                        return new VariableWildcard(ctx, name, F.Ident(name));
467.1271 -                    }
467.1272 -                }
467.1273 -            }
467.1274 -
467.1275 -            return super.formalParameter(lambdaParam);
467.1276 -        }
467.1277 -
467.1278 -        @Override
467.1279 -        protected JCVariableDecl implicitParameter() {
467.1280 -            if (token.kind == TokenKind.IDENTIFIER) {
467.1281 -                if (token.name().startsWith(dollar)) {
467.1282 -                    com.sun.tools.javac.util.Name name = token.name();
467.1283 -
467.1284 -                    Token peeked = S.token(1);
467.1285 -
467.1286 -                    if (peeked.kind == TokenKind.COMMA || peeked.kind == TokenKind.RPAREN) {
467.1287 -                        nextToken();
467.1288 -                        return new VariableWildcard(ctx, name, F.Ident(name));
467.1289 -                    }
467.1290 -                }
467.1291 -            }
467.1292 -
467.1293 -            return super.implicitParameter();
467.1294 -        }
467.1295 -        
467.1296 -        @Override
467.1297 -        protected JCCatch catchClause() {
467.1298 -            if (token.kind == TokenKind.CATCH) {
467.1299 -                Token peeked = S.token(1);
467.1300 -                
467.1301 -                if (   peeked.kind == TokenKind.IDENTIFIER
467.1302 -                    && Utilities.isMultistatementWildcard(peeked.name().toString())) {
467.1303 -                    accept(TokenKind.CATCH);
467.1304 -                    
467.1305 -                    com.sun.tools.javac.util.Name name = token.name();
467.1306 -
467.1307 -                    accept(TokenKind.IDENTIFIER);
467.1308 -
467.1309 -                    return new CatchWildcard(ctx, name, F.Ident(name));
467.1310 -                } else {
467.1311 -                    nextToken();
467.1312 -                }
467.1313 -            }
467.1314 -            return super.catchClause();
467.1315 -        }
467.1316 -
467.1317 -        @Override
467.1318 -        public com.sun.tools.javac.util.List<JCTree> classOrInterfaceBodyDeclaration(com.sun.tools.javac.util.Name className, boolean isInterface) {
467.1319 -            if (token.kind == TokenKind.IDENTIFIER) {
467.1320 -                if (token.name().startsWith(dollar)) {
467.1321 -                    com.sun.tools.javac.util.Name name = token.name();
467.1322 -
467.1323 -                    Token peeked = S.token(1);
467.1324 -
467.1325 -                    if (peeked.kind == TokenKind.SEMI) {
467.1326 -                        nextToken();
467.1327 -                        nextToken();
467.1328 -                        
467.1329 -                        return com.sun.tools.javac.util.List.<JCTree>of(F.Ident(name));
467.1330 -                    }
467.1331 -                }
467.1332 -            }
467.1333 -            return super.classOrInterfaceBodyDeclaration(className, isInterface);
467.1334 -        }
467.1335 -        
467.1336 -        @Override
467.1337 -        protected JCExpression checkExprStat(JCExpression t) {
467.1338 -            if (t.getTag() == JCTree.Tag.IDENT) {
467.1339 -                if (((IdentifierTree) t).getName().toString().startsWith("$")) {
467.1340 -                    return t;
467.1341 -                }
467.1342 -            }
467.1343 -            return super.checkExprStat(t);
467.1344 -        }
467.1345 -
467.1346 -        @Override
467.1347 -        protected JCCase switchBlockStatementGroup() {
467.1348 -            if (token.kind == TokenKind.CASE) {
467.1349 -                Token peeked = S.token(1);
467.1350 -
467.1351 -                if (peeked.kind == TokenKind.IDENTIFIER) {
467.1352 -                    String ident = peeked.name().toString();
467.1353 -
467.1354 -                    if (ident.startsWith("$") && ident.endsWith("$")) {
467.1355 -                        nextToken();
467.1356 -                        
467.1357 -                        int pos = token.pos;
467.1358 -                        com.sun.tools.javac.util.Name name = token.name();
467.1359 -
467.1360 -                        nextToken();
467.1361 -
467.1362 -                        if (token.kind == TokenKind.SEMI) {
467.1363 -                            nextToken();
467.1364 -                        }
467.1365 -
467.1366 -                        return new JackpotTrees.CaseWildcard(ctx, name, F.at(pos).Ident(name));
467.1367 -                    }
467.1368 -                }
467.1369 -            }
467.1370 -
467.1371 -            return super.switchBlockStatementGroup();
467.1372 -        }
467.1373 -
467.1374 -
467.1375 -        @Override
467.1376 -        protected JCTree resource() {
467.1377 -            if (token.kind == TokenKind.IDENTIFIER && token.name().startsWith(dollar)) {
467.1378 -                Token peeked = S.token(1);
467.1379 -
467.1380 -                if (peeked.kind == TokenKind.SEMI || peeked.kind == TokenKind.RPAREN) {
467.1381 -                    int pos = token.pos;
467.1382 -                    com.sun.tools.javac.util.Name name = token.name();
467.1383 -
467.1384 -                    nextToken();
467.1385 -
467.1386 -                    return F.at(pos).Ident(name);
467.1387 -                }
467.1388 -            }
467.1389 -            return super.resource();
467.1390 -        }
467.1391 -
467.1392 -    }
467.1393 -
467.1394 -    private static final class DummyJFO extends SimpleJavaFileObject {
467.1395 -        private DummyJFO() {
467.1396 -            super(URI.create("dummy.java"), JavaFileObject.Kind.SOURCE);
467.1397 -        }
467.1398 -        @Override
467.1399 -        public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException {
467.1400 -            return "";
467.1401 -        }
467.1402 -    };
467.1403 -
467.1404 -    /**
467.1405 -     * Only for members (i.e. generated constructor):
467.1406 -     */
467.1407 -    public static List<? extends Tree> filterHidden(TreePath basePath, Iterable<? extends Tree> members) {
467.1408 -        List<Tree> result = new LinkedList<Tree>();
467.1409 -
467.1410 -        for (Tree t : members) {
467.1411 -            if (!isSynthetic(basePath != null ? basePath.getCompilationUnit() : null, t)) {
467.1412 -                result.add(t);
467.1413 -            }
467.1414 -        }
467.1415 -
467.1416 -        return result;
467.1417 -    }
467.1418 -
467.1419 -    private static boolean isSynthetic(CompilationUnitTree cut, Tree leaf) throws NullPointerException {
467.1420 -        JCTree tree = (JCTree) leaf;
467.1421 -
467.1422 -        if (tree.pos == (-1))
467.1423 -            return true;
467.1424 -
467.1425 -        if (leaf.getKind() == Kind.METHOD) {
467.1426 -            //check for synthetic constructor:
467.1427 -            return (((JCMethodDecl)leaf).mods.flags & Flags.GENERATEDCONSTR) != 0L;
467.1428 -        }
467.1429 -
467.1430 -        //check for synthetic superconstructor call:
467.1431 -        if (cut != null && leaf.getKind() == Kind.EXPRESSION_STATEMENT) {
467.1432 -            ExpressionStatementTree est = (ExpressionStatementTree) leaf;
467.1433 -
467.1434 -            if (est.getExpression().getKind() == Kind.METHOD_INVOCATION) {
467.1435 -                MethodInvocationTree mit = (MethodInvocationTree) est.getExpression();
467.1436 -
467.1437 -                if (mit.getMethodSelect().getKind() == Kind.IDENTIFIER) {
467.1438 -                    IdentifierTree it = (IdentifierTree) mit.getMethodSelect();
467.1439 -
467.1440 -                    if ("super".equals(it.getName().toString())) {
467.1441 -                        return ((JCCompilationUnit) cut).endPositions.getEndPos(tree) == (-1);
467.1442 -                    }
467.1443 -                }
467.1444 -            }
467.1445 -        }
467.1446 -
467.1447 -        return false;
467.1448 -    }
467.1449 -
467.1450 -    public static boolean isFakeBlock(Tree t) {
467.1451 -        return t instanceof FakeBlock;
467.1452 -    }
467.1453 -
467.1454 -    public static boolean isFakeClass(Tree t) {
467.1455 -        if (!(t instanceof ClassTree)) {
467.1456 -            return false;
467.1457 -        }
467.1458 -
467.1459 -        ClassTree ct = (ClassTree) t;
467.1460 -
467.1461 -        if (ct.getMembers().isEmpty()) {
467.1462 -            return false;
467.1463 -        }
467.1464 -
467.1465 -        CharSequence wildcardTreeName = Utilities.getWildcardTreeName(ct.getMembers().get(0));
467.1466 -
467.1467 -        if (wildcardTreeName == null) {
467.1468 -            return false;
467.1469 -        }
467.1470 -
467.1471 -        return wildcardTreeName.toString().startsWith("$$");
467.1472 -    }
467.1473 -
467.1474 -    private static final class OffsetSourcePositions implements SourcePositions {
467.1475 -
467.1476 -        private final SourcePositions delegate;
467.1477 -        private final long offset;
467.1478 -
467.1479 -        public OffsetSourcePositions(SourcePositions delegate, long offset) {
467.1480 -            this.delegate = delegate;
467.1481 -            this.offset = offset;
467.1482 -        }
467.1483 -
467.1484 -        public long getStartPosition(CompilationUnitTree cut, Tree tree) {
467.1485 -            return delegate.getStartPosition(cut, tree) + offset;
467.1486 -        }
467.1487 -
467.1488 -        public long getEndPosition(CompilationUnitTree cut, Tree tree) {
467.1489 -            return delegate.getEndPosition(cut, tree) + offset;
467.1490 -        }
467.1491 -
467.1492 -    }
467.1493 -
467.1494 -    private static final class OffsetDiagnostic<S> implements Diagnostic<S> {
467.1495 -        private final Diagnostic<? extends S> delegate;
467.1496 -        private final long offset;
467.1497 -
467.1498 -        public OffsetDiagnostic(Diagnostic<? extends S> delegate, long offset) {
467.1499 -            this.delegate = delegate;
467.1500 -            this.offset = offset;
467.1501 -        }
467.1502 -
467.1503 -        public Diagnostic.Kind getKind() {
467.1504 -            return delegate.getKind();
467.1505 -        }
467.1506 -
467.1507 -        public S getSource() {
467.1508 -            return delegate.getSource();
467.1509 -        }
467.1510 -
467.1511 -        public long getPosition() {
467.1512 -            return delegate.getPosition() + offset;
467.1513 -        }
467.1514 -
467.1515 -        public long getStartPosition() {
467.1516 -            return delegate.getStartPosition() + offset;
467.1517 -        }
467.1518 -
467.1519 -        public long getEndPosition() {
467.1520 -            return delegate.getEndPosition() + offset;
467.1521 -        }
467.1522 -
467.1523 -        public long getLineNumber() {
467.1524 -            throw new UnsupportedOperationException("Not supported yet.");
467.1525 -        }
467.1526 -
467.1527 -        public long getColumnNumber() {
467.1528 -            throw new UnsupportedOperationException("Not supported yet.");
467.1529 -        }
467.1530 -
467.1531 -        public String getCode() {
467.1532 -            return delegate.getCode();
467.1533 -        }
467.1534 -
467.1535 -        public String getMessage(Locale locale) {
467.1536 -            return delegate.getMessage(locale);
467.1537 -        }
467.1538 -
467.1539 -    }
467.1540 -
467.1541 -    private static class ParserSourcePositions implements SourcePositions {
467.1542 -
467.1543 -        private JavacParser parser;
467.1544 -
467.1545 -        private ParserSourcePositions(JavacParser parser) {
467.1546 -            this.parser = parser;
467.1547 -        }
467.1548 -
467.1549 -        public long getStartPosition(CompilationUnitTree file, Tree tree) {
467.1550 -            return parser.getStartPos((JCTree)tree);
467.1551 -        }
467.1552 -
467.1553 -        public long getEndPosition(CompilationUnitTree file, Tree tree) {
467.1554 -            return parser.getEndPos((JCTree)tree);
467.1555 -        }
467.1556 -    }
467.1557 -}
   468.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchSearch.java	Mon Dec 19 11:37:36 2016 +0100
   468.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   468.3 @@ -1,714 +0,0 @@
   468.4 -/*
   468.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   468.6 - *
   468.7 - * Copyright 2009-2011 Oracle and/or its affiliates. All rights reserved.
   468.8 - *
   468.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  468.10 - * Other names may be trademarks of their respective owners.
  468.11 - *
  468.12 - * The contents of this file are subject to the terms of either the GNU
  468.13 - * General Public License Version 2 only ("GPL") or the Common
  468.14 - * Development and Distribution License("CDDL") (collectively, the
  468.15 - * "License"). You may not use this file except in compliance with the
  468.16 - * License. You can obtain a copy of the License at
  468.17 - * http://www.netbeans.org/cddl-gplv2.html
  468.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  468.19 - * specific language governing permissions and limitations under the
  468.20 - * License.  When distributing the software, include this License Header
  468.21 - * Notice in each file and include the License file at
  468.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  468.23 - * particular file as subject to the "Classpath" exception as provided
  468.24 - * by Oracle in the GPL Version 2 section of the License file that
  468.25 - * accompanied this code. If applicable, add the following below the
  468.26 - * License Header, with the fields enclosed by brackets [] replaced by
  468.27 - * your own identifying information:
  468.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  468.29 - *
  468.30 - * If you wish your version of this file to be governed by only the CDDL
  468.31 - * or only the GPL Version 2, indicate your decision by adding
  468.32 - * "[Contributor] elects to include this software in this distribution
  468.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  468.34 - * single choice of license, a recipient has the option to distribute
  468.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  468.36 - * to extend the choice of license to its licensees as provided above.
  468.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  468.38 - * Version 2 license, then the option applies only if the new code is
  468.39 - * made subject to such option by the copyright holder.
  468.40 - *
  468.41 - * Contributor(s):
  468.42 - *
  468.43 - * Portions Copyrighted 2009-2011 Sun Microsystems, Inc.
  468.44 - */
  468.45 -package org.netbeans.modules.java.hints.spiimpl.batch;
  468.46 -
  468.47 -import org.netbeans.spi.java.hints.HintContext.MessageKind;
  468.48 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
  468.49 -import com.sun.source.tree.Tree;
  468.50 -import com.sun.source.util.TreePath;
  468.51 -import java.io.IOException;
  468.52 -import java.io.OutputStreamWriter;
  468.53 -import java.io.Writer;
  468.54 -import java.nio.ByteBuffer;
  468.55 -import java.util.ArrayList;
  468.56 -import java.util.Collection;
  468.57 -import java.util.Collections;
  468.58 -import java.util.HashMap;
  468.59 -import java.util.HashSet;
  468.60 -import java.util.LinkedList;
  468.61 -import java.util.List;
  468.62 -import java.util.Map;
  468.63 -import java.util.Map.Entry;
  468.64 -import java.util.Set;
  468.65 -import java.util.concurrent.Callable;
  468.66 -import java.util.concurrent.atomic.AtomicBoolean;
  468.67 -import java.util.concurrent.atomic.AtomicInteger;
  468.68 -import java.util.concurrent.atomic.AtomicReference;
  468.69 -import java.util.logging.Level;
  468.70 -import java.util.logging.Logger;
  468.71 -import org.netbeans.api.annotations.common.NonNull;
  468.72 -import org.netbeans.api.annotations.common.NullAllowed;
  468.73 -import org.netbeans.api.fileinfo.NonRecursiveFolder;
  468.74 -import org.netbeans.api.java.classpath.ClassPath;
  468.75 -import org.netbeans.api.java.classpath.GlobalPathRegistry;
  468.76 -import org.netbeans.api.java.source.ClasspathInfo;
  468.77 -import org.netbeans.api.java.source.ClasspathInfo.PathKind;
  468.78 -import org.netbeans.api.java.source.CompilationController;
  468.79 -import org.netbeans.api.java.source.CompilationInfo;
  468.80 -import org.netbeans.api.java.source.JavaSource;
  468.81 -import org.netbeans.api.java.source.JavaSource.Phase;
  468.82 -import org.netbeans.api.java.source.Task;
  468.83 -import org.netbeans.api.queries.FileEncodingQuery;
  468.84 -import org.netbeans.modules.java.hints.spiimpl.MessageImpl;
  468.85 -import org.netbeans.modules.java.hints.spiimpl.Utilities;
  468.86 -import org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker;
  468.87 -import org.netbeans.modules.java.hints.spiimpl.pm.BulkSearch;
  468.88 -import org.netbeans.modules.java.hints.spiimpl.pm.BulkSearch.BulkPattern;
  468.89 -import org.netbeans.modules.java.hints.providers.spi.HintDescription.AdditionalQueryConstraints;
  468.90 -import org.netbeans.modules.java.hints.providers.spi.Trigger.PatternDescription;
  468.91 -import org.netbeans.spi.editor.hints.ErrorDescription;
  468.92 -import org.netbeans.api.java.source.matching.Matcher;
  468.93 -import org.netbeans.api.java.source.matching.Pattern;
  468.94 -import org.netbeans.modules.java.hints.providers.spi.Trigger.DecisionTrigger;
  468.95 -import org.netbeans.modules.java.hints.spiimpl.SPIAccessor;
  468.96 -import org.netbeans.modules.java.hints.spiimpl.hints.GlobalProcessingContext;
  468.97 -import org.netbeans.modules.java.hints.spiimpl.options.HintsSettings;
  468.98 -import org.netbeans.spi.java.hints.Decision;
  468.99 -import org.netbeans.spi.java.hints.HintContext;
 468.100 -import org.openide.filesystems.FileObject;
 468.101 -import org.openide.filesystems.FileUtil;
 468.102 -import org.openide.util.Exceptions;
 468.103 -
 468.104 -/**
 468.105 - *
 468.106 - * @author lahvac
 468.107 - */
 468.108 -public class BatchSearch {
 468.109 -
 468.110 -    private static final Logger LOG = Logger.getLogger(BatchSearch.class.getName());
 468.111 -
 468.112 -    public static BatchResult findOccurrences(Iterable<? extends HintDescription> patterns, Scope scope) {
 468.113 -        return findOccurrences(patterns, scope, new ProgressHandleWrapper(null), HintsSettings.getGlobalSettings());
 468.114 -    }
 468.115 -
 468.116 -    public static BatchResult findOccurrences(final Iterable<? extends HintDescription> patterns, final Scope scope, final ProgressHandleWrapper progress, @NullAllowed HintsSettings settingsProvider) {
 468.117 -        return findOccurrencesLocal(patterns, scope.getIndexMapper(patterns), scope.getTodo(), progress, settingsProvider);
 468.118 -    }
 468.119 -
 468.120 -    private static BatchResult findOccurrencesLocal(final Iterable<? extends HintDescription> patterns, final MapIndices indexMapper, final Collection<? extends Folder> todo, final ProgressHandleWrapper progress, final @NullAllowed HintsSettings settingsProvider) {
 468.121 -        final BatchResult[] result = new BatchResult[1];
 468.122 -
 468.123 -        try {
 468.124 -            JavaSource.create(Utilities.createUniversalCPInfo()).runUserActionTask(new Task<CompilationController>() {
 468.125 -                public void run(CompilationController parameter) throws Exception {
 468.126 -                    result[0] = findOccurrencesLocalImpl(parameter, patterns, indexMapper, todo, progress, settingsProvider);
 468.127 -                }
 468.128 -            }, true);
 468.129 -        } catch (IOException ex) {
 468.130 -            throw new IllegalStateException(ex);
 468.131 -        }
 468.132 -
 468.133 -        return result[0];
 468.134 -    }
 468.135 -    
 468.136 -    private static BatchResult findOccurrencesLocalImpl(final CompilationInfo info, final Iterable<? extends HintDescription> patterns, MapIndices indexMapper, Collection<? extends Folder> todo, ProgressHandleWrapper progress, HintsSettings settingsProvider) {
 468.137 -        boolean hasKindPatterns = false;
 468.138 -
 468.139 -        for (HintDescription pattern : patterns) {
 468.140 -            if (!(pattern.getTrigger() instanceof PatternDescription)) {
 468.141 -                hasKindPatterns = true;
 468.142 -                break;
 468.143 -            }
 468.144 -        }
 468.145 -
 468.146 -        final Callable<BulkPattern> bulkPattern = hasKindPatterns ? null : new Callable<BulkPattern>() {
 468.147 -            private final AtomicReference<BulkPattern> pattern = new AtomicReference<BulkPattern>();
 468.148 -            public BulkPattern call() {
 468.149 -                if (pattern.get() == null) {
 468.150 -                    pattern.set(preparePattern(patterns, info));
 468.151 -                }
 468.152 -
 468.153 -                return pattern.get();
 468.154 -            }
 468.155 -        };
 468.156 -        final Map<IndexEnquirer, Collection<? extends Resource>> result = new HashMap<IndexEnquirer, Collection<? extends Resource>>();
 468.157 -        final Collection<MessageImpl> problems = new LinkedList<MessageImpl>();
 468.158 -        ProgressHandleWrapper innerForAll = progress.startNextPartWithEmbedding(ProgressHandleWrapper.prepareParts(2 * todo.size()));
 468.159 -        
 468.160 -        for (final Folder src : todo) {
 468.161 -            LOG.log(Level.FINE, "Processing: {0}", FileUtil.getFileDisplayName(src.getFileObject()));
 468.162 -            
 468.163 -            IndexEnquirer indexEnquirer;// = indexMapper.findIndex(src.getFileObject(), innerForAll, src.isRecursive());
 468.164 -
 468.165 -//            if (indexEnquirer == null) {
 468.166 -                indexEnquirer = new FileSystemBasedIndexEnquirer(src.getFileObject(), src.isRecursive());
 468.167 -//            }
 468.168 -
 468.169 -            Collection<? extends Resource> occurrences = indexEnquirer.findResources(patterns, innerForAll, bulkPattern, problems, settingsProvider);
 468.170 -
 468.171 -            if (!occurrences.isEmpty()) {
 468.172 -                result.put(indexEnquirer, occurrences);
 468.173 -            }
 468.174 -
 468.175 -            innerForAll.tick();
 468.176 -        }
 468.177 -
 468.178 -        return new BatchResult(result, patterns, problems);
 468.179 -    }
 468.180 -
 468.181 -    private static BulkPattern preparePattern(final Iterable<? extends HintDescription> patterns, CompilationInfo info) {
 468.182 -        Collection<String> code = new LinkedList<String>();
 468.183 -        Collection<Tree> trees = new LinkedList<Tree>();
 468.184 -        Collection<AdditionalQueryConstraints> additionalConstraints = new LinkedList<AdditionalQueryConstraints>();
 468.185 -
 468.186 -        for (HintDescription pattern : patterns) {
 468.187 -            String textPattern = ((PatternDescription) pattern.getTrigger()).getPattern();
 468.188 -
 468.189 -            code.add(textPattern);
 468.190 -            trees.add(Utilities.parseAndAttribute(info, textPattern, null));
 468.191 -            additionalConstraints.add(pattern.getAdditionalConstraints());
 468.192 -        }
 468.193 -
 468.194 -        return BulkSearch.getDefault().create(code, trees, additionalConstraints, new AtomicBoolean());
 468.195 -    }
 468.196 -
 468.197 -    public static void getVerifiedSpans(BatchResult candidates, @NonNull ProgressHandleWrapper progress, final VerifiedSpansCallBack callback, final Collection<? super MessageImpl> problems, AtomicBoolean cancel) {
 468.198 -        getVerifiedSpans(candidates, progress, callback, false, problems, cancel);
 468.199 -    }
 468.200 -
 468.201 -    public static void getVerifiedSpans(BatchResult candidates, @NonNull ProgressHandleWrapper progress, final VerifiedSpansCallBack callback, boolean doNotRegisterClassPath, final Collection<? super MessageImpl> problems, AtomicBoolean cancel) {
 468.202 -        int[] parts = new int[candidates.projectId2Resources.size()];
 468.203 -        int   index = 0;
 468.204 -
 468.205 -        for (Entry<? extends IndexEnquirer, ? extends Collection<? extends Resource>> e : candidates.projectId2Resources.entrySet()) {
 468.206 -            parts[index++] = e.getValue().size();
 468.207 -        }
 468.208 -
 468.209 -        ProgressHandleWrapper inner = progress.startNextPartWithEmbedding(parts);
 468.210 -
 468.211 -        for (Entry<? extends IndexEnquirer, ? extends Collection<? extends Resource>> e : candidates.projectId2Resources.entrySet()) {
 468.212 -            if (cancel.get()) 
 468.213 -                return;
 468.214 -            inner.startNextPart(e.getValue().size());
 468.215 -
 468.216 -            e.getKey().validateResource(e.getValue(), inner, callback, doNotRegisterClassPath, problems, cancel);
 468.217 -        }
 468.218 -    }
 468.219 -
 468.220 -    private static void getLocalVerifiedSpans(Collection<? extends Resource> resources, @NonNull final ProgressHandleWrapper progress, final VerifiedSpansCallBack callback, boolean doNotRegisterClassPath, final Collection<? super MessageImpl> problems, final AtomicBoolean cancel) {
 468.221 -        Collection<FileObject> files = new LinkedList<FileObject>();
 468.222 -        final Map<FileObject, Resource> file2Resource = new HashMap<FileObject, Resource>();
 468.223 -
 468.224 -        for (Resource r : resources) {
 468.225 -            FileObject file = r.getResolvedFile();
 468.226 -
 468.227 -            if (file != null) {
 468.228 -                files.add(file);
 468.229 -                file2Resource.put(file, r);
 468.230 -            } else {
 468.231 -                callback.cannotVerifySpan(r);
 468.232 -                progress.tick();
 468.233 -            }
 468.234 -        }
 468.235 -
 468.236 -        Map<ClasspathInfo, Collection<FileObject>> cp2Files = BatchUtilities.sortFiles(files);
 468.237 -        ClassPath[] toRegister = null;
 468.238 -
 468.239 -        if (!doNotRegisterClassPath) {
 468.240 -            Set<ClassPath> toRegisterSet = new HashSet<ClassPath>();
 468.241 -
 468.242 -            for (ClasspathInfo cpInfo : cp2Files.keySet()) {
 468.243 -                toRegisterSet.add(cpInfo.getClassPath(PathKind.SOURCE));
 468.244 -            }
 468.245 -
 468.246 -            toRegister = !toRegisterSet.isEmpty() ? toRegisterSet.toArray(new ClassPath[0]) : null;
 468.247 -
 468.248 -            if (toRegister != null) {
 468.249 -                GlobalPathRegistry.getDefault().register(ClassPath.SOURCE, toRegister);
 468.250 -                try {
 468.251 -                    Utilities.waitScanFinished();
 468.252 -                } catch (InterruptedException ex) {
 468.253 -                    Exceptions.printStackTrace(ex);
 468.254 -                }
 468.255 -            }
 468.256 -        }
 468.257 -
 468.258 -        callback.groupStarted();
 468.259 -
 468.260 -        try {
 468.261 -            final GlobalProcessingContext gpc = new GlobalProcessingContext();
 468.262 -            for (Entry<ClasspathInfo, Collection<FileObject>> e : cp2Files.entrySet()) {
 468.263 -                try {
 468.264 -                    List<FileObject> toProcess = new ArrayList<FileObject>(e.getValue());
 468.265 -                    final AtomicInteger currentPointer = new AtomicInteger();
 468.266 -
 468.267 -//                    for (FileObject f : toProcess) {
 468.268 -                    while (currentPointer.get() < toProcess.size()) {
 468.269 -                        if (cancel.get())
 468.270 -                            return;
 468.271 -                        final AtomicBoolean stop = new AtomicBoolean();
 468.272 -//                        JavaSource js = JavaSource.create(e.getKey(), f);
 468.273 -                        JavaSource js = JavaSource.create(e.getKey(), toProcess.subList(currentPointer.get(), toProcess.size()));
 468.274 -
 468.275 -                        js.runUserActionTask(new Task<CompilationController>() {
 468.276 -                            public void run(CompilationController parameter) throws Exception {
 468.277 -                                if (stop.get()) return;
 468.278 -                                if (cancel.get()) return;
 468.279 -
 468.280 -                                boolean cont = true;
 468.281 -
 468.282 -                                try {
 468.283 -                                    if (parameter.toPhase(Phase.RESOLVED).compareTo(Phase.RESOLVED) < 0)
 468.284 -                                        return ;
 468.285 -
 468.286 -                                    progress.setMessage("processing: " + FileUtil.getFileDisplayName(parameter.getFileObject()));
 468.287 -                                    Resource r = file2Resource.get(parameter.getFileObject());
 468.288 -
 468.289 -                                    HintsSettings settings = r.settings;
 468.290 -                                    Iterable<? extends HintDescription> enabledHints;
 468.291 -                                    
 468.292 -                                    if (settings == null) {
 468.293 -                                        settings = HintsSettings.getSettingsFor(parameter.getFileObject());
 468.294 -                                        List<HintDescription> hintsCopy = new ArrayList<>();
 468.295 -                                        for (HintDescription hd : r.hints) {
 468.296 -                                            if (settings.isEnabled(hd.getMetadata())) {
 468.297 -                                                hintsCopy.add(hd);
 468.298 -                                            }
 468.299 -                                        }
 468.300 -                                        enabledHints = hintsCopy;
 468.301 -                                    } else {
 468.302 -                                        enabledHints = r.hints;
 468.303 -                                    }
 468.304 -                                    
 468.305 -                                    List<ErrorDescription> hints = new HintsInvoker(settings, gpc, new AtomicBoolean()).computeHints(parameter, r.hints, problems);
 468.306 -
 468.307 -                                    assert hints != null;
 468.308 -                                    
 468.309 -                                    cont = callback.spansVerified(parameter, r, hints);
 468.310 -                                } catch (ThreadDeath td) {
 468.311 -                                    throw td;
 468.312 -                                } catch (Throwable t) {
 468.313 -                                    LOG.log(Level.INFO, "Exception while performing batch processing in " + FileUtil.getFileDisplayName(parameter.getFileObject()), t);
 468.314 -                                    problems.add(new MessageImpl(MessageKind.WARNING, "An exception occurred while processing file: " + FileUtil.getFileDisplayName(parameter.getFileObject()) + " (" + t.getLocalizedMessage() + ")."));
 468.315 -                                }
 468.316 -                                
 468.317 -                                if (cont) {
 468.318 -                                    progress.tick();
 468.319 -                                    currentPointer.incrementAndGet();
 468.320 -                                } else {
 468.321 -                                    stop.set(true);
 468.322 -                                }
 468.323 -                            }
 468.324 -                        }, true);
 468.325 -                    }
 468.326 -                } catch (IOException ex) {
 468.327 -                    Exceptions.printStackTrace(ex);
 468.328 -                }
 468.329 -            }
 468.330 -            
 468.331 -            final Map<FileObject, List<Decision>> file2Decision = new HashMap<FileObject, List<Decision>>();
 468.332 -            for (List<Decision<?, ?>> decisions : gpc.decisions.values()) {
 468.333 -                for (Decision<?, ?> d : decisions) {
 468.334 -                    if (d.makeDecision()) {
 468.335 -                        List<Decision> fileDecisions = file2Decision.get(d.root.getFileObject());
 468.336 -                        
 468.337 -                        if (fileDecisions == null) {
 468.338 -                            file2Decision.put(d.root.getFileObject(), fileDecisions = new ArrayList<Decision>());
 468.339 -                        }
 468.340 -                        
 468.341 -                        fileDecisions.add(d);
 468.342 -                    }
 468.343 -                }
 468.344 -            }
 468.345 -
 468.346 -            Map<ClasspathInfo, Collection<FileObject>> cp2FilesAfterDecision = BatchUtilities.sortFiles(file2Decision.keySet());
 468.347 -            
 468.348 -            for (Entry<ClasspathInfo, Collection<FileObject>> e : cp2FilesAfterDecision.entrySet()) {
 468.349 -                JavaSource js = JavaSource.create(e.getKey(), e.getValue());
 468.350 -                
 468.351 -                try {
 468.352 -                    js.runUserActionTask(new Task<CompilationController>() {
 468.353 -                        @Override public void run(CompilationController parameter) throws Exception {
 468.354 -                            if (parameter.toPhase(Phase.RESOLVED).compareTo(Phase.RESOLVED) < 0)
 468.355 -                                return ;
 468.356 -                            
 468.357 -                            Resource r = file2Resource.get(parameter.getFileObject());
 468.358 -
 468.359 -                            HintsSettings settings = r.settings;
 468.360 -
 468.361 -                            if (settings == null) {
 468.362 -                                settings = HintsSettings.getSettingsFor(parameter.getFileObject());
 468.363 -                            }
 468.364 -
 468.365 -                            for (Decision<?, ?> d : file2Decision.get(parameter.getFileObject())) {
 468.366 -                            for (HintDescription hd : r.hints) {
 468.367 -                                if (!(hd.getTrigger() instanceof DecisionTrigger)) continue;
 468.368 -                                if (r.settings == null && !settings.isEnabled(hd.getMetadata())) continue;
 468.369 -                                DecisionTrigger dt = (DecisionTrigger) hd.getTrigger();
 468.370 -                                if (dt.getDecisionClass() != d.getClass()) continue;
 468.371 -                                TreePath tp = d.root.resolve(parameter);
 468.372 -                                HintContext ctx = SPIAccessor.getINSTANCE().createHintContext(parameter, settings, hd.getMetadata(), new GlobalProcessingContext(), tp, Collections.<String, TreePath>emptyMap(), Collections.<String, Collection<? extends TreePath>>emptyMap(), Collections.<String, String>emptyMap());
 468.373 -                                ctx.decision = d;
 468.374 -                                Collection<? extends ErrorDescription> errors = hd.getWorker().createErrors(ctx);
 468.375 -                                
 468.376 -                                if (errors != null) {
 468.377 -                                    callback.spansVerified(parameter, file2Resource.get(parameter.getFileObject()), errors);
 468.378 -                                }
 468.379 -                            }
 468.380 -                            }
 468.381 -                        }
 468.382 -                    }, true);
 468.383 -                } catch (IOException ex) {
 468.384 -                    Exceptions.printStackTrace(ex);
 468.385 -                }
 468.386 -            }
 468.387 -        } finally {
 468.388 -            callback.groupFinished();
 468.389 -            
 468.390 -            if (toRegister != null) {
 468.391 -                GlobalPathRegistry.getDefault().unregister(ClassPath.SOURCE, toRegister);
 468.392 -            }
 468.393 -            progress.finish();
 468.394 -        }
 468.395 -    }
 468.396 -
 468.397 -    public interface VerifiedSpansCallBack {
 468.398 -        public void groupStarted();
 468.399 -        public boolean spansVerified(CompilationController wc, Resource r, Collection<? extends ErrorDescription> hints) throws Exception;
 468.400 -        public void groupFinished();
 468.401 -        public void cannotVerifySpan(Resource r);
 468.402 -    }
 468.403 -
 468.404 -    
 468.405 -    public static class Folder {
 468.406 -
 468.407 -        private FileObject file;
 468.408 -        private NonRecursiveFolder folder;
 468.409 -        
 468.410 -        public Folder(FileObject file) {
 468.411 -            this.file = file;
 468.412 -        }
 468.413 -        
 468.414 -        public Folder(NonRecursiveFolder folder) {
 468.415 -            this.folder = folder;
 468.416 -        }
 468.417 -        
 468.418 -        public FileObject getFileObject() {
 468.419 -            if (file!=null) {
 468.420 -                return file;
 468.421 -            }
 468.422 -            return folder.getFolder();
 468.423 -            
 468.424 -        }
 468.425 -        
 468.426 -        private boolean isRecursive() {
 468.427 -            if (file!=null) {
 468.428 -                return file.isFolder();
 468.429 -            }
 468.430 -            return false;
 468.431 -        }
 468.432 -
 468.433 -        public static Folder[] convert(FileObject... files) {
 468.434 -            Folder[] result = new Folder[files.length];
 468.435 -            for (int i=0;i<files.length;i++) {
 468.436 -                result[i] = new Folder(files[i]);
 468.437 -            }
 468.438 -            return result;
 468.439 -        }
 468.440 -
 468.441 -        public static Folder[] convert(Collection list) {
 468.442 -            Folder[] result = new Folder[list.size()];
 468.443 -            int i=0;
 468.444 -            for (Object item:list) {
 468.445 -                if (item instanceof FileObject)
 468.446 -                    result[i] = new Folder((FileObject) item);
 468.447 -                else 
 468.448 -                    result[i] = new Folder((NonRecursiveFolder) item);
 468.449 -                i++;
 468.450 -            }
 468.451 -            return result;
 468.452 -        }
 468.453 -
 468.454 -        @Override
 468.455 -        public String toString() {
 468.456 -            return !isRecursive()?"Non":"" + "Recursive file " + getFileObject().getPath();
 468.457 -        }
 468.458 -        
 468.459 -        
 468.460 -    }
 468.461 -    
 468.462 -    public abstract static class Scope {
 468.463 -
 468.464 -        public abstract String getDisplayName();
 468.465 -        public abstract Collection<? extends Folder> getTodo();
 468.466 -        public abstract MapIndices getIndexMapper(Iterable<? extends HintDescription> hints);
 468.467 -        
 468.468 -    }
 468.469 -    
 468.470 -    public static final class BatchResult {
 468.471 -        
 468.472 -        private final Map<? extends IndexEnquirer, ? extends Collection<? extends Resource>> projectId2Resources;
 468.473 -        private final Iterable<? extends HintDescription> patterns;
 468.474 -        public final Collection<? extends MessageImpl> problems;
 468.475 -        
 468.476 -        public BatchResult(Map<? extends IndexEnquirer, ? extends Collection<? extends Resource>> projectId2Resources, Iterable<? extends HintDescription> patterns, Collection<? extends MessageImpl> problems) {
 468.477 -            this.projectId2Resources = projectId2Resources;
 468.478 -            this.patterns = patterns;
 468.479 -            this.problems = problems;
 468.480 -        }
 468.481 -
 468.482 -        public Collection<? extends Collection<? extends Resource>> getResources() {
 468.483 -            return projectId2Resources.values();
 468.484 -        }
 468.485 -
 468.486 -        public Map<FileObject, Collection<? extends Resource>> getResourcesWithRoots() {
 468.487 -            Map<FileObject, Collection<? extends Resource>> result = new HashMap<FileObject, Collection<? extends Resource>>();
 468.488 -
 468.489 -            for (Entry<? extends IndexEnquirer, ? extends Collection<? extends Resource>> e : projectId2Resources.entrySet()) {
 468.490 -                result.put(e.getKey().src, e.getValue());
 468.491 -            }
 468.492 -
 468.493 -            return result;
 468.494 -        }
 468.495 -
 468.496 -        public Iterable<? extends HintDescription> getPatterns() {
 468.497 -            return patterns;
 468.498 -        }
 468.499 -    }
 468.500 -
 468.501 -    public static final class Resource {
 468.502 -        private final IndexEnquirer indexEnquirer;
 468.503 -        private final String relativePath;
 468.504 -        final Iterable<? extends HintDescription> hints;
 468.505 -        private final BulkPattern pattern;
 468.506 -        final HintsSettings settings;
 468.507 -
 468.508 -        public Resource(IndexEnquirer indexEnquirer, String relativePath, Iterable<? extends HintDescription> hints, BulkPattern pattern, HintsSettings settings) {
 468.509 -            this.indexEnquirer = indexEnquirer;
 468.510 -            this.relativePath = relativePath;
 468.511 -            this.hints = hints;
 468.512 -            this.pattern = pattern;
 468.513 -            this.settings = settings;
 468.514 -        }
 468.515 -
 468.516 -        public String getRelativePath() {
 468.517 -            return relativePath;
 468.518 -        }
 468.519 -        
 468.520 -        public Iterable<int[]> getCandidateSpans() {
 468.521 -            FileObject file = getResolvedFile();
 468.522 -            JavaSource js;
 468.523 -
 468.524 -            if (file != null) {
 468.525 -                js = JavaSource.forFileObject(file);
 468.526 -            } else {
 468.527 -                CharSequence text = getSourceCode();
 468.528 -
 468.529 -                if (text == null) {
 468.530 -                    return null;
 468.531 -                }
 468.532 -
 468.533 -                Writer out = null;
 468.534 -
 468.535 -                try {
 468.536 -                    file = FileUtil.createData(FileUtil.createMemoryFileSystem().getRoot(), relativePath);
 468.537 -                    out = new OutputStreamWriter(file.getOutputStream());
 468.538 -
 468.539 -                    out.write(text.toString());
 468.540 -                } catch (IOException ex) {
 468.541 -                    Exceptions.printStackTrace(ex);
 468.542 -                    return null;
 468.543 -                } finally {
 468.544 -                    if (out != null) {
 468.545 -                        try {
 468.546 -                            out.close();
 468.547 -                        } catch (IOException ex) {
 468.548 -                            Exceptions.printStackTrace(ex);
 468.549 -                        }
 468.550 -                    }
 468.551 -                }
 468.552 -
 468.553 -                js = JavaSource.create(Utilities.createUniversalCPInfo(), file);
 468.554 -            }
 468.555 -
 468.556 -            final List<int[]> span = new LinkedList<int[]>();
 468.557 -
 468.558 -            try {
 468.559 -                js.runUserActionTask(new Task<CompilationController>() {
 468.560 -                    public void run(CompilationController cc) throws Exception {
 468.561 -                        cc.toPhase(Phase.PARSED);
 468.562 -
 468.563 -                        span.addAll(doComputeSpans(cc));
 468.564 -                    }
 468.565 -                }, true);
 468.566 -            } catch (IOException ex) {
 468.567 -                Exceptions.printStackTrace(ex);
 468.568 -            }
 468.569 -
 468.570 -            return span;
 468.571 -        }
 468.572 -
 468.573 -        private Collection<int[]> doComputeSpans(CompilationInfo ci) {
 468.574 -            Collection<int[]> result = new LinkedList<int[]>();
 468.575 -            Map<String, Collection<TreePath>> found = BulkSearch.getDefault().match(ci, new AtomicBoolean(), new TreePath(ci.getCompilationUnit()), pattern);
 468.576 -            
 468.577 -            for (Entry<String, Collection<TreePath>> e : found.entrySet()) {
 468.578 -                Tree treePattern = Utilities.parseAndAttribute(ci, e.getKey(), null);
 468.579 -                
 468.580 -                for (TreePath tp : e.getValue()) {
 468.581 -                    //XXX: this pass will not be performed on the web!!!
 468.582 -                    if (   BulkSearch.getDefault().requiresLightweightVerification()
 468.583 -                        && !Matcher.create(ci).setCancel(new AtomicBoolean()).setSearchRoot(tp).setTreeTopSearch().setUntypedMatching().match(Pattern.createSimplePattern(new TreePath(new TreePath(ci.getCompilationUnit()), treePattern))).iterator().hasNext()) {
 468.584 -                        continue;
 468.585 -                    }
 468.586 -                    int[] span = new int[] {
 468.587 -                        (int) ci.getTrees().getSourcePositions().getStartPosition(ci.getCompilationUnit(), tp.getLeaf()),
 468.588 -                        (int) ci.getTrees().getSourcePositions().getEndPosition(ci.getCompilationUnit(), tp.getLeaf())
 468.589 -                    };
 468.590 -
 468.591 -                    result.add(span);
 468.592 -                }
 468.593 -            }
 468.594 -
 468.595 -            return result;
 468.596 -        }
 468.597 -        
 468.598 -        public FileObject getResolvedFile() {
 468.599 -            return indexEnquirer.src.getFileObject(relativePath);
 468.600 -        }
 468.601 -
 468.602 -        public String getDisplayName() {
 468.603 -            FileObject file = getResolvedFile();
 468.604 -
 468.605 -            if (file != null) {
 468.606 -                return FileUtil.getFileDisplayName(file);
 468.607 -            } else {
 468.608 -                return relativePath; //TODO:+container
 468.609 -            }
 468.610 -        }
 468.611 -        
 468.612 -        public CharSequence getSourceCode() {
 468.613 -            try {
 468.614 -                FileObject file = getResolvedFile();
 468.615 -                ByteBuffer bb = ByteBuffer.wrap(file.asBytes());
 468.616 -
 468.617 -                return FileEncodingQuery.getEncoding(file).decode(bb);
 468.618 -            } catch (IOException ex) {
 468.619 -                Exceptions.printStackTrace(ex);
 468.620 -                return null;
 468.621 -            }
 468.622 -        }
 468.623 -
 468.624 -        public FileObject getRoot() {
 468.625 -            return indexEnquirer.src;
 468.626 -        }
 468.627 -    }
 468.628 -
 468.629 -    public static interface MapIndices {
 468.630 -        public IndexEnquirer findIndex(FileObject root, ProgressHandleWrapper progress, boolean recursive);
 468.631 -    }
 468.632 -
 468.633 -    public static abstract class IndexEnquirer {
 468.634 -        final FileObject src;
 468.635 -        public IndexEnquirer(FileObject src) {
 468.636 -            this.src = src;
 468.637 -        }
 468.638 -        public abstract Collection<? extends Resource> findResources(Iterable<? extends HintDescription> hints, ProgressHandleWrapper progress, @NullAllowed Callable<BulkPattern> bulkPattern, Collection<? super MessageImpl> problems, HintsSettings settingsProvider);
 468.639 -        public abstract void validateResource(Collection<? extends Resource> resources, ProgressHandleWrapper progress, VerifiedSpansCallBack callback, boolean doNotRegisterClassPath, Collection<? super MessageImpl> problems, AtomicBoolean cancel);
 468.640 -//        public int[] getEstimatedSpan(Resource r);
 468.641 -    }
 468.642 -
 468.643 -    public static abstract class LocalIndexEnquirer extends IndexEnquirer {
 468.644 -        public LocalIndexEnquirer(FileObject src) {
 468.645 -            super(src);
 468.646 -        }
 468.647 -        public void validateResource(Collection<? extends Resource> resources, ProgressHandleWrapper progress, VerifiedSpansCallBack callback, boolean doNotRegisterClassPath, Collection<? super MessageImpl> problems, AtomicBoolean cancel) {
 468.648 -            getLocalVerifiedSpans(resources, progress, callback, doNotRegisterClassPath, problems, cancel);
 468.649 -        }
 468.650 -    }
 468.651 -
 468.652 -    public static final class FileSystemBasedIndexEnquirer extends LocalIndexEnquirer {
 468.653 -        private boolean recursive;
 468.654 -        public FileSystemBasedIndexEnquirer(FileObject src, boolean recursive) {
 468.655 -            super(src);
 468.656 -            this.recursive = recursive;
 468.657 -        }
 468.658 -        public Collection<? extends Resource> findResources(final Iterable<? extends HintDescription> hints, ProgressHandleWrapper progress, final @NullAllowed Callable<BulkPattern> bulkPattern, final Collection<? super MessageImpl> problems, final HintsSettings settingsProvider) {
 468.659 -            Collection<FileObject> files = new LinkedList<FileObject>();
 468.660 -
 468.661 -            final ProgressHandleWrapper innerProgress = progress.startNextPartWithEmbedding(30, 70);
 468.662 -
 468.663 -            BatchUtilities.recursive(src, src, files, innerProgress, 0, null, null, recursive);
 468.664 -
 468.665 -            LOG.log(Level.FINE, "files: {0}", files);
 468.666 -
 468.667 -            innerProgress.startNextPart(files.size());
 468.668 -
 468.669 -            final Collection<Resource> result = new ArrayList<Resource>();
 468.670 -
 468.671 -            if (!files.isEmpty()) {
 468.672 -                try {
 468.673 -                    if (bulkPattern != null) {
 468.674 -                        long start = System.currentTimeMillis();
 468.675 -
 468.676 -                        JavaSource.create(Utilities.createUniversalCPInfo(), files).runUserActionTask(new Task<CompilationController>() {
 468.677 -                            public void run(CompilationController cc) throws Exception {
 468.678 -                                if (cc.toPhase(Phase.PARSED).compareTo(Phase.PARSED) <0) {
 468.679 -                                    return ;
 468.680 -                                }
 468.681 -
 468.682 -                                try {
 468.683 -                                    boolean matches = BulkSearch.getDefault().matches(cc, new AtomicBoolean(), new TreePath(cc.getCompilationUnit()), bulkPattern.call());
 468.684 -
 468.685 -                                    if (matches) {
 468.686 -                                        result.add(new Resource(FileSystemBasedIndexEnquirer.this, FileUtil.getRelativePath(src, cc.getFileObject()), hints, bulkPattern.call(), settingsProvider));
 468.687 -                                    }
 468.688 -                                } catch (ThreadDeath td) {
 468.689 -                                    throw td;
 468.690 -                                } catch (Throwable t) {
 468.691 -                                    LOG.log(Level.INFO, "Exception while performing batch search in " + FileUtil.getFileDisplayName(cc.getFileObject()), t);
 468.692 -                                    problems.add(new MessageImpl(MessageKind.WARNING, "An exception occurred while testing file: " + FileUtil.getFileDisplayName(cc.getFileObject()) + " (" + t.getLocalizedMessage() + ")."));
 468.693 -                                }
 468.694 -
 468.695 -                                innerProgress.tick();
 468.696 -                            }
 468.697 -                        }, true);
 468.698 -
 468.699 -                        long end = System.currentTimeMillis();
 468.700 -
 468.701 -                        LOG.log(Level.FINE, "took: {0}, per file: {1}", new Object[]{end - start, (end - start) / files.size()});
 468.702 -                    } else {
 468.703 -                        for (FileObject file : files) {
 468.704 -                            result.add(new Resource(this, FileUtil.getRelativePath(src, file), hints, null, settingsProvider));
 468.705 -                        }
 468.706 -                    }
 468.707 -                } catch (IOException ex) {
 468.708 -                    Exceptions.printStackTrace(ex);
 468.709 -                }
 468.710 -            }
 468.711 -
 468.712 -            return result;
 468.713 -        }
 468.714 -
 468.715 -    }
 468.716 -
 468.717 -}
   469.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchUtilities.java	Mon Dec 19 11:37:36 2016 +0100
   469.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   469.3 @@ -1,586 +0,0 @@
   469.4 -/*
   469.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   469.6 - *
   469.7 - * Copyright 2009-2011 Oracle and/or its affiliates. All rights reserved.
   469.8 - *
   469.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  469.10 - * Other names may be trademarks of their respective owners.
  469.11 - *
  469.12 - * The contents of this file are subject to the terms of either the GNU
  469.13 - * General Public License Version 2 only ("GPL") or the Common
  469.14 - * Development and Distribution License("CDDL") (collectively, the
  469.15 - * "License"). You may not use this file except in compliance with the
  469.16 - * License. You can obtain a copy of the License at
  469.17 - * http://www.netbeans.org/cddl-gplv2.html
  469.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  469.19 - * specific language governing permissions and limitations under the
  469.20 - * License.  When distributing the software, include this License Header
  469.21 - * Notice in each file and include the License file at
  469.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  469.23 - * particular file as subject to the "Classpath" exception as provided
  469.24 - * by Oracle in the GPL Version 2 section of the License file that
  469.25 - * accompanied this code. If applicable, add the following below the
  469.26 - * License Header, with the fields enclosed by brackets [] replaced by
  469.27 - * your own identifying information:
  469.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  469.29 - *
  469.30 - * If you wish your version of this file to be governed by only the CDDL
  469.31 - * or only the GPL Version 2, indicate your decision by adding
  469.32 - * "[Contributor] elects to include this software in this distribution
  469.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  469.34 - * single choice of license, a recipient has the option to distribute
  469.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  469.36 - * to extend the choice of license to its licensees as provided above.
  469.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  469.38 - * Version 2 license, then the option applies only if the new code is
  469.39 - * made subject to such option by the copyright holder.
  469.40 - *
  469.41 - * Contributor(s):
  469.42 - *
  469.43 - * Portions Copyrighted 2009-2011 Sun Microsystems, Inc.
  469.44 - */
  469.45 -package org.netbeans.modules.java.hints.spiimpl.batch;
  469.46 -
  469.47 -import com.sun.tools.javac.api.JavacTaskImpl;
  469.48 -import com.sun.tools.javac.util.Log;
  469.49 -import java.io.IOException;
  469.50 -import java.lang.reflect.Constructor;
  469.51 -import java.lang.reflect.Method;
  469.52 -import java.nio.ByteBuffer;
  469.53 -import java.nio.charset.Charset;
  469.54 -import java.util.ArrayList;
  469.55 -import java.util.Collection;
  469.56 -import java.util.Collections;
  469.57 -import java.util.HashMap;
  469.58 -import java.util.HashSet;
  469.59 -import java.util.IdentityHashMap;
  469.60 -import java.util.Iterator;
  469.61 -import java.util.LinkedHashMap;
  469.62 -import java.util.LinkedHashSet;
  469.63 -import java.util.LinkedList;
  469.64 -import java.util.List;
  469.65 -import java.util.Map;
  469.66 -import java.util.Map.Entry;
  469.67 -import java.util.Properties;
  469.68 -import java.util.Set;
  469.69 -import java.util.concurrent.atomic.AtomicBoolean;
  469.70 -import java.util.logging.Level;
  469.71 -import java.util.logging.Logger;
  469.72 -import javax.swing.text.BadLocationException;
  469.73 -import javax.swing.text.Document;
  469.74 -import org.netbeans.api.annotations.common.CheckForNull;
  469.75 -import org.netbeans.api.annotations.common.NonNull;
  469.76 -import org.netbeans.api.java.classpath.ClassPath;
  469.77 -import org.netbeans.api.java.classpath.ClassPath.PathConversionMode;
  469.78 -import org.netbeans.api.java.platform.JavaPlatformManager;
  469.79 -import org.netbeans.api.java.source.ClasspathInfo;
  469.80 -import org.netbeans.api.java.source.CompilationController;
  469.81 -import org.netbeans.api.java.source.CompilationInfo;
  469.82 -import org.netbeans.api.java.source.JavaSource;
  469.83 -import org.netbeans.api.java.source.JavaSource.Phase;
  469.84 -import org.netbeans.api.java.source.ModificationResult;
  469.85 -import org.netbeans.api.java.source.ModificationResult.Difference;
  469.86 -import org.netbeans.api.java.source.Task;
  469.87 -import org.netbeans.api.java.source.WorkingCopy;
  469.88 -import org.netbeans.api.project.FileOwnerQuery;
  469.89 -import org.netbeans.api.project.Project;
  469.90 -import org.netbeans.api.project.ProjectUtils;
  469.91 -import org.netbeans.api.project.SourceGroup;
  469.92 -import org.netbeans.api.project.Sources;
  469.93 -import org.netbeans.api.queries.FileEncodingQuery;
  469.94 -import org.netbeans.api.queries.VisibilityQuery;
  469.95 -//import org.netbeans.modules.java.editor.semantic.SemanticHighlighter;
  469.96 -import org.netbeans.modules.java.hints.spiimpl.JavaFixImpl;
  469.97 -import org.netbeans.modules.java.hints.spiimpl.JavaFixImpl.Accessor;
  469.98 -import org.netbeans.modules.java.hints.spiimpl.MessageImpl;
  469.99 -import org.netbeans.modules.java.hints.spiimpl.SyntheticFix;
 469.100 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.BatchResult;
 469.101 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.Resource;
 469.102 -import org.netbeans.modules.java.hints.spiimpl.ipi.upgrade.ProjectDependencyUpgrader;
 469.103 -import org.netbeans.modules.java.source.JavaSourceAccessor;
 469.104 -import org.netbeans.modules.java.source.parsing.CompilationInfoImpl;
 469.105 -import org.netbeans.modules.java.source.save.DiffUtilities;
 469.106 -import org.netbeans.modules.java.source.save.ElementOverlay;
 469.107 -import org.netbeans.modules.parsing.api.Source;
 469.108 -import org.netbeans.modules.refactoring.spi.RefactoringElementImplementation;
 469.109 -import org.netbeans.spi.editor.hints.ErrorDescription;
 469.110 -import org.netbeans.spi.editor.hints.Fix;
 469.111 -import org.netbeans.spi.java.hints.HintContext.MessageKind;
 469.112 -import org.netbeans.spi.java.hints.JavaFix;
 469.113 -import org.openide.cookies.EditorCookie;
 469.114 -import org.openide.filesystems.FileObject;
 469.115 -import org.openide.filesystems.FileUtil;
 469.116 -import org.openide.loaders.DataObject;
 469.117 -import org.openide.loaders.DataObjectNotFoundException;
 469.118 -import org.openide.util.Exceptions;
 469.119 -import org.openide.util.Lookup;
 469.120 -
 469.121 -/**
 469.122 - *
 469.123 - * @author Jan Lahoda
 469.124 - */
 469.125 -public class BatchUtilities {
 469.126 -
 469.127 -    private static final Logger LOG = Logger.getLogger(BatchUtilities.class.getName());
 469.128 -    
 469.129 -    public static Collection<ModificationResult> applyFixes(BatchResult candidates, @NonNull final ProgressHandleWrapper progress, AtomicBoolean cancel, final Collection<? super MessageImpl> problems) {
 469.130 -        return applyFixes(candidates, progress, cancel, new ArrayList<RefactoringElementImplementation>(), problems);
 469.131 -    }
 469.132 -    
 469.133 -    public static Collection<ModificationResult> applyFixes(BatchResult candidates, @NonNull final ProgressHandleWrapper progress, AtomicBoolean cancel, final Collection<? super RefactoringElementImplementation> fileChanges, final Collection<? super MessageImpl> problems) {
 469.134 -        return applyFixes(candidates, progress, cancel, fileChanges, null, problems);
 469.135 -    }
 469.136 -    
 469.137 -    public static Collection<ModificationResult> applyFixes(BatchResult candidates, @NonNull final ProgressHandleWrapper progress, AtomicBoolean cancel, final Collection<? super RefactoringElementImplementation> fileChanges, final Map<JavaFix, ModificationResult> changesPerFix, final Collection<? super MessageImpl> problems) {
 469.138 -        return applyFixes(candidates, progress, cancel, fileChanges, changesPerFix, false, problems);
 469.139 -    }
 469.140 -    
 469.141 -    public static Collection<ModificationResult> applyFixes(BatchResult candidates, @NonNull final ProgressHandleWrapper progress, AtomicBoolean cancel, final Collection<? super RefactoringElementImplementation> fileChanges, final Map<JavaFix, ModificationResult> changesPerFix, boolean doNotRegisterClassPath, final Collection<? super MessageImpl> problems) {
 469.142 -        final Map<Project, Set<String>> processedDependencyChanges = new IdentityHashMap<Project, Set<String>>();
 469.143 -        final Map<FileObject, List<ModificationResult.Difference>> result = new LinkedHashMap<FileObject, List<ModificationResult.Difference>>();
 469.144 -        final Map<FileObject, byte[]> resourceContentChanges = new HashMap<FileObject, byte[]>();
 469.145 -
 469.146 -        BatchSearch.VerifiedSpansCallBack callback = new BatchSearch.VerifiedSpansCallBack() {
 469.147 -            private ElementOverlay overlay;
 469.148 -            public void groupStarted() {
 469.149 -                overlay = ElementOverlay.getOrCreateOverlay();
 469.150 -            }
 469.151 -            public boolean spansVerified(CompilationController wc, Resource r, Collection<? extends ErrorDescription> hints) throws Exception {
 469.152 -                if (hints.isEmpty()) return true;
 469.153 -                
 469.154 -                Constructor<WorkingCopy> wcConstr = WorkingCopy.class.getDeclaredConstructor(CompilationInfoImpl.class, ElementOverlay.class);
 469.155 -                wcConstr.setAccessible(true);
 469.156 -
 469.157 -//                final WorkingCopy copy = new WorkingCopy(JavaSourceAccessor.getINSTANCE().getCompilationInfoImpl(parameter), overlay);
 469.158 -                WorkingCopy copy = wcConstr.newInstance(JavaSourceAccessor.getINSTANCE().getCompilationInfoImpl(wc), overlay);
 469.159 -                Method setJavaSource = CompilationInfo.class.getDeclaredMethod("setJavaSource", JavaSource.class);
 469.160 -                setJavaSource.setAccessible(true);
 469.161 -
 469.162 -//                copy.setJavaSource(JavaSource.this);
 469.163 -                setJavaSource.invoke(copy, wc.getJavaSource());
 469.164 -
 469.165 -                copy.toPhase(Phase.RESOLVED);
 469.166 -                progress.tick();
 469.167 -                
 469.168 -                if (applyFixes(copy, processedDependencyChanges, hints, resourceContentChanges, fileChanges, changesPerFix, problems)) {
 469.169 -                    return false;
 469.170 -                }
 469.171 -
 469.172 -                final JavacTaskImpl jt = JavaSourceAccessor.getINSTANCE().getJavacTask(copy);
 469.173 -                Log.instance(jt.getContext()).nerrors = 0;
 469.174 -                Method getChanges = WorkingCopy.class.getDeclaredMethod("getChanges", Map.class);
 469.175 -                getChanges.setAccessible(true);
 469.176 -
 469.177 -                result.put(copy.getFileObject(), (List<ModificationResult.Difference>) getChanges.invoke(copy, new HashMap<Object, int[]>()));
 469.178 -
 469.179 -                if (LOG.isLoggable(Level.FINE)) {
 469.180 -                    LOG.log(Level.FINE, "fixes applied to: {0}", FileUtil.getFileDisplayName(wc.getFileObject()));
 469.181 -                }
 469.182 -
 469.183 -                return true;
 469.184 -            }
 469.185 -
 469.186 -            public void groupFinished() {
 469.187 -                overlay = null;
 469.188 -            }
 469.189 -
 469.190 -            public void cannotVerifySpan(Resource r) {
 469.191 -                problems.add(new MessageImpl(MessageKind.WARNING, "Cannot parse: " + r.getRelativePath()));
 469.192 -            }
 469.193 -        };
 469.194 -
 469.195 -        BatchSearch.getVerifiedSpans(candidates, progress, callback, doNotRegisterClassPath, problems, cancel);
 469.196 -        
 469.197 -        addResourceContentChanges(resourceContentChanges, result);
 469.198 -
 469.199 -        return Collections.singletonList(JavaSourceAccessor.getINSTANCE().createModificationResult(result, Collections.<Object, int[]>emptyMap()));
 469.200 -    }
 469.201 -
 469.202 -    public static void addResourceContentChanges(final Map<FileObject, byte[]> resourceContentChanges, final Map<FileObject, List<Difference>> result) {
 469.203 -        for (Entry<FileObject, byte[]> e : resourceContentChanges.entrySet()) {
 469.204 -            try {
 469.205 -                Charset encoding = FileEncodingQuery.getEncoding(e.getKey());
 469.206 -                final Document originalDocument = getDocument(e.getKey());
 469.207 -                final String[] origContent = new String[1];
 469.208 -                final Source[] s = new Source[1];
 469.209 -                if (originalDocument != null) {
 469.210 -                    originalDocument.render(new Runnable() {
 469.211 -                        @Override public void run() {
 469.212 -                            try {
 469.213 -                                origContent[0] = originalDocument.getText(0, originalDocument.getLength());
 469.214 -                                s[0] = Source.create(originalDocument);
 469.215 -                            } catch (BadLocationException ex) {
 469.216 -                                Exceptions.printStackTrace(ex);
 469.217 -                            }
 469.218 -                        }
 469.219 -                    });
 469.220 -                }
 469.221 -                
 469.222 -                if (origContent[0] == null) {
 469.223 -                    byte[] origBytes = e.getKey().asBytes();
 469.224 -                    origContent[0] = encoding.newDecoder().decode(ByteBuffer.wrap(origBytes)).toString();
 469.225 -                }
 469.226 -                String newContent  = encoding.newDecoder().decode(ByteBuffer.wrap(e.getValue())).toString();
 469.227 -
 469.228 -                result.put(e.getKey(), DiffUtilities.diff2ModificationResultDifference(e.getKey(), null, Collections.<Integer, String>emptyMap(), origContent[0], newContent, s[0]));
 469.229 -            } catch (BadLocationException ex) {
 469.230 -                Exceptions.printStackTrace(ex);
 469.231 -            } catch (IOException ex) {
 469.232 -                Exceptions.printStackTrace(ex);
 469.233 -            }
 469.234 -        }
 469.235 -    }
 469.236 -    
 469.237 -    public static @CheckForNull Document getDocument(@NonNull FileObject file) {
 469.238 -        try {
 469.239 -            DataObject od = DataObject.find(file);
 469.240 -            EditorCookie ec = od.getLookup().lookup(EditorCookie.class);
 469.241 -
 469.242 -            if (ec == null) return null;
 469.243 -
 469.244 -            return ec.getDocument();
 469.245 -        } catch (DataObjectNotFoundException ex) {
 469.246 -            LOG.log(Level.FINE, null, ex);
 469.247 -            return null;
 469.248 -        }
 469.249 -    }
 469.250 -
 469.251 -    private static String positionToString(ErrorDescription ed) {
 469.252 -        try {
 469.253 -            return ed.getFile().getNameExt() + ":" + ed.getRange().getBegin().getLine();
 469.254 -        } catch (IOException ex) {
 469.255 -            LOG.log(Level.FINE, null, ex);
 469.256 -            return ed.getFile().getNameExt();
 469.257 -        }
 469.258 -    }
 469.259 -
 469.260 -//    public static void removeUnusedImports(Collection<? extends FileObject> files) throws IOException {
 469.261 -//        Map<ClasspathInfo, Collection<FileObject>> sortedFastFiles = sortFiles(files);
 469.262 -//
 469.263 -//        for (Entry<ClasspathInfo, Collection<FileObject>> e : sortedFastFiles.entrySet()) {
 469.264 -//            JavaSource.create(e.getKey(), e.getValue()).runModificationTask(new RemoveUnusedImports()).commit();
 469.265 -//        }
 469.266 -//    }
 469.267 -//
 469.268 -//    private static final class RemoveUnusedImports implements Task<WorkingCopy> {
 469.269 -//        public void run(WorkingCopy wc) throws IOException {
 469.270 -//            Document doc = wc.getSnapshot().getSource().getDocument(true);
 469.271 -//            
 469.272 -//            if (wc.toPhase(Phase.RESOLVED).compareTo(Phase.RESOLVED) < 0) {
 469.273 -//                return;
 469.274 -//            }
 469.275 -//
 469.276 -//            //compute imports to remove:
 469.277 -//            List<TreePathHandle> unusedImports = SemanticHighlighter.computeUnusedImports(wc);
 469.278 -//            CompilationUnitTree cut = wc.getCompilationUnit();
 469.279 -//            // make the changes to the source
 469.280 -//            for (TreePathHandle handle : unusedImports) {
 469.281 -//                TreePath path = handle.resolve(wc);
 469.282 -//                assert path != null;
 469.283 -//                cut = wc.getTreeMaker().removeCompUnitImport(cut,
 469.284 -//                        (ImportTree) path.getLeaf());
 469.285 -//            }
 469.286 -//
 469.287 -//            if (!unusedImports.isEmpty()) {
 469.288 -//                wc.rewrite(wc.getCompilationUnit(), cut);
 469.289 -//            }
 469.290 -//        }
 469.291 -//    }
 469.292 -
 469.293 -    public static boolean applyFixes(WorkingCopy copy, Map<Project, Set<String>> processedDependencyChanges, Collection<? extends ErrorDescription> hints, Map<FileObject, byte[]> resourceContentChanges, Collection<? super RefactoringElementImplementation> fileChanges, Collection<? super MessageImpl> problems) throws IllegalStateException, Exception {
 469.294 -        return applyFixes(copy, processedDependencyChanges, hints, resourceContentChanges, fileChanges, null, problems);
 469.295 -    }
 469.296 -    
 469.297 -    public static boolean applyFixes(WorkingCopy copy, Map<Project, Set<String>> processedDependencyChanges, Collection<? extends ErrorDescription> hints, Map<FileObject, byte[]> resourceContentChanges, Collection<? super RefactoringElementImplementation> fileChanges, Map<JavaFix, ModificationResult> changesPerFix, Collection<? super MessageImpl> problems) throws IllegalStateException, Exception {
 469.298 -        Set<JavaFix> fixes = new LinkedHashSet<JavaFix>();
 469.299 -        for (ErrorDescription ed : hints) {
 469.300 -            if (!ed.getFixes().isComputed()) {
 469.301 -                throw new IllegalStateException();//TODO: should be problem
 469.302 -            }
 469.303 -
 469.304 -            Fix toApply = null;
 469.305 -
 469.306 -            for (Fix f : ed.getFixes().getFixes()) {
 469.307 -                if (f instanceof SyntheticFix) continue;
 469.308 -                if (toApply == null) toApply = f;
 469.309 -                else problems.add(new MessageImpl(MessageKind.WARNING, "More than one fix for: " + ed.getDescription() + " at " + positionToString(ed) + ", only the first one will be used."));
 469.310 -            }
 469.311 -
 469.312 -            if (toApply == null) {
 469.313 -                //TODO: currently giving a warning so that the hints can be augmented with "Options.QUERY", but that should be removed
 469.314 -                //if a non-query hint cannot produce any fix, it is likely Ok - if not, the hint should produce a warning itself
 469.315 -                boolean doWarning = false;
 469.316 -                assert doWarning = true;
 469.317 -                if (doWarning) {
 469.318 -                    problems.add(new MessageImpl(MessageKind.WARNING, "No fix for: " + ed.getDescription() + " at " + positionToString(ed) + "."));
 469.319 -                }
 469.320 -                continue;
 469.321 -            }
 469.322 -
 469.323 -            if (!(toApply instanceof JavaFixImpl)) {
 469.324 -                throw new IllegalStateException(toApply.getClass().getName());//XXX: hints need to provide JavaFixes
 469.325 -            }
 469.326 -
 469.327 -
 469.328 -            fixes.add(((JavaFixImpl) toApply).jf);
 469.329 -        }
 469.330 -        if (fixDependencies(copy.getFileObject(), fixes, processedDependencyChanges)) {
 469.331 -            return true;
 469.332 -        }
 469.333 -        for (JavaFix f : fixes) {
 469.334 -//                    if (cancel.get()) return ;
 469.335 -
 469.336 -            JavaFixImpl.Accessor.INSTANCE.process(f, copy, false, resourceContentChanges, fileChanges);
 469.337 -            
 469.338 -            if (changesPerFix != null) {
 469.339 -                ElementOverlay overlay = ElementOverlay.getOrCreateOverlay(); //XXX: will use the incorrect overlay?
 469.340 -                Constructor<WorkingCopy> wcConstr = WorkingCopy.class.getDeclaredConstructor(CompilationInfoImpl.class, ElementOverlay.class);
 469.341 -                wcConstr.setAccessible(true);
 469.342 -
 469.343 -//                final WorkingCopy copy = new WorkingCopy(JavaSourceAccessor.getINSTANCE().getCompilationInfoImpl(parameter), overlay);
 469.344 -                WorkingCopy perFixCopy = wcConstr.newInstance(JavaSourceAccessor.getINSTANCE().getCompilationInfoImpl(copy), overlay);
 469.345 -                Method setJavaSource = CompilationInfo.class.getDeclaredMethod("setJavaSource", JavaSource.class);
 469.346 -                setJavaSource.setAccessible(true);
 469.347 -
 469.348 -//                copy.setJavaSource(JavaSource.this);
 469.349 -                setJavaSource.invoke(perFixCopy, copy.getJavaSource());
 469.350 -
 469.351 -                perFixCopy.toPhase(Phase.RESOLVED);
 469.352 -                
 469.353 -                final Map<FileObject, byte[]> perFixResourceContentChanges = new HashMap<FileObject, byte[]>();
 469.354 -        
 469.355 -                JavaFixImpl.Accessor.INSTANCE.process(f, perFixCopy, false, perFixResourceContentChanges, new ArrayList<RefactoringElementImplementation>());
 469.356 -                
 469.357 -                final JavacTaskImpl jt = JavaSourceAccessor.getINSTANCE().getJavacTask(perFixCopy);
 469.358 -                Log.instance(jt.getContext()).nerrors = 0;
 469.359 -                Method getChanges = WorkingCopy.class.getDeclaredMethod("getChanges", Map.class);
 469.360 -                getChanges.setAccessible(true);
 469.361 -                
 469.362 -                Map<FileObject, List<Difference>> changes = new HashMap<FileObject, List<Difference>>();
 469.363 -                
 469.364 -                changes.put(perFixCopy.getFileObject(), (List<ModificationResult.Difference>) getChanges.invoke(perFixCopy, new HashMap<Object, int[]>()));
 469.365 -                
 469.366 -                addResourceContentChanges(resourceContentChanges, changes);
 469.367 -                
 469.368 -                for (Iterator<Entry<FileObject, List<Difference>>> it = changes.entrySet().iterator(); it.hasNext();) {
 469.369 -                    if (it.next().getValue().isEmpty()) it.remove();
 469.370 -                }
 469.371 -
 469.372 -                if (!changes.isEmpty()) {
 469.373 -                    ModificationResult perFixResult = JavaSourceAccessor.getINSTANCE().createModificationResult(changes, Collections.<Object, int[]>emptyMap());
 469.374 -
 469.375 -                    changesPerFix.put(f, perFixResult);
 469.376 -                }
 469.377 -            }
 469.378 -        }
 469.379 -        return false;
 469.380 -    }
 469.381 -    
 469.382 -    public static Collection<ModificationResult> applyFixes(final Map<FileObject, Collection<JavaFix>> toRun) {
 469.383 -        final Map<FileObject, List<ModificationResult.Difference>> result = new LinkedHashMap<FileObject, List<ModificationResult.Difference>>();
 469.384 -        final Map<FileObject, byte[]> resourceContentChanges = new HashMap<FileObject, byte[]>();
 469.385 -        Map<ClasspathInfo, Collection<FileObject>> cp2Files = BatchUtilities.sortFiles(toRun.keySet());
 469.386 -
 469.387 -        for (Entry<ClasspathInfo, Collection<FileObject>> e : cp2Files.entrySet()) {
 469.388 -            try {
 469.389 -                ModificationResult mr = JavaSource.create(e.getKey(), e.getValue()).runModificationTask(new Task<WorkingCopy>() {
 469.390 -                    @Override
 469.391 -                    public void run(WorkingCopy parameter) throws Exception {
 469.392 -                        if (parameter.toPhase(Phase.RESOLVED).compareTo(Phase.RESOLVED) < 0) return ;
 469.393 -
 469.394 -                        for (JavaFix jf : toRun.get(parameter.getFileObject())) {
 469.395 -                            JavaFixImpl.Accessor.INSTANCE.process(jf, parameter, false, resourceContentChanges, new ArrayList<RefactoringElementImplementation>());
 469.396 -                        }
 469.397 -                    }
 469.398 -                });
 469.399 -                
 469.400 -                result.putAll(JavaSourceAccessor.getINSTANCE().getDiffsFromModificationResult(mr));
 469.401 -            } catch (IOException ex) {
 469.402 -                Exceptions.printStackTrace(ex);
 469.403 -            }
 469.404 -        }
 469.405 -        
 469.406 -        addResourceContentChanges(resourceContentChanges, result);
 469.407 -        
 469.408 -        return Collections.singletonList(JavaSourceAccessor.getINSTANCE().createModificationResult(result, Collections.<Object, int[]>emptyMap()));
 469.409 -    }
 469.410 -
 469.411 -    public static Collection<FileObject> getSourceGroups(Iterable<? extends Project> prjs) {
 469.412 -        List<FileObject> result = new LinkedList<FileObject>();
 469.413 -        
 469.414 -        for (Project p : prjs) {
 469.415 -            Sources s = ProjectUtils.getSources(p);
 469.416 -
 469.417 -            for (SourceGroup sg : s.getSourceGroups("java")) {
 469.418 -                result.add(sg.getRootFolder());
 469.419 -            }
 469.420 -        }
 469.421 -
 469.422 -        return result;
 469.423 -    }
 469.424 -
 469.425 -    public static Map<ClasspathInfo, Collection<FileObject>> sortFiles(Collection<? extends FileObject> from) {
 469.426 -        Map<CPCategorizer, Collection<FileObject>> m = new HashMap<CPCategorizer, Collection<FileObject>>();
 469.427 -
 469.428 -        for (FileObject f : from) {
 469.429 -            CPCategorizer cpCategorizer = new CPCategorizer(f);
 469.430 -
 469.431 -            Collection<FileObject> files = m.get(cpCategorizer);
 469.432 -
 469.433 -            if (files == null) {
 469.434 -                m.put(cpCategorizer, files = new LinkedList<FileObject>());
 469.435 -            }
 469.436 -
 469.437 -            files.add(f);
 469.438 -        }
 469.439 -        
 469.440 -        Map<ClasspathInfo, Collection<FileObject>> result = new IdentityHashMap<ClasspathInfo, Collection<FileObject>>();
 469.441 -
 469.442 -        for (Entry<CPCategorizer, Collection<FileObject>> e : m.entrySet()) {
 469.443 -            result.put(ClasspathInfo.create(e.getKey().boot, e.getKey().compile, e.getKey().source), e.getValue());
 469.444 -        }
 469.445 -        
 469.446 -        return result;
 469.447 -    }
 469.448 -    
 469.449 -    private static final ClassPath getClassPath(FileObject forFO, String id) {
 469.450 -        ClassPath result = ClassPath.getClassPath(forFO, id);
 469.451 -        
 469.452 -        if (result == null) {
 469.453 -            if (ClassPath.BOOT.equals(id)) {
 469.454 -                result = JavaPlatformManager.getDefault().getDefaultPlatform().getBootstrapLibraries();
 469.455 -            } else {
 469.456 -                result = ClassPath.EMPTY;
 469.457 -            }
 469.458 -        }
 469.459 -        
 469.460 -        return result;
 469.461 -    }
 469.462 -    
 469.463 -    private static final class CPCategorizer {
 469.464 -        private final String cps;
 469.465 -        private final ClassPath boot;
 469.466 -        private final ClassPath compile;
 469.467 -        private final ClassPath source;
 469.468 -        private final FileObject sourceRoot;
 469.469 -
 469.470 -        public CPCategorizer(FileObject file) {
 469.471 -            this.boot = getClassPath(file, ClassPath.BOOT);
 469.472 -            this.compile = getClassPath(file, ClassPath.COMPILE);
 469.473 -            this.source = getClassPath(file, ClassPath.SOURCE);
 469.474 -            this.sourceRoot = source != null ? source.findOwnerRoot(file) : null;
 469.475 -            
 469.476 -            StringBuilder cps = new StringBuilder();
 469.477 -            
 469.478 -            if (boot != null) cps.append(boot.toString(PathConversionMode.PRINT));
 469.479 -            if (compile != null) cps.append(compile.toString(PathConversionMode.PRINT));
 469.480 -            if (source != null) cps.append(source.toString(PathConversionMode.PRINT));
 469.481 -            
 469.482 -            this.cps = cps.toString();
 469.483 -        }
 469.484 -
 469.485 -        @Override
 469.486 -        public int hashCode() {
 469.487 -            int hash = 5;
 469.488 -            hash = 53 * hash + this.cps.hashCode();
 469.489 -            hash = 53 * hash + (this.sourceRoot != null ? this.sourceRoot.hashCode() : 0);
 469.490 -            return hash;
 469.491 -        }
 469.492 -
 469.493 -        @Override
 469.494 -        public boolean equals(Object obj) {
 469.495 -            if (obj == null) {
 469.496 -                return false;
 469.497 -            }
 469.498 -            if (getClass() != obj.getClass()) {
 469.499 -                return false;
 469.500 -            }
 469.501 -            final CPCategorizer other = (CPCategorizer) obj;
 469.502 -            if (!this.cps.equals(other.cps)) {
 469.503 -                return false;
 469.504 -            }
 469.505 -            if (this.sourceRoot != other.sourceRoot && (this.sourceRoot == null || !this.sourceRoot.equals(other.sourceRoot))) {
 469.506 -                return false;
 469.507 -            }
 469.508 -            return true;
 469.509 -        }
 469.510 -        
 469.511 -    }
 469.512 -
 469.513 -    public static final String ENSURE_DEPENDENCY = "ensure-dependency";
 469.514 -
 469.515 -    public static boolean fixDependencies(FileObject file, Iterable<? extends JavaFix> toProcess, Map<Project, Set<String>> alreadyProcessed) {
 469.516 -        boolean modified = false;
 469.517 -//        for (FileObject file : toProcess.keySet()) {
 469.518 -            for (JavaFix fix : toProcess) {
 469.519 -                String updateTo = Accessor.INSTANCE.getOptions(fix).get(ENSURE_DEPENDENCY);
 469.520 -
 469.521 -                if (updateTo != null) {
 469.522 -                    Project p = FileOwnerQuery.getOwner(file);
 469.523 -
 469.524 -                    if (p != null) {
 469.525 -                        Set<String> seen = alreadyProcessed.get(p);
 469.526 -
 469.527 -                        if (seen == null) {
 469.528 -                            alreadyProcessed.put(p, seen = new HashSet<String>());
 469.529 -                        }
 469.530 -
 469.531 -                        if (seen.add(updateTo)) {
 469.532 -                            for (ProjectDependencyUpgrader up : Lookup.getDefault().lookupAll(ProjectDependencyUpgrader.class)) {
 469.533 -                                if (up.ensureDependency(p, updateTo, false)) { //XXX: should check whether the given project was actually modified
 469.534 -                                    modified = true;
 469.535 -                                    break;
 469.536 -                                }
 469.537 -                            }
 469.538 -                            //TODO: fail if cannot update the dependency?
 469.539 -                        }
 469.540 -                    }
 469.541 -                }
 469.542 -            }
 469.543 -
 469.544 -            return modified;
 469.545 -//        }
 469.546 -    }
 469.547 -
 469.548 -    public static void recursive(FileObject root, FileObject file, Collection<FileObject> collected, ProgressHandleWrapper progress, int depth, Properties timeStamps, Set<String> removedFiles, boolean recursive) {
 469.549 -        if (!VisibilityQuery.getDefault().isVisible(file)) return;
 469.550 -
 469.551 -        if (file.isData()) {
 469.552 -            if (timeStamps != null) {
 469.553 -                String relativePath = FileUtil.getRelativePath(root, file);
 469.554 -                String lastModified = Long.toHexString(file.lastModified().getTime());
 469.555 -
 469.556 -                removedFiles.remove(relativePath);
 469.557 -
 469.558 -                if (lastModified.equals(timeStamps.getProperty(relativePath))) {
 469.559 -                    return;
 469.560 -                }
 469.561 -
 469.562 -                timeStamps.setProperty(relativePath, lastModified);
 469.563 -            }
 469.564 -
 469.565 -            if (/*???:*/"java".equals(file.getExt()) || "text/x-java".equals(FileUtil.getMIMEType(file, "text/x-java"))) {
 469.566 -                collected.add(file);
 469.567 -            }
 469.568 -        } else {
 469.569 -            FileObject[] children = file.getChildren();
 469.570 -
 469.571 -            if (children.length == 0) return;
 469.572 -
 469.573 -            ProgressHandleWrapper inner = depth < 2 ? progress.startNextPartWithEmbedding(ProgressHandleWrapper.prepareParts(children.length)) : null;
 469.574 -
 469.575 -            if (inner == null && progress != null) {
 469.576 -                progress.startNextPart(children.length);
 469.577 -            } else {
 469.578 -                progress = null;
 469.579 -            }
 469.580 -
 469.581 -            for (FileObject c : children) {
 469.582 -                if (recursive || c.isData())
 469.583 -                    recursive(root, c, collected, inner, depth + 1, timeStamps, removedFiles, recursive);
 469.584 -
 469.585 -                if (progress != null) progress.tick();
 469.586 -            }
 469.587 -        }
 469.588 -    }    
 469.589 -}
   470.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/batch/ProgressHandleWrapper.java	Mon Dec 19 11:37:36 2016 +0100
   470.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   470.3 @@ -1,293 +0,0 @@
   470.4 -/*
   470.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   470.6 - *
   470.7 - * Copyright 2009-2011 Oracle and/or its affiliates. All rights reserved.
   470.8 - *
   470.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  470.10 - * Other names may be trademarks of their respective owners.
  470.11 - *
  470.12 - * The contents of this file are subject to the terms of either the GNU
  470.13 - * General Public License Version 2 only ("GPL") or the Common
  470.14 - * Development and Distribution License("CDDL") (collectively, the
  470.15 - * "License"). You may not use this file except in compliance with the
  470.16 - * License. You can obtain a copy of the License at
  470.17 - * http://www.netbeans.org/cddl-gplv2.html
  470.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  470.19 - * specific language governing permissions and limitations under the
  470.20 - * License.  When distributing the software, include this License Header
  470.21 - * Notice in each file and include the License file at
  470.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  470.23 - * particular file as subject to the "Classpath" exception as provided
  470.24 - * by Oracle in the GPL Version 2 section of the License file that
  470.25 - * accompanied this code. If applicable, add the following below the
  470.26 - * License Header, with the fields enclosed by brackets [] replaced by
  470.27 - * your own identifying information:
  470.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  470.29 - *
  470.30 - * If you wish your version of this file to be governed by only the CDDL
  470.31 - * or only the GPL Version 2, indicate your decision by adding
  470.32 - * "[Contributor] elects to include this software in this distribution
  470.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  470.34 - * single choice of license, a recipient has the option to distribute
  470.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  470.36 - * to extend the choice of license to its licensees as provided above.
  470.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  470.38 - * Version 2 license, then the option applies only if the new code is
  470.39 - * made subject to such option by the copyright holder.
  470.40 - *
  470.41 - * Contributor(s):
  470.42 - *
  470.43 - * Portions Copyrighted 2009-2011 Sun Microsystems, Inc.
  470.44 - */
  470.45 -package org.netbeans.modules.java.hints.spiimpl.batch;
  470.46 -
  470.47 -import java.util.Arrays;
  470.48 -import java.util.logging.Level;
  470.49 -import java.util.logging.Logger;
  470.50 -import org.netbeans.api.progress.ProgressHandle;
  470.51 -import org.netbeans.modules.analysis.spi.Analyzer.Context;
  470.52 -import org.netbeans.modules.java.hints.spiimpl.Utilities;
  470.53 -
  470.54 -public final class ProgressHandleWrapper {
  470.55 -
  470.56 -    private static final int TOTAL = 1000;
  470.57 -    private final ProgressHandleAbstraction handle;
  470.58 -    private final int[] parts;
  470.59 -    private int currentPart = -1;
  470.60 -    private int currentPartTotalWork;
  470.61 -    private int currentPartWorkDone;
  470.62 -    private long currentPartStartTime;
  470.63 -    private int currentOffset;
  470.64 -    private final long[] spentTime;
  470.65 -    private boolean debug;
  470.66 -
  470.67 -    public ProgressHandleWrapper(int... parts) {
  470.68 -        this((ProgressHandleAbstraction) null, parts);
  470.69 -    }
  470.70 -
  470.71 -    public ProgressHandleWrapper(ProgressHandle handle, int... parts) {
  470.72 -        this(new ProgressHandleBasedProgressHandleAbstraction(handle), parts);
  470.73 -    }
  470.74 -
  470.75 -    public ProgressHandleWrapper(Context handle, int... parts) {
  470.76 -        this(new AnalysisContextBasedProgressHandleAbstraction(handle), parts);
  470.77 -    }
  470.78 -
  470.79 -    public ProgressHandleWrapper(ProgressHandleAbstraction handle, int... parts) {
  470.80 -        this.handle = handle;
  470.81 -        if (handle == null) {
  470.82 -            this.parts = null;
  470.83 -            this.spentTime = null;
  470.84 -        } else {
  470.85 -            int total = 0;
  470.86 -            for (int i : parts) {
  470.87 -                total += i;
  470.88 -            }
  470.89 -            this.parts = new int[parts.length];
  470.90 -            for (int cntr = 0; cntr < parts.length; cntr++) {
  470.91 -                this.parts[cntr] = (TOTAL * parts[cntr]) / total;
  470.92 -            }
  470.93 -            this.spentTime = new long[parts.length];
  470.94 -        }
  470.95 -    }
  470.96 -
  470.97 -    public void setDebug(boolean debug) {
  470.98 -        this.debug = debug;
  470.99 -    }
 470.100 -
 470.101 -    public void startNextPart(int totalWork) {
 470.102 -        if (handle == null) {
 470.103 -            return;
 470.104 -        }
 470.105 -        if (currentPart == (-1)) {
 470.106 -            handle.start(TOTAL);
 470.107 -        } else {
 470.108 -            currentOffset += parts[currentPart];
 470.109 -            spentTime[currentPart] = System.currentTimeMillis() - currentPartStartTime;
 470.110 -        }
 470.111 -        currentPart++;
 470.112 -        currentPartTotalWork = totalWork;
 470.113 -        currentPartWorkDone = 0;
 470.114 -        currentPartStartTime = System.currentTimeMillis();
 470.115 -        currentPartWorkDoneUpdated();
 470.116 -    }
 470.117 -
 470.118 -    public ProgressHandleWrapper startNextPartWithEmbedding(int... embeddedParts) {
 470.119 -//        startNextPart(TOTAL);
 470.120 -        return new ProgressHandleWrapper(new ProgressHandleWrapperBasedProgressHandleAbstraction(this), embeddedParts);
 470.121 -    }
 470.122 -
 470.123 -    public void tick() {
 470.124 -        if (handle == null) {
 470.125 -            return;
 470.126 -        }
 470.127 -        currentPartWorkDone++;
 470.128 -        currentPartWorkDoneUpdated();
 470.129 -    }
 470.130 -
 470.131 -    private void setCurrentPartWorkDone(int done) {
 470.132 -        if (handle == null) {
 470.133 -            return;
 470.134 -        }
 470.135 -        currentPartWorkDone = done;
 470.136 -        currentPartWorkDoneUpdated();
 470.137 -    }
 470.138 -
 470.139 -    private void currentPartWorkDoneUpdated() {
 470.140 -        if (currentPartTotalWork > 0) {
 470.141 -            int parentProgress = currentOffset + (parts[currentPart] * currentPartWorkDone) / currentPartTotalWork;
 470.142 -            if (debug) {
 470.143 -                System.err.println("currentOffset=" + currentOffset);
 470.144 -                System.err.println("currentPart=" + currentPart);
 470.145 -                System.err.println("parts[currentPart]= " +parts[currentPart]);
 470.146 -                System.err.println("currentPartWorkDone=" + currentPartWorkDone);
 470.147 -                System.err.println("currentPartTotalWork= " +currentPartTotalWork);
 470.148 -                System.err.println("parentProgress=" + parentProgress);
 470.149 -            }
 470.150 -            handle.progress(parentProgress);
 470.151 -        } else {
 470.152 -            handle.progress(currentOffset + parts[currentPart]);
 470.153 -        }
 470.154 -        setAutomatedMessage();
 470.155 -    }
 470.156 -
 470.157 -    public void setMessage(String message) {
 470.158 -        if (handle == null) {
 470.159 -            return;
 470.160 -        }
 470.161 -        handle.progress(message);
 470.162 -    }
 470.163 -
 470.164 -    private void setAutomatedMessage() {
 470.165 -        if (handle == null || currentPart == (-1)) {
 470.166 -            return;
 470.167 -        }
 470.168 -        long spentTime = System.currentTimeMillis() - currentPartStartTime;
 470.169 -        double timePerUnit = ((double) spentTime) / currentPartWorkDone;
 470.170 -        String timeString;
 470.171 -        if (spentTime > 0) {
 470.172 -            double totalTime = currentPartTotalWork * timePerUnit;
 470.173 -            timeString = Utilities.toHumanReadableTime(spentTime) + "/" + Utilities.toHumanReadableTime(totalTime);
 470.174 -        } else {
 470.175 -            timeString = "No estimate";
 470.176 -        }
 470.177 -        handle.progress("Part " + (currentPart + 1) + "/" + parts.length + ", " + currentPartWorkDone + "/" + currentPartTotalWork + ", " + timeString);
 470.178 -    }
 470.179 -
 470.180 -    public void finish() {
 470.181 -        if (handle == null) {
 470.182 -            return ;
 470.183 -        }
 470.184 -
 470.185 -        handle.finish();
 470.186 -
 470.187 -        if (currentPart < 0) return ;
 470.188 -        
 470.189 -        spentTime[currentPart] = System.currentTimeMillis() - currentPartStartTime;
 470.190 -
 470.191 -        double total = 0.0;
 470.192 -
 470.193 -        for (long t : spentTime) {
 470.194 -            total += t;
 470.195 -        }
 470.196 -
 470.197 -        double[] actualSplit = new double[spentTime.length];
 470.198 -        int i = 0;
 470.199 -
 470.200 -        for (long t : spentTime) {
 470.201 -            actualSplit[i++] = TOTAL * (t / total);
 470.202 -        }
 470.203 -
 470.204 -        Logger.getLogger(ProgressHandleWrapper.class.getName()).log(Level.FINE, "Progress handle with split: {0}, actual times: {1}, actual split: {2}", new Object[] {Arrays.toString(parts), Arrays.toString(spentTime), Arrays.toString(actualSplit)});
 470.205 -    }
 470.206 -
 470.207 -    public static int[] prepareParts(int count) {
 470.208 -        int[] result = new int[count];
 470.209 -
 470.210 -        for (int cntr = 0; cntr < count; cntr++) {
 470.211 -            result[cntr] = 1;
 470.212 -        }
 470.213 -
 470.214 -        return result;
 470.215 -    }
 470.216 -
 470.217 -    public static interface ProgressHandleAbstraction {
 470.218 -
 470.219 -        public void start(int totalWork);
 470.220 -
 470.221 -        public void progress(int currentWorkDone);
 470.222 -
 470.223 -        public void progress(String message);
 470.224 -
 470.225 -        public void finish();
 470.226 -
 470.227 -    }
 470.228 -
 470.229 -    private static final class ProgressHandleBasedProgressHandleAbstraction implements ProgressHandleAbstraction {
 470.230 -        private final ProgressHandle delegate;
 470.231 -        public ProgressHandleBasedProgressHandleAbstraction(ProgressHandle delegate) {
 470.232 -            this.delegate = delegate;
 470.233 -        }
 470.234 -
 470.235 -        public void start(int totalWork) {
 470.236 -            delegate.start(totalWork);
 470.237 -        }
 470.238 -
 470.239 -        public void progress(int currentWorkDone) {
 470.240 -            delegate.progress(currentWorkDone);
 470.241 -        }
 470.242 -
 470.243 -        public void progress(String message) {
 470.244 -            delegate.progress(message);
 470.245 -        }
 470.246 -
 470.247 -        public void finish() {
 470.248 -            delegate.finish();
 470.249 -        }
 470.250 -    }
 470.251 -
 470.252 -    private static final class AnalysisContextBasedProgressHandleAbstraction implements ProgressHandleAbstraction {
 470.253 -        private final Context delegate;
 470.254 -        AnalysisContextBasedProgressHandleAbstraction(Context delegate) {
 470.255 -            this.delegate = delegate;
 470.256 -        }
 470.257 -
 470.258 -        public void start(int totalWork) {
 470.259 -            delegate.start(totalWork);
 470.260 -        }
 470.261 -
 470.262 -        public void progress(int currentWorkDone) {
 470.263 -            delegate.progress(currentWorkDone);
 470.264 -        }
 470.265 -
 470.266 -        public void progress(String message) {
 470.267 -            delegate.progress(message);
 470.268 -        }
 470.269 -
 470.270 -        public void finish() {
 470.271 -            delegate.finish();
 470.272 -        }
 470.273 -    }
 470.274 -
 470.275 -    private static final class ProgressHandleWrapperBasedProgressHandleAbstraction implements ProgressHandleAbstraction {
 470.276 -        private final ProgressHandleWrapper delegate;
 470.277 -        public ProgressHandleWrapperBasedProgressHandleAbstraction(ProgressHandleWrapper delegate) {
 470.278 -            this.delegate = delegate;
 470.279 -        }
 470.280 -
 470.281 -        public void start(int totalWork) {
 470.282 -            delegate.startNextPart(totalWork);
 470.283 -        }
 470.284 -
 470.285 -        public void progress(int currentWorkDone) {
 470.286 -            delegate.setCurrentPartWorkDone(currentWorkDone);
 470.287 -        }
 470.288 -
 470.289 -        public void progress(String message) {
 470.290 -            delegate.setMessage(message);
 470.291 -        }
 470.292 -
 470.293 -        public void finish() {}
 470.294 -    }
 470.295 -
 470.296 -}
   471.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/batch/Scopes.java	Mon Dec 19 11:37:36 2016 +0100
   471.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   471.3 @@ -1,141 +0,0 @@
   471.4 -/*
   471.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   471.6 - *
   471.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
   471.8 - *
   471.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  471.10 - * Other names may be trademarks of their respective owners.
  471.11 - *
  471.12 - * The contents of this file are subject to the terms of either the GNU
  471.13 - * General Public License Version 2 only ("GPL") or the Common
  471.14 - * Development and Distribution License("CDDL") (collectively, the
  471.15 - * "License"). You may not use this file except in compliance with the
  471.16 - * License. You can obtain a copy of the License at
  471.17 - * http://www.netbeans.org/cddl-gplv2.html
  471.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  471.19 - * specific language governing permissions and limitations under the
  471.20 - * License.  When distributing the software, include this License Header
  471.21 - * Notice in each file and include the License file at
  471.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  471.23 - * particular file as subject to the "Classpath" exception as provided
  471.24 - * by Oracle in the GPL Version 2 section of the License file that
  471.25 - * accompanied this code. If applicable, add the following below the
  471.26 - * License Header, with the fields enclosed by brackets [] replaced by
  471.27 - * your own identifying information:
  471.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  471.29 - *
  471.30 - * If you wish your version of this file to be governed by only the CDDL
  471.31 - * or only the GPL Version 2, indicate your decision by adding
  471.32 - * "[Contributor] elects to include this software in this distribution
  471.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  471.34 - * single choice of license, a recipient has the option to distribute
  471.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  471.36 - * to extend the choice of license to its licensees as provided above.
  471.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  471.38 - * Version 2 license, then the option applies only if the new code is
  471.39 - * made subject to such option by the copyright holder.
  471.40 - *
  471.41 - * Contributor(s):
  471.42 - *
  471.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
  471.44 - */
  471.45 -package org.netbeans.modules.java.hints.spiimpl.batch;
  471.46 -
  471.47 -import java.util.Arrays;
  471.48 -import java.util.Collection;
  471.49 -import java.util.HashSet;
  471.50 -import java.util.Set;
  471.51 -import org.netbeans.api.java.classpath.ClassPath;
  471.52 -import org.netbeans.api.java.classpath.GlobalPathRegistry;
  471.53 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.Folder;
  471.54 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.IndexEnquirer;
  471.55 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.MapIndices;
  471.56 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.Scope;
  471.57 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
  471.58 -import org.openide.filesystems.FileObject;
  471.59 -import org.openide.util.Lookup;
  471.60 -
  471.61 -/**
  471.62 - *
  471.63 - * @author lahvac
  471.64 - */
  471.65 -public class Scopes {
  471.66 -
  471.67 -    public static Scope allOpenedProjectsScope() {
  471.68 -        return new AllOpenedProjectsScope();
  471.69 -    }
  471.70 -
  471.71 -    private static final class AllOpenedProjectsScope extends Scope {
  471.72 -
  471.73 -        @Override
  471.74 -        public String getDisplayName() {
  471.75 -            return "All Opened Projects";
  471.76 -        }
  471.77 -
  471.78 -        @Override
  471.79 -        public Collection<? extends Folder> getTodo() {
  471.80 -            Set<Folder> todo = new HashSet<Folder>();
  471.81 -
  471.82 -            for (ClassPath source : GlobalPathRegistry.getDefault().getPaths(ClassPath.SOURCE)) {
  471.83 -                todo.addAll(Arrays.asList(Folder.convert(source.getRoots())));
  471.84 -            }
  471.85 -
  471.86 -            return todo;
  471.87 -        }
  471.88 -
  471.89 -        @Override
  471.90 -        public MapIndices getIndexMapper(Iterable<? extends HintDescription> hints) {
  471.91 -            return getDefaultIndicesMapper();
  471.92 -        }
  471.93 -    }
  471.94 -
  471.95 -    public static Scope specifiedFoldersScope(Folder... roots) {
  471.96 -        return new SpecificFoldersScope(roots);
  471.97 -    }
  471.98 -    
  471.99 -    private static final class SpecificFoldersScope extends Scope {
 471.100 -
 471.101 -        private final Collection<? extends Folder> roots;
 471.102 -
 471.103 -        public SpecificFoldersScope(Folder... roots) {
 471.104 -            this.roots = Arrays.asList(roots);
 471.105 -        }
 471.106 -
 471.107 -        @Override
 471.108 -        public String getDisplayName() {
 471.109 -            return "Specified Root";
 471.110 -        }
 471.111 -
 471.112 -        @Override
 471.113 -        public Collection<? extends Folder> getTodo() {
 471.114 -            return roots;
 471.115 -        }
 471.116 -
 471.117 -        @Override
 471.118 -        public MapIndices getIndexMapper(Iterable<? extends HintDescription> hints) {
 471.119 -            return getDefaultIndicesMapper();
 471.120 -        }
 471.121 -    }
 471.122 -
 471.123 -    public static MapIndices getDefaultIndicesMapper() {
 471.124 -        return new MapIndices() {
 471.125 -            @Override
 471.126 -            public IndexEnquirer findIndex(FileObject root, ProgressHandleWrapper progress, boolean recursive) {
 471.127 -                IndexEnquirer e = findIndexEnquirer(root, progress, recursive);
 471.128 -
 471.129 -                if (e != null) return e;
 471.130 -                else return new BatchSearch.FileSystemBasedIndexEnquirer(root, recursive);
 471.131 -            }
 471.132 -        };
 471.133 -    }
 471.134 -    
 471.135 -    public static IndexEnquirer findIndexEnquirer(FileObject root, ProgressHandleWrapper progress, boolean recursive) {
 471.136 -        for (MapIndices mi : Lookup.getDefault().lookupAll(MapIndices.class)) {
 471.137 -            IndexEnquirer r = mi.findIndex(root, progress, recursive);
 471.138 -
 471.139 -            if (r != null) return r;
 471.140 -        }
 471.141 -
 471.142 -        return null;
 471.143 -    }
 471.144 -}
   472.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/hints/GlobalProcessingContext.java	Mon Dec 19 11:37:36 2016 +0100
   472.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   472.3 @@ -1,56 +0,0 @@
   472.4 -/*
   472.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   472.6 - *
   472.7 - * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
   472.8 - *
   472.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  472.10 - * Other names may be trademarks of their respective owners.
  472.11 - *
  472.12 - * The contents of this file are subject to the terms of either the GNU
  472.13 - * General Public License Version 2 only ("GPL") or the Common
  472.14 - * Development and Distribution License("CDDL") (collectively, the
  472.15 - * "License"). You may not use this file except in compliance with the
  472.16 - * License. You can obtain a copy of the License at
  472.17 - * http://www.netbeans.org/cddl-gplv2.html
  472.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  472.19 - * specific language governing permissions and limitations under the
  472.20 - * License.  When distributing the software, include this License Header
  472.21 - * Notice in each file and include the License file at
  472.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  472.23 - * particular file as subject to the "Classpath" exception as provided
  472.24 - * by Oracle in the GPL Version 2 section of the License file that
  472.25 - * accompanied this code. If applicable, add the following below the
  472.26 - * License Header, with the fields enclosed by brackets [] replaced by
  472.27 - * your own identifying information:
  472.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  472.29 - *
  472.30 - * If you wish your version of this file to be governed by only the CDDL
  472.31 - * or only the GPL Version 2, indicate your decision by adding
  472.32 - * "[Contributor] elects to include this software in this distribution
  472.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  472.34 - * single choice of license, a recipient has the option to distribute
  472.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  472.36 - * to extend the choice of license to its licensees as provided above.
  472.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  472.38 - * Version 2 license, then the option applies only if the new code is
  472.39 - * made subject to such option by the copyright holder.
  472.40 - *
  472.41 - * Contributor(s):
  472.42 - *
  472.43 - * Portions Copyrighted 2013 Sun Microsystems, Inc.
  472.44 - */
  472.45 -package org.netbeans.modules.java.hints.spiimpl.hints;
  472.46 -
  472.47 -import java.util.HashMap;
  472.48 -import java.util.List;
  472.49 -import java.util.Map;
  472.50 -import org.netbeans.api.java.source.TreePathHandle;
  472.51 -import org.netbeans.spi.java.hints.Decision;
  472.52 -
  472.53 -/**
  472.54 - *
  472.55 - * @author lahvac
  472.56 - */
  472.57 -public class GlobalProcessingContext {
  472.58 -    public final Map<TreePathHandle, List<Decision<?, ?>>> decisions = new HashMap<TreePathHandle, List<Decision<?, ?>>>();
  472.59 -}
   473.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/hints/HintsInvoker.java	Mon Dec 19 11:37:36 2016 +0100
   473.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   473.3 @@ -1,863 +0,0 @@
   473.4 -/*
   473.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   473.6 - *
   473.7 - * Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   473.8 - *
   473.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  473.10 - * Other names may be trademarks of their respective owners.
  473.11 - *
  473.12 - * The contents of this file are subject to the terms of either the GNU
  473.13 - * General Public License Version 2 only ("GPL") or the Common
  473.14 - * Development and Distribution License("CDDL") (collectively, the
  473.15 - * "License"). You may not use this file except in compliance with the
  473.16 - * License. You can obtain a copy of the License at
  473.17 - * http://www.netbeans.org/cddl-gplv2.html
  473.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  473.19 - * specific language governing permissions and limitations under the
  473.20 - * License.  When distributing the software, include this License Header
  473.21 - * Notice in each file and include the License file at
  473.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  473.23 - * particular file as subject to the "Classpath" exception as provided
  473.24 - * by Oracle in the GPL Version 2 section of the License file that
  473.25 - * accompanied this code. If applicable, add the following below the
  473.26 - * License Header, with the fields enclosed by brackets [] replaced by
  473.27 - * your own identifying information:
  473.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  473.29 - *
  473.30 - * If you wish your version of this file to be governed by only the CDDL
  473.31 - * or only the GPL Version 2, indicate your decision by adding
  473.32 - * "[Contributor] elects to include this software in this distribution
  473.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  473.34 - * single choice of license, a recipient has the option to distribute
  473.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  473.36 - * to extend the choice of license to its licensees as provided above.
  473.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  473.38 - * Version 2 license, then the option applies only if the new code is
  473.39 - * made subject to such option by the copyright holder.
  473.40 - *
  473.41 - * Contributor(s):
  473.42 - *
  473.43 - * Portions Copyrighted 2008-2010 Sun Microsystems, Inc.
  473.44 - */
  473.45 -
  473.46 -package org.netbeans.modules.java.hints.spiimpl.hints;
  473.47 -
  473.48 -import com.sun.source.tree.Tree;
  473.49 -import java.util.Stack;
  473.50 -import java.util.concurrent.atomic.AtomicBoolean;
  473.51 -import javax.lang.model.element.AnnotationMirror;
  473.52 -import javax.lang.model.element.AnnotationValue;
  473.53 -import javax.lang.model.element.Element;
  473.54 -import javax.lang.model.element.ExecutableElement;
  473.55 -import javax.lang.model.element.TypeElement;
  473.56 -import javax.swing.text.Document;
  473.57 -import org.netbeans.api.java.source.support.CancellableTreePathScanner;
  473.58 -import org.netbeans.editor.GuardedDocument;
  473.59 -import org.netbeans.editor.MarkBlock;
  473.60 -import org.netbeans.editor.MarkBlockChain;
  473.61 -import org.openide.filesystems.FileObject;
  473.62 -
  473.63 -import com.sun.source.tree.Tree.Kind;
  473.64 -import com.sun.source.util.TreePath;
  473.65 -import com.sun.source.util.Trees;
  473.66 -import java.io.IOException;
  473.67 -import java.util.ArrayList;
  473.68 -import java.util.Arrays;
  473.69 -import java.util.Collection;
  473.70 -import java.util.Collections;
  473.71 -import java.util.Comparator;
  473.72 -import java.util.EnumMap;
  473.73 -import java.util.HashMap;
  473.74 -import java.util.HashSet;
  473.75 -import java.util.Iterator;
  473.76 -import java.util.LinkedList;
  473.77 -import java.util.List;
  473.78 -import java.util.Map;
  473.79 -import java.util.Map.Entry;
  473.80 -import java.util.Set;
  473.81 -import java.util.prefs.Preferences;
  473.82 -import javax.annotation.processing.ProcessingEnvironment;
  473.83 -import javax.lang.model.type.TypeKind;
  473.84 -import javax.lang.model.type.TypeMirror;
  473.85 -import org.netbeans.api.annotations.common.CheckForNull;
  473.86 -import org.netbeans.api.java.source.CompilationInfo;
  473.87 -import org.netbeans.modules.java.hints.spiimpl.Hacks;
  473.88 -import org.netbeans.spi.java.hints.HintContext;
  473.89 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
  473.90 -import org.netbeans.modules.java.hints.providers.spi.HintMetadata;
  473.91 -import org.netbeans.modules.java.hints.providers.spi.Trigger;
  473.92 -import org.netbeans.modules.java.hints.providers.spi.Trigger.Kinds;
  473.93 -import org.netbeans.modules.java.hints.providers.spi.Trigger.PatternDescription;
  473.94 -import org.netbeans.modules.java.hints.spiimpl.options.HintsSettings;
  473.95 -import org.netbeans.modules.java.hints.spiimpl.MessageImpl;
  473.96 -import org.netbeans.modules.java.hints.spiimpl.RulesManager;
  473.97 -import org.netbeans.modules.java.hints.spiimpl.SPIAccessor;
  473.98 -import org.netbeans.modules.java.hints.spiimpl.Utilities;
  473.99 -import org.netbeans.modules.java.hints.spiimpl.pm.BulkSearch;
 473.100 -import org.netbeans.modules.java.hints.spiimpl.pm.BulkSearch.BulkPattern;
 473.101 -import org.netbeans.modules.java.hints.spiimpl.pm.PatternCompiler;
 473.102 -import org.netbeans.spi.editor.hints.ErrorDescription;
 473.103 -import org.netbeans.spi.editor.hints.Severity;
 473.104 -import org.netbeans.spi.java.hints.Hint;
 473.105 -import org.netbeans.api.java.source.matching.Matcher;
 473.106 -import org.netbeans.api.java.source.matching.Occurrence;
 473.107 -import org.netbeans.api.java.source.matching.Pattern;
 473.108 -import org.netbeans.modules.java.hints.providers.spi.Trigger.DecisionTrigger;
 473.109 -import org.openide.util.Exceptions;
 473.110 -
 473.111 -/**
 473.112 - *
 473.113 - * @author lahvac
 473.114 - */
 473.115 -public class HintsInvoker {
 473.116 -
 473.117 -    private final Map<String, Long> timeLog = new HashMap<String, Long>();
 473.118 -
 473.119 -    private final HintsSettings settings;
 473.120 -    private final int caret;
 473.121 -    private final int from;
 473.122 -    private final int to;
 473.123 -    private final GlobalProcessingContext globalContext;
 473.124 -    private final AtomicBoolean cancel;
 473.125 -
 473.126 -    public HintsInvoker(HintsSettings settings, AtomicBoolean cancel) {
 473.127 -        this(settings, null, cancel);
 473.128 -    }
 473.129 -
 473.130 -    public HintsInvoker(HintsSettings settings, GlobalProcessingContext globalContext, AtomicBoolean cancel) {
 473.131 -        this(settings, -1, -1, -1, globalContext, cancel);
 473.132 -    }
 473.133 -
 473.134 -    public HintsInvoker(HintsSettings settings, int caret, AtomicBoolean cancel) {
 473.135 -        this(settings, caret, -1, -1, null, cancel);
 473.136 -    }
 473.137 -
 473.138 -    public HintsInvoker(HintsSettings settings, int from, int to, AtomicBoolean cancel) {
 473.139 -        this(settings, -1, from, to, null, cancel);
 473.140 -    }
 473.141 -
 473.142 -    private HintsInvoker(HintsSettings settings, int caret, int from, int to, GlobalProcessingContext globalContext, AtomicBoolean cancel) {
 473.143 -        this.settings = settings;
 473.144 -        this.caret = caret;
 473.145 -        this.from = from;
 473.146 -        this.to = to;
 473.147 -        this.globalContext = globalContext;
 473.148 -        this.cancel = cancel;
 473.149 -    }
 473.150 -
 473.151 -    @CheckForNull
 473.152 -    public List<ErrorDescription> computeHints(CompilationInfo info) {
 473.153 -        return computeHints(info, new TreePath(info.getCompilationUnit()));
 473.154 -    }
 473.155 -
 473.156 -    private List<ErrorDescription> computeHints(CompilationInfo info, TreePath startAt) {
 473.157 -        List<HintDescription> descs = new LinkedList<HintDescription>();
 473.158 -        Map<HintMetadata, ? extends Collection<? extends HintDescription>> allHints = RulesManager.getInstance().readHints(info, null, cancel);
 473.159 -
 473.160 -        for (Entry<HintMetadata, ? extends Collection<? extends HintDescription>> e : allHints.entrySet()) {
 473.161 -            HintMetadata m = e.getKey();
 473.162 -
 473.163 -            if (!settings.isEnabled(m)) {
 473.164 -                continue;
 473.165 -            }
 473.166 -
 473.167 -            if (caret != -1) {
 473.168 -                if (m.kind == Hint.Kind.ACTION) {
 473.169 -                    descs.addAll(e.getValue());
 473.170 -                } else {
 473.171 -                    if (settings.getSeverity(m) == Severity.HINT) {
 473.172 -                        descs.addAll(e.getValue());
 473.173 -                    }
 473.174 -                }
 473.175 -            } else {
 473.176 -                if (m.kind == Hint.Kind.INSPECTION) {
 473.177 -                    if (settings.getSeverity(m) != Severity.HINT) {
 473.178 -                        descs.addAll(e.getValue());
 473.179 -                    }
 473.180 -                }
 473.181 -            }
 473.182 -        }
 473.183 -
 473.184 -        List<ErrorDescription> errors = join(computeHints(info, startAt, descs, new LinkedList<MessageImpl>()));
 473.185 -
 473.186 -        dumpTimeSpentInHints();
 473.187 -        
 473.188 -        return errors;
 473.189 -    }
 473.190 -
 473.191 -    @CheckForNull
 473.192 -    public List<ErrorDescription> computeHints(CompilationInfo info,
 473.193 -                                               Iterable<? extends HintDescription> hints) {
 473.194 -        return computeHints(info, hints, new LinkedList<MessageImpl>());
 473.195 -    }
 473.196 -
 473.197 -    @CheckForNull
 473.198 -    public List<ErrorDescription> computeHints(CompilationInfo info,
 473.199 -                                               Iterable<? extends HintDescription> hints,
 473.200 -                                               Collection<? super MessageImpl> problems) {
 473.201 -        return join(computeHints(info, new TreePath(info.getCompilationUnit()), hints, problems));
 473.202 -    }
 473.203 -
 473.204 -    private static final Iterable<? extends Class<? extends Trigger>> TRIGGER_KINDS = Arrays.asList(Kinds.class, PatternDescription.class, DecisionTrigger.class);
 473.205 -    
 473.206 -    @CheckForNull
 473.207 -    public Map<HintDescription, List<ErrorDescription>> computeHints(CompilationInfo info,
 473.208 -                                        TreePath startAt,
 473.209 -                                        Iterable<? extends HintDescription> hints,
 473.210 -                                        Collection<? super MessageImpl> problems) {
 473.211 -        return computeHints(info, startAt, true, hints, problems);
 473.212 -    }
 473.213 -    
 473.214 -    @CheckForNull
 473.215 -    public Map<HintDescription, List<ErrorDescription>> computeHints(CompilationInfo info,
 473.216 -                                        TreePath startAt,
 473.217 -                                        boolean recursive,
 473.218 -                                        Iterable<? extends HintDescription> hints,
 473.219 -                                        Collection<? super MessageImpl> problems) {
 473.220 -        Map<Class, List<HintDescription>> triggerKind2Hints = new HashMap<Class, List<HintDescription>>();
 473.221 -
 473.222 -        for (Class<? extends Trigger> c : TRIGGER_KINDS) {
 473.223 -            triggerKind2Hints.put(c, new ArrayList<HintDescription>());
 473.224 -        }
 473.225 -
 473.226 -        for (HintDescription hd : hints) {
 473.227 -            List<HintDescription> sorted = triggerKind2Hints.get(hd.getTrigger().getClass());
 473.228 -
 473.229 -            sorted.add(hd);
 473.230 -        }
 473.231 -
 473.232 -        if (caret != -1) {
 473.233 -            TreePath tp = info.getTreeUtilities().pathFor(caret);
 473.234 -            return computeSuggestions(info, tp, true, triggerKind2Hints, problems);
 473.235 -        } else {
 473.236 -            if (from != (-1) && to != (-1)) {
 473.237 -                return computeHintsInSpan(info, triggerKind2Hints, problems);
 473.238 -            } else if (!recursive) {
 473.239 -                return computeSuggestions(info, startAt, false, triggerKind2Hints, problems);
 473.240 -            } else {
 473.241 -                return computeHintsImpl(info, startAt, triggerKind2Hints, problems);
 473.242 -            }
 473.243 -        }
 473.244 -    }
 473.245 -
 473.246 -    private Map<HintDescription, List<ErrorDescription>> computeHintsImpl(CompilationInfo info,
 473.247 -                                        TreePath startAt,
 473.248 -                                        Map<Class, List<HintDescription>> triggerKind2Hints,
 473.249 -                                        Collection<? super MessageImpl> problems) {
 473.250 -        Map<HintDescription, List<ErrorDescription>> errors = new HashMap<HintDescription, List<ErrorDescription>>();
 473.251 -        List<HintDescription> kindBasedHints = triggerKind2Hints.get(Kinds.class);
 473.252 -
 473.253 -        timeLog.put("[C] Kind Based Hints", (long) kindBasedHints.size());
 473.254 -
 473.255 -        if (!kindBasedHints.isEmpty()) {
 473.256 -            long kindStart = System.currentTimeMillis();
 473.257 -
 473.258 -            new ScannerImpl(info, cancel, sortByKinds(kindBasedHints), problems).scan(startAt, errors);
 473.259 -
 473.260 -            long kindEnd = System.currentTimeMillis();
 473.261 -
 473.262 -            timeLog.put("Kind Based Hints", kindEnd - kindStart);
 473.263 -        }
 473.264 -
 473.265 -        if (cancel.get()) return null;
 473.266 -        
 473.267 -        List<HintDescription> patternBasedHints = triggerKind2Hints.get(PatternDescription.class);
 473.268 -
 473.269 -        timeLog.put("[C] Pattern Based Hints", (long) patternBasedHints.size());
 473.270 -
 473.271 -        long patternStart = System.currentTimeMillis();
 473.272 -
 473.273 -        Map<PatternDescription, List<HintDescription>> patternHints = sortByPatterns(patternBasedHints);
 473.274 -        Map<String, List<PatternDescription>> patternTests = computePatternTests(patternHints);
 473.275 -
 473.276 -        long bulkPatternStart = System.currentTimeMillis();
 473.277 -
 473.278 -        BulkPattern bulkPattern = BulkSearch.getDefault().create(info, cancel, patternTests.keySet());
 473.279 -
 473.280 -        if (bulkPattern == null || cancel.get()) return null;
 473.281 -        
 473.282 -        long bulkPatternEnd = System.currentTimeMillis();
 473.283 -
 473.284 -        timeLog.put("Bulk Pattern preparation", bulkPatternEnd - bulkPatternStart);
 473.285 -
 473.286 -        long bulkStart = System.currentTimeMillis();
 473.287 -
 473.288 -        Map<String, Collection<TreePath>> occurringPatterns = BulkSearch.getDefault().match(info, cancel, startAt, bulkPattern, timeLog);
 473.289 -        
 473.290 -        if (occurringPatterns == null || cancel.get()) return null;
 473.291 -
 473.292 -        long bulkEnd = System.currentTimeMillis();
 473.293 -
 473.294 -        timeLog.put("Bulk Search", bulkEnd - bulkStart);
 473.295 -        
 473.296 -        Map<HintDescription, List<ErrorDescription>> computedHints = doComputeHints(info, occurringPatterns, patternTests, patternHints, problems);
 473.297 -
 473.298 -        if (computedHints == null || cancel.get()) return null;
 473.299 -        
 473.300 -        mergeAll(errors, computedHints);
 473.301 -
 473.302 -        long patternEnd = System.currentTimeMillis();
 473.303 -
 473.304 -        timeLog.put("Pattern Based Hints", patternEnd - patternStart);
 473.305 -
 473.306 -        return errors;
 473.307 -    }
 473.308 -
 473.309 -    private Map<HintDescription, List<ErrorDescription>> computeHintsInSpan(CompilationInfo info,
 473.310 -                                        Map<Class, List<HintDescription>> triggerKind2Hints,
 473.311 -                                        Collection<? super MessageImpl> problems) {
 473.312 -
 473.313 -        TreePath path = info.getTreeUtilities().pathFor((from + to) / 2);
 473.314 -
 473.315 -        while (path.getLeaf().getKind() != Kind.COMPILATION_UNIT) {
 473.316 -            int start = (int) info.getTrees().getSourcePositions().getStartPosition(info.getCompilationUnit(), path.getLeaf());
 473.317 -            int end = (int) info.getTrees().getSourcePositions().getEndPosition(info.getCompilationUnit(), path.getLeaf());
 473.318 -
 473.319 -            if (start <= from && end >= to) {
 473.320 -                break;
 473.321 -            }
 473.322 -
 473.323 -            path = path.getParentPath();
 473.324 -        }
 473.325 -
 473.326 -        Map<HintDescription, List<ErrorDescription>> errors = new HashMap<HintDescription, List<ErrorDescription>>();
 473.327 -        List<HintDescription> kindBasedHints = triggerKind2Hints.get(Kinds.class);
 473.328 -
 473.329 -        if (!kindBasedHints.isEmpty()) {
 473.330 -            long kindStart = System.currentTimeMillis();
 473.331 -
 473.332 -            new ScannerImpl(info, cancel, sortByKinds(kindBasedHints), problems).scan(path, errors);
 473.333 -
 473.334 -            long kindEnd = System.currentTimeMillis();
 473.335 -
 473.336 -            timeLog.put("Kind Based Hints", kindEnd - kindStart);
 473.337 -        }
 473.338 -
 473.339 -        List<HintDescription> patternBasedHints = triggerKind2Hints.get(PatternDescription.class);
 473.340 -
 473.341 -        if (!patternBasedHints.isEmpty()) {
 473.342 -            long patternStart = System.currentTimeMillis();
 473.343 -
 473.344 -            Map<PatternDescription, List<HintDescription>> patternHints = sortByPatterns(patternBasedHints);
 473.345 -            Map<String, List<PatternDescription>> patternTests = computePatternTests(patternHints);
 473.346 -
 473.347 -            long bulkStart = System.currentTimeMillis();
 473.348 -
 473.349 -            BulkPattern bulkPattern = BulkSearch.getDefault().create(info, cancel, patternTests.keySet());
 473.350 -            
 473.351 -            if (bulkPattern == null || cancel.get()) return null;
 473.352 -            
 473.353 -            Map<String, Collection<TreePath>> occurringPatterns = BulkSearch.getDefault().match(info, cancel, path, bulkPattern, timeLog);
 473.354 -
 473.355 -            long bulkEnd = System.currentTimeMillis();
 473.356 -
 473.357 -            timeLog.put("Bulk Search", bulkEnd - bulkStart);
 473.358 -            
 473.359 -            Map<HintDescription, List<ErrorDescription>> computedHints = doComputeHints(info, occurringPatterns, patternTests, patternHints, problems);
 473.360 -
 473.361 -            if (computedHints == null || cancel.get()) return null;
 473.362 -            
 473.363 -            mergeAll(errors, computedHints);
 473.364 -
 473.365 -            long patternEnd = System.currentTimeMillis();
 473.366 -
 473.367 -            timeLog.put("Pattern Based Hints", patternEnd - patternStart);
 473.368 -        }
 473.369 -
 473.370 -        if (path != null) {
 473.371 -            Map<HintDescription, List<ErrorDescription>> suggestions = computeSuggestions(info, path, true, triggerKind2Hints, problems);
 473.372 -            
 473.373 -            if (suggestions == null || cancel.get()) return null;
 473.374 -            
 473.375 -            mergeAll(errors, suggestions);
 473.376 -        }
 473.377 -
 473.378 -        return errors;
 473.379 -    }
 473.380 -
 473.381 -    private Map<HintDescription, List<ErrorDescription>> computeSuggestions(CompilationInfo info,
 473.382 -                                        TreePath workOn,
 473.383 -                                        boolean up,
 473.384 -                                        Map<Class, List<HintDescription>> triggerKind2Hints,
 473.385 -                                        Collection<? super MessageImpl> problems) {
 473.386 -        Map<HintDescription, List<ErrorDescription>> errors = new HashMap<HintDescription, List<ErrorDescription>>();
 473.387 -        List<HintDescription> kindBasedHints = triggerKind2Hints.get(Kinds.class);
 473.388 -
 473.389 -        if (!kindBasedHints.isEmpty()) {
 473.390 -            long kindStart = System.currentTimeMillis();
 473.391 -            
 473.392 -            Map<Kind, List<HintDescription>> hints = sortByKinds(kindBasedHints);
 473.393 -            TreePath proc = workOn;
 473.394 -
 473.395 -            while (proc != null) {
 473.396 -                new ScannerImpl(info, cancel, hints, problems).scanDoNotGoDeeper(proc, errors);
 473.397 -                if (!up) break;
 473.398 -                proc = proc.getParentPath();
 473.399 -            }
 473.400 -
 473.401 -            long kindEnd = System.currentTimeMillis();
 473.402 -
 473.403 -            timeLog.put("Kind Based Suggestions", kindEnd - kindStart);
 473.404 -        }
 473.405 -        
 473.406 -        if (cancel.get()) return null;
 473.407 -
 473.408 -        List<HintDescription> patternBasedHints = triggerKind2Hints.get(PatternDescription.class);
 473.409 -
 473.410 -        if (!patternBasedHints.isEmpty()) {
 473.411 -            long patternStart = System.currentTimeMillis();
 473.412 -
 473.413 -            Map<PatternDescription, List<HintDescription>> patternHints = sortByPatterns(patternBasedHints);
 473.414 -            Map<String, List<PatternDescription>> patternTests = computePatternTests(patternHints);
 473.415 -
 473.416 -            //pretend that all the patterns occur on all treepaths from the current path
 473.417 -            //up (probably faster than using BulkSearch over whole file)
 473.418 -            //TODO: what about machint trees under the current path?
 473.419 -            Set<TreePath> paths = new HashSet<TreePath>();
 473.420 -
 473.421 -            TreePath tp = workOn;
 473.422 -
 473.423 -            while (tp != null) {
 473.424 -                paths.add(tp);
 473.425 -                if (!up) break;
 473.426 -                tp = tp.getParentPath();
 473.427 -            }
 473.428 -
 473.429 -            Map<String, Collection<TreePath>> occurringPatterns = new HashMap<String, Collection<TreePath>>();
 473.430 -
 473.431 -            for (String p : patternTests.keySet()) {
 473.432 -                occurringPatterns.put(p, paths);
 473.433 -            }
 473.434 -
 473.435 -//            long bulkStart = System.currentTimeMillis();
 473.436 -//
 473.437 -//            BulkPattern bulkPattern = BulkSearch.getDefault().create(info, patternTests.keySet());
 473.438 -//            Map<String, Collection<TreePath>> occurringPatterns = BulkSearch.getDefault().match(info, new TreePath(info.getCompilationUnit()), bulkPattern, timeLog);
 473.439 -//
 473.440 -//            long bulkEnd = System.currentTimeMillis();
 473.441 -//
 473.442 -//            Set<Tree> acceptedLeafs = new HashSet<Tree>();
 473.443 -//
 473.444 -//            TreePath tp = workOn;
 473.445 -//
 473.446 -//            while (tp != null) {
 473.447 -//                acceptedLeafs.add(tp.getLeaf());
 473.448 -//                tp = tp.getParentPath();
 473.449 -//            }
 473.450 -//
 473.451 -//            for (Entry<String, Collection<TreePath>> e : occurringPatterns.entrySet()) {
 473.452 -//                for (Iterator<TreePath> it = e.getValue().iterator(); it.hasNext(); ) {
 473.453 -//                    if (!acceptedLeafs.contains(it.next().getLeaf())) {
 473.454 -//                        it.remove();
 473.455 -//                    }
 473.456 -//                }
 473.457 -//            }
 473.458 -//
 473.459 -//            timeLog.put("Bulk Search", bulkEnd - bulkStart);
 473.460 -
 473.461 -            Map<HintDescription, List<ErrorDescription>> computed = doComputeHints(info, occurringPatterns, patternTests, patternHints, problems);
 473.462 -            
 473.463 -            if (computed == null || cancel.get()) return null;
 473.464 -            
 473.465 -            mergeAll(errors, computed);
 473.466 -
 473.467 -            long patternEnd = System.currentTimeMillis();
 473.468 -
 473.469 -            timeLog.put("Pattern Based Hints", patternEnd - patternStart);
 473.470 -        }
 473.471 -
 473.472 -        return errors;
 473.473 -    }
 473.474 -
 473.475 -    public Map<HintDescription, List<ErrorDescription>> doComputeHints(CompilationInfo info, Map<String, Collection<TreePath>> occurringPatterns, Map<String, List<PatternDescription>> patterns, Map<PatternDescription, List<HintDescription>> patternHints) throws IllegalStateException {
 473.476 -        return doComputeHints(info, occurringPatterns, patterns, patternHints, new LinkedList<MessageImpl>());
 473.477 -    }
 473.478 -
 473.479 -    private static Map<Kind, List<HintDescription>> sortByKinds(List<HintDescription> kindBasedHints) {
 473.480 -        Map<Kind, List<HintDescription>> result = new EnumMap<Kind, List<HintDescription>>(Kind.class);
 473.481 -
 473.482 -        for (HintDescription hd : kindBasedHints) {
 473.483 -            for (Kind k : ((Kinds) hd.getTrigger()).getKinds()) {
 473.484 -                List<HintDescription> hints = result.get(k);
 473.485 -
 473.486 -                if (hints == null) {
 473.487 -                    result.put(k, hints = new ArrayList<HintDescription>());
 473.488 -                }
 473.489 -
 473.490 -                hints.add(hd);
 473.491 -            }
 473.492 -        }
 473.493 -
 473.494 -        return result;
 473.495 -    }
 473.496 -
 473.497 -    private static Map<PatternDescription, List<HintDescription>> sortByPatterns(List<HintDescription> kindBasedHints) {
 473.498 -        Map<PatternDescription, List<HintDescription>> result = new HashMap<PatternDescription, List<HintDescription>>();
 473.499 -
 473.500 -        for (HintDescription hd : kindBasedHints) {
 473.501 -            List<HintDescription> hints = result.get((PatternDescription) hd.getTrigger());
 473.502 -
 473.503 -            if (hints == null) {
 473.504 -                result.put((PatternDescription) hd.getTrigger(), hints = new ArrayList<HintDescription>());
 473.505 -            }
 473.506 -
 473.507 -            hints.add(hd);
 473.508 -        }
 473.509 -
 473.510 -        return result;
 473.511 -    }
 473.512 -
 473.513 -    public static Map<String, List<PatternDescription>> computePatternTests(Map<PatternDescription, List<HintDescription>> patternHints) {
 473.514 -        Map<String, List<PatternDescription>> patternTests = new HashMap<String, List<PatternDescription>>();
 473.515 -        for (Entry<PatternDescription, List<HintDescription>> e : patternHints.entrySet()) {
 473.516 -            String p = e.getKey().getPattern();
 473.517 -            List<PatternDescription> descs = patternTests.get(p);
 473.518 -            if (descs == null) {
 473.519 -                patternTests.put(p, descs = new LinkedList<PatternDescription>());
 473.520 -            }
 473.521 -            descs.add(e.getKey());
 473.522 -        }
 473.523 -        return patternTests;
 473.524 -    }
 473.525 -
 473.526 -    private Map<HintDescription, List<ErrorDescription>> doComputeHints(CompilationInfo info, Map<String, Collection<TreePath>> occurringPatterns, Map<String, List<PatternDescription>> patterns, Map<PatternDescription, List<HintDescription>> patternHints, Collection<? super MessageImpl> problems) throws IllegalStateException {
 473.527 -        Map<HintDescription, List<ErrorDescription>> errors = new HashMap<HintDescription, List<ErrorDescription>>();
 473.528 -
 473.529 -        for (Entry<String, Collection<TreePath>> occ : occurringPatterns.entrySet()) {
 473.530 -            PATTERN_LOOP: for (PatternDescription d : patterns.get(occ.getKey())) {
 473.531 -                if (cancel.get()) return null;
 473.532 -                
 473.533 -                Map<String, TypeMirror> constraints = new HashMap<String, TypeMirror>();
 473.534 -
 473.535 -                for (Entry<String, String> e : d.getConstraints().entrySet()) {
 473.536 -                    TypeMirror designedType = Hacks.parseFQNType(info, e.getValue());
 473.537 -
 473.538 -                    if (designedType == null || designedType.getKind() == TypeKind.ERROR) {
 473.539 -                        //will not bind to anything anyway (#190449), skip pattern:
 473.540 -                        continue PATTERN_LOOP;
 473.541 -                    }
 473.542 -
 473.543 -                    constraints.put(e.getKey(), designedType);
 473.544 -                }
 473.545 -
 473.546 -                Pattern pattern = PatternCompiler.compile(info, occ.getKey(), constraints, d.getImports());
 473.547 -
 473.548 -                for (TreePath candidate : occ.getValue()) {
 473.549 -                    if (cancel.get()) return null;
 473.550 -                
 473.551 -                    Iterator<? extends Occurrence> verified = Matcher.create(info).setCancel(cancel).setSearchRoot(candidate).setTreeTopSearch().match(pattern).iterator();
 473.552 -
 473.553 -                    if (!verified.hasNext()) {
 473.554 -                        continue;
 473.555 -                    }
 473.556 -
 473.557 -                    Set<String> suppressedWarnings = new HashSet<String>(Utilities.findSuppressedWarnings(info, candidate));
 473.558 -                    Occurrence verifiedVariables = verified.next();
 473.559 -
 473.560 -                    for (HintDescription hd : patternHints.get(d)) {
 473.561 -                        HintMetadata hm = hd.getMetadata();
 473.562 -                        HintContext c = SPIAccessor.getINSTANCE().createHintContext(info, settings, hm, globalContext != null ? globalContext : new GlobalProcessingContext(), candidate, verifiedVariables.getVariables(), verifiedVariables.getMultiVariables(), verifiedVariables.getVariables2Names(), constraints, problems, globalContext != null, cancel, caret);
 473.563 -
 473.564 -                        if (!Collections.disjoint(suppressedWarnings, hm.suppressWarnings))
 473.565 -                            continue;
 473.566 -
 473.567 -                        Collection<? extends ErrorDescription> workerErrors = runHint(hd, c);
 473.568 -
 473.569 -                        if (workerErrors != null) {
 473.570 -                            merge(errors, hd, workerErrors);
 473.571 -                        }
 473.572 -                    }
 473.573 -                }
 473.574 -            }
 473.575 -        }
 473.576 -
 473.577 -        return errors;
 473.578 -    }
 473.579 -
 473.580 -//    public static void computeHints(URI file, ProcessingEnvironment env, CompilationUnitTree cut, RulesManager m) {
 473.581 -//        Map<Kind, HintDescription> hints = m.getKindBasedHints();
 473.582 -//
 473.583 -//        if (hints.isEmpty()) {
 473.584 -//            return ;
 473.585 -//        }
 473.586 -//
 473.587 -//        List<ErrorDescription> errors = new  LinkedList<ErrorDescription>();
 473.588 -//
 473.589 -//        File af = new File(file.getPath());
 473.590 -//        FileObject f = FileUtil.toFileObject(af);
 473.591 -//
 473.592 -//        new ScannerImpl(f, env, hints).scan(cut, errors);
 473.593 -//
 473.594 -//        for (ErrorDescription ed : errors) {
 473.595 -//            Diagnostic.Kind k;
 473.596 -//
 473.597 -//            switch (ed.getSeverity()) {
 473.598 -//                case ERROR:
 473.599 -//                    k = Diagnostic.Kind.ERROR;
 473.600 -//                    break;
 473.601 -//                default:
 473.602 -//                    k = Diagnostic.Kind.WARNING;
 473.603 -//                    break;
 473.604 -//            }
 473.605 -//
 473.606 -//            env.getMessager().printMessage(k, ed.getDescription());
 473.607 -//        }
 473.608 -//    }
 473.609 -
 473.610 -    public Map<String, Long> getTimeLog() {
 473.611 -        return timeLog;
 473.612 -    }
 473.613 -
 473.614 -    private final class ScannerImpl extends CancellableTreePathScanner<Void, Map<HintDescription, List<ErrorDescription>>> {
 473.615 -
 473.616 -        private final Stack<Set<String>> suppresWarnings = new Stack<Set<String>>();
 473.617 -        private final CompilationInfo info;
 473.618 -        private final FileObject file;
 473.619 -        private final ProcessingEnvironment env;
 473.620 -        private final Map<Kind, List<HintDescription>> hints;
 473.621 -        private final Collection<? super MessageImpl> problems;
 473.622 -        
 473.623 -        public ScannerImpl(CompilationInfo info, AtomicBoolean cancel, Map<Kind, List<HintDescription>> hints, Collection<? super MessageImpl> problems) {
 473.624 -            super(cancel);
 473.625 -            this.info = info;
 473.626 -            this.file = null;
 473.627 -            this.env  = null;
 473.628 -            this.hints = hints;
 473.629 -            this.problems = problems;
 473.630 -        }
 473.631 -
 473.632 -        public ScannerImpl(FileObject file, ProcessingEnvironment env, Map<Kind, List<HintDescription>> hints, Collection<? super MessageImpl> problems) {
 473.633 -            super(new AtomicBoolean());
 473.634 -            this.info = null;
 473.635 -            this.file = file;
 473.636 -            this.env = env;
 473.637 -            this.hints = hints;
 473.638 -            this.problems = problems;
 473.639 -        }
 473.640 -
 473.641 -        private void runAndAdd(TreePath path, List<HintDescription> rules, Map<HintDescription, List<ErrorDescription>> d) {
 473.642 -            if (rules != null && !isInGuarded(info, path)) {
 473.643 -                OUTER: for (HintDescription hd : rules) {
 473.644 -                    if (isCanceled()) {
 473.645 -                        return ;
 473.646 -                    }
 473.647 -
 473.648 -                    HintMetadata hm = hd.getMetadata();
 473.649 -
 473.650 -                    for (String wname : hm.suppressWarnings) {
 473.651 -                        if( !suppresWarnings.empty() && suppresWarnings.peek().contains(wname)) {
 473.652 -                            continue OUTER;
 473.653 -                        }
 473.654 -                    }
 473.655 -
 473.656 -                    HintContext c = SPIAccessor.getINSTANCE().createHintContext(info, settings, hm, globalContext != null ? globalContext : new GlobalProcessingContext(), path, Collections.<String, TreePath>emptyMap(), Collections.<String, Collection<? extends TreePath>>emptyMap(), Collections.<String, String>emptyMap(), Collections.<String, TypeMirror>emptyMap(), new ArrayList<MessageImpl>(), globalContext != null, cancel, caret);
 473.657 -                    Collection<? extends ErrorDescription> errors = runHint(hd, c);
 473.658 -
 473.659 -                    if (errors != null) {
 473.660 -                        merge(d, hd, errors);
 473.661 -                    }
 473.662 -                }
 473.663 -            }
 473.664 -        }
 473.665 -
 473.666 -        @Override
 473.667 -        public Void scan(Tree tree, Map<HintDescription, List<ErrorDescription>> p) {
 473.668 -            if (tree == null)
 473.669 -                return null;
 473.670 -
 473.671 -            TreePath tp = new TreePath(getCurrentPath(), tree);
 473.672 -            Kind k = tree.getKind();
 473.673 -
 473.674 -            boolean b = pushSuppressWarrnings(tp);
 473.675 -            try {
 473.676 -                runAndAdd(tp, hints.get(k), p);
 473.677 -
 473.678 -                if (isCanceled()) {
 473.679 -                    return null;
 473.680 -                }
 473.681 -
 473.682 -                return super.scan(tree, p);
 473.683 -            } finally {
 473.684 -                if (b) {
 473.685 -                    suppresWarnings.pop();
 473.686 -                }
 473.687 -            }
 473.688 -        }
 473.689 -
 473.690 -        @Override
 473.691 -        public Void scan(TreePath path, Map<HintDescription, List<ErrorDescription>> p) {
 473.692 -            Kind k = path.getLeaf().getKind();
 473.693 -            boolean b = pushSuppressWarrnings(path);
 473.694 -            try {
 473.695 -                runAndAdd(path, hints.get(k), p);
 473.696 -
 473.697 -                if (isCanceled()) {
 473.698 -                    return null;
 473.699 -                }
 473.700 -
 473.701 -                return super.scan(path, p);
 473.702 -            } finally {
 473.703 -                if (b) {
 473.704 -                    suppresWarnings.pop();
 473.705 -                }
 473.706 -            }
 473.707 -        }
 473.708 -
 473.709 -        public void scanDoNotGoDeeper(TreePath path, Map<HintDescription, List<ErrorDescription>> p) {
 473.710 -            Kind k = path.getLeaf().getKind();
 473.711 -            runAndAdd(path, hints.get(k), p);
 473.712 -        }
 473.713 -
 473.714 -        private boolean pushSuppressWarrnings(TreePath path) {
 473.715 -            switch(path.getLeaf().getKind()) {
 473.716 -                case ANNOTATION_TYPE:
 473.717 -                case CLASS:
 473.718 -                case ENUM:
 473.719 -                case INTERFACE:
 473.720 -                case METHOD:
 473.721 -                case VARIABLE:
 473.722 -                    Set<String> current = suppresWarnings.size() == 0 ? null : suppresWarnings.peek();
 473.723 -                    Set<String> nju = current == null ? new HashSet<String>() : new HashSet<String>(current);
 473.724 -
 473.725 -                    Element e = getTrees().getElement(path);
 473.726 -
 473.727 -                    if ( e != null) {
 473.728 -                        for (AnnotationMirror am : e.getAnnotationMirrors()) {
 473.729 -                            String name = ((TypeElement)am.getAnnotationType().asElement()).getQualifiedName().toString();
 473.730 -                            if ( "java.lang.SuppressWarnings".equals(name) ) { // NOI18N
 473.731 -                                Map<? extends ExecutableElement, ? extends AnnotationValue> elementValues = am.getElementValues();
 473.732 -                                for (Map.Entry<? extends ExecutableElement, ? extends AnnotationValue> entry : elementValues.entrySet()) {
 473.733 -                                    if( "value".equals(entry.getKey().getSimpleName().toString()) ) { // NOI18N
 473.734 -                                        Object value = entry.getValue().getValue();
 473.735 -                                        if ( value instanceof List) {
 473.736 -                                            for (Object av : (List)value) {
 473.737 -                                                if( av instanceof AnnotationValue ) {
 473.738 -                                                    Object wname = ((AnnotationValue)av).getValue();
 473.739 -                                                    if ( wname instanceof String ) {
 473.740 -                                                        nju.add((String)wname);
 473.741 -                                                    }
 473.742 -                                                }
 473.743 -                                            }
 473.744 -                                        }
 473.745 -                                    }
 473.746 -                                }
 473.747 -                            }
 473.748 -                        }
 473.749 -                    }
 473.750 -
 473.751 -                    suppresWarnings.push(nju);
 473.752 -                    return true;
 473.753 -            }
 473.754 -            return false;
 473.755 -        }
 473.756 -
 473.757 -        private Trees getTrees() {
 473.758 -            return info != null ? info.getTrees() : Trees.instance(env);
 473.759 -        }
 473.760 -    }
 473.761 -
 473.762 -    static boolean isInGuarded(CompilationInfo info, TreePath tree) {
 473.763 -        if (info == null) {
 473.764 -            return false;
 473.765 -        }
 473.766 -
 473.767 -        try {
 473.768 -            Document doc = info.getDocument();
 473.769 -
 473.770 -            if (doc instanceof GuardedDocument) {
 473.771 -                int start = (int) info.getTrees().getSourcePositions().getStartPosition(info.getCompilationUnit(), tree.getLeaf());
 473.772 -                int end = (int) info.getTrees().getSourcePositions().getEndPosition(info.getCompilationUnit(), tree.getLeaf());
 473.773 -                GuardedDocument gdoc = (GuardedDocument) doc;
 473.774 -                MarkBlockChain guardedBlockChain = gdoc.getGuardedBlockChain();
 473.775 -                if (guardedBlockChain.compareBlock(start, end) == MarkBlock.INNER) {
 473.776 -                    return true;
 473.777 -                }
 473.778 -            }
 473.779 -        } catch (IOException ex) {
 473.780 -            Exceptions.printStackTrace(ex);
 473.781 -        }
 473.782 -
 473.783 -        return false;
 473.784 -    }
 473.785 -
 473.786 -    private Collection<? extends ErrorDescription> runHint(HintDescription hd, HintContext ctx) {
 473.787 -        long start = System.nanoTime();
 473.788 -
 473.789 -        try {
 473.790 -            return hd.getWorker().createErrors(ctx);
 473.791 -        } finally {
 473.792 -            long end = System.nanoTime();
 473.793 -            reportSpentTime(hd.getMetadata().id, end - start);
 473.794 -        }
 473.795 -    }
 473.796 -
 473.797 -    public static <K, V> Map<K, List<V>> merge(Map<K, List<V>> to, K key, Collection<? extends V> value) {
 473.798 -        List<V> toColl = to.get(key);
 473.799 -
 473.800 -        if (toColl == null) {
 473.801 -            to.put(key, toColl = new LinkedList<V>());
 473.802 -        }
 473.803 -
 473.804 -        toColl.addAll(value);
 473.805 -
 473.806 -        return to;
 473.807 -    }
 473.808 -
 473.809 -    public static <K, V> Map<K, List<V>> mergeAll(Map<K, List<V>> to, Map<? extends K, ? extends Collection<? extends V>> what) {
 473.810 -        for (Entry<? extends K, ? extends Collection<? extends V>> e : what.entrySet()) {
 473.811 -            List<V> toColl = to.get(e.getKey());
 473.812 -
 473.813 -            if (toColl == null) {
 473.814 -                to.put(e.getKey(), toColl = new LinkedList<V>());
 473.815 -            }
 473.816 -
 473.817 -            toColl.addAll(e.getValue());
 473.818 -        }
 473.819 -
 473.820 -        return to;
 473.821 -    }
 473.822 -
 473.823 -    public static List<ErrorDescription> join(Map<?, ? extends List<? extends ErrorDescription>> errors) {
 473.824 -        if (errors == null) return null;
 473.825 -        
 473.826 -        List<ErrorDescription> result = new LinkedList<ErrorDescription>();
 473.827 -
 473.828 -        for (Entry<?, ? extends Collection<? extends ErrorDescription>> e : errors.entrySet()) {
 473.829 -            result.addAll(e.getValue());
 473.830 -        }
 473.831 -
 473.832 -        return result;
 473.833 -    }
 473.834 -
 473.835 -    private static final boolean logTimeSpentInHints = Boolean.getBoolean("java.HintsInvoker.time.in.hints");
 473.836 -    private final Map<String, Long> hint2SpentTime = new HashMap<String, Long>();
 473.837 -
 473.838 -    private void reportSpentTime(String id, long nanoTime) {
 473.839 -        if (!logTimeSpentInHints) return;
 473.840 -        
 473.841 -        Long prev = hint2SpentTime.get(id);
 473.842 -
 473.843 -        if (prev == null) {
 473.844 -            prev = (long) 0;
 473.845 -        }
 473.846 -
 473.847 -        hint2SpentTime.put(id, prev + nanoTime);
 473.848 -    }
 473.849 -
 473.850 -    private void dumpTimeSpentInHints() {
 473.851 -        if (!logTimeSpentInHints) return;
 473.852 -
 473.853 -        List<Entry<String, Long>> l = new ArrayList<Entry<String, Long>>(hint2SpentTime.entrySet());
 473.854 -
 473.855 -        Collections.sort(l, new Comparator<Entry<String, Long>>() {
 473.856 -            @Override
 473.857 -            public int compare(Entry<String, Long> o1, Entry<String, Long> o2) {
 473.858 -                return (int) Math.signum(o1.getValue() - o2.getValue());
 473.859 -            }
 473.860 -        });
 473.861 -
 473.862 -        for (Entry<String, Long> e : l) {
 473.863 -            System.err.println(e.getKey() + "=" + String.format("%3.2f", e.getValue() / 1000000.0));
 473.864 -        }
 473.865 -    }
 473.866 -}
   474.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/hints/HintsTask.java	Mon Dec 19 11:37:36 2016 +0100
   474.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   474.3 @@ -1,254 +0,0 @@
   474.4 -/*
   474.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   474.6 - *
   474.7 - * Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   474.8 - *
   474.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  474.10 - * Other names may be trademarks of their respective owners.
  474.11 - *
  474.12 - * The contents of this file are subject to the terms of either the GNU
  474.13 - * General Public License Version 2 only ("GPL") or the Common
  474.14 - * Development and Distribution License("CDDL") (collectively, the
  474.15 - * "License"). You may not use this file except in compliance with the
  474.16 - * License. You can obtain a copy of the License at
  474.17 - * http://www.netbeans.org/cddl-gplv2.html
  474.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  474.19 - * specific language governing permissions and limitations under the
  474.20 - * License.  When distributing the software, include this License Header
  474.21 - * Notice in each file and include the License file at
  474.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  474.23 - * particular file as subject to the "Classpath" exception as provided
  474.24 - * by Oracle in the GPL Version 2 section of the License file that
  474.25 - * accompanied this code. If applicable, add the following below the
  474.26 - * License Header, with the fields enclosed by brackets [] replaced by
  474.27 - * your own identifying information:
  474.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  474.29 - *
  474.30 - * If you wish your version of this file to be governed by only the CDDL
  474.31 - * or only the GPL Version 2, indicate your decision by adding
  474.32 - * "[Contributor] elects to include this software in this distribution
  474.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  474.34 - * single choice of license, a recipient has the option to distribute
  474.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  474.36 - * to extend the choice of license to its licensees as provided above.
  474.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  474.38 - * Version 2 license, then the option applies only if the new code is
  474.39 - * made subject to such option by the copyright holder.
  474.40 - *
  474.41 - * Contributor(s):
  474.42 - *
  474.43 - * Portions Copyrighted 2008-2010 Sun Microsystems, Inc.
  474.44 - */
  474.45 -
  474.46 -package org.netbeans.modules.java.hints.spiimpl.hints;
  474.47 -
  474.48 -import java.util.List;
  474.49 -import java.util.Map.Entry;
  474.50 -import java.util.concurrent.atomic.AtomicBoolean;
  474.51 -import java.util.logging.Level;
  474.52 -import java.util.logging.Logger;
  474.53 -import javax.swing.event.ChangeEvent;
  474.54 -import javax.swing.event.ChangeListener;
  474.55 -import javax.swing.text.BadLocationException;
  474.56 -import javax.swing.text.Document;
  474.57 -import org.netbeans.api.editor.mimelookup.MimeLookup;
  474.58 -import org.netbeans.api.editor.mimelookup.MimeRegistration;
  474.59 -import org.netbeans.api.java.source.CancellableTask;
  474.60 -import org.netbeans.api.java.source.CompilationInfo;
  474.61 -import org.netbeans.api.java.source.JavaSource.Phase;
  474.62 -import org.netbeans.api.java.source.JavaSource.Priority;
  474.63 -import org.netbeans.api.java.source.JavaSourceTaskFactory;
  474.64 -import org.netbeans.api.java.source.support.CaretAwareJavaSourceTaskFactory;
  474.65 -import org.netbeans.api.java.source.support.EditorAwareJavaSourceTaskFactory;
  474.66 -import org.netbeans.editor.BaseDocument;
  474.67 -import org.netbeans.editor.Utilities;
  474.68 -import org.netbeans.lib.editor.util.swing.DocumentUtilities;
  474.69 -import org.netbeans.modules.java.hints.providers.spi.PositionRefresherHelper;
  474.70 -import org.netbeans.modules.java.hints.providers.spi.PositionRefresherHelper.DocumentVersion;
  474.71 -import org.netbeans.modules.java.hints.spiimpl.options.HintsSettings;
  474.72 -import org.netbeans.modules.parsing.spi.TaskIndexingMode;
  474.73 -import org.netbeans.spi.editor.hints.Context;
  474.74 -import org.netbeans.spi.editor.hints.ErrorDescription;
  474.75 -import org.netbeans.spi.editor.hints.HintsController;
  474.76 -import org.netbeans.spi.editor.hints.Severity;
  474.77 -import org.netbeans.spi.editor.hints.settings.FileHintPreferences;
  474.78 -import org.openide.filesystems.FileObject;
  474.79 -import org.openide.util.WeakListeners;
  474.80 -import org.openide.util.lookup.ServiceProvider;
  474.81 -
  474.82 -/**
  474.83 - *
  474.84 - * @author lahvac
  474.85 - */
  474.86 -public class HintsTask implements CancellableTask<CompilationInfo> {
  474.87 -
  474.88 -    public static final String KEY_HINTS = HintsInvoker.class.getName() + "-hints";
  474.89 -    public static final String KEY_SUGGESTIONS = HintsInvoker.class.getName() + "-suggestions";
  474.90 -
  474.91 -    private static final Logger TIMER = Logger.getLogger("TIMER");
  474.92 -    private static final Logger TIMER_EDITOR = Logger.getLogger("TIMER.editor");
  474.93 -    private static final Logger TIMER_CARET = Logger.getLogger("TIMER.caret");
  474.94 -
  474.95 -    private final AtomicBoolean cancel = new AtomicBoolean();
  474.96 -
  474.97 -    private final boolean caretAware;
  474.98 -
  474.99 -    public HintsTask(boolean caretAware) {
 474.100 -        this.caretAware = caretAware;
 474.101 -    }
 474.102 -    
 474.103 -    public void run(CompilationInfo info) {
 474.104 -        cancel.set(false);
 474.105 -
 474.106 -        if (org.netbeans.modules.java.hints.spiimpl.Utilities.disableErrors(info.getFileObject()).contains(Severity.VERIFIER)) {
 474.107 -            return;
 474.108 -        }
 474.109 -
 474.110 -        Document doc = info.getSnapshot().getSource().getDocument(false);
 474.111 -        long version = doc != null ? DocumentUtilities.getDocumentVersion(doc) : 0;
 474.112 -        long startTime = System.currentTimeMillis();
 474.113 -
 474.114 -        int caret = CaretAwareJavaSourceTaskFactory.getLastPosition(info.getFileObject());
 474.115 -        HintsSettings settings = HintsSettings.getSettingsFor(info.getFileObject());
 474.116 -        HintsInvoker inv = caretAware ? new HintsInvoker(settings, caret, cancel) : new HintsInvoker(settings, cancel);
 474.117 -        List<ErrorDescription> result = inv.computeHints(info);
 474.118 -
 474.119 -        if (result == null || cancel.get()) {
 474.120 -            return;
 474.121 -        }
 474.122 -
 474.123 -        HintsController.setErrors(info.getFileObject(), caretAware ? KEY_SUGGESTIONS : KEY_HINTS, result);
 474.124 -
 474.125 -        if (caretAware) {
 474.126 -            SuggestionsPositionRefresherHelper.setVersion(doc, caret);
 474.127 -        } else {
 474.128 -            HintPositionRefresherHelper.setVersion(doc);
 474.129 -        }
 474.130 -
 474.131 -        long endTime = System.currentTimeMillis();
 474.132 -        
 474.133 -        TIMER.log(Level.FINE, "Jackpot 3.0 Hints Task" + (caretAware ? " - Caret Aware" : ""), new Object[] {info.getFileObject(), endTime - startTime});
 474.134 -
 474.135 -        Logger l = caretAware ? TIMER_CARET : TIMER_EDITOR;
 474.136 -
 474.137 -        for (Entry<String, Long> e : inv.getTimeLog().entrySet()) {
 474.138 -            l.log(Level.FINE, e.getKey(), new Object[] {info.getFileObject(), e.getValue()});
 474.139 -        }
 474.140 -    }
 474.141 -
 474.142 -    public void cancel() {
 474.143 -        cancel.set(true);
 474.144 -    }
 474.145 -
 474.146 -
 474.147 -    @ServiceProvider(service=JavaSourceTaskFactory.class)
 474.148 -    public static final class FactoryImpl extends EditorAwareJavaSourceTaskFactory implements ChangeListener {
 474.149 -
 474.150 -        public FactoryImpl() {
 474.151 -            super(Phase.RESOLVED, Priority.LOW, TaskIndexingMode.ALLOWED_DURING_SCAN);
 474.152 -            FileHintPreferences.addChangeListener(WeakListeners.change(this, HintsSettings.class));
 474.153 -        }
 474.154 -
 474.155 -        @Override
 474.156 -        protected CancellableTask<CompilationInfo> createTask(FileObject file) {
 474.157 -            return new HintsTask(false);
 474.158 -        }
 474.159 -
 474.160 -	@Override
 474.161 -	public void stateChanged(ChangeEvent e) {
 474.162 -	    for (FileObject file : getFileObjects()) {
 474.163 -		reschedule(file);
 474.164 -	    }
 474.165 -	}
 474.166 -        
 474.167 -    }
 474.168 -
 474.169 -    @ServiceProvider(service=JavaSourceTaskFactory.class)
 474.170 -    public static final class CaretFactoryImpl extends CaretAwareJavaSourceTaskFactory implements ChangeListener {
 474.171 -
 474.172 -        public CaretFactoryImpl() {
 474.173 -            super(Phase.RESOLVED, Priority.LOW);
 474.174 -            FileHintPreferences.addChangeListener(WeakListeners.change(this, HintsSettings.class));
 474.175 -        }
 474.176 -
 474.177 -        @Override
 474.178 -        protected CancellableTask<CompilationInfo> createTask(FileObject file) {
 474.179 -            return new HintsTask(true);
 474.180 -        }
 474.181 -
 474.182 -	@Override
 474.183 -	public void stateChanged(ChangeEvent e) {
 474.184 -	    for (FileObject file : getFileObjects()) {
 474.185 -		reschedule(file);
 474.186 -	    }
 474.187 -	}
 474.188 -
 474.189 -    }
 474.190 -
 474.191 -    @MimeRegistration(mimeType="text/x-java", service=PositionRefresherHelper.class)
 474.192 -    public static final class HintPositionRefresherHelper extends PositionRefresherHelper<DocumentVersion> {
 474.193 -
 474.194 -        public HintPositionRefresherHelper() {
 474.195 -            super(KEY_HINTS);
 474.196 -        }
 474.197 -
 474.198 -        @Override
 474.199 -        protected boolean isUpToDate(Context context, Document doc, DocumentVersion oldVersion) {
 474.200 -            return true;
 474.201 -        }
 474.202 -
 474.203 -        @Override
 474.204 -        public List<ErrorDescription> getErrorDescriptionsAt(CompilationInfo info, Context context, Document doc) throws BadLocationException {
 474.205 -            int rowStart = Utilities.getRowStart((BaseDocument) doc, context.getPosition());
 474.206 -            int rowEnd = Utilities.getRowEnd((BaseDocument) doc, context.getPosition());
 474.207 -
 474.208 -            return new HintsInvoker(HintsSettings.getSettingsFor(info.getFileObject()), rowStart, rowEnd, context.getCancel()).computeHints(info);
 474.209 -        }
 474.210 -
 474.211 -        private static void setVersion(Document doc) {
 474.212 -            for (PositionRefresherHelper h : MimeLookup.getLookup("text/x-java").lookupAll(PositionRefresherHelper.class)) {
 474.213 -                if (h instanceof HintPositionRefresherHelper) {
 474.214 -                    ((HintPositionRefresherHelper) h).setVersion(doc, new DocumentVersion(doc));
 474.215 -                }
 474.216 -            }
 474.217 -        }
 474.218 -
 474.219 -    }
 474.220 -
 474.221 -    @MimeRegistration(mimeType="text/x-java", service=PositionRefresherHelper.class)
 474.222 -    public static final class SuggestionsPositionRefresherHelper extends PositionRefresherHelper<SuggestionsDocumentVersion> {
 474.223 -
 474.224 -        public SuggestionsPositionRefresherHelper() {
 474.225 -            super(KEY_SUGGESTIONS);
 474.226 -        }
 474.227 -
 474.228 -        @Override
 474.229 -        protected boolean isUpToDate(Context context, Document doc, SuggestionsDocumentVersion oldVersion) {
 474.230 -            return oldVersion.suggestionsCaret == context.getPosition();
 474.231 -        }
 474.232 -
 474.233 -        @Override
 474.234 -        public List<ErrorDescription> getErrorDescriptionsAt(CompilationInfo info, Context context, Document doc) throws BadLocationException {
 474.235 -            return new HintsInvoker(HintsSettings.getSettingsFor(info.getFileObject()), context.getPosition(), context.getCancel()).computeHints(info);
 474.236 -        }
 474.237 -
 474.238 -        private static void setVersion(Document doc, int caret) {
 474.239 -            for (PositionRefresherHelper h : MimeLookup.getLookup("text/x-java").lookupAll(PositionRefresherHelper.class)) {
 474.240 -                if (h instanceof SuggestionsPositionRefresherHelper) {
 474.241 -                    ((SuggestionsPositionRefresherHelper) h).setVersion(doc, new SuggestionsDocumentVersion(doc, caret));
 474.242 -                }
 474.243 -            }
 474.244 -        }
 474.245 -    }
 474.246 -
 474.247 -    private static class SuggestionsDocumentVersion extends DocumentVersion {
 474.248 -
 474.249 -        private final int suggestionsCaret;
 474.250 -        
 474.251 -        public SuggestionsDocumentVersion(Document doc, int suggestionsCaret) {
 474.252 -            super(doc);
 474.253 -            this.suggestionsCaret = suggestionsCaret;
 474.254 -        }
 474.255 -    }
 474.256 -
 474.257 -}
   475.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/ipi/upgrade/ProjectDependencyUpgrader.java	Mon Dec 19 11:37:36 2016 +0100
   475.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   475.3 @@ -1,64 +0,0 @@
   475.4 -/*
   475.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   475.6 - *
   475.7 - * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
   475.8 - *
   475.9 - * The contents of this file are subject to the terms of either the GNU
  475.10 - * General Public License Version 2 only ("GPL") or the Common
  475.11 - * Development and Distribution License("CDDL") (collectively, the
  475.12 - * "License"). You may not use this file except in compliance with the
  475.13 - * License. You can obtain a copy of the License at
  475.14 - * http://www.netbeans.org/cddl-gplv2.html
  475.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  475.16 - * specific language governing permissions and limitations under the
  475.17 - * License.  When distributing the software, include this License Header
  475.18 - * Notice in each file and include the License file at
  475.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  475.20 - * particular file as subject to the "Classpath" exception as provided
  475.21 - * by Sun in the GPL Version 2 section of the License file that
  475.22 - * accompanied this code. If applicable, add the following below the
  475.23 - * License Header, with the fields enclosed by brackets [] replaced by
  475.24 - * your own identifying information:
  475.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  475.26 - *
  475.27 - * If you wish your version of this file to be governed by only the CDDL
  475.28 - * or only the GPL Version 2, indicate your decision by adding
  475.29 - * "[Contributor] elects to include this software in this distribution
  475.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  475.31 - * single choice of license, a recipient has the option to distribute
  475.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  475.33 - * to extend the choice of license to its licensees as provided above.
  475.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  475.35 - * Version 2 license, then the option applies only if the new code is
  475.36 - * made subject to such option by the copyright holder.
  475.37 - *
  475.38 - * Contributor(s):
  475.39 - *
  475.40 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  475.41 - */
  475.42 -package org.netbeans.modules.java.hints.spiimpl.ipi.upgrade;
  475.43 -
  475.44 -import org.netbeans.api.project.Project;
  475.45 -import org.openide.DialogDisplayer;
  475.46 -import org.openide.NotifyDescriptor;
  475.47 -import org.openide.filesystems.FileObject;
  475.48 -import org.openide.modules.SpecificationVersion;
  475.49 -
  475.50 -/**
  475.51 - *
  475.52 - * @author lahvac
  475.53 - */
  475.54 -public abstract class ProjectDependencyUpgrader {
  475.55 -
  475.56 -    public abstract boolean ensureDependency(Project p, FileObject dep, SpecificationVersion spec, boolean canShowUI);
  475.57 -    public abstract boolean ensureDependency(Project p, String specification, boolean b);
  475.58 -
  475.59 -    protected final boolean showDependencyUpgradeDialog(Project p, String dep, SpecificationVersion currentDependency, SpecificationVersion spec, boolean newDepenency, boolean canShowUI) {
  475.60 -        if (!canShowUI) return true;
  475.61 -        
  475.62 -        NotifyDescriptor nd = new NotifyDescriptor.Confirmation("New version: " + spec, "Update spec version.", NotifyDescriptor.YES_NO_OPTION);
  475.63 -
  475.64 -        return DialogDisplayer.getDefault().notify(nd) == NotifyDescriptor.YES_OPTION;
  475.65 -    }
  475.66 -
  475.67 -}
   476.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/options/HintsSettings.java	Mon Dec 19 11:37:36 2016 +0100
   476.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   476.3 @@ -1,149 +0,0 @@
   476.4 -/*
   476.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   476.6 - *
   476.7 - * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
   476.8 - *
   476.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  476.10 - * Other names may be trademarks of their respective owners.
  476.11 - *
  476.12 - * The contents of this file are subject to the terms of either the GNU
  476.13 - * General Public License Version 2 only ("GPL") or the Common
  476.14 - * Development and Distribution License("CDDL") (collectively, the
  476.15 - * "License"). You may not use this file except in compliance with the
  476.16 - * License. You can obtain a copy of the License at
  476.17 - * http://www.netbeans.org/cddl-gplv2.html
  476.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  476.19 - * specific language governing permissions and limitations under the
  476.20 - * License.  When distributing the software, include this License Header
  476.21 - * Notice in each file and include the License file at
  476.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  476.23 - * particular file as subject to the "Classpath" exception as provided
  476.24 - * by Oracle in the GPL Version 2 section of the License file that
  476.25 - * accompanied this code. If applicable, add the following below the
  476.26 - * License Header, with the fields enclosed by brackets [] replaced by
  476.27 - * your own identifying information:
  476.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  476.29 - *
  476.30 - * Contributor(s):
  476.31 - *
  476.32 - * The Original Software is NetBeans. The Initial Developer of the Original
  476.33 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2010 Sun
  476.34 - * Microsystems, Inc. All Rights Reserved.
  476.35 - *
  476.36 - * If you wish your version of this file to be governed by only the CDDL
  476.37 - * or only the GPL Version 2, indicate your decision by adding
  476.38 - * "[Contributor] elects to include this software in this distribution
  476.39 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  476.40 - * single choice of license, a recipient has the option to distribute
  476.41 - * your version of this file under either the CDDL, the GPL Version 2 or
  476.42 - * to extend the choice of license to its licensees as provided above.
  476.43 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  476.44 - * Version 2 license, then the option applies only if the new code is
  476.45 - * made subject to such option by the copyright holder.
  476.46 - */
  476.47 -package org.netbeans.modules.java.hints.spiimpl.options;
  476.48 -
  476.49 -import java.util.prefs.Preferences;
  476.50 -import org.netbeans.api.editor.mimelookup.MimeRegistration;
  476.51 -import org.netbeans.modules.java.hints.providers.spi.HintMetadata;
  476.52 -import org.netbeans.spi.editor.hints.Severity;
  476.53 -import org.netbeans.spi.editor.hints.settings.FileHintPreferences;
  476.54 -import org.netbeans.spi.editor.hints.settings.FileHintPreferences.GlobalHintPreferencesProvider;
  476.55 -import org.openide.filesystems.FileObject;
  476.56 -import org.openide.util.NbPreferences;
  476.57 -
  476.58 -/**
  476.59 - *
  476.60 - * @author Petr Hrebejk
  476.61 - * @author Jan Lahoda
  476.62 - */
  476.63 -public abstract class HintsSettings {
  476.64 -
  476.65 -    private static final String ENABLED_KEY = "enabled";         // NOI18N
  476.66 -    private static final String OLD_SEVERITY_KEY = "severity";       // NOI18N
  476.67 -    private static final String NEW_SEVERITY_KEY = "hintSeverity";       // NOI18N
  476.68 -//    protected static final String IN_TASK_LIST_KEY = "inTaskList"; // NOI18N
  476.69 -
  476.70 -    public abstract boolean isEnabled(HintMetadata hint);
  476.71 -    public abstract void setEnabled(HintMetadata hint, boolean value);
  476.72 -    public abstract Preferences getHintPreferences(HintMetadata hint);
  476.73 -    public abstract Severity getSeverity(HintMetadata hint);
  476.74 -    public abstract void setSeverity(HintMetadata hint, Severity severity);
  476.75 -//    public abstract Iterable<? extends HintDescription> getEnabledHints();
  476.76 -    
  476.77 -    private static final class PreferencesBasedHintsSettings extends HintsSettings {
  476.78 -
  476.79 -        private final Preferences preferences;
  476.80 -        private final boolean useDefaultEnabled;
  476.81 -        private final Severity overrideSeverity;
  476.82 -
  476.83 -        public PreferencesBasedHintsSettings(Preferences preferences, boolean useDefaultEnabled, Severity overrideSeverity) {
  476.84 -            this.preferences = preferences;
  476.85 -            this.useDefaultEnabled = useDefaultEnabled;
  476.86 -            this.overrideSeverity = overrideSeverity;
  476.87 -        }
  476.88 -
  476.89 -        @Override
  476.90 -        public boolean isEnabled(HintMetadata hint) {
  476.91 -            return getHintPreferences(hint).getBoolean(ENABLED_KEY, useDefaultEnabled && hint.enabled);
  476.92 -        }
  476.93 -
  476.94 -        @Override
  476.95 -        public void setEnabled(HintMetadata hint, boolean value) {
  476.96 -            getHintPreferences(hint).putBoolean(ENABLED_KEY, value);
  476.97 -        }
  476.98 -
  476.99 -        @Override
 476.100 -        public Preferences getHintPreferences(HintMetadata hint) {
 476.101 -            return preferences.node(hint.id);
 476.102 -        }
 476.103 -
 476.104 -        @Override
 476.105 -        public Severity getSeverity(HintMetadata hint) {
 476.106 -            Preferences prefs = getHintPreferences(hint);
 476.107 -            String s = prefs.get(NEW_SEVERITY_KEY, null);
 476.108 -            if (s != null) return Severity.valueOf(s);
 476.109 -
 476.110 -            s = prefs.get(OLD_SEVERITY_KEY, null);
 476.111 -
 476.112 -            if (s == null) return overrideSeverity != null ? overrideSeverity : hint != null ? hint.severity : null;
 476.113 -
 476.114 -            if ("ERROR".equals(s)) return Severity.ERROR;
 476.115 -            else if ("WARNING".equals(s)) return Severity.VERIFIER;
 476.116 -            else if ("CURRENT_LINE_WARNING".equals(s)) return Severity.HINT;
 476.117 -
 476.118 -            return overrideSeverity != null ? overrideSeverity : hint != null ? hint.severity : null;
 476.119 -        }
 476.120 -        
 476.121 -        @Override
 476.122 -        public void setSeverity(HintMetadata hint, Severity severity) {
 476.123 -            getHintPreferences(hint).put(NEW_SEVERITY_KEY, severity.name());
 476.124 -        }
 476.125 -    }
 476.126 -    
 476.127 -    public static HintsSettings createPreferencesBasedHintsSettings(Preferences preferences, boolean useDefaultEnabled, Severity overrideSeverity) {
 476.128 -        return new PreferencesBasedHintsSettings(preferences, useDefaultEnabled, overrideSeverity);
 476.129 -    }
 476.130 -    
 476.131 -    public static HintsSettings getSettingsFor(FileObject file) {
 476.132 -        return createPreferencesBasedHintsSettings(FileHintPreferences.getFilePreferences(file, "text/x-java"), true, null);
 476.133 -    }
 476.134 -    
 476.135 -    public static HintsSettings getGlobalSettings() {
 476.136 -        return GLOBAL_SETTINGS;
 476.137 -    }
 476.138 -    
 476.139 -    private static final String DEFAULT_PROFILE = "default"; // NOI18N
 476.140 -    private static final String PREFERENCES_LOCATION = "org/netbeans/modules/java/hints";
 476.141 -    private static final HintsSettings GLOBAL_SETTINGS = createPreferencesBasedHintsSettings(NbPreferences.root().node(PREFERENCES_LOCATION).node(DEFAULT_PROFILE), true, null);
 476.142 -    
 476.143 -    @MimeRegistration(mimeType="text/x-java", service=GlobalHintPreferencesProvider.class)
 476.144 -    public static class GlobalSettingsProvider implements GlobalHintPreferencesProvider {
 476.145 -
 476.146 -        @Override
 476.147 -        public Preferences getGlobalPreferences() {
 476.148 -            return NbPreferences.root().node(PREFERENCES_LOCATION).node(DEFAULT_PROFILE);
 476.149 -        }
 476.150 -        
 476.151 -    }
 476.152 -}
   477.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/pm/BulkSearch.java	Mon Dec 19 11:37:36 2016 +0100
   477.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   477.3 @@ -1,190 +0,0 @@
   477.4 -/*
   477.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   477.6 - *
   477.7 - * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
   477.8 - *
   477.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  477.10 - * Other names may be trademarks of their respective owners.
  477.11 - *
  477.12 - * The contents of this file are subject to the terms of either the GNU
  477.13 - * General Public License Version 2 only ("GPL") or the Common
  477.14 - * Development and Distribution License("CDDL") (collectively, the
  477.15 - * "License"). You may not use this file except in compliance with the
  477.16 - * License. You can obtain a copy of the License at
  477.17 - * http://www.netbeans.org/cddl-gplv2.html
  477.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  477.19 - * specific language governing permissions and limitations under the
  477.20 - * License.  When distributing the software, include this License Header
  477.21 - * Notice in each file and include the License file at
  477.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  477.23 - * particular file as subject to the "Classpath" exception as provided
  477.24 - * by Oracle in the GPL Version 2 section of the License file that
  477.25 - * accompanied this code. If applicable, add the following below the
  477.26 - * License Header, with the fields enclosed by brackets [] replaced by
  477.27 - * your own identifying information:
  477.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  477.29 - *
  477.30 - * If you wish your version of this file to be governed by only the CDDL
  477.31 - * or only the GPL Version 2, indicate your decision by adding
  477.32 - * "[Contributor] elects to include this software in this distribution
  477.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  477.34 - * single choice of license, a recipient has the option to distribute
  477.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  477.36 - * to extend the choice of license to its licensees as provided above.
  477.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  477.38 - * Version 2 license, then the option applies only if the new code is
  477.39 - * made subject to such option by the copyright holder.
  477.40 - *
  477.41 - * Contributor(s):
  477.42 - *
  477.43 - * Portions Copyrighted 2009 Sun Microsystems, Inc.
  477.44 - */
  477.45 -
  477.46 -package org.netbeans.modules.java.hints.spiimpl.pm;
  477.47 -
  477.48 -import com.sun.source.tree.Tree;
  477.49 -import com.sun.source.util.TreePath;
  477.50 -import java.io.InputStream;
  477.51 -import java.io.OutputStream;
  477.52 -import java.util.Arrays;
  477.53 -import java.util.Collection;
  477.54 -import java.util.LinkedList;
  477.55 -import java.util.List;
  477.56 -import java.util.Map;
  477.57 -import java.util.Set;
  477.58 -import java.util.concurrent.atomic.AtomicBoolean;
  477.59 -import org.netbeans.api.annotations.common.CheckForNull;
  477.60 -import org.netbeans.api.java.source.CompilationInfo;
  477.61 -import org.netbeans.modules.java.hints.spiimpl.Utilities;
  477.62 -import org.netbeans.modules.java.hints.providers.spi.HintDescription.AdditionalQueryConstraints;
  477.63 -
  477.64 -/**
  477.65 - *
  477.66 - * @author lahvac
  477.67 - */
  477.68 -public abstract class BulkSearch {
  477.69 -
  477.70 -    private static final BulkSearch INSTANCE = new NFABasedBulkSearch();
  477.71 -//    private static final BulkSearch INSTANCE = new REBasedBulkSearch();
  477.72 -
  477.73 -    public static BulkSearch getDefault() {
  477.74 -        return INSTANCE;
  477.75 -    }
  477.76 -    
  477.77 -    private final boolean requiresLightweightVerification;
  477.78 -    
  477.79 -    protected BulkSearch(boolean requiresLightweightVerification) {
  477.80 -        this.requiresLightweightVerification = requiresLightweightVerification;
  477.81 -    }
  477.82 -    
  477.83 -    public final Map<String, Collection<TreePath>> match(CompilationInfo info, AtomicBoolean cancel, TreePath toSearch, BulkPattern pattern) {
  477.84 -        return match(info, cancel, toSearch, pattern, null);
  477.85 -    }
  477.86 -
  477.87 -    public final boolean requiresLightweightVerification() {
  477.88 -        return requiresLightweightVerification;
  477.89 -    }
  477.90 -
  477.91 -    @CheckForNull
  477.92 -    public abstract Map<String, Collection<TreePath>> match(CompilationInfo info, AtomicBoolean cancel, TreePath toSearch, BulkPattern pattern, Map<String, Long> timeLog);
  477.93 -
  477.94 -    public abstract boolean matches(InputStream encoded, AtomicBoolean cancel, BulkPattern pattern);
  477.95 -    
  477.96 -    @CheckForNull
  477.97 -    public abstract Map<String, Integer> matchesWithFrequencies(InputStream encoded, BulkPattern pattern, AtomicBoolean cancel);
  477.98 -    
  477.99 -    public abstract boolean matches(CompilationInfo info, AtomicBoolean cancel, TreePath toSearch, BulkPattern pattern);
 477.100 -
 477.101 -    public abstract void encode(Tree tree, EncodingContext ctx, AtomicBoolean cancel);
 477.102 -    
 477.103 -    @CheckForNull
 477.104 -    public final BulkPattern create(CompilationInfo info, AtomicBoolean cancel, String... code) {
 477.105 -        return create(info, cancel, Arrays.asList(code));
 477.106 -    }
 477.107 -
 477.108 -    @CheckForNull
 477.109 -    public final BulkPattern create(CompilationInfo info, AtomicBoolean cancel, Collection<? extends String> code) {
 477.110 -        List<Tree> patterns = new LinkedList<Tree>();
 477.111 -        List<AdditionalQueryConstraints> additionalConstraints = new LinkedList<AdditionalQueryConstraints>();
 477.112 -
 477.113 -        for (String c : code) {
 477.114 -            patterns.add(Utilities.parseAndAttribute(info, c, null));
 477.115 -            additionalConstraints.add(AdditionalQueryConstraints.empty());
 477.116 -        }
 477.117 -
 477.118 -        return create(code, patterns, additionalConstraints, cancel);
 477.119 -    }
 477.120 -    
 477.121 -    @CheckForNull
 477.122 -    public abstract BulkPattern create(Collection<? extends String> code, Collection<? extends Tree> patterns, Collection<? extends AdditionalQueryConstraints> additionalConstraints, AtomicBoolean cancel);
 477.123 -
 477.124 -    public static abstract class BulkPattern {
 477.125 -
 477.126 -        private final List<? extends String> patterns;
 477.127 -        private final List<? extends Set<? extends String>> identifiers;
 477.128 -        private final List<List<List<String>>> requiredContent;
 477.129 -        private final List<AdditionalQueryConstraints> additionalConstraints;
 477.130 -
 477.131 -        public BulkPattern(List<? extends String> patterns, List<? extends Set<? extends String>> identifiers, List<List<List<String>>> requiredContent, List<AdditionalQueryConstraints> additionalConstraints) {
 477.132 -            this.patterns = patterns;
 477.133 -            this.identifiers = identifiers;//TODO: immutable, maybe clone
 477.134 -            this.requiredContent = requiredContent;
 477.135 -            this.additionalConstraints = additionalConstraints;
 477.136 -        }
 477.137 -
 477.138 -        public List<? extends String> getPatterns() {
 477.139 -            return patterns;
 477.140 -        }
 477.141 -
 477.142 -        public List<? extends Set<? extends String>> getIdentifiers() {
 477.143 -            return identifiers;
 477.144 -        }
 477.145 -
 477.146 -        public List<List<List<String>>> getRequiredContent() {
 477.147 -            return requiredContent;
 477.148 -        }
 477.149 -
 477.150 -        public List<AdditionalQueryConstraints> getAdditionalConstraints() {
 477.151 -            return additionalConstraints;
 477.152 -        }
 477.153 -
 477.154 -    }
 477.155 -
 477.156 -    public static final class EncodingContext {
 477.157 -
 477.158 -        private final OutputStream out;
 477.159 -        private final boolean forDuplicates;
 477.160 -        private Set<? extends String> identifiers;
 477.161 -        private List<String> content;
 477.162 -
 477.163 -        public EncodingContext(OutputStream out, boolean forDuplicates) {
 477.164 -            this.out = out;
 477.165 -            this.forDuplicates = forDuplicates;
 477.166 -        }
 477.167 -
 477.168 -        public Set<? extends String> getIdentifiers() {
 477.169 -            return identifiers;
 477.170 -        }
 477.171 -
 477.172 -        public OutputStream getOut() {
 477.173 -            return out;
 477.174 -        }
 477.175 -
 477.176 -        public boolean isForDuplicates() {
 477.177 -            return forDuplicates;
 477.178 -        }
 477.179 -
 477.180 -        public void setIdentifiers(Set<? extends String> identifiers) {
 477.181 -            this.identifiers = identifiers;
 477.182 -        }
 477.183 -
 477.184 -        public void setContent(List<String> content) {
 477.185 -            this.content = content;
 477.186 -        }
 477.187 -
 477.188 -        public List<String> getContent() {
 477.189 -            return content;
 477.190 -        }
 477.191 -
 477.192 -    }
 477.193 -}
   478.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/pm/CopyFinderBasedBulkSearch.java	Mon Dec 19 11:37:36 2016 +0100
   478.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   478.3 @@ -1,141 +0,0 @@
   478.4 -/*
   478.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   478.6 - *
   478.7 - * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
   478.8 - *
   478.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  478.10 - * Other names may be trademarks of their respective owners.
  478.11 - *
  478.12 - * The contents of this file are subject to the terms of either the GNU
  478.13 - * General Public License Version 2 only ("GPL") or the Common
  478.14 - * Development and Distribution License("CDDL") (collectively, the
  478.15 - * "License"). You may not use this file except in compliance with the
  478.16 - * License. You can obtain a copy of the License at
  478.17 - * http://www.netbeans.org/cddl-gplv2.html
  478.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  478.19 - * specific language governing permissions and limitations under the
  478.20 - * License.  When distributing the software, include this License Header
  478.21 - * Notice in each file and include the License file at
  478.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  478.23 - * particular file as subject to the "Classpath" exception as provided
  478.24 - * by Oracle in the GPL Version 2 section of the License file that
  478.25 - * accompanied this code. If applicable, add the following below the
  478.26 - * License Header, with the fields enclosed by brackets [] replaced by
  478.27 - * your own identifying information:
  478.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  478.29 - *
  478.30 - * If you wish your version of this file to be governed by only the CDDL
  478.31 - * or only the GPL Version 2, indicate your decision by adding
  478.32 - * "[Contributor] elects to include this software in this distribution
  478.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  478.34 - * single choice of license, a recipient has the option to distribute
  478.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  478.36 - * to extend the choice of license to its licensees as provided above.
  478.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  478.38 - * Version 2 license, then the option applies only if the new code is
  478.39 - * made subject to such option by the copyright holder.
  478.40 - *
  478.41 - * Contributor(s):
  478.42 - *
  478.43 - * Portions Copyrighted 2009 Sun Microsystems, Inc.
  478.44 - */
  478.45 -
  478.46 -package org.netbeans.modules.java.hints.spiimpl.pm;
  478.47 -
  478.48 -import com.sun.source.tree.Tree;
  478.49 -import com.sun.source.util.TreePath;
  478.50 -import java.io.InputStream;
  478.51 -import java.util.Collection;
  478.52 -import java.util.Collections;
  478.53 -import java.util.HashMap;
  478.54 -import java.util.Iterator;
  478.55 -import java.util.LinkedList;
  478.56 -import java.util.Map;
  478.57 -import java.util.Map.Entry;
  478.58 -import java.util.concurrent.atomic.AtomicBoolean;
  478.59 -import javax.lang.model.type.TypeMirror;
  478.60 -import org.netbeans.api.java.source.CompilationInfo;
  478.61 -import org.netbeans.modules.java.hints.providers.spi.HintDescription.AdditionalQueryConstraints;
  478.62 -import org.netbeans.api.java.source.matching.Matcher;
  478.63 -import org.netbeans.api.java.source.matching.Occurrence;
  478.64 -import org.netbeans.api.java.source.matching.Pattern;
  478.65 -import org.openide.util.Parameters;
  478.66 -
  478.67 -/**
  478.68 - *
  478.69 - * @author lahvac
  478.70 - */
  478.71 -public class CopyFinderBasedBulkSearch extends BulkSearch {
  478.72 -
  478.73 -    public CopyFinderBasedBulkSearch() {
  478.74 -        super(false);
  478.75 -    }
  478.76 -
  478.77 -    @Override
  478.78 -    public Map<String, Collection<TreePath>> match(CompilationInfo info, AtomicBoolean cancel, TreePath toSearch, BulkPattern pattern, Map<String, Long> timeLog) {
  478.79 -        Parameters.notNull("info", info);
  478.80 -        Map<String, Collection<TreePath>> result = new HashMap<String, Collection<TreePath>>();
  478.81 -        TreePath topLevel = new TreePath(info.getCompilationUnit());
  478.82 -        
  478.83 -        for (Entry<Tree, String> e : ((BulkPatternImpl) pattern).pattern2Code.entrySet()) {
  478.84 -            for (Occurrence od : Matcher.create(info).setCancel(new AtomicBoolean()).setUntypedMatching().setCancel(cancel).match(Pattern.createPatternWithFreeVariables(new TreePath(topLevel, e.getKey()), Collections.<String, TypeMirror>emptyMap()))) {
  478.85 -                Collection<TreePath> c = result.get(e.getValue());
  478.86 -
  478.87 -                if (c == null) {
  478.88 -                    result.put(e.getValue(), c = new LinkedList<TreePath>());
  478.89 -                }
  478.90 -
  478.91 -                c.add(od.getOccurrenceRoot());
  478.92 -            }
  478.93 -        }
  478.94 -
  478.95 -        return result;
  478.96 -    }
  478.97 -
  478.98 -    @Override
  478.99 -    public boolean matches(CompilationInfo info, AtomicBoolean cancel, TreePath toSearch, BulkPattern pattern) {
 478.100 -        //XXX: performance
 478.101 -        return !match(info, cancel, toSearch, pattern).isEmpty();
 478.102 -    }
 478.103 -
 478.104 -    @Override
 478.105 -    public BulkPattern create(Collection<? extends String> code, Collection<? extends Tree> patterns, Collection<? extends AdditionalQueryConstraints> additionalConstraints, AtomicBoolean cancel) {
 478.106 -        Map<Tree, String> pattern2Code = new HashMap<Tree, String>();
 478.107 -
 478.108 -        Iterator<? extends String> itCode = code.iterator();
 478.109 -        Iterator<? extends Tree>   itPatt = patterns.iterator();
 478.110 -
 478.111 -        while (itCode.hasNext() && itPatt.hasNext()) {
 478.112 -            pattern2Code.put(itPatt.next(), itCode.next());
 478.113 -        }
 478.114 -
 478.115 -        return new BulkPatternImpl(additionalConstraints, pattern2Code);
 478.116 -    }
 478.117 -
 478.118 -    @Override
 478.119 -    public boolean matches(InputStream encoded, AtomicBoolean cancel, BulkPattern pattern) {
 478.120 -        throw new UnsupportedOperationException("Not supported yet.");
 478.121 -    }
 478.122 -
 478.123 -    @Override
 478.124 -    public void encode(Tree tree, EncodingContext ctx, AtomicBoolean cancel) {
 478.125 -        throw new UnsupportedOperationException("Not supported yet.");
 478.126 -    }
 478.127 -
 478.128 -    @Override
 478.129 -    public Map<String, Integer> matchesWithFrequencies(InputStream encoded, BulkPattern pattern, AtomicBoolean cancel) {
 478.130 -        throw new UnsupportedOperationException("Not supported yet.");
 478.131 -    }
 478.132 -
 478.133 -    private static final class BulkPatternImpl extends BulkPattern {
 478.134 -
 478.135 -        private final Map<Tree, String> pattern2Code;
 478.136 -        
 478.137 -        public BulkPatternImpl(Collection<? extends AdditionalQueryConstraints> additionalConstraints, Map<Tree, String> pattern2Code) {
 478.138 -            super(new LinkedList<String>(pattern2Code.values()), null, null, new LinkedList<AdditionalQueryConstraints>(additionalConstraints));
 478.139 -            this.pattern2Code = pattern2Code;
 478.140 -        }
 478.141 -
 478.142 -    }
 478.143 -
 478.144 -}
   479.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/pm/NFA.java	Mon Dec 19 11:37:36 2016 +0100
   479.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   479.3 @@ -1,216 +0,0 @@
   479.4 -/*
   479.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   479.6 - *
   479.7 - * Copyright 2009-2010 Oracle and/or its affiliates. All rights reserved.
   479.8 - *
   479.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  479.10 - * Other names may be trademarks of their respective owners.
  479.11 - *
  479.12 - * The contents of this file are subject to the terms of either the GNU
  479.13 - * General Public License Version 2 only ("GPL") or the Common
  479.14 - * Development and Distribution License("CDDL") (collectively, the
  479.15 - * "License"). You may not use this file except in compliance with the
  479.16 - * License. You can obtain a copy of the License at
  479.17 - * http://www.netbeans.org/cddl-gplv2.html
  479.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  479.19 - * specific language governing permissions and limitations under the
  479.20 - * License.  When distributing the software, include this License Header
  479.21 - * Notice in each file and include the License file at
  479.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  479.23 - * particular file as subject to the "Classpath" exception as provided
  479.24 - * by Oracle in the GPL Version 2 section of the License file that
  479.25 - * accompanied this code. If applicable, add the following below the
  479.26 - * License Header, with the fields enclosed by brackets [] replaced by
  479.27 - * your own identifying information:
  479.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  479.29 - *
  479.30 - * If you wish your version of this file to be governed by only the CDDL
  479.31 - * or only the GPL Version 2, indicate your decision by adding
  479.32 - * "[Contributor] elects to include this software in this distribution
  479.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  479.34 - * single choice of license, a recipient has the option to distribute
  479.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  479.36 - * to extend the choice of license to its licensees as provided above.
  479.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  479.38 - * Version 2 license, then the option applies only if the new code is
  479.39 - * made subject to such option by the copyright holder.
  479.40 - *
  479.41 - * Contributor(s):
  479.42 - *
  479.43 - * Portions Copyrighted 2009 Sun Microsystems, Inc.
  479.44 - */
  479.45 -
  479.46 -package org.netbeans.modules.java.hints.spiimpl.pm;
  479.47 -
  479.48 -import java.util.BitSet;
  479.49 -import java.util.HashSet;
  479.50 -import java.util.Map;
  479.51 -import java.util.Set;
  479.52 -
  479.53 -/**
  479.54 - *
  479.55 - * @author lahvac
  479.56 - */
  479.57 -public class NFA<I, R> {
  479.58 -
  479.59 -    /*XXX: private*/ final int stateCount;
  479.60 -    private final int startingState;
  479.61 -    private final Set<I> inputs;
  479.62 -    private final Map<Key<I>, State> transitionTable;
  479.63 -    private final Map<Integer, R> finalStates;
  479.64 -
  479.65 -    private final State startingStateObject;
  479.66 -
  479.67 -    private NFA(int startingState, int stateCount, Set<I> inputs, Map<Key<I>, State> transitionTable, Map<Integer, R> finalStates) {
  479.68 -        this.startingState = startingState;
  479.69 -        this.stateCount = stateCount;
  479.70 -        this.inputs = inputs;
  479.71 -        this.transitionTable = transitionTable;
  479.72 -        this.finalStates = finalStates;
  479.73 -
  479.74 -        startingStateObject = State.create().mutableOr(startingState);
  479.75 -    }
  479.76 -
  479.77 -    public State getStartingState() {
  479.78 -        return startingStateObject;
  479.79 -    }
  479.80 -
  479.81 -    public State transition(final State active, final I input) {
  479.82 -        State result = null;
  479.83 -
  479.84 -//        for (int i : active) {
  479.85 -        for (int i = active.nextSetBit(0); i >= 0; i = active.nextSetBit(i+1)) {
  479.86 -             State target = transitionTable.get(Key.create(i, input));
  479.87 -
  479.88 -             if (target != null) {
  479.89 -                 if (result == null) {
  479.90 -                     result = State.create();
  479.91 -                 }
  479.92 -                 
  479.93 -                 result.mutableOr(target);
  479.94 -             }
  479.95 -        }
  479.96 -
  479.97 -        State r;
  479.98 -
  479.99 -        //XXX:
 479.100 -        if (result == null) {
 479.101 -            r = startingStateObject;
 479.102 -        } else {
 479.103 -            r = result.mutableOr(startingState);//???
 479.104 -        }
 479.105 -
 479.106 -        return r;
 479.107 -    }
 479.108 -
 479.109 -    public Set<R> getResults(State bs) {
 479.110 -        Set<R> result = new HashSet<R>();
 479.111 -
 479.112 -        for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i+1)) {
 479.113 -            if (finalStates.get(i) != null) {
 479.114 -                result.add(finalStates.get(i));
 479.115 -            }
 479.116 -        }
 479.117 -
 479.118 -        return result;
 479.119 -    }
 479.120 -
 479.121 -    public static <I, R> NFA<I, R> create(int startingState, int stateCount, Set<I> inputs, Map<Key<I>, State> transitionTable, Map<Integer, R> finalStates) {
 479.122 -        return new NFA<I, R>(startingState, stateCount, inputs, transitionTable, finalStates);
 479.123 -    }
 479.124 -
 479.125 -    public State join(State s1, State s2) {
 479.126 -        State bs = State.create();
 479.127 -
 479.128 -        bs.mutableOr(s1);
 479.129 -        bs.mutableOr(s2);
 479.130 -
 479.131 -        return bs;
 479.132 -    }
 479.133 -
 479.134 -    public static final class Key<I> {
 479.135 -        private final int state;
 479.136 -        private final I   input;
 479.137 -
 479.138 -        private Key(int state, I input) {
 479.139 -            this.state = state;
 479.140 -            this.input = input;
 479.141 -        }
 479.142 -
 479.143 -        public static <I> Key<I> create(int state, I input) {
 479.144 -            return new Key<I>(state, input);
 479.145 -        }
 479.146 -
 479.147 -        @Override
 479.148 -        public boolean equals(Object obj) {
 479.149 -            if (obj == null) {
 479.150 -                return false;
 479.151 -            }
 479.152 -            if (getClass() != obj.getClass()) {
 479.153 -                return false;
 479.154 -            }
 479.155 -            final Key<?> other = (Key<?>) obj;
 479.156 -            if (this.state != other.state) {
 479.157 -                return false;
 479.158 -            }
 479.159 -            if (this.input != other.input && (this.input == null || !this.input.equals(other.input))) {
 479.160 -                return false;
 479.161 -            }
 479.162 -            return true;
 479.163 -        }
 479.164 -
 479.165 -        @Override
 479.166 -        public int hashCode() {
 479.167 -            int hash = 3;
 479.168 -            hash = 83 * hash + this.state;
 479.169 -            hash = 83 * hash + (this.input != null ? this.input.hashCode() : 0);
 479.170 -            return hash;
 479.171 -        }
 479.172 -
 479.173 -        @Override
 479.174 -        public String toString() {
 479.175 -            return "[" + state + ", " + input + "]";
 479.176 -        }
 479.177 -
 479.178 -    }
 479.179 -
 479.180 -//    public static final class State extends HashSet<Integer> {
 479.181 -//        private State() {
 479.182 -//        }
 479.183 -//
 479.184 -//        public static State create() {
 479.185 -//            return new State();
 479.186 -//        }
 479.187 -//
 479.188 -//        public State mutableOr(int state) {
 479.189 -//            add(state);
 479.190 -//            return this;
 479.191 -//        }
 479.192 -//
 479.193 -//        public State mutableOr(State or) {
 479.194 -//            addAll(or);
 479.195 -//            return this;
 479.196 -//        }
 479.197 -//
 479.198 -//    }
 479.199 -
 479.200 -    public static final class State extends BitSet {
 479.201 -        private State() {}
 479.202 -
 479.203 -        public static State create() {
 479.204 -            return new State();
 479.205 -        }
 479.206 -
 479.207 -        public State mutableOr(int state) {
 479.208 -            set(state);
 479.209 -            return this;
 479.210 -        }
 479.211 -
 479.212 -        public State mutableOr(State or) {
 479.213 -            or(or);
 479.214 -            return this;
 479.215 -        }
 479.216 -
 479.217 -    }
 479.218 -
 479.219 -}
   480.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/pm/NFABasedBulkSearch.java	Mon Dec 19 11:37:36 2016 +0100
   480.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   480.3 @@ -1,826 +0,0 @@
   480.4 -/*
   480.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   480.6 - *
   480.7 - * Copyright 2009-2010 Oracle and/or its affiliates. All rights reserved.
   480.8 - *
   480.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  480.10 - * Other names may be trademarks of their respective owners.
  480.11 - *
  480.12 - * The contents of this file are subject to the terms of either the GNU
  480.13 - * General Public License Version 2 only ("GPL") or the Common
  480.14 - * Development and Distribution License("CDDL") (collectively, the
  480.15 - * "License"). You may not use this file except in compliance with the
  480.16 - * License. You can obtain a copy of the License at
  480.17 - * http://www.netbeans.org/cddl-gplv2.html
  480.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  480.19 - * specific language governing permissions and limitations under the
  480.20 - * License.  When distributing the software, include this License Header
  480.21 - * Notice in each file and include the License file at
  480.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  480.23 - * particular file as subject to the "Classpath" exception as provided
  480.24 - * by Oracle in the GPL Version 2 section of the License file that
  480.25 - * accompanied this code. If applicable, add the following below the
  480.26 - * License Header, with the fields enclosed by brackets [] replaced by
  480.27 - * your own identifying information:
  480.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  480.29 - *
  480.30 - * If you wish your version of this file to be governed by only the CDDL
  480.31 - * or only the GPL Version 2, indicate your decision by adding
  480.32 - * "[Contributor] elects to include this software in this distribution
  480.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  480.34 - * single choice of license, a recipient has the option to distribute
  480.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  480.36 - * to extend the choice of license to its licensees as provided above.
  480.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  480.38 - * Version 2 license, then the option applies only if the new code is
  480.39 - * made subject to such option by the copyright holder.
  480.40 - *
  480.41 - * Contributor(s):
  480.42 - *
  480.43 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  480.44 - */
  480.45 -
  480.46 -package org.netbeans.modules.java.hints.spiimpl.pm;
  480.47 -
  480.48 -import com.sun.source.tree.AnnotationTree;
  480.49 -import com.sun.source.tree.BlockTree;
  480.50 -import com.sun.source.tree.ClassTree;
  480.51 -import com.sun.source.tree.IdentifierTree;
  480.52 -import com.sun.source.tree.LiteralTree;
  480.53 -import com.sun.source.tree.MemberSelectTree;
  480.54 -import com.sun.source.tree.MethodTree;
  480.55 -import com.sun.source.tree.ModifiersTree;
  480.56 -import com.sun.source.tree.StatementTree;
  480.57 -import com.sun.source.tree.Tree;
  480.58 -import com.sun.source.tree.Tree.Kind;
  480.59 -import com.sun.source.tree.VariableTree;
  480.60 -import com.sun.source.util.TreePath;
  480.61 -import com.sun.source.util.TreeScanner;
  480.62 -import java.io.ByteArrayOutputStream;
  480.63 -import java.io.IOException;
  480.64 -import java.io.InputStream;
  480.65 -import java.io.UnsupportedEncodingException;
  480.66 -import java.util.ArrayList;
  480.67 -import java.util.Collection;
  480.68 -import java.util.Collections;
  480.69 -import java.util.EnumMap;
  480.70 -import java.util.EnumSet;
  480.71 -import java.util.HashMap;
  480.72 -import java.util.HashSet;
  480.73 -import java.util.Iterator;
  480.74 -import java.util.LinkedHashMap;
  480.75 -import java.util.LinkedList;
  480.76 -import java.util.List;
  480.77 -import java.util.Map;
  480.78 -import java.util.Map.Entry;
  480.79 -import java.util.Set;
  480.80 -import java.util.Stack;
  480.81 -import java.util.concurrent.atomic.AtomicBoolean;
  480.82 -import javax.lang.model.element.Name;
  480.83 -import org.netbeans.api.java.source.CompilationInfo;
  480.84 -import org.netbeans.api.java.source.support.CancellableTreeScanner;
  480.85 -import org.netbeans.modules.java.hints.spiimpl.Utilities;
  480.86 -import org.netbeans.modules.java.hints.providers.spi.HintDescription.AdditionalQueryConstraints;
  480.87 -import org.openide.util.Exceptions;
  480.88 -
  480.89 -/**
  480.90 - *
  480.91 - * @author lahvac
  480.92 - */
  480.93 -public class NFABasedBulkSearch extends BulkSearch {
  480.94 -
  480.95 -    public NFABasedBulkSearch() {
  480.96 -        super(false);
  480.97 -    }
  480.98 -
  480.99 -    @Override
 480.100 -    public Map<String, Collection<TreePath>> match(CompilationInfo info, final AtomicBoolean cancel, TreePath tree, BulkPattern patternIn, Map<String, Long> timeLog) {
 480.101 -        BulkPatternImpl pattern = (BulkPatternImpl) patternIn;
 480.102 -        
 480.103 -        final Map<Res, Collection<TreePath>> occurringPatterns = new HashMap<Res, Collection<TreePath>>();
 480.104 -        final NFA<Input, Res> nfa = pattern.toNFA();
 480.105 -        final Set<String> identifiers = new HashSet<String>();
 480.106 -
 480.107 -        new CollectIdentifiers<Void, TreePath>(identifiers, cancel) {
 480.108 -            private NFA.State active = nfa.getStartingState();
 480.109 -            @Override
 480.110 -            public Void scan(Tree node, TreePath p) {
 480.111 -                if (node == null) {
 480.112 -                    return null;
 480.113 -                }
 480.114 -
 480.115 -                TreePath currentPath = new TreePath(p, node);
 480.116 -                boolean[] goDeeper = new boolean[1];
 480.117 -                final NFA.State newActiveAfterVariable = nfa.transition(active, new Input(Kind.IDENTIFIER, "$", false));
 480.118 -                Input normalizedInput = normalizeInput(node, goDeeper, null);
 480.119 -                boolean ignoreKind = normalizedInput.kind == Kind.IDENTIFIER || normalizedInput.kind == Kind.MEMBER_SELECT;
 480.120 -
 480.121 -                NFA.State newActiveBefore = nfa.transition(active, normalizedInput);
 480.122 -
 480.123 -                if (normalizedInput.name != null && !ignoreKind) {
 480.124 -                    newActiveBefore = nfa.join(newActiveBefore, nfa.transition(active, new Input(normalizedInput.kind, "$", false)));
 480.125 -                }
 480.126 -
 480.127 -                active = newActiveBefore;
 480.128 -
 480.129 -                if (goDeeper[0]) {
 480.130 -                    super.scan(node, currentPath);
 480.131 -                } else {
 480.132 -                    new CollectIdentifiers<Void, Void>(identifiers, cancel).scan(node, null);
 480.133 -                }
 480.134 -                
 480.135 -                if (cancel.get()) return null;
 480.136 -
 480.137 -                NFA.State newActiveAfter = nfa.transition(active, UP);
 480.138 -
 480.139 -                active = nfa.join(newActiveAfter, nfa.transition(newActiveAfterVariable, UP));
 480.140 -
 480.141 -                for (Res r : nfa.getResults(active)) {
 480.142 -                    addOccurrence(r, currentPath);
 480.143 -                }
 480.144 -
 480.145 -                return null;
 480.146 -            }
 480.147 -
 480.148 -            @Override
 480.149 -            public Void scan(Iterable<? extends Tree> nodes, TreePath p) {
 480.150 -                active = nfa.transition(active, new Input(Kind.IDENTIFIER, "(", false));
 480.151 -                try {
 480.152 -                    return super.scan(nodes, p);
 480.153 -                } finally {
 480.154 -                    active = nfa.transition(active, UP);
 480.155 -                }
 480.156 -            }
 480.157 -            
 480.158 -            private void addOccurrence(Res r, TreePath currentPath) {
 480.159 -                Collection<TreePath> occurrences = occurringPatterns.get(r);
 480.160 -                if (occurrences == null) {
 480.161 -                    occurringPatterns.put(r, occurrences = new LinkedList<TreePath>());
 480.162 -                }
 480.163 -                occurrences.add(currentPath);
 480.164 -            }
 480.165 -        }.scan(tree, tree.getParentPath());
 480.166 -
 480.167 -        if (cancel.get()) return null;
 480.168 -        
 480.169 -        Map<String, Collection<TreePath>> result = new HashMap<String, Collection<TreePath>>();
 480.170 -
 480.171 -        for (Entry<Res, Collection<TreePath>> e : occurringPatterns.entrySet()) {
 480.172 -            if (cancel.get()) return null;
 480.173 -            if (!identifiers.containsAll(pattern.getIdentifiers().get(e.getKey().patternIndex))) {
 480.174 -                continue;
 480.175 -            }
 480.176 -
 480.177 -            result.put(e.getKey().pattern, e.getValue());
 480.178 -        }
 480.179 -
 480.180 -        return result;
 480.181 -    }
 480.182 -
 480.183 -    @Override
 480.184 -    public BulkPattern create(Collection<? extends String> code, Collection<? extends Tree> patterns, Collection<? extends AdditionalQueryConstraints> additionalConstraints, final AtomicBoolean cancel) {
 480.185 -        int startState = 0;
 480.186 -        final int[] nextState = new int[] {1};
 480.187 -        final Map<NFA.Key<Input>, NFA.State> transitionTable = new LinkedHashMap<NFA.Key<Input>, NFA.State>();
 480.188 -        Map<Integer, Res> finalStates = new HashMap<Integer, Res>();
 480.189 -        List<Set<? extends String>> identifiers = new LinkedList<Set<? extends String>>();
 480.190 -        List<List<List<String>>> requiredContent = new ArrayList<List<List<String>>>();
 480.191 -        Iterator<? extends String> codeIt = code.iterator();
 480.192 -        int patternIndex = 0;
 480.193 -
 480.194 -        for (final Tree pattern : patterns) {
 480.195 -            final int[] currentState = new int[] {startState};
 480.196 -            final Set<String> patternIdentifiers = new HashSet<String>();
 480.197 -            final List<List<String>> content = new ArrayList<List<String>>();
 480.198 -
 480.199 -            identifiers.add(patternIdentifiers);
 480.200 -            requiredContent.add(content);
 480.201 -
 480.202 -            class Scanner extends CollectIdentifiers<Void, Void> {
 480.203 -                public Scanner() {
 480.204 -                    super(patternIdentifiers, cancel);
 480.205 -                }
 480.206 -                private boolean auxPath;
 480.207 -                private List<String> currentContent;
 480.208 -                {
 480.209 -                    content.add(currentContent = new ArrayList<String>());
 480.210 -                }
 480.211 -                @Override
 480.212 -                public Void scan(Tree t, Void v) {
 480.213 -                    if (t == null) {
 480.214 -                        return null;
 480.215 -                    }
 480.216 -
 480.217 -                    if (Utilities.isMultistatementWildcardTree(t) || multiModifiers(t)) {
 480.218 -                        int target = nextState[0]++;
 480.219 -
 480.220 -                        setBit(transitionTable, NFA.Key.create(currentState[0], new Input(Kind.IDENTIFIER, "$", false)), target);
 480.221 -                        setBit(transitionTable, NFA.Key.create(target, UP), currentState[0]);
 480.222 -
 480.223 -                        content.add(currentContent = new ArrayList<String>());
 480.224 -                        
 480.225 -                        return null;
 480.226 -                    }
 480.227 -
 480.228 -                    if (t.getKind() == Kind.BLOCK) {
 480.229 -                        StatementTree singletonStatement = null;
 480.230 -                        BlockTree bt = (BlockTree) t;
 480.231 -
 480.232 -                        if (!bt.isStatic()) {
 480.233 -                            switch (bt.getStatements().size()) {
 480.234 -                                case 1:
 480.235 -                                    singletonStatement = bt.getStatements().get(0);
 480.236 -                                    break;
 480.237 -                                case 2:
 480.238 -                                    if (Utilities.isMultistatementWildcardTree(bt.getStatements().get(0))) {
 480.239 -                                        singletonStatement = bt.getStatements().get(1);
 480.240 -                                    } else {
 480.241 -                                        if (Utilities.isMultistatementWildcardTree(bt.getStatements().get(1))) {
 480.242 -                                            singletonStatement = bt.getStatements().get(0);
 480.243 -                                        }
 480.244 -                                    }
 480.245 -                                    break;
 480.246 -                                case 3:
 480.247 -                                    if (Utilities.isMultistatementWildcardTree(bt.getStatements().get(0)) && Utilities.isMultistatementWildcardTree(bt.getStatements().get(2))) {
 480.248 -                                        singletonStatement = bt.getStatements().get(1);
 480.249 -                                    }
 480.250 -                                    break;
 480.251 -                            }
 480.252 -                        }
 480.253 -
 480.254 -                        if (singletonStatement != null) {
 480.255 -                            int backup = currentState[0];
 480.256 -
 480.257 -                            boolean oldAuxPath = auxPath;
 480.258 -
 480.259 -                            auxPath = true;
 480.260 -
 480.261 -                            scan(singletonStatement, null);
 480.262 -
 480.263 -                            auxPath = oldAuxPath;
 480.264 -
 480.265 -                            int target = currentState[0];
 480.266 -
 480.267 -                            setBit(transitionTable, NFA.Key.create(backup, new Input(Kind.BLOCK, null, false)), currentState[0] = nextState[0]++);
 480.268 -                            setBit(transitionTable, NFA.Key.create(currentState[0], new Input(Kind.IDENTIFIER, "(", false)), currentState[0] = nextState[0]++);
 480.269 -
 480.270 -                            for (StatementTree st : bt.getStatements()) {
 480.271 -                                scan(st, null);
 480.272 -                            }
 480.273 -
 480.274 -                            setBit(transitionTable, NFA.Key.create(currentState[0], UP), currentState[0] = nextState[0]++);
 480.275 -                            setBit(transitionTable, NFA.Key.create(currentState[0], UP), target);
 480.276 -                            currentState[0] = target;
 480.277 -
 480.278 -                            return null;
 480.279 -                        }
 480.280 -                    }
 480.281 -                    
 480.282 -                    boolean[] goDeeper = new boolean[1];
 480.283 -                    Input[] bypass = new Input[1];
 480.284 -                    Input i = normalizeInput(t, goDeeper, bypass);
 480.285 -
 480.286 -                    if (!TO_IGNORE.contains(i.kind) && !auxPath) {
 480.287 -                        currentContent.add(kind2EncodedString.get(i.kind));
 480.288 -                    }
 480.289 -
 480.290 -                    if (i.name != null && !auxPath) {
 480.291 -                        if (!"$".equals(i.name)) {
 480.292 -                            if (isIdentifierAcceptable(i.name)) {
 480.293 -                                currentContent.add(i.name);
 480.294 -                            }
 480.295 -                            if (Utilities.isPureMemberSelect(t, false)) {
 480.296 -                                content.add(currentContent = new ArrayList<String>());
 480.297 -                            }
 480.298 -                        } else {
 480.299 -                            content.add(currentContent = new ArrayList<String>());
 480.300 -                        }
 480.301 -                    }
 480.302 -
 480.303 -                    int backup = currentState[0];
 480.304 -
 480.305 -                    handleTree(i, goDeeper, t, bypass);
 480.306 -
 480.307 -                    boolean oldAuxPath = auxPath;
 480.308 -
 480.309 -                    auxPath = true;
 480.310 -
 480.311 -                    if (StatementTree.class.isAssignableFrom(t.getKind().asInterface()) && t != pattern) {
 480.312 -                        int target = currentState[0];
 480.313 -
 480.314 -                        setBit(transitionTable, NFA.Key.create(backup, new Input(Kind.BLOCK, null, false)), currentState[0] = nextState[0]++);
 480.315 -                        setBit(transitionTable, NFA.Key.create(currentState[0], new Input(Kind.IDENTIFIER, "(", false)), currentState[0] = nextState[0]++);
 480.316 -                        handleTree(i, goDeeper, t, bypass);
 480.317 -                        setBit(transitionTable, NFA.Key.create(currentState[0], UP), currentState[0] = nextState[0]++);
 480.318 -                        setBit(transitionTable, NFA.Key.create(currentState[0], UP), target);
 480.319 -                        currentState[0] = target;
 480.320 -                    }
 480.321 -
 480.322 -                    auxPath = oldAuxPath;
 480.323 -
 480.324 -                    return null;
 480.325 -                }
 480.326 -
 480.327 -                @Override
 480.328 -                public Void scan(Iterable<? extends Tree> nodes, Void p) {
 480.329 -                    setBit(transitionTable, NFA.Key.create(currentState[0], new Input(Kind.IDENTIFIER, "(", false)), currentState[0] = nextState[0]++);
 480.330 -                    try {
 480.331 -                        return super.scan(nodes, p);
 480.332 -                    } finally {
 480.333 -                        setBit(transitionTable, NFA.Key.create(currentState[0], UP), currentState[0] = nextState[0]++);
 480.334 -                    }
 480.335 -                }
 480.336 -
 480.337 -                private void handleTree(Input i, boolean[] goDeeper, Tree t, Input[] bypass) {
 480.338 -                    int backup = currentState[0];
 480.339 -                    int target = nextState[0]++;
 480.340 -
 480.341 -                    setBit(transitionTable, NFA.Key.create(backup, i), currentState[0] = nextState[0]++);
 480.342 -
 480.343 -                    if (goDeeper[0]) {
 480.344 -                        super.scan(t, null);
 480.345 -                    } else {
 480.346 -                        new CollectIdentifiers<Void, Void>(patternIdentifiers, cancel).scan(t, null);
 480.347 -                        int aux = nextState[0]++;
 480.348 -                        setBit(transitionTable, NFA.Key.create(backup, new Input(Kind.MEMBER_SELECT, i.name, false)), aux);
 480.349 -                        setBit(transitionTable, NFA.Key.create(aux, new Input(Kind.IDENTIFIER, "$", false)), aux = nextState[0]++);
 480.350 -                        setBit(transitionTable, NFA.Key.create(aux, UP), aux = nextState[0]++);
 480.351 -                        setBit(transitionTable, NFA.Key.create(aux, UP), target);
 480.352 -                    }
 480.353 -
 480.354 -                    setBit(transitionTable, NFA.Key.create(currentState[0], UP), target);
 480.355 -                    
 480.356 -                    if (bypass[0] != null) {
 480.357 -                        int intermediate = nextState[0]++;
 480.358 -                        
 480.359 -                        setBit(transitionTable, NFA.Key.create(backup, bypass[0]), intermediate);
 480.360 -                        setBit(transitionTable, NFA.Key.create(intermediate, UP), target);
 480.361 -                    }
 480.362 -                    
 480.363 -                    currentState[0] = target;
 480.364 -                }
 480.365 -            }
 480.366 -
 480.367 -            Scanner s = new Scanner();
 480.368 -
 480.369 -            s.scan(pattern, null);
 480.370 -
 480.371 -            finalStates.put(currentState[0], new Res(codeIt.next(), patternIndex++));
 480.372 -        }
 480.373 -
 480.374 -        if (cancel.get()) return null;
 480.375 -        
 480.376 -        NFA<Input, Res> nfa = NFA.<Input, Res>create(startState, nextState[0], null, transitionTable, finalStates);
 480.377 -
 480.378 -        return new BulkPatternImpl(new LinkedList<String>(code), identifiers, requiredContent, new LinkedList<AdditionalQueryConstraints>(additionalConstraints), nfa);
 480.379 -    }
 480.380 -
 480.381 -    private static void setBit(Map<NFA.Key<Input>, NFA.State> transitionTable, NFA.Key<Input> input, int state) {
 480.382 -        NFA.State target = transitionTable.get(input);
 480.383 -
 480.384 -        if (target == null) {
 480.385 -            transitionTable.put(input, target = NFA.State.create());
 480.386 -        }
 480.387 -
 480.388 -        target.mutableOr(state);
 480.389 -    }
 480.390 -
 480.391 -    private static Input normalizeInput(Tree t, boolean[] goDeeper, Input[] bypass) {
 480.392 -        if (t.getKind() == Kind.IDENTIFIER && ((IdentifierTree) t).getName().toString().startsWith("$")) {
 480.393 -            goDeeper[0] = false;
 480.394 -            return new Input(Kind.IDENTIFIER, "$", false);
 480.395 -        }
 480.396 -
 480.397 -        if (Utilities.getWildcardTreeName(t) != null) {
 480.398 -            goDeeper[0] = false;
 480.399 -            return new Input(Kind.IDENTIFIER, "$", false);
 480.400 -        }
 480.401 -        
 480.402 -        if (t.getKind() == Kind.IDENTIFIER) {
 480.403 -            goDeeper[0] = false;
 480.404 -            String name = ((IdentifierTree) t).getName().toString();
 480.405 -            return new Input(Kind.IDENTIFIER, name, false);
 480.406 -        }
 480.407 -
 480.408 -        if (t.getKind() == Kind.MEMBER_SELECT) {
 480.409 -            String name = ((MemberSelectTree) t).getIdentifier().toString();
 480.410 -            if (name.startsWith("$")) {
 480.411 -                goDeeper[0] = false;//???
 480.412 -                return new Input(Kind.IDENTIFIER, "$", false);
 480.413 -            }
 480.414 -            if (bypass != null && Utilities.isPureMemberSelect(t, true)) {
 480.415 -                bypass[0] = new Input(Kind.IDENTIFIER, name, false);
 480.416 -            }
 480.417 -            goDeeper[0] = true;
 480.418 -            return new Input(Kind.MEMBER_SELECT, name, false);
 480.419 -        }
 480.420 -
 480.421 -        goDeeper[0] = true;
 480.422 -
 480.423 -        String name;
 480.424 -
 480.425 -        switch (t.getKind()) {
 480.426 -            case CLASS: name = ((ClassTree)t).getSimpleName().toString(); break;
 480.427 -            case VARIABLE: name = ((VariableTree)t).getName().toString(); break;
 480.428 -            case METHOD: name = ((MethodTree)t).getName().toString(); break;
 480.429 -            case BOOLEAN_LITERAL: name = ((LiteralTree) t).getValue().toString(); break;
 480.430 -            default: name = null;
 480.431 -        }
 480.432 -
 480.433 -        if (name != null) {
 480.434 -            if (!name.isEmpty() && name.charAt(0) == '$') {
 480.435 -                name = "$";
 480.436 -            }
 480.437 -        }
 480.438 -        return new Input(t.getKind(), name, false);
 480.439 -    }
 480.440 -    
 480.441 -    private boolean multiModifiers(Tree t) {
 480.442 -        if (t.getKind() != Kind.MODIFIERS) return false;
 480.443 -        
 480.444 -        List<AnnotationTree> annotations = new ArrayList<AnnotationTree>(((ModifiersTree) t).getAnnotations());
 480.445 -
 480.446 -        return !annotations.isEmpty() && annotations.get(0).getAnnotationType().getKind() == Kind.IDENTIFIER;
 480.447 -    }
 480.448 -
 480.449 -    @Override
 480.450 -    public boolean matches(CompilationInfo info, AtomicBoolean cancel, TreePath tree, BulkPattern pattern) {
 480.451 -        //XXX: performance
 480.452 -        return !match(info, cancel, tree, pattern).isEmpty();
 480.453 -    }
 480.454 -
 480.455 -    private static final Set<Kind> TO_IGNORE = EnumSet.of(Kind.BLOCK, Kind.IDENTIFIER, Kind.MEMBER_SELECT);
 480.456 -
 480.457 -    @Override
 480.458 -    public void encode(Tree tree, final EncodingContext ctx, AtomicBoolean cancel) {
 480.459 -        final Set<String> identifiers = new HashSet<String>();
 480.460 -        final List<String> content = new ArrayList<String>();
 480.461 -        if (!ctx.isForDuplicates()) {
 480.462 -            new CollectIdentifiers<Void, Void>(identifiers, cancel).scan(tree, null);
 480.463 -            try {
 480.464 -                int size = identifiers.size();
 480.465 -                ctx.getOut().write((size >> 24) & 0xFF);
 480.466 -                ctx.getOut().write((size >> 16) & 0xFF);
 480.467 -                ctx.getOut().write((size >>  8) & 0xFF);
 480.468 -                ctx.getOut().write((size >>  0) & 0xFF);
 480.469 -                for (String ident : identifiers) {
 480.470 -                    ctx.getOut().write(ident.getBytes("UTF-8"));//XXX: might probably contain ';'
 480.471 -                    ctx.getOut().write(';');
 480.472 -                }
 480.473 -            } catch (IOException ex) {
 480.474 -                throw new IllegalStateException(ex);
 480.475 -            }
 480.476 -        }
 480.477 -        if (cancel.get());
 480.478 -        new CollectIdentifiers<Void, Void>(new HashSet<String>(), cancel) {
 480.479 -            private boolean encode = true;
 480.480 -            @Override
 480.481 -            public Void scan(Tree t, Void v) {
 480.482 -                if (t == null) return null;
 480.483 -
 480.484 -                if (t instanceof StatementTree && Utilities.isMultistatementWildcardTree((StatementTree) t)) {
 480.485 -                    return null;
 480.486 -                }
 480.487 -
 480.488 -                boolean[] goDeeper = new boolean[1];
 480.489 -
 480.490 -                Input i = normalizeInput(t, goDeeper, null);
 480.491 -                try {
 480.492 -                    ctx.getOut().write('(');
 480.493 -                    ctx.getOut().write(kind2Encoded.get(i.kind));
 480.494 -                    if (!TO_IGNORE.contains(i.kind)) {
 480.495 -                        content.add(kind2EncodedString.get(i.kind));
 480.496 -                    }
 480.497 -                    if (i.name != null) {
 480.498 -                        if (encode) {
 480.499 -                            ctx.getOut().write('$');
 480.500 -                            ctx.getOut().write(i.name.getBytes("UTF-8"));
 480.501 -                            ctx.getOut().write(';');
 480.502 -                        }
 480.503 -                        if (isIdentifierAcceptable(i.name)) content.add(i.name);
 480.504 -                    }
 480.505 -
 480.506 -                    boolean oldEncode = encode;
 480.507 -
 480.508 -                    encode &= goDeeper[0];
 480.509 -                    super.scan(t, v);
 480.510 -                    encode = oldEncode;
 480.511 -
 480.512 -                    ctx.getOut().write(')');
 480.513 -                } catch (IOException ex) {
 480.514 -                    //XXX
 480.515 -                    Exceptions.printStackTrace(ex);
 480.516 -                }
 480.517 -
 480.518 -                return null;
 480.519 -            }
 480.520 -            @Override
 480.521 -            public Void scan(Iterable<? extends Tree> nodes, Void p) {
 480.522 -                try {
 480.523 -                    ctx.getOut().write('(');
 480.524 -                    ctx.getOut().write(kind2Encoded.get(Kind.IDENTIFIER));
 480.525 -                    ctx.getOut().write('$');
 480.526 -                    ctx.getOut().write('(');
 480.527 -                    ctx.getOut().write(';');
 480.528 -                    super.scan(nodes, p);
 480.529 -                    ctx.getOut().write(')');
 480.530 -                } catch (IOException ex) {
 480.531 -                    //XXX
 480.532 -                    Exceptions.printStackTrace(ex);
 480.533 -                }
 480.534 -                return null;
 480.535 -            }
 480.536 -        }.scan(tree, null);
 480.537 -
 480.538 -        ctx.setIdentifiers(identifiers);
 480.539 -        ctx.setContent(content);
 480.540 -        if (cancel.get());
 480.541 -    }
 480.542 -
 480.543 -    @Override
 480.544 -    public boolean matches(InputStream encoded, AtomicBoolean cancel, BulkPattern patternIn) {
 480.545 -        try {
 480.546 -            return !matchesImpl(encoded, cancel, patternIn, false).isEmpty();
 480.547 -        } catch (IOException ex) {
 480.548 -            Exceptions.printStackTrace(ex);
 480.549 -            return false;
 480.550 -        }
 480.551 -    }
 480.552 -
 480.553 -    @Override
 480.554 -    public Map<String, Integer> matchesWithFrequencies(InputStream encoded, BulkPattern patternIn, AtomicBoolean cancel) {
 480.555 -        try {
 480.556 -            return matchesImpl(encoded, cancel, patternIn, true);
 480.557 -        } catch (IOException ex) {
 480.558 -            Exceptions.printStackTrace(ex);
 480.559 -            return Collections.emptyMap();
 480.560 -        }
 480.561 -    }
 480.562 -
 480.563 -    public Map<String, Integer> matchesImpl(InputStream encoded, AtomicBoolean cancel, BulkPattern patternIn, boolean withFrequencies) throws IOException {
 480.564 -        BulkPatternImpl pattern = (BulkPatternImpl) patternIn;
 480.565 -        final NFA<Input, Res> nfa = pattern.toNFA();
 480.566 -        Stack<NFA.State> skips = new Stack<NFA.State>();
 480.567 -        NFA.State active = nfa.getStartingState();
 480.568 -        int identSize = 0;
 480.569 -
 480.570 -        identSize = encoded.read();
 480.571 -        identSize = (identSize << 8) + encoded.read();
 480.572 -        identSize = (identSize << 8) + encoded.read();
 480.573 -        identSize = (identSize << 8) + encoded.read();
 480.574 -
 480.575 -        Set<String> identifiers = new HashSet<String>(2 * identSize);
 480.576 -
 480.577 -        while (identSize-- > 0) {
 480.578 -            if (cancel.get()) return null;
 480.579 -            int read = encoded.read();
 480.580 -
 480.581 -            ByteArrayOutputStream baos = new ByteArrayOutputStream();
 480.582 -
 480.583 -            //read name:
 480.584 -            while (read != ';') {
 480.585 -                baos.write(read);
 480.586 -                read = encoded.read();
 480.587 -            }
 480.588 -
 480.589 -            identifiers.add(new String(baos.toByteArray(), "UTF-8"));
 480.590 -        }
 480.591 -
 480.592 -        Map<String, Integer> patternsAndFrequencies = new HashMap<String, Integer>();
 480.593 -        int read = encoded.read();
 480.594 -        
 480.595 -        while (read != (-1)) {
 480.596 -            if (cancel.get()) return null;
 480.597 -            if (read == '(') {
 480.598 -                read = encoded.read(); //kind
 480.599 -
 480.600 -                Kind k = encoded2Kind.get((read << 8) + encoded.read());
 480.601 -
 480.602 -                read = encoded.read();
 480.603 -
 480.604 -                String name;
 480.605 -
 480.606 -                if (read == '$') {
 480.607 -                    //XXX:
 480.608 -                    read = encoded.read();
 480.609 -
 480.610 -                    ByteArrayOutputStream baos = new ByteArrayOutputStream();
 480.611 -
 480.612 -                    //read name:
 480.613 -                    while (read != ';') {
 480.614 -                        baos.write(read);
 480.615 -                        read = encoded.read();
 480.616 -                    }
 480.617 -
 480.618 -                    read = encoded.read();
 480.619 -                    name = new String(baos.toByteArray(), "UTF-8");
 480.620 -                } else {
 480.621 -                    name = null;
 480.622 -                }
 480.623 -                
 480.624 -                final NFA.State newActiveAfterVariable = nfa.transition(active, new Input(Kind.IDENTIFIER, "$", false));
 480.625 -                Input normalizedInput = new Input(k, name, false);
 480.626 -                boolean ignoreKind = normalizedInput.kind == Kind.IDENTIFIER || normalizedInput.kind == Kind.MEMBER_SELECT;
 480.627 -
 480.628 -                NFA.State newActive = nfa.transition(active, normalizedInput);
 480.629 -
 480.630 -                if (normalizedInput.name != null && !ignoreKind) {
 480.631 -                    newActive = nfa.join(newActive, nfa.transition(active, new Input(k, "$", false)));
 480.632 -                }
 480.633 -
 480.634 -                active = newActive;
 480.635 -
 480.636 -                skips.push(newActiveAfterVariable);
 480.637 -            } else {
 480.638 -                NFA.State newActiveAfterVariable = skips.pop();
 480.639 -                NFA.State newActive = nfa.transition(active, UP);
 480.640 -                NFA.State s2 = nfa.transition(newActiveAfterVariable, UP);
 480.641 -
 480.642 -                active = nfa.join(newActive, s2);
 480.643 -                
 480.644 -                for (Res res : nfa.getResults(active)) {
 480.645 -                    if (identifiers.containsAll(pattern.getIdentifiers().get(res.patternIndex))) {
 480.646 -                        if (!withFrequencies) {
 480.647 -                            patternsAndFrequencies.put(res.pattern, 1);
 480.648 -                            return patternsAndFrequencies;
 480.649 -                        }
 480.650 -                        
 480.651 -                        Integer freqs = patternsAndFrequencies.get(res.pattern);
 480.652 -
 480.653 -                        if (freqs == null) freqs = 0;
 480.654 -
 480.655 -                        patternsAndFrequencies.put(res.pattern, freqs + 1);
 480.656 -                    }
 480.657 -                }
 480.658 -
 480.659 -                read = encoded.read();
 480.660 -            }
 480.661 -        }
 480.662 -
 480.663 -        return patternsAndFrequencies;
 480.664 -    }
 480.665 -
 480.666 -    private static final Map<Kind, byte[]> kind2Encoded;
 480.667 -    private static final Map<Kind, String> kind2EncodedString;
 480.668 -    private static final Map<Integer, Kind> encoded2Kind;
 480.669 -
 480.670 -    static {
 480.671 -        kind2Encoded = new EnumMap<Kind, byte[]>(Kind.class);
 480.672 -        kind2EncodedString = new EnumMap<Kind, String>(Kind.class);
 480.673 -        encoded2Kind = new HashMap<Integer, Kind>();
 480.674 -
 480.675 -        for (Kind k : Kind.values()) {
 480.676 -            String enc = Integer.toHexString(k.ordinal());
 480.677 -
 480.678 -            if (enc.length() < 2) {
 480.679 -                enc = "0" + enc;
 480.680 -            }
 480.681 -
 480.682 -            try {
 480.683 -                final byte[] bytes = enc.getBytes("UTF-8");
 480.684 -
 480.685 -                assert bytes.length == 2;
 480.686 -
 480.687 -                kind2Encoded.put(k, bytes);
 480.688 -                kind2EncodedString.put(k, enc);
 480.689 -
 480.690 -                encoded2Kind.put((bytes[0] << 8) + bytes[1], k);
 480.691 -            } catch (UnsupportedEncodingException ex) {
 480.692 -                throw new IllegalStateException(ex);
 480.693 -            }
 480.694 -        }
 480.695 -    }
 480.696 -
 480.697 -    public static class BulkPatternImpl extends BulkPattern {
 480.698 -
 480.699 -        private final NFA<Input, Res> nfa;
 480.700 -
 480.701 -        private BulkPatternImpl(List<? extends String> patterns, List<? extends Set<? extends String>> identifiers, List<List<List<String>>> requiredContent, List<AdditionalQueryConstraints> additionalConstraints, NFA<Input, Res> nfa) {
 480.702 -            super(patterns, identifiers, requiredContent, additionalConstraints);
 480.703 -            this.nfa = nfa;
 480.704 -        }
 480.705 -
 480.706 -        NFA<Input, Res> toNFA() {
 480.707 -            return nfa;
 480.708 -        }
 480.709 -        
 480.710 -    }
 480.711 -
 480.712 -    private static final class Res {
 480.713 -        private final String pattern;
 480.714 -        private final int patternIndex;
 480.715 -
 480.716 -        public Res(String pattern, int patternIndex) {
 480.717 -            this.pattern = pattern;
 480.718 -            this.patternIndex = patternIndex;
 480.719 -        }
 480.720 -
 480.721 -    }
 480.722 -
 480.723 -    private static final class Input {
 480.724 -        private final Kind kind;
 480.725 -        private final String name;
 480.726 -        private final boolean end;
 480.727 -
 480.728 -        private Input(Kind kind, String name, boolean end) {
 480.729 -            this.kind = kind;
 480.730 -            this.name = name;
 480.731 -            this.end = end;
 480.732 -        }
 480.733 -
 480.734 -        @Override
 480.735 -        public boolean equals(Object obj) {
 480.736 -            if (obj == null) {
 480.737 -                return false;
 480.738 -            }
 480.739 -            if (getClass() != obj.getClass()) {
 480.740 -                return false;
 480.741 -            }
 480.742 -            final Input other = (Input) obj;
 480.743 -            if (this.kind != other.kind) {
 480.744 -                return false;
 480.745 -            }
 480.746 -            if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) {
 480.747 -                return false;
 480.748 -            }
 480.749 -            if (this.end != other.end) {
 480.750 -                return false;
 480.751 -            }
 480.752 -            return true;
 480.753 -        }
 480.754 -
 480.755 -        @Override
 480.756 -        public int hashCode() {
 480.757 -            int hash = 7;
 480.758 -            hash = 47 * hash + (this.kind != null ? this.kind.hashCode() : 17);
 480.759 -            hash = 47 * hash + (this.name != null ? this.name.hashCode() : 0);
 480.760 -            hash = 47 * hash + (this.end ? 1 : 0);
 480.761 -            return hash;
 480.762 -        }
 480.763 -
 480.764 -        @Override
 480.765 -        public String toString() {
 480.766 -            return kind + ", " + name + ", " + end;
 480.767 -        }
 480.768 -
 480.769 -    }
 480.770 -
 480.771 -    private static final Input UP = new Input(null, null, true);
 480.772 -
 480.773 -    private static boolean isIdentifierAcceptable(CharSequence content) {
 480.774 -        if (content.length() == 0) return false;
 480.775 -        if (content.charAt(0) == '$' || content.charAt(0) == '<') return false;
 480.776 -        String stringValue = content.toString();
 480.777 -        if (stringValue.contentEquals("java") || "lang".equals(stringValue)) return false;
 480.778 -        return true;
 480.779 -    }
 480.780 -
 480.781 -    private static class CollectIdentifiers<R, P> extends CancellableTreeScanner<R, P> {
 480.782 -
 480.783 -        private final Set<String> identifiers;
 480.784 -
 480.785 -        public CollectIdentifiers(Set<String> identifiers, AtomicBoolean cancel) {
 480.786 -            super(cancel);
 480.787 -            this.identifiers = identifiers;
 480.788 -        }
 480.789 -
 480.790 -        private void addIdentifier(Name ident) {
 480.791 -            if (!isIdentifierAcceptable(ident)) return;
 480.792 -            identifiers.add(ident.toString());
 480.793 -        }
 480.794 -
 480.795 -        @Override
 480.796 -        public R visitMemberSelect(MemberSelectTree node, P p) {
 480.797 -            addIdentifier(node.getIdentifier());
 480.798 -            return super.visitMemberSelect(node, p);
 480.799 -        }
 480.800 -
 480.801 -        @Override
 480.802 -        public R visitIdentifier(IdentifierTree node, P p) {
 480.803 -            addIdentifier(node.getName());
 480.804 -            return super.visitIdentifier(node, p);
 480.805 -        }
 480.806 -
 480.807 -        @Override
 480.808 -        public R visitClass(ClassTree node, P p) {
 480.809 -            if (node.getSimpleName().length() == 0) {
 480.810 -                return scan(Utilities.filterHidden(null, node.getMembers()), p);
 480.811 -            }
 480.812 -            addIdentifier(node.getSimpleName());
 480.813 -            return super.visitClass(node, p);
 480.814 -        }
 480.815 -
 480.816 -        @Override
 480.817 -        public R visitMethod(MethodTree node, P p) {
 480.818 -            addIdentifier(node.getName());
 480.819 -            return super.visitMethod(node, p);
 480.820 -        }
 480.821 -
 480.822 -        @Override
 480.823 -        public R visitVariable(VariableTree node, P p) {
 480.824 -            addIdentifier(node.getName());
 480.825 -            return super.visitVariable(node, p);
 480.826 -        }
 480.827 -
 480.828 -    }
 480.829 -}
   481.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/pm/PatternCompiler.java	Mon Dec 19 11:37:36 2016 +0100
   481.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   481.3 @@ -1,72 +0,0 @@
   481.4 -/*
   481.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   481.6 - *
   481.7 - * Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   481.8 - *
   481.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  481.10 - * Other names may be trademarks of their respective owners.
  481.11 - *
  481.12 - * The contents of this file are subject to the terms of either the GNU
  481.13 - * General Public License Version 2 only ("GPL") or the Common
  481.14 - * Development and Distribution License("CDDL") (collectively, the
  481.15 - * "License"). You may not use this file except in compliance with the
  481.16 - * License. You can obtain a copy of the License at
  481.17 - * http://www.netbeans.org/cddl-gplv2.html
  481.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  481.19 - * specific language governing permissions and limitations under the
  481.20 - * License.  When distributing the software, include this License Header
  481.21 - * Notice in each file and include the License file at
  481.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  481.23 - * particular file as subject to the "Classpath" exception as provided
  481.24 - * by Oracle in the GPL Version 2 section of the License file that
  481.25 - * accompanied this code. If applicable, add the following below the
  481.26 - * License Header, with the fields enclosed by brackets [] replaced by
  481.27 - * your own identifying information:
  481.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  481.29 - *
  481.30 - * If you wish your version of this file to be governed by only the CDDL
  481.31 - * or only the GPL Version 2, indicate your decision by adding
  481.32 - * "[Contributor] elects to include this software in this distribution
  481.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  481.34 - * single choice of license, a recipient has the option to distribute
  481.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  481.36 - * to extend the choice of license to its licensees as provided above.
  481.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  481.38 - * Version 2 license, then the option applies only if the new code is
  481.39 - * made subject to such option by the copyright holder.
  481.40 - *
  481.41 - * Contributor(s):
  481.42 - *
  481.43 - * Portions Copyrighted 2008-2009 Sun Microsystems, Inc.
  481.44 - */
  481.45 -
  481.46 -package org.netbeans.modules.java.hints.spiimpl.pm;
  481.47 -
  481.48 -import com.sun.source.tree.Scope;
  481.49 -import com.sun.source.tree.Tree;
  481.50 -import com.sun.source.util.TreePath;
  481.51 -import java.util.Map;
  481.52 -import javax.lang.model.type.TypeMirror;
  481.53 -import org.netbeans.api.java.source.CompilationInfo;
  481.54 -import org.netbeans.modules.java.hints.spiimpl.Utilities;
  481.55 -import org.netbeans.api.java.source.matching.Pattern;
  481.56 -
  481.57 -/**XXX: cancelability!
  481.58 - *
  481.59 - * @author Jan Lahoda
  481.60 - */
  481.61 -public class PatternCompiler {
  481.62 -
  481.63 -    public static Pattern compile(CompilationInfo info, String pattern, Map<String, TypeMirror> constraints, Iterable<? extends String> imports) {
  481.64 -        Scope scope = Utilities.constructScope(info, constraints, imports);
  481.65 -
  481.66 -        if (scope == null) {
  481.67 -            return null; //TODO: can happen?
  481.68 -        }
  481.69 -
  481.70 -        Tree patternTree = Utilities.parseAndAttribute(info, pattern, scope);
  481.71 -
  481.72 -        return Pattern.createPatternWithFreeVariables(new TreePath(new TreePath(info.getCompilationUnit()), patternTree), constraints);
  481.73 -    }
  481.74 -
  481.75 -}
   482.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/processor/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   482.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   482.3 @@ -1,3 +0,0 @@
   482.4 -OpenIDE-Module-Name=Java Hints Annotation Processor
   482.5 -OpenIDE-Module-Display-Category=Java
   482.6 -OpenIDE-Module-Short-Description=Java Hints Annotation Processor
   483.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/processor/JavaHintsAnnotationProcessor.java	Mon Dec 19 11:37:36 2016 +0100
   483.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   483.3 @@ -1,635 +0,0 @@
   483.4 -/*
   483.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   483.6 - *
   483.7 - * Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   483.8 - *
   483.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  483.10 - * Other names may be trademarks of their respective owners.
  483.11 - *
  483.12 - * The contents of this file are subject to the terms of either the GNU
  483.13 - * General Public License Version 2 only ("GPL") or the Common
  483.14 - * Development and Distribution License("CDDL") (collectively, the
  483.15 - * "License"). You may not use this file except in compliance with the
  483.16 - * License. You can obtain a copy of the License at
  483.17 - * http://www.netbeans.org/cddl-gplv2.html
  483.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  483.19 - * specific language governing permissions and limitations under the
  483.20 - * License.  When distributing the software, include this License Header
  483.21 - * Notice in each file and include the License file at
  483.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  483.23 - * particular file as subject to the "Classpath" exception as provided
  483.24 - * by Oracle in the GPL Version 2 section of the License file that
  483.25 - * accompanied this code. If applicable, add the following below the
  483.26 - * License Header, with the fields enclosed by brackets [] replaced by
  483.27 - * your own identifying information:
  483.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  483.29 - *
  483.30 - * If you wish your version of this file to be governed by only the CDDL
  483.31 - * or only the GPL Version 2, indicate your decision by adding
  483.32 - * "[Contributor] elects to include this software in this distribution
  483.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  483.34 - * single choice of license, a recipient has the option to distribute
  483.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  483.36 - * to extend the choice of license to its licensees as provided above.
  483.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  483.38 - * Version 2 license, then the option applies only if the new code is
  483.39 - * made subject to such option by the copyright holder.
  483.40 - *
  483.41 - * Contributor(s):
  483.42 - *
  483.43 - * Portions Copyrighted 2008-2010 Sun Microsystems, Inc.
  483.44 - */
  483.45 -
  483.46 -package org.netbeans.modules.java.hints.spiimpl.processor;
  483.47 -
  483.48 -import java.lang.reflect.Array;
  483.49 -import java.util.Map.Entry;
  483.50 -import java.util.*;
  483.51 -import java.util.AbstractMap.SimpleEntry;
  483.52 -import java.util.logging.Logger;
  483.53 -import java.util.regex.Matcher;
  483.54 -import java.util.regex.Pattern;
  483.55 -import javax.annotation.processing.Processor;
  483.56 -import javax.annotation.processing.RoundEnvironment;
  483.57 -import javax.annotation.processing.SupportedAnnotationTypes;
  483.58 -import javax.annotation.processing.SupportedSourceVersion;
  483.59 -import javax.lang.model.SourceVersion;
  483.60 -import javax.lang.model.element.*;
  483.61 -import javax.lang.model.type.DeclaredType;
  483.62 -import javax.lang.model.type.TypeMirror;
  483.63 -import javax.lang.model.util.AbstractAnnotationValueVisitor6;
  483.64 -import javax.lang.model.util.ElementFilter;
  483.65 -import javax.lang.model.util.ElementScanner6;
  483.66 -import javax.lang.model.util.Elements;
  483.67 -import javax.lang.model.util.Types;
  483.68 -import javax.tools.Diagnostic.Kind;
  483.69 -import org.openide.filesystems.annotations.LayerBuilder;
  483.70 -import org.openide.filesystems.annotations.LayerBuilder.File;
  483.71 -import org.openide.filesystems.annotations.LayerGeneratingProcessor;
  483.72 -import org.openide.filesystems.annotations.LayerGenerationException;
  483.73 -import org.openide.util.NbCollections;
  483.74 -import org.openide.util.lookup.ServiceProvider;
  483.75 -
  483.76 -/**Inspired by https://sezpoz.dev.java.net/.
  483.77 - *
  483.78 - * @author lahvac
  483.79 - */
  483.80 -@SupportedSourceVersion(SourceVersion.RELEASE_6)
  483.81 -@SupportedAnnotationTypes("org.netbeans.spi.java.hints.*")
  483.82 -@ServiceProvider(service=Processor.class, position=100)
  483.83 -public class JavaHintsAnnotationProcessor extends LayerGeneratingProcessor {
  483.84 -    
  483.85 -    private static final Logger LOG = Logger.getLogger(JavaHintsAnnotationProcessor.class.getName());
  483.86 -    
  483.87 -    @Override
  483.88 -    protected boolean handleProcess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) throws LayerGenerationException {
  483.89 -        if (!roundEnv.processingOver()) {
  483.90 -            generateTypeList("org.netbeans.spi.java.hints.Hint", roundEnv);
  483.91 -        }
  483.92 -
  483.93 -        return false;
  483.94 -    }
  483.95 -
  483.96 -    private static final String[] TRIGGERS = new String[] {
  483.97 -        "org.netbeans.spi.java.hints.TriggerTreeKind",
  483.98 -        "org.netbeans.spi.java.hints.TriggerPattern",
  483.99 -        "org.netbeans.spi.java.hints.TriggerPatterns",
 483.100 -    };
 483.101 -
 483.102 -    private static final String[] OPTIONS = new String[] {
 483.103 -        "org.netbeans.spi.java.hints.BooleanOption"
 483.104 -    };
 483.105 -
 483.106 -    private void generateTypeList(String annotationName, RoundEnvironment roundEnv) throws LayerGenerationException {
 483.107 -        TypeElement hint = processingEnv.getElementUtils().getTypeElement(annotationName);
 483.108 -
 483.109 -        if (hint == null) return ;
 483.110 -        
 483.111 -        for (Element annotated : roundEnv.getElementsAnnotatedWith(hint)) {
 483.112 -            if (!verifyHintAnnotationAcceptable(annotated)) continue;
 483.113 -            if (!annotated.getKind().isClass() && !annotated.getKind().isInterface()) {
 483.114 -                if (annotated.getKind() != ElementKind.METHOD) {
 483.115 -                    //the compiler should have already warned about this
 483.116 -                    continue;
 483.117 -                }
 483.118 -
 483.119 -                annotated = annotated.getEnclosingElement();
 483.120 -            } else {
 483.121 -                if (!annotated.getKind().isClass()) {
 483.122 -                    //the compiler should have already warned about this
 483.123 -                    continue;
 483.124 -                }
 483.125 -            }
 483.126 -
 483.127 -            if (!annotated.getKind().isClass()) {
 483.128 -                processingEnv.getMessager().printMessage(Kind.ERROR, "Internal error - cannot find class containing the hint", annotated);
 483.129 -                continue;
 483.130 -            }
 483.131 -
 483.132 -            TypeElement clazz = (TypeElement) annotated;
 483.133 -            String classFolder = "org-netbeans-modules-java-hints/code-hints/" + getFQN(clazz).replace('.', '-') + ".class";
 483.134 -
 483.135 -            {
 483.136 -                LayerBuilder builder = layer(clazz);
 483.137 -                File clazzFolder = builder.folder(classFolder);
 483.138 -                
 483.139 -                for (AnnotationMirror am : clazz.getAnnotationMirrors()) {
 483.140 -                    dumpAnnotation(builder, clazzFolder, clazz, am, true);
 483.141 -                }
 483.142 -                
 483.143 -                clazzFolder.write();
 483.144 -            }
 483.145 -
 483.146 -            for (ExecutableElement ee : ElementFilter.methodsIn(clazz.getEnclosedElements())) {
 483.147 -                if (!ee.getAnnotationMirrors().isEmpty()) {
 483.148 -                    LayerBuilder builder = layer(ee);
 483.149 -                    File methodFolder = builder.folder(classFolder + "/" + ee.getSimpleName() + ".method");
 483.150 -
 483.151 -                    for (AnnotationMirror am : ee.getAnnotationMirrors()) {
 483.152 -                        dumpAnnotation(builder, methodFolder, ee, am, true);
 483.153 -                    }
 483.154 -
 483.155 -                    methodFolder.write();
 483.156 -                }
 483.157 -            }
 483.158 -
 483.159 -            for (VariableElement var : ElementFilter.fieldsIn(clazz.getEnclosedElements())) {
 483.160 -                if (!var.getAnnotationMirrors().isEmpty()) {
 483.161 -                    LayerBuilder builder = layer(var);
 483.162 -                    File fieldFolder = builder.folder(classFolder + "/" + var.getSimpleName() + ".field");
 483.163 -
 483.164 -                    for (AnnotationMirror am : var.getAnnotationMirrors()) {
 483.165 -                        dumpAnnotation(builder, fieldFolder, var, am, true);
 483.166 -                    }
 483.167 -
 483.168 -                    if (var.getConstantValue() instanceof String) {
 483.169 -                        fieldFolder.stringvalue("constantValue", (String) var.getConstantValue());
 483.170 -                    }
 483.171 -
 483.172 -                    fieldFolder.write();
 483.173 -                }
 483.174 -            }
 483.175 -            
 483.176 -            new ElementScanner6<Void, Void>() {
 483.177 -                @Override public Void scan(Element e, Void p) {
 483.178 -                    AnnotationMirror hintMirror = findAnnotation(e.getAnnotationMirrors(), "org.netbeans.spi.java.hints.Hint");
 483.179 -            
 483.180 -                    if (hintMirror != null) {
 483.181 -                        String qualifiedName;
 483.182 -                        switch (e.getKind()) {
 483.183 -                            case METHOD: case CONSTRUCTOR:
 483.184 -                                qualifiedName = e.getEnclosingElement().asType().toString() + "." + e.getSimpleName().toString() + e.asType().toString();
 483.185 -                                break;
 483.186 -                            case FIELD: case ENUM_CONSTANT:
 483.187 -                                qualifiedName = e.getEnclosingElement().asType().toString() + "." + e.getSimpleName().toString();
 483.188 -                                break;
 483.189 -                            case ANNOTATION_TYPE: case CLASS:
 483.190 -                            case ENUM: case INTERFACE:
 483.191 -                            default:
 483.192 -                                qualifiedName = e.asType().toString();
 483.193 -                                break;
 483.194 -                        }
 483.195 -                        
 483.196 -                        try {
 483.197 -                            File keywordsFile = layer(e)
 483.198 -                                               .file("OptionsDialog/Keywords/".concat(qualifiedName))
 483.199 -                                               .stringvalue("location", "Editor")
 483.200 -                                               .bundlevalue("tabTitle", "org.netbeans.modules.options.editor.Bundle", "CTL_Hints_DisplayName");
 483.201 -
 483.202 -                            String displayName = getAttributeValue(hintMirror, "displayName", String.class);
 483.203 -
 483.204 -                            if (displayName != null)
 483.205 -                                keywordsFile = keywordsFile.bundlevalue("keywords-1", displayName);
 483.206 -
 483.207 -                            String description = getAttributeValue(hintMirror, "description", String.class);
 483.208 -
 483.209 -                            if (description != null)
 483.210 -                                keywordsFile = keywordsFile.bundlevalue("keywords-2", description);
 483.211 -
 483.212 -                            int i = 3;
 483.213 -
 483.214 -                            for (String sw : getAttributeValue(hintMirror, "suppressWarnings", String[].class)) {
 483.215 -                                keywordsFile = keywordsFile.stringvalue("keywords-" + i++, sw);
 483.216 -                            }
 483.217 -
 483.218 -                            keywordsFile.write();
 483.219 -                        } catch (LayerGenerationException ex) {
 483.220 -                            JavaHintsAnnotationProcessor.<RuntimeException>rethrowAsRuntime(ex);
 483.221 -                        }
 483.222 -                    }
 483.223 -
 483.224 -                    return super.scan(e, p);
 483.225 -                }
 483.226 -            }.scan(annotated, null);
 483.227 -        }
 483.228 -
 483.229 -        for (String ann : TRIGGERS) {
 483.230 -            TypeElement annRes = processingEnv.getElementUtils().getTypeElement(ann);
 483.231 -
 483.232 -            if (annRes == null) continue;
 483.233 -
 483.234 -            for (ExecutableElement method : ElementFilter.methodsIn(roundEnv.getElementsAnnotatedWith(annRes))) {
 483.235 -                verifyHintMethod(method);
 483.236 -                verifyTriggerAnnotations(method);
 483.237 -            }
 483.238 -        }
 483.239 -
 483.240 -        for (String ann : OPTIONS) {
 483.241 -            TypeElement annRes = processingEnv.getElementUtils().getTypeElement(ann);
 483.242 -
 483.243 -            if (annRes == null) continue;
 483.244 -
 483.245 -            for (VariableElement var : ElementFilter.fieldsIn(roundEnv.getElementsAnnotatedWith(annRes))) {
 483.246 -                verifyOptionField(var);
 483.247 -            }
 483.248 -        }
 483.249 -
 483.250 -    }
 483.251 -
 483.252 -    private void dumpAnnotation(LayerBuilder builder, File folder, Element errElement, AnnotationMirror annotation, boolean topLevel) {
 483.253 -        String fqn = getFQN(((TypeElement) annotation.getAnnotationType().asElement())).replace('.', '-');
 483.254 -        if (topLevel && !fqn.startsWith("org-netbeans-spi-java-hints")) return ;
 483.255 -        final File   annotationFolder = builder.folder(folder.getPath() + "/" + fqn + ".annotation");
 483.256 -
 483.257 -        for (Entry<? extends ExecutableElement, ? extends AnnotationValue> e : annotation.getElementValues().entrySet()) {
 483.258 -            final String attrName = e.getKey().getSimpleName().toString();
 483.259 -            e.getValue().accept(new DumpAnnotationValue(builder, annotationFolder, attrName, errElement, annotation, e.getValue()), null);
 483.260 -        }
 483.261 -
 483.262 -        annotationFolder.write();
 483.263 -    }
 483.264 -
 483.265 -    private String getFQN(TypeElement clazz) {
 483.266 -        return processingEnv.getElementUtils().getBinaryName(clazz).toString();
 483.267 -    }
 483.268 -
 483.269 -    static final String ERR_RETURN_TYPE = "The return type must be either org.netbeans.spi.editor.hints.ErrorDescription or java.util.List<org.netbeans.spi.editor.hints.ErrorDescription>";
 483.270 -    static final String ERR_PARAMETERS = "The method must have exactly one parameter of type org.netbeans.spi.java.hints.HintContext";
 483.271 -    static final String ERR_MUST_BE_STATIC = "The method must be static";
 483.272 -    static final String ERR_OPTION_TYPE = "The option field must be of type java.lang.String";
 483.273 -    static final String ERR_OPTION_MUST_BE_STATIC_FINAL = "The option field must be static final";
 483.274 -    static final String WARN_BUNDLE_KEY_NOT_FOUND = "Bundle key %s not found";
 483.275 -
 483.276 -    private static AnnotationMirror findAnnotation(Iterable<? extends AnnotationMirror> annotations, String annotationFQN) {
 483.277 -        for (AnnotationMirror am : annotations) {
 483.278 -            if (((TypeElement) am.getAnnotationType().asElement()).getQualifiedName().contentEquals(annotationFQN)) {
 483.279 -                return am;
 483.280 -            }
 483.281 -        }
 483.282 -
 483.283 -        return null;
 483.284 -    }
 483.285 -
 483.286 -    private <T> T getAttributeValue(AnnotationMirror annotation, String attribute, Class<T> clazz) {
 483.287 -        if (clazz.isArray()) {
 483.288 -            Iterable<?> attributes = getAttributeValueInternal(annotation, attribute, Iterable.class);
 483.289 -            
 483.290 -            Collection<Object> coll = new ArrayList<Object>();
 483.291 -            Class<?> componentType = clazz.getComponentType();
 483.292 -
 483.293 -            for (Object attr : attributes) {
 483.294 -                if (attr instanceof AnnotationValue) {
 483.295 -                    attr = ((AnnotationValue) attr).getValue();
 483.296 -                }
 483.297 -                
 483.298 -                if (componentType.isAssignableFrom(attr.getClass())) {
 483.299 -                    coll.add(componentType.cast(attr));
 483.300 -                }
 483.301 -            }
 483.302 -
 483.303 -            return clazz.cast(coll.toArray((Object[]) Array.newInstance(clazz.getComponentType(), 0)));
 483.304 -        } else {
 483.305 -            return getAttributeValueInternal(annotation, attribute, clazz);
 483.306 -        }
 483.307 -    }
 483.308 -
 483.309 -    private <T> T getAttributeValueInternal(AnnotationMirror annotation, String attribute, Class<T> clazz) {
 483.310 -        for (Entry<? extends ExecutableElement, ? extends AnnotationValue> e : processingEnv.getElementUtils().getElementValuesWithDefaults(annotation).entrySet()) {
 483.311 -            if (e.getKey().getSimpleName().contentEquals(attribute)) {
 483.312 -                Object value = e.getValue().getValue();
 483.313 -
 483.314 -                if (clazz.isAssignableFrom(value.getClass())) {
 483.315 -                    return clazz.cast(value);
 483.316 -                }
 483.317 -
 483.318 -                return null;
 483.319 -            }
 483.320 -        }
 483.321 -        
 483.322 -        return null;
 483.323 -    }
 483.324 -
 483.325 -    private AnnotationValue getAttributeValueDescription(AnnotationMirror annotation, String attribute) {
 483.326 -        for (Entry<? extends ExecutableElement, ? extends AnnotationValue> e : processingEnv.getElementUtils().getElementValuesWithDefaults(annotation).entrySet()) {
 483.327 -            if (e.getKey().getSimpleName().contentEquals(attribute)) {
 483.328 -                return e.getValue();
 483.329 -            }
 483.330 -        }
 483.331 -
 483.332 -        return null;
 483.333 -    }
 483.334 -    
 483.335 -    private boolean verifyHintAnnotationAcceptable(Element hint) {
 483.336 -        AnnotationMirror hintMirror = findAnnotation(hint.getAnnotationMirrors(), "org.netbeans.spi.java.hints.Hint");
 483.337 -
 483.338 -        if (hintMirror == null) return false;
 483.339 -
 483.340 -        String id = getAttributeValue(hintMirror, "id", String.class);
 483.341 -
 483.342 -        if (id == null || id.isEmpty()) {
 483.343 -            switch (hint.getKind()) {
 483.344 -                case CLASS:
 483.345 -                case METHOD:
 483.346 -                    break; //OK
 483.347 -                default:
 483.348 -                    //compiler should have already warned about this
 483.349 -                    return false;
 483.350 -            }
 483.351 -        }
 483.352 -
 483.353 -        TypeMirror customizerProviderType = getAttributeValue(hintMirror, "customizerProvider", TypeMirror.class);
 483.354 -
 483.355 -        if (customizerProviderType != null) {
 483.356 -            Element customizerProvider = processingEnv.getTypeUtils().asElement(customizerProviderType);
 483.357 -
 483.358 -            if (customizerProvider != null) {
 483.359 -                if (customizerProvider.getKind() != ElementKind.CLASS) {
 483.360 -                    TypeElement customizerProviderInterface = processingEnv.getElementUtils().getTypeElement("org.netbeans.spi.java.hints.CustomizerProvider");
 483.361 -
 483.362 -                    if (customizerProviderInterface != null && !customizerProviderInterface.equals(customizerProvider)) {
 483.363 -                        processingEnv.getMessager().printMessage(Kind.ERROR, "Customizer provider must be a concrete class", hint, hintMirror, getAttributeValueDescription(hintMirror, "customizerProvider"));
 483.364 -                    }
 483.365 -                } else {
 483.366 -                    TypeElement customizerProviderClazz = (TypeElement) customizerProvider;
 483.367 -
 483.368 -                    if (!customizerProviderClazz.getModifiers().contains(Modifier.PUBLIC)) {
 483.369 -                        processingEnv.getMessager().printMessage(Kind.ERROR, "Customizer provider must be public", hint, hintMirror, getAttributeValueDescription(hintMirror, "customizerProvider"));
 483.370 -                    }
 483.371 -
 483.372 -                    if (   customizerProviderClazz.getEnclosingElement().getKind() != ElementKind.PACKAGE
 483.373 -                        && !customizerProviderClazz.getModifiers().contains(Modifier.STATIC)) {
 483.374 -                        processingEnv.getMessager().printMessage(Kind.ERROR, "Customizer provider must be non-static innerclass", hint, hintMirror, getAttributeValueDescription(hintMirror, "customizerProvider"));
 483.375 -                    }
 483.376 -
 483.377 -                    boolean foundDefaultConstructor = false;
 483.378 -
 483.379 -                    for (ExecutableElement ee : ElementFilter.constructorsIn(customizerProviderClazz.getEnclosedElements())) {
 483.380 -                        if (ee.getParameters().isEmpty()) {
 483.381 -                            foundDefaultConstructor = true;
 483.382 -                            if (!ee.getModifiers().contains(Modifier.PUBLIC)) {
 483.383 -                                processingEnv.getMessager().printMessage(Kind.ERROR, "Customizer provider must provide a public default constructor", hint, hintMirror, getAttributeValueDescription(hintMirror, "customizerProvider"));
 483.384 -                            }
 483.385 -                            break;
 483.386 -                        }
 483.387 -                    }
 483.388 -
 483.389 -                    if (!foundDefaultConstructor) {
 483.390 -                        processingEnv.getMessager().printMessage(Kind.ERROR, "Customizer provider must provide a public default constructor", hint, hintMirror, getAttributeValueDescription(hintMirror, "customizerProvider"));
 483.391 -                    }
 483.392 -                }
 483.393 -            }
 483.394 -        }
 483.395 -
 483.396 -        return true;
 483.397 -    }
 483.398 -
 483.399 -    private boolean verifyHintMethod(ExecutableElement method) {
 483.400 -        StringBuilder error = new StringBuilder();
 483.401 -        Elements elements = processingEnv.getElementUtils();
 483.402 -        TypeElement errDesc = elements.getTypeElement("org.netbeans.spi.editor.hints.ErrorDescription");
 483.403 -        TypeElement jlIterable = elements.getTypeElement("java.lang.Iterable");
 483.404 -        TypeElement hintCtx = elements.getTypeElement("org.netbeans.spi.java.hints.HintContext");
 483.405 -
 483.406 -        if (errDesc == null || jlIterable == null || hintCtx == null) {
 483.407 -            return true;
 483.408 -        }
 483.409 -
 483.410 -        Types types = processingEnv.getTypeUtils();
 483.411 -        TypeMirror errDescType = errDesc.asType(); //no type params, no need to erasure
 483.412 -        TypeMirror jlIterableErrDesc = types.getDeclaredType(jlIterable, errDescType);
 483.413 -        TypeMirror ret = method.getReturnType();
 483.414 -
 483.415 -        if (!types.isSameType(ret, errDescType) && !types.isAssignable(ret, jlIterableErrDesc)) {
 483.416 -            error.append(ERR_RETURN_TYPE);
 483.417 -            error.append("\n");
 483.418 -        }
 483.419 -
 483.420 -        if (method.getParameters().size() != 1 || !types.isSameType(method.getParameters().get(0).asType(), hintCtx.asType())) {
 483.421 -            error.append(ERR_PARAMETERS);
 483.422 -            error.append("\n");
 483.423 -        }
 483.424 -
 483.425 -        if (!method.getModifiers().contains(Modifier.STATIC)) {
 483.426 -            error.append(ERR_MUST_BE_STATIC);
 483.427 -            error.append("\n");
 483.428 -        }
 483.429 -
 483.430 -        if (error.length() == 0) {
 483.431 -            return true;
 483.432 -        }
 483.433 -
 483.434 -        if (error.charAt(error.length() - 1) == '\n') {
 483.435 -            error.delete(error.length() - 1, error.length());
 483.436 -        }
 483.437 -
 483.438 -        processingEnv.getMessager().printMessage(Kind.ERROR, error.toString(), method);
 483.439 -
 483.440 -        return false;
 483.441 -    }
 483.442 -
 483.443 -    private static final Pattern VARIABLE_PATTERN = Pattern.compile("\\$[a-zA-Z0-9_]+");
 483.444 -    private boolean verifyTriggerAnnotations(ExecutableElement method) {
 483.445 -        List<AnnotationMirror> patternAnnotations = new ArrayList<AnnotationMirror>();
 483.446 -        AnnotationMirror am = findAnnotation(method.getAnnotationMirrors(), "org.netbeans.spi.java.hints.TriggerPattern");
 483.447 -
 483.448 -        if (am != null) {
 483.449 -            patternAnnotations.add(am);
 483.450 -        }
 483.451 -
 483.452 -        am = findAnnotation(method.getAnnotationMirrors(), "org.netbeans.spi.java.hints.TriggerPatterns");
 483.453 -
 483.454 -        if (am != null) {
 483.455 -            patternAnnotations.addAll(Arrays.asList(getAttributeValue(am, "value", AnnotationMirror[].class)));
 483.456 -        }
 483.457 -
 483.458 -        for (AnnotationMirror patternDescription : patternAnnotations) {
 483.459 -            String pattern = getAttributeValue(patternDescription, "value", String.class);
 483.460 -
 483.461 -            if (pattern == null) continue;
 483.462 -
 483.463 -            Set<String> variables = new HashSet<String>();
 483.464 -            Matcher m = VARIABLE_PATTERN.matcher(pattern);
 483.465 -
 483.466 -            while (m.find()) {
 483.467 -                variables.add(m.group(0));
 483.468 -            }
 483.469 -
 483.470 -            for (AnnotationMirror constraint : getAttributeValue(patternDescription, "constraints", AnnotationMirror[].class)) {
 483.471 -                String variable = getAttributeValue(constraint, "variable", String.class);
 483.472 -                String type = getAttributeValue(constraint, "type", String.class);
 483.473 -
 483.474 -                if (variable == null || type == null) continue;
 483.475 -
 483.476 -                if (!variables.contains(variable)) {
 483.477 -                    processingEnv.getMessager().printMessage(Kind.WARNING, "Variable " + variable + " not used in the pattern", method, constraint, getAttributeValueDescription(constraint, "variable"));
 483.478 -                }
 483.479 -            }
 483.480 -        }
 483.481 -
 483.482 -        return false;
 483.483 -    }
 483.484 -
 483.485 -    private boolean verifyOptionField(VariableElement field) {
 483.486 -        StringBuilder error = new StringBuilder();
 483.487 -        Elements elements = processingEnv.getElementUtils();
 483.488 -        TypeElement jlString = elements.getTypeElement("java.lang.String");
 483.489 -
 483.490 -        if (jlString == null) {
 483.491 -            return true;
 483.492 -        }
 483.493 -
 483.494 -        Types types = processingEnv.getTypeUtils();
 483.495 -        TypeMirror jlStringType = jlString.asType(); //no type params, no need to erasure
 483.496 -
 483.497 -        if (!types.isSameType(field.asType(), jlStringType)) {
 483.498 -            error.append(ERR_RETURN_TYPE);
 483.499 -            error.append("\n");
 483.500 -        }
 483.501 -
 483.502 -        if (!field.getModifiers().contains(Modifier.STATIC) || !field.getModifiers().contains(Modifier.FINAL)) {
 483.503 -            error.append(ERR_OPTION_MUST_BE_STATIC_FINAL);
 483.504 -            error.append("\n");
 483.505 -        }
 483.506 -
 483.507 -        Object key = field.getConstantValue();
 483.508 -
 483.509 -        if (key == null) {
 483.510 -            error.append("Option field not a compile-time constant");
 483.511 -            error.append("\n");
 483.512 -        }
 483.513 -
 483.514 -        if (error.length() == 0) {
 483.515 -            return true;
 483.516 -        }
 483.517 -
 483.518 -        if (error.charAt(error.length() - 1) == '\n') {
 483.519 -            error.delete(error.length() - 1, error.length());
 483.520 -        }
 483.521 -
 483.522 -        processingEnv.getMessager().printMessage(Kind.ERROR, error.toString(), field);
 483.523 -
 483.524 -        return false;
 483.525 -    }
 483.526 -
 483.527 -    private class DumpAnnotationValue extends AbstractAnnotationValueVisitor6<Void, Void> {
 483.528 -
 483.529 -        private final LayerBuilder builder;
 483.530 -        private final File annotationFolder;
 483.531 -        private final String attrName;
 483.532 -        private final Element errElement;
 483.533 -        private final AnnotationMirror errAnnotationMirror;
 483.534 -        private final AnnotationValue errAnnotationValue;
 483.535 -
 483.536 -        public DumpAnnotationValue(LayerBuilder builder, File annotationFolder, String attrName, Element errElement, AnnotationMirror errAnnotationMirror, AnnotationValue errAnnotationValue) {
 483.537 -            this.builder = builder;
 483.538 -            this.annotationFolder = annotationFolder;
 483.539 -            this.attrName = attrName;
 483.540 -            this.errElement = errElement;
 483.541 -            this.errAnnotationMirror = errAnnotationMirror;
 483.542 -            this.errAnnotationValue = errAnnotationValue;
 483.543 -        }
 483.544 -
 483.545 -        public Void visitBoolean(boolean b, Void p) {
 483.546 -            annotationFolder.boolvalue(attrName, b);
 483.547 -            return null;
 483.548 -        }
 483.549 -
 483.550 -        public Void visitByte(byte b, Void p) {
 483.551 -            annotationFolder.bytevalue(attrName, b);
 483.552 -            return null;
 483.553 -        }
 483.554 -
 483.555 -        public Void visitChar(char c, Void p) {
 483.556 -            annotationFolder.charvalue(attrName, c);
 483.557 -            return null;
 483.558 -        }
 483.559 -
 483.560 -        public Void visitDouble(double d, Void p) {
 483.561 -            annotationFolder.doublevalue(attrName, d);
 483.562 -            return null;
 483.563 -        }
 483.564 -
 483.565 -        public Void visitFloat(float f, Void p) {
 483.566 -            annotationFolder.floatvalue(attrName, f);
 483.567 -            return null;
 483.568 -        }
 483.569 -
 483.570 -        public Void visitInt(int i, Void p) {
 483.571 -            annotationFolder.intvalue(attrName, i);
 483.572 -            return null;
 483.573 -        }
 483.574 -
 483.575 -        public Void visitLong(long i, Void p) {
 483.576 -            annotationFolder.longvalue(attrName, i);
 483.577 -            return null;
 483.578 -        }
 483.579 -
 483.580 -        public Void visitShort(short s, Void p) {
 483.581 -            annotationFolder.shortvalue(attrName, s);
 483.582 -            return null;
 483.583 -        }
 483.584 -
 483.585 -        public Void visitString(String s, Void p) {
 483.586 -            if ("displayName".equals(attrName) || "description".equals(attrName) || "tooltip".equals(attrName)) {
 483.587 -                try {
 483.588 -                    annotationFolder.bundlevalue(attrName, s);
 483.589 -                } catch (LayerGenerationException ex) {
 483.590 -                   processingEnv.getMessager().printMessage(Kind.ERROR, ex.getLocalizedMessage(), errElement, errAnnotationMirror, errAnnotationValue);
 483.591 -                }
 483.592 -            } else {
 483.593 -                annotationFolder.stringvalue(attrName, s);
 483.594 -            }
 483.595 -            return null;
 483.596 -        }
 483.597 -
 483.598 -        public Void visitType(TypeMirror t, Void p) {
 483.599 -            annotationFolder.stringvalue(attrName, getFQN(((TypeElement) ((DeclaredType) t).asElement())));
 483.600 -            return null;
 483.601 -        }
 483.602 -
 483.603 -        public Void visitEnumConstant(VariableElement c, Void p) {
 483.604 -            TypeElement owner = (TypeElement) c.getEnclosingElement();
 483.605 -            annotationFolder.stringvalue(attrName, getFQN(owner) + "." + c.getSimpleName());
 483.606 -            return null;
 483.607 -        }
 483.608 -
 483.609 -        public Void visitAnnotation(AnnotationMirror a, Void p) {
 483.610 -            File f = builder.folder(annotationFolder.getPath() + "/" + attrName);
 483.611 -            
 483.612 -            dumpAnnotation(builder, f, errElement, a, false);
 483.613 -
 483.614 -            f.write();
 483.615 -            return null;
 483.616 -        }
 483.617 -
 483.618 -        public Void visitArray(List<? extends AnnotationValue> vals, Void p) {
 483.619 -            File arr = builder.folder(annotationFolder.getPath() + "/" + attrName);
 483.620 -            int c = 0;
 483.621 -
 483.622 -            for (AnnotationValue av : vals) {
 483.623 -                av.accept(new DumpAnnotationValue(builder, arr, "item" + c, errElement, errAnnotationMirror, av), null);
 483.624 -                c++;
 483.625 -            }
 483.626 -
 483.627 -            arr.write();
 483.628 -
 483.629 -            return null;
 483.630 -        }
 483.631 -    }
 483.632 -    
 483.633 -    @SuppressWarnings("unchecked")
 483.634 -    private static <T extends Throwable> void rethrowAsRuntime(Throwable t) throws T {
 483.635 -        throw (T) t;
 483.636 -    }
 483.637 -
 483.638 -}
   484.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/BooleanOption.java	Mon Dec 19 11:37:36 2016 +0100
   484.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   484.3 @@ -1,87 +0,0 @@
   484.4 -/*
   484.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   484.6 - *
   484.7 - * Copyright 2012 Oracle and/or its affiliates. All rights reserved.
   484.8 - *
   484.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  484.10 - * Other names may be trademarks of their respective owners.
  484.11 - *
  484.12 - * The contents of this file are subject to the terms of either the GNU
  484.13 - * General Public License Version 2 only ("GPL") or the Common
  484.14 - * Development and Distribution License("CDDL") (collectively, the
  484.15 - * "License"). You may not use this file except in compliance with the
  484.16 - * License. You can obtain a copy of the License at
  484.17 - * http://www.netbeans.org/cddl-gplv2.html
  484.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  484.19 - * specific language governing permissions and limitations under the
  484.20 - * License.  When distributing the software, include this License Header
  484.21 - * Notice in each file and include the License file at
  484.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  484.23 - * particular file as subject to the "Classpath" exception as provided
  484.24 - * by Oracle in the GPL Version 2 section of the License file that
  484.25 - * accompanied this code. If applicable, add the following below the
  484.26 - * License Header, with the fields enclosed by brackets [] replaced by
  484.27 - * your own identifying information:
  484.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  484.29 - *
  484.30 - * If you wish your version of this file to be governed by only the CDDL
  484.31 - * or only the GPL Version 2, indicate your decision by adding
  484.32 - * "[Contributor] elects to include this software in this distribution
  484.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  484.34 - * single choice of license, a recipient has the option to distribute
  484.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  484.36 - * to extend the choice of license to its licensees as provided above.
  484.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  484.38 - * Version 2 license, then the option applies only if the new code is
  484.39 - * made subject to such option by the copyright holder.
  484.40 - *
  484.41 - * Contributor(s):
  484.42 - *
  484.43 - * Portions Copyrighted 2012 Sun Microsystems, Inc.
  484.44 - */
  484.45 -package org.netbeans.spi.java.hints;
  484.46 -
  484.47 -import java.lang.annotation.ElementType;
  484.48 -import java.lang.annotation.Retention;
  484.49 -import java.lang.annotation.RetentionPolicy;
  484.50 -import java.lang.annotation.Target;
  484.51 -import java.util.prefs.Preferences;
  484.52 -
  484.53 -/**Specify an option that affects the way the hint works.
  484.54 - *
  484.55 - * Only {@code static final String} compile-time constant can be marked with this
  484.56 - * annotation. The value of the constant will be used as the key to the hint's {@link Preferences}.
  484.57 - *
  484.58 - * For hints that consist of a class, all options that are directly enclosed in the class
  484.59 - * will be used in their source order.
  484.60 - *
  484.61 - * For hints that consist of a single method, use {@link UseOptions} to specify which options
  484.62 - * from the enclosing class should be used. The order of the options will be the order in which
  484.63 - * they appear in the source code of the enclosing class.
  484.64 - *
  484.65 - * The customizer will be generated automatically when {@link BooleanOption} is used.
  484.66 - *
  484.67 - * Two keys need to be defined in the corresponding {@code Bundle.properties}:
  484.68 - * {@code LBL_<class-fqn>.<field_name>}, which will be used as the display name of
  484.69 - * the corresponding checkbox in the customizer, and {@code TP_<class-fqn>.<field_name>}
  484.70 - * which will be used as the tooltip of the checkbox.
  484.71 - *
  484.72 - * @author lahvac
  484.73 - */
  484.74 -@Retention(RetentionPolicy.SOURCE)
  484.75 -@Target(ElementType.FIELD)
  484.76 -public @interface BooleanOption {
  484.77 -
  484.78 -    /**The options' display name. Will be used as the display name of the
  484.79 -     * checkbox in the customizer.
  484.80 -     */
  484.81 -    public String displayName();
  484.82 -    /**The tooltip of the checkbox in the customizer.
  484.83 -     */
  484.84 -    public String tooltip();
  484.85 -    
  484.86 -    /**The default value of the option.
  484.87 -     */
  484.88 -    public boolean defaultValue();
  484.89 -    
  484.90 -}
   485.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   485.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   485.3 @@ -1,7 +0,0 @@
   485.4 -#{0}: hint/suggestion name
   485.5 -FIX_DisableHint=Disable "{0}" Hint
   485.6 -FIX_ConfigureHint=Configure "{0}" Hint
   485.7 -FIX_DisableSuggestion=Disable "{0}" Suggestion
   485.8 -FIX_ConfigureSuggestion=Configure "{0}" Suggestion
   485.9 -#{0}: Key of the warning
  485.10 -LBL_FIX_Suppress_Waning=Suppress Warning - {0}
   486.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/ConstraintVariableType.java	Mon Dec 19 11:37:36 2016 +0100
   486.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   486.3 @@ -1,73 +0,0 @@
   486.4 -/*
   486.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   486.6 - *
   486.7 - * Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   486.8 - *
   486.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  486.10 - * Other names may be trademarks of their respective owners.
  486.11 - *
  486.12 - * The contents of this file are subject to the terms of either the GNU
  486.13 - * General Public License Version 2 only ("GPL") or the Common
  486.14 - * Development and Distribution License("CDDL") (collectively, the
  486.15 - * "License"). You may not use this file except in compliance with the
  486.16 - * License. You can obtain a copy of the License at
  486.17 - * http://www.netbeans.org/cddl-gplv2.html
  486.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  486.19 - * specific language governing permissions and limitations under the
  486.20 - * License.  When distributing the software, include this License Header
  486.21 - * Notice in each file and include the License file at
  486.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  486.23 - * particular file as subject to the "Classpath" exception as provided
  486.24 - * by Oracle in the GPL Version 2 section of the License file that
  486.25 - * accompanied this code. If applicable, add the following below the
  486.26 - * License Header, with the fields enclosed by brackets [] replaced by
  486.27 - * your own identifying information:
  486.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  486.29 - *
  486.30 - * If you wish your version of this file to be governed by only the CDDL
  486.31 - * or only the GPL Version 2, indicate your decision by adding
  486.32 - * "[Contributor] elects to include this software in this distribution
  486.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  486.34 - * single choice of license, a recipient has the option to distribute
  486.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  486.36 - * to extend the choice of license to its licensees as provided above.
  486.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  486.38 - * Version 2 license, then the option applies only if the new code is
  486.39 - * made subject to such option by the copyright holder.
  486.40 - *
  486.41 - * Contributor(s):
  486.42 - *
  486.43 - * Portions Copyrighted 2008-2009 Sun Microsystems, Inc.
  486.44 - */
  486.45 -
  486.46 -package org.netbeans.spi.java.hints;
  486.47 -
  486.48 -import java.lang.annotation.Target;
  486.49 -
  486.50 -/**Specifies a type of a variable. During the matching process, only those
  486.51 - * sections of the source code that have the given type are considered.
  486.52 - *
  486.53 - * @author Jan Lahoda
  486.54 - */
  486.55 -@Target({})
  486.56 -public @interface ConstraintVariableType {
  486.57 -
  486.58 -    /**Variable name, must start with the dollar sign (<code>$</code>).
  486.59 -     * Variable<code>$this</code> is automatically bound to the current class.
  486.60 -     */
  486.61 -    public String variable();
  486.62 -
  486.63 -    /**The required type of the section of source code. The value must be a type
  486.64 -     * per JLS 4.1, i.e. a primitive type (JLS 4.2), or a reference type (JLS 4.3).
  486.65 -     * All elements of the type must be resolvable when written to any Java file,
  486.66 -     * they may not contain e.g. references to type variables, simple names, etc.
  486.67 -     *
  486.68 -     * The type may include any actual type arguments, including wildcard.
  486.69 -     *
  486.70 -     * While matching, the type of the tree that corresponds to the variable in
  486.71 -     * the actual occurrence candidate is accepted if it is assignable into the
  486.72 -     * variable defined by the attribute.
  486.73 -     */
  486.74 -    public String type();
  486.75 -    
  486.76 -}
   487.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/CustomizerProvider.java	Mon Dec 19 11:37:36 2016 +0100
   487.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   487.3 @@ -1,66 +0,0 @@
   487.4 -/*
   487.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   487.6 - *
   487.7 - * Copyright 2010-2012 Oracle and/or its affiliates. All rights reserved.
   487.8 - *
   487.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  487.10 - * Other names may be trademarks of their respective owners.
  487.11 - *
  487.12 - * The contents of this file are subject to the terms of either the GNU
  487.13 - * General Public License Version 2 only ("GPL") or the Common
  487.14 - * Development and Distribution License("CDDL") (collectively, the
  487.15 - * "License"). You may not use this file except in compliance with the
  487.16 - * License. You can obtain a copy of the License at
  487.17 - * http://www.netbeans.org/cddl-gplv2.html
  487.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  487.19 - * specific language governing permissions and limitations under the
  487.20 - * License.  When distributing the software, include this License Header
  487.21 - * Notice in each file and include the License file at
  487.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  487.23 - * particular file as subject to the "Classpath" exception as provided
  487.24 - * by Oracle in the GPL Version 2 section of the License file that
  487.25 - * accompanied this code. If applicable, add the following below the
  487.26 - * License Header, with the fields enclosed by brackets [] replaced by
  487.27 - * your own identifying information:
  487.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  487.29 - *
  487.30 - * If you wish your version of this file to be governed by only the CDDL
  487.31 - * or only the GPL Version 2, indicate your decision by adding
  487.32 - * "[Contributor] elects to include this software in this distribution
  487.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  487.34 - * single choice of license, a recipient has the option to distribute
  487.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  487.36 - * to extend the choice of license to its licensees as provided above.
  487.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  487.38 - * Version 2 license, then the option applies only if the new code is
  487.39 - * made subject to such option by the copyright holder.
  487.40 - *
  487.41 - * Contributor(s):
  487.42 - *
  487.43 - * Portions Copyrighted 2010-2012 Sun Microsystems, Inc.
  487.44 - */
  487.45 -
  487.46 -package org.netbeans.spi.java.hints;
  487.47 -
  487.48 -import java.util.prefs.Preferences;
  487.49 -import javax.swing.JComponent;
  487.50 -import org.netbeans.api.annotations.common.NonNull;
  487.51 -
  487.52 -/**A factory for hint customizer.
  487.53 - *
  487.54 - * @author lahvac
  487.55 - */
  487.56 -public interface CustomizerProvider {
  487.57 -
  487.58 -    /**Create a customizer component. The hint settings are in the given
  487.59 -     * {@link Preferences}. The customizer can write into the provided {@link Preferences}
  487.60 -     * immediately, the values will be persisted or rolled-back automatically
  487.61 -     * based on the user's gesture.
  487.62 -     *
  487.63 -     * @param prefs the hints preferences from which the data to show should be read,
  487.64 -     *              and to which the new settings should be written
  487.65 -     * @return a customizer component
  487.66 -     */
  487.67 -    public @NonNull JComponent getCustomizer(@NonNull Preferences prefs);
  487.68 -
  487.69 -}
   488.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/Decision.java	Mon Dec 19 11:37:36 2016 +0100
   488.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   488.3 @@ -1,106 +0,0 @@
   488.4 -/*
   488.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   488.6 - *
   488.7 - * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
   488.8 - *
   488.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  488.10 - * Other names may be trademarks of their respective owners.
  488.11 - *
  488.12 - * The contents of this file are subject to the terms of either the GNU
  488.13 - * General Public License Version 2 only ("GPL") or the Common
  488.14 - * Development and Distribution License("CDDL") (collectively, the
  488.15 - * "License"). You may not use this file except in compliance with the
  488.16 - * License. You can obtain a copy of the License at
  488.17 - * http://www.netbeans.org/cddl-gplv2.html
  488.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  488.19 - * specific language governing permissions and limitations under the
  488.20 - * License.  When distributing the software, include this License Header
  488.21 - * Notice in each file and include the License file at
  488.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  488.23 - * particular file as subject to the "Classpath" exception as provided
  488.24 - * by Oracle in the GPL Version 2 section of the License file that
  488.25 - * accompanied this code. If applicable, add the following below the
  488.26 - * License Header, with the fields enclosed by brackets [] replaced by
  488.27 - * your own identifying information:
  488.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  488.29 - *
  488.30 - * If you wish your version of this file to be governed by only the CDDL
  488.31 - * or only the GPL Version 2, indicate your decision by adding
  488.32 - * "[Contributor] elects to include this software in this distribution
  488.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  488.34 - * single choice of license, a recipient has the option to distribute
  488.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  488.36 - * to extend the choice of license to its licensees as provided above.
  488.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  488.38 - * Version 2 license, then the option applies only if the new code is
  488.39 - * made subject to such option by the copyright holder.
  488.40 - *
  488.41 - * Contributor(s):
  488.42 - *
  488.43 - * Portions Copyrighted 2013 Sun Microsystems, Inc.
  488.44 - */
  488.45 -package org.netbeans.spi.java.hints;
  488.46 -
  488.47 -import java.util.ArrayList;
  488.48 -import java.util.HashMap;
  488.49 -import java.util.List;
  488.50 -import java.util.Map;
  488.51 -import org.netbeans.api.java.source.CompilationInfo;
  488.52 -import org.netbeans.api.java.source.TreePathHandle;
  488.53 -import org.openide.filesystems.FileObject;
  488.54 -
  488.55 -/**
  488.56 - *
  488.57 - * @author lahvac
  488.58 - */
  488.59 -public abstract class Decision<V, R> {
  488.60 -    
  488.61 -    /*XXX: should not be public*/public final TreePathHandle root;
  488.62 -    private final Map<FileObject, List<V>> file2Facts = new HashMap<FileObject, List<V>>();
  488.63 -
  488.64 -    protected Decision(TreePathHandle root) {
  488.65 -        this.root = root;
  488.66 -    }
  488.67 -    
  488.68 -    protected abstract R makeDecision(Iterable<? extends V> input);
  488.69 -    
  488.70 -    private R previousResult;
  488.71 -    
  488.72 -    /*XXX: should not be public*/public boolean makeDecision() {
  488.73 -        List<V> inputs = new ArrayList<V>();
  488.74 -        
  488.75 -        for (List<V> v : file2Facts.values()) {
  488.76 -            inputs.addAll(v);
  488.77 -        }
  488.78 -        
  488.79 -        R current = makeDecision(inputs);
  488.80 -        
  488.81 -        boolean changed = !(previousResult == null ? current == null : previousResult.equals(current));
  488.82 -        
  488.83 -        previousResult = current;
  488.84 -        
  488.85 -        return changed;
  488.86 -    }
  488.87 -    
  488.88 -    public R getCurrentResult() {
  488.89 -        return previousResult;
  488.90 -    }
  488.91 -    
  488.92 -    public void recordLocalFact(/*XXX: should not require the CompilationInfo!*/CompilationInfo info, V fact) {
  488.93 -        List<V> facts = file2Facts.get(info.getFileObject());
  488.94 -        
  488.95 -        if (facts == null) {
  488.96 -            file2Facts.put(info.getFileObject(), facts = new ArrayList<V>());
  488.97 -        }
  488.98 -        
  488.99 -        facts.add(fact);
 488.100 -    }
 488.101 -    
 488.102 -    public static abstract class Factory<V, R, DecisionImpl extends Decision<V, R>> {
 488.103 -        /*XXX: should not be public*/public final Class<DecisionImpl> decisionClass;
 488.104 -        public Factory(Class<DecisionImpl> decisionClass) {
 488.105 -            this.decisionClass = decisionClass;
 488.106 -        }
 488.107 -        public abstract DecisionImpl create(TreePathHandle handle);
 488.108 -    }
 488.109 -}
   489.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/ErrorDescriptionFactory.java	Mon Dec 19 11:37:36 2016 +0100
   489.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   489.3 @@ -1,619 +0,0 @@
   489.4 -/*
   489.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   489.6 - *
   489.7 - * Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   489.8 - *
   489.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  489.10 - * Other names may be trademarks of their respective owners.
  489.11 - *
  489.12 - * The contents of this file are subject to the terms of either the GNU
  489.13 - * General Public License Version 2 only ("GPL") or the Common
  489.14 - * Development and Distribution License("CDDL") (collectively, the
  489.15 - * "License"). You may not use this file except in compliance with the
  489.16 - * License. You can obtain a copy of the License at
  489.17 - * http://www.netbeans.org/cddl-gplv2.html
  489.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  489.19 - * specific language governing permissions and limitations under the
  489.20 - * License.  When distributing the software, include this License Header
  489.21 - * Notice in each file and include the License file at
  489.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  489.23 - * particular file as subject to the "Classpath" exception as provided
  489.24 - * by Oracle in the GPL Version 2 section of the License file that
  489.25 - * accompanied this code. If applicable, add the following below the
  489.26 - * License Header, with the fields enclosed by brackets [] replaced by
  489.27 - * your own identifying information:
  489.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  489.29 - *
  489.30 - * If you wish your version of this file to be governed by only the CDDL
  489.31 - * or only the GPL Version 2, indicate your decision by adding
  489.32 - * "[Contributor] elects to include this software in this distribution
  489.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  489.34 - * single choice of license, a recipient has the option to distribute
  489.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  489.36 - * to extend the choice of license to its licensees as provided above.
  489.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  489.38 - * Version 2 license, then the option applies only if the new code is
  489.39 - * made subject to such option by the copyright holder.
  489.40 - *
  489.41 - * Contributor(s):
  489.42 - *
  489.43 - * Portions Copyrighted 2008-2010 Sun Microsystems, Inc.
  489.44 - */
  489.45 -
  489.46 -package org.netbeans.spi.java.hints;
  489.47 -
  489.48 -import com.sun.source.tree.BlockTree;
  489.49 -import com.sun.source.tree.ClassTree;
  489.50 -import com.sun.source.tree.LiteralTree;
  489.51 -import com.sun.source.tree.MemberSelectTree;
  489.52 -import com.sun.source.tree.MethodInvocationTree;
  489.53 -import com.sun.source.tree.MethodTree;
  489.54 -import com.sun.source.tree.ModifiersTree;
  489.55 -import com.sun.source.tree.StatementTree;
  489.56 -import com.sun.source.tree.Tree;
  489.57 -import com.sun.source.tree.Tree.Kind;
  489.58 -import com.sun.source.tree.VariableTree;
  489.59 -import com.sun.source.util.TreePath;
  489.60 -import java.io.IOException;
  489.61 -import java.util.Arrays;
  489.62 -import java.util.Collection;
  489.63 -import java.util.Collections;
  489.64 -import java.util.EnumSet;
  489.65 -import java.util.LinkedHashSet;
  489.66 -import java.util.LinkedList;
  489.67 -import java.util.List;
  489.68 -import java.util.Set;
  489.69 -import javax.lang.model.SourceVersion;
  489.70 -import javax.lang.model.element.TypeElement;
  489.71 -import javax.swing.SwingUtilities;
  489.72 -import org.netbeans.api.annotations.common.NonNull;
  489.73 -import org.netbeans.api.java.source.CompilationInfo;
  489.74 -import org.netbeans.api.java.source.GeneratorUtilities;
  489.75 -import org.netbeans.api.java.source.JavaSource;
  489.76 -import org.netbeans.api.java.source.JavaSource.Phase;
  489.77 -import org.netbeans.api.java.source.Task;
  489.78 -import org.netbeans.api.java.source.TreePathHandle;
  489.79 -import org.netbeans.api.java.source.WorkingCopy;
  489.80 -import org.netbeans.api.lexer.TokenSequence;
  489.81 -import org.netbeans.api.options.OptionsDisplayer;
  489.82 -import org.netbeans.modules.analysis.api.CodeAnalysis;
  489.83 -import org.netbeans.modules.analysis.spi.Analyzer.WarningDescription;
  489.84 -import org.netbeans.modules.java.hints.providers.spi.HintMetadata;
  489.85 -import org.netbeans.modules.java.hints.providers.spi.HintMetadata.Options;
  489.86 -import org.netbeans.modules.java.hints.spiimpl.Hacks.InspectAndTransformOpener;
  489.87 -import org.netbeans.modules.java.hints.spiimpl.SPIAccessor;
  489.88 -import org.netbeans.modules.java.hints.spiimpl.SyntheticFix;
  489.89 -import org.netbeans.modules.java.hints.spiimpl.options.HintsSettings;
  489.90 -import org.netbeans.spi.editor.hints.ChangeInfo;
  489.91 -import org.netbeans.spi.editor.hints.EnhancedFix;
  489.92 -import org.netbeans.spi.editor.hints.ErrorDescription;
  489.93 -import org.netbeans.spi.editor.hints.Fix;
  489.94 -import org.netbeans.spi.editor.hints.LazyFixList;
  489.95 -import org.openide.filesystems.FileObject;
  489.96 -import org.openide.util.Lookup;
  489.97 -import org.openide.util.NbBundle;
  489.98 -import org.openide.util.NbBundle.Messages;
  489.99 -import org.openide.util.Parameters;
 489.100 -
 489.101 -/**
 489.102 - *
 489.103 - * @author Jan Lahoda
 489.104 - */
 489.105 -public class ErrorDescriptionFactory {
 489.106 -
 489.107 -    private ErrorDescriptionFactory() {
 489.108 -    }
 489.109 -
 489.110 -//    public static ErrorDescription forTree(HintContext context, String text, Fix... fixes) {
 489.111 -//        return forTree(context, context.getContext(), text, fixes);
 489.112 -//    }
 489.113 -
 489.114 -    public static ErrorDescription forTree(HintContext context, TreePath tree, String text, Fix... fixes) {
 489.115 -        return forTree(context, tree.getLeaf(), text, fixes);
 489.116 -    }
 489.117 -    
 489.118 -    public static ErrorDescription forTree(HintContext context, Tree tree, String text, Fix... fixes) {
 489.119 -        int start;
 489.120 -        int end;
 489.121 -
 489.122 -        if (context.getHintMetadata().kind == Hint.Kind.INSPECTION) {
 489.123 -            start = (int) context.getInfo().getTrees().getSourcePositions().getStartPosition(context.getInfo().getCompilationUnit(), tree);
 489.124 -            end = (int) context.getInfo().getTrees().getSourcePositions().getEndPosition(context.getInfo().getCompilationUnit(), tree);
 489.125 -        } else {
 489.126 -            start = end = context.getCaretLocation();
 489.127 -        }
 489.128 -
 489.129 -        if (start != (-1) && end != (-1)) {
 489.130 -            LazyFixList fixesForED = org.netbeans.spi.editor.hints.ErrorDescriptionFactory.lazyListForFixes(resolveDefaultFixes(context, fixes));
 489.131 -            return org.netbeans.spi.editor.hints.ErrorDescriptionFactory.createErrorDescription("text/x-java:" + context.getHintMetadata().id, context.getSeverity(), text, context.getHintMetadata().description, fixesForED, context.getInfo().getFileObject(), start, end);
 489.132 -        }
 489.133 -
 489.134 -        return null;
 489.135 -    }
 489.136 -    
 489.137 -    /**Create a new {@link ErrorDescription}. Severity is automatically inferred from the {@link HintContext},
 489.138 -     * and the {@link ErrorDescription} is created to be consistent with {@link ErrorDescription}s created
 489.139 -     * by the other factory methods in this class.
 489.140 -     * 
 489.141 -     * @param context from which the {@link Severity} and other properties are inferred.
 489.142 -     * @param start start of the warning
 489.143 -     * @param end end of the warning
 489.144 -     * @param text the warning text
 489.145 -     * @param fixes one or more {@link Fix}es to show shown to the user.
 489.146 -     * @return a standard {@link ErrorDescription} for use in Java source
 489.147 -     * @since 1.9
 489.148 -     */
 489.149 -    public static ErrorDescription forSpan(HintContext context, int start, int end, String text, Fix... fixes) {
 489.150 -        if (context.getHintMetadata().kind != Hint.Kind.INSPECTION) {
 489.151 -            start = end = context.getCaretLocation();
 489.152 -        }
 489.153 -
 489.154 -        if (start != (-1) && end != (-1)) {
 489.155 -            LazyFixList fixesForED = org.netbeans.spi.editor.hints.ErrorDescriptionFactory.lazyListForFixes(resolveDefaultFixes(context, fixes));
 489.156 -            return org.netbeans.spi.editor.hints.ErrorDescriptionFactory.createErrorDescription("text/x-java:" + context.getHintMetadata().id, context.getSeverity(), text, context.getHintMetadata().description, fixesForED, context.getInfo().getFileObject(), start, end);
 489.157 -        }
 489.158 -
 489.159 -        return null;
 489.160 -    }
 489.161 -    
 489.162 -    public static ErrorDescription forName(HintContext context, TreePath tree, String text, Fix... fixes) {
 489.163 -        return forName(context, tree.getLeaf(), text, fixes);
 489.164 -    }
 489.165 -
 489.166 -    public static ErrorDescription forName(HintContext context, Tree tree, String text, Fix... fixes) {
 489.167 -        int[] span;
 489.168 -        
 489.169 -        if (context.getHintMetadata().kind == Hint.Kind.INSPECTION) {
 489.170 -            span = computeNameSpan(tree, context);
 489.171 -        } else {
 489.172 -            span = new int[] {context.getCaretLocation(), context.getCaretLocation()};
 489.173 -        }
 489.174 -        
 489.175 -        if (span != null && span[0] != (-1) && span[1] != (-1)) {
 489.176 -            LazyFixList fixesForED = org.netbeans.spi.editor.hints.ErrorDescriptionFactory.lazyListForFixes(resolveDefaultFixes(context, fixes));
 489.177 -            return org.netbeans.spi.editor.hints.ErrorDescriptionFactory.createErrorDescription("text/x-java:" + context.getHintMetadata().id, context.getSeverity(), text, context.getHintMetadata().description, fixesForED, context.getInfo().getFileObject(), span[0], span[1]);
 489.178 -        }
 489.179 -
 489.180 -        return null;
 489.181 -    }
 489.182 -
 489.183 -    private static int[] computeNameSpan(Tree tree, HintContext context) {
 489.184 -        switch (tree.getKind()) {
 489.185 -            case METHOD:
 489.186 -                return context.getInfo().getTreeUtilities().findNameSpan((MethodTree) tree);
 489.187 -            case ANNOTATION_TYPE:
 489.188 -            case CLASS:
 489.189 -            case ENUM:
 489.190 -            case INTERFACE:
 489.191 -                return context.getInfo().getTreeUtilities().findNameSpan((ClassTree) tree);
 489.192 -            case VARIABLE:
 489.193 -                return context.getInfo().getTreeUtilities().findNameSpan((VariableTree) tree);
 489.194 -            case MEMBER_SELECT:
 489.195 -                //XXX:
 489.196 -                MemberSelectTree mst = (MemberSelectTree) tree;
 489.197 -                int[] span = context.getInfo().getTreeUtilities().findNameSpan(mst);
 489.198 -
 489.199 -                if (span == null) {
 489.200 -                    int end = (int) context.getInfo().getTrees().getSourcePositions().getEndPosition(context.getInfo().getCompilationUnit(), tree);
 489.201 -                    span = new int[] {end - mst.getIdentifier().length(), end};
 489.202 -                }
 489.203 -                return span;
 489.204 -            case METHOD_INVOCATION:
 489.205 -                return computeNameSpan(((MethodInvocationTree) tree).getMethodSelect(), context);
 489.206 -            case BLOCK:
 489.207 -                Collection<? extends TreePath> prefix = context.getMultiVariables().get("$$1$");
 489.208 -                
 489.209 -                if (prefix != null) {
 489.210 -                    BlockTree bt = (BlockTree) tree;
 489.211 -                    
 489.212 -                    if (bt.getStatements().size() > prefix.size()) {
 489.213 -                        return computeNameSpan(bt.getStatements().get(prefix.size()), context);
 489.214 -                    }
 489.215 -                }
 489.216 -            default:
 489.217 -                int start = (int) context.getInfo().getTrees().getSourcePositions().getStartPosition(context.getInfo().getCompilationUnit(), tree);
 489.218 -                if (    StatementTree.class.isAssignableFrom(tree.getKind().asInterface())
 489.219 -                    && tree.getKind() != Kind.EXPRESSION_STATEMENT
 489.220 -                    && tree.getKind() != Kind.BLOCK) {
 489.221 -                    TokenSequence<?> ts = context.getInfo().getTokenHierarchy().tokenSequence();
 489.222 -                    ts.move(start);
 489.223 -                    if (ts.moveNext()) {
 489.224 -                        return new int[] {ts.offset(), ts.offset() + ts.token().length()};
 489.225 -                    }
 489.226 -                }
 489.227 -                return new int[] {
 489.228 -                    start,
 489.229 -                    (int) context.getInfo().getTrees().getSourcePositions().getEndPosition(context.getInfo().getCompilationUnit(), tree),
 489.230 -                };
 489.231 -        }
 489.232 -    }
 489.233 -
 489.234 -    static List<Fix> resolveDefaultFixes(HintContext ctx, Fix... provided) {
 489.235 -        List<Fix> auxiliaryFixes = new LinkedList<Fix>();
 489.236 -        HintMetadata hm = SPIAccessor.getINSTANCE().getHintMetadata(ctx);
 489.237 -
 489.238 -        if (hm != null) {
 489.239 -            Set<String> suppressWarningsKeys = new LinkedHashSet<String>();
 489.240 -
 489.241 -            for (String key : hm.suppressWarnings) {
 489.242 -                if (key == null || key.length() == 0) {
 489.243 -                    break;
 489.244 -                }
 489.245 -
 489.246 -                suppressWarningsKeys.add(key);
 489.247 -            }
 489.248 -
 489.249 -
 489.250 -            auxiliaryFixes.add(new DisableConfigure(hm, true, SPIAccessor.getINSTANCE().getHintSettings(ctx)));
 489.251 -            auxiliaryFixes.add(new DisableConfigure(hm, false, null));
 489.252 -
 489.253 -            if (hm.kind == Hint.Kind.INSPECTION) {
 489.254 -                auxiliaryFixes.add(new InspectFix(hm, false));
 489.255 -                if (!hm.options.contains(Options.QUERY)) {
 489.256 -                    auxiliaryFixes.add(new InspectFix(hm, true));
 489.257 -                }
 489.258 -            }
 489.259 -            
 489.260 -            if (!suppressWarningsKeys.isEmpty()) {
 489.261 -                auxiliaryFixes.addAll(createSuppressWarnings(ctx.getInfo(), ctx.getPath(), suppressWarningsKeys.toArray(new String[0])));
 489.262 -            }
 489.263 -
 489.264 -            List<Fix> result = new LinkedList<Fix>();
 489.265 -
 489.266 -            for (Fix f : provided != null ? provided : new Fix[0]) {
 489.267 -                if (f == null) continue;
 489.268 -                
 489.269 -                result.add(org.netbeans.spi.editor.hints.ErrorDescriptionFactory.attachSubfixes(f, auxiliaryFixes));
 489.270 -            }
 489.271 -
 489.272 -            if (result.isEmpty()) {
 489.273 -                result.add(org.netbeans.spi.editor.hints.ErrorDescriptionFactory.attachSubfixes(new TopLevelConfigureFix(hm), auxiliaryFixes));
 489.274 -            }
 489.275 -
 489.276 -            return result;
 489.277 -        }
 489.278 -
 489.279 -        return Arrays.asList(provided);
 489.280 -    }
 489.281 -
 489.282 -    private static class DisableConfigure implements Fix, SyntheticFix {
 489.283 -        private final @NonNull HintMetadata metadata;
 489.284 -        private final boolean disable;
 489.285 -        private final HintsSettings hintsSettings;
 489.286 -
 489.287 -        DisableConfigure(@NonNull HintMetadata metadata, boolean disable, HintsSettings hintsSettings) {
 489.288 -            this.metadata = metadata;
 489.289 -            this.disable = disable;
 489.290 -            this.hintsSettings = hintsSettings;
 489.291 -        }
 489.292 -
 489.293 -        @Override
 489.294 -        public String getText() {
 489.295 -            String displayName = metadata.displayName;
 489.296 -            String key;
 489.297 -            switch (metadata.kind) {
 489.298 -                case INSPECTION:
 489.299 -                    key = disable ? "FIX_DisableHint" : "FIX_ConfigureHint";
 489.300 -                    break;
 489.301 -                case ACTION:
 489.302 -                    key = disable ? "FIX_DisableSuggestion" : "FIX_ConfigureSuggestion";
 489.303 -                    break;
 489.304 -                default:
 489.305 -                    throw new IllegalStateException();
 489.306 -            }
 489.307 -
 489.308 -            return NbBundle.getMessage(ErrorDescriptionFactory.class, key, displayName);
 489.309 -        }
 489.310 -
 489.311 -        @Override
 489.312 -        public ChangeInfo implement() throws Exception {
 489.313 -            if (disable) {
 489.314 -                hintsSettings.setEnabled(metadata, false);
 489.315 -                //XXX: re-run hints task
 489.316 -            } else {
 489.317 -                OptionsDisplayer.getDefault().open("Editor/Hints/text/x-java/" + metadata.id);
 489.318 -            }
 489.319 -
 489.320 -            return null;
 489.321 -        }
 489.322 -
 489.323 -        @Override
 489.324 -        public boolean equals(Object obj) {
 489.325 -            if (obj == null) {
 489.326 -                return false;
 489.327 -            }
 489.328 -            if (this.getClass() != obj.getClass()) {
 489.329 -                return false;
 489.330 -            }
 489.331 -            final DisableConfigure other = (DisableConfigure) obj;
 489.332 -            if (this.metadata != other.metadata && (this.metadata == null || !this.metadata.equals(other.metadata))) {
 489.333 -                return false;
 489.334 -            }
 489.335 -            if (this.disable != other.disable) {
 489.336 -                return false;
 489.337 -            }
 489.338 -            return true;
 489.339 -        }
 489.340 -
 489.341 -        @Override
 489.342 -        public int hashCode() {
 489.343 -            int hash = 7;
 489.344 -            hash = 43 * hash + (this.metadata != null ? this.metadata.hashCode() : 0);
 489.345 -            hash = 43 * hash + (this.disable ? 1 : 0);
 489.346 -            return hash;
 489.347 -        }
 489.348 -
 489.349 -
 489.350 -    }
 489.351 -
 489.352 -    private static final class TopLevelConfigureFix extends DisableConfigure implements EnhancedFix {
 489.353 -
 489.354 -        public TopLevelConfigureFix(@NonNull HintMetadata metadata) {
 489.355 -            super(metadata, false, null);
 489.356 -        }
 489.357 -
 489.358 -        @Override
 489.359 -        public CharSequence getSortText() {
 489.360 -            return "\uFFFFzz";
 489.361 -        }
 489.362 -        
 489.363 -    }
 489.364 -
 489.365 -    private static class InspectFix implements Fix, SyntheticFix {
 489.366 -        private final @NonNull HintMetadata metadata;
 489.367 -        private final boolean transform;
 489.368 -
 489.369 -        InspectFix(@NonNull HintMetadata metadata, boolean transform) {
 489.370 -            this.metadata = metadata;
 489.371 -            this.transform = transform;
 489.372 -        }
 489.373 -
 489.374 -        @Override
 489.375 -        @Messages({
 489.376 -            "DN_InspectAndTransform=Run Inspect&Transform on...",
 489.377 -            "DN_Inspect=Run Inspect on..."
 489.378 -        })
 489.379 -        public String getText() {
 489.380 -            return transform ? Bundle.DN_InspectAndTransform() : Bundle.DN_Inspect();
 489.381 -        }
 489.382 -
 489.383 -        @Override
 489.384 -        public ChangeInfo implement() throws Exception {
 489.385 -            SwingUtilities.invokeLater(new Runnable() {
 489.386 -                @Override
 489.387 -                public void run() {
 489.388 -                    if (transform) {
 489.389 -                        final InspectAndTransformOpener o = Lookup.getDefault().lookup(InspectAndTransformOpener.class);
 489.390 -
 489.391 -                        if (o != null) {
 489.392 -                            o.openIAT(metadata);
 489.393 -                        } else {
 489.394 -                            //warn
 489.395 -                        }
 489.396 -                    } else {
 489.397 -                        CodeAnalysis.open(WarningDescription.create("text/x-java:" + metadata.id, null, null, null));
 489.398 -                    }
 489.399 -                }
 489.400 -            });
 489.401 -            
 489.402 -            return null;
 489.403 -        }
 489.404 -
 489.405 -        @Override
 489.406 -        public boolean equals(Object obj) {
 489.407 -            if (obj == null) {
 489.408 -                return false;
 489.409 -            }
 489.410 -            if (this.getClass() != obj.getClass()) {
 489.411 -                return false;
 489.412 -            }
 489.413 -            final InspectFix other = (InspectFix) obj;
 489.414 -            if (this.metadata != other.metadata && (this.metadata == null || !this.metadata.equals(other.metadata))) {
 489.415 -                return false;
 489.416 -            }
 489.417 -            if (this.transform != other.transform) {
 489.418 -                return false;
 489.419 -            }
 489.420 -            return true;
 489.421 -        }
 489.422 -
 489.423 -        @Override
 489.424 -        public int hashCode() {
 489.425 -            int hash = 7;
 489.426 -            hash = 43 * hash + (this.metadata != null ? this.metadata.hashCode() : 0);
 489.427 -            hash = 43 * hash + (this.transform ? 1 : 0);
 489.428 -            return hash;
 489.429 -        }
 489.430 -
 489.431 -
 489.432 -    }
 489.433 -    
 489.434 -    /** Creates a fix, which when invoked adds @SuppresWarnings(keys) to
 489.435 -     * nearest declaration.
 489.436 -     * @param compilationInfo CompilationInfo to work on
 489.437 -     * @param treePath TreePath to a tree. The method will find nearest outer
 489.438 -     *        declaration. (type, method, field or local variable)
 489.439 -     * @param keys keys to be contained in the SuppresWarnings annotation. E.g.
 489.440 -     *        @SuppresWarnings( "key" ) or @SuppresWarnings( {"key1", "key2", ..., "keyN" } ).
 489.441 -     * @throws IllegalArgumentException if keys are null or empty or id no suitable element
 489.442 -     *         to put the annotation on is found (e.g. if TreePath to CompilationUnit is given")
 489.443 -     */
 489.444 -    static Fix createSuppressWarningsFix(CompilationInfo compilationInfo, TreePath treePath, String... keys ) {
 489.445 -        Parameters.notNull("compilationInfo", compilationInfo);
 489.446 -        Parameters.notNull("treePath", treePath);
 489.447 -        Parameters.notNull("keys", keys);
 489.448 -
 489.449 -        if (keys.length == 0) {
 489.450 -            throw new IllegalArgumentException("key must not be empty"); // NOI18N
 489.451 -        }
 489.452 -
 489.453 -        if (!isSuppressWarningsSupported(compilationInfo)) {
 489.454 -            return null;
 489.455 -        }
 489.456 -
 489.457 -        while (treePath.getLeaf().getKind() != Kind.COMPILATION_UNIT && !DECLARATION.contains(treePath.getLeaf().getKind())) {
 489.458 -            treePath = treePath.getParentPath();
 489.459 -        }
 489.460 -
 489.461 -        if (treePath.getLeaf().getKind() != Kind.COMPILATION_UNIT) {
 489.462 -            return new FixImpl(TreePathHandle.create(treePath, compilationInfo), compilationInfo.getFileObject(), keys);
 489.463 -        } else {
 489.464 -            return null;
 489.465 -        }
 489.466 -    }
 489.467 -
 489.468 -    /** Creates a fix, which when invoked adds @SuppresWarnings(keys) to
 489.469 -     * nearest declaration.
 489.470 -     * @param compilationInfo CompilationInfo to work on
 489.471 -     * @param treePath TreePath to a tree. The method will find nearest outer
 489.472 -     *        declaration. (type, method, field or local variable)
 489.473 -     * @param keys keys to be contained in the SuppresWarnings annotation. E.g.
 489.474 -     *        @SuppresWarnings( "key" ) or @SuppresWarnings( {"key1", "key2", ..., "keyN" } ).
 489.475 -     * @throws IllegalArgumentException if keys are null or empty or id no suitable element
 489.476 -     *         to put the annotation on is found (e.g. if TreePath to CompilationUnit is given")
 489.477 -     */
 489.478 -    static List<Fix> createSuppressWarnings(CompilationInfo compilationInfo, TreePath treePath, String... keys ) {
 489.479 -        Parameters.notNull("compilationInfo", compilationInfo);
 489.480 -        Parameters.notNull("treePath", treePath);
 489.481 -        Parameters.notNull("keys", keys);
 489.482 -
 489.483 -        if (keys.length == 0) {
 489.484 -            throw new IllegalArgumentException("key must not be empty"); // NOI18N
 489.485 -        }
 489.486 -
 489.487 -        Fix f = createSuppressWarningsFix(compilationInfo, treePath, keys);
 489.488 -
 489.489 -        if (f != null) {
 489.490 -            return Collections.<Fix>singletonList(f);
 489.491 -        } else {
 489.492 -            return Collections.emptyList();
 489.493 -        }
 489.494 -    }
 489.495 -
 489.496 -    private static boolean isSuppressWarningsSupported(CompilationInfo info) {
 489.497 -        //cannot suppress if there is no SuppressWarnings annotation in the platform:
 489.498 -        if (info.getElements().getTypeElement("java.lang.SuppressWarnings") == null)
 489.499 -            return false;
 489.500 -
 489.501 -        return info.getSourceVersion().compareTo(SourceVersion.RELEASE_5) >= 0;
 489.502 -    }
 489.503 -
 489.504 -    private static final Set<Kind> DECLARATION = EnumSet.of(Kind.ANNOTATION_TYPE, Kind.CLASS, Kind.ENUM, Kind.INTERFACE, Kind.METHOD, Kind.VARIABLE);
 489.505 -
 489.506 -    private static final class FixImpl implements Fix, SyntheticFix {
 489.507 -
 489.508 -        private String keys[];
 489.509 -        private TreePathHandle handle;
 489.510 -        private FileObject file;
 489.511 -
 489.512 -        public FixImpl(TreePathHandle handle, FileObject file, String... keys) {
 489.513 -            this.keys = keys;
 489.514 -            this.handle = handle;
 489.515 -            this.file = file;
 489.516 -        }
 489.517 -
 489.518 -        public String getText() {
 489.519 -            StringBuilder keyNames = new StringBuilder();
 489.520 -            for (int i = 0; i < keys.length; i++) {
 489.521 -                String string = keys[i];
 489.522 -                keyNames.append(string);
 489.523 -                if ( i < keys.length - 1) {
 489.524 -                    keyNames.append(", "); // NOI18N
 489.525 -                }
 489.526 -            }
 489.527 -
 489.528 -            return NbBundle.getMessage(ErrorDescriptionFactory.class, "LBL_FIX_Suppress_Waning",  keyNames.toString() );  // NOI18N
 489.529 -        }
 489.530 -
 489.531 -        public ChangeInfo implement() throws IOException {
 489.532 -            JavaSource js = JavaSource.forFileObject(file);
 489.533 -
 489.534 -            js.runModificationTask(new Task<WorkingCopy>() {
 489.535 -                public void run(WorkingCopy copy) throws IOException {
 489.536 -                    copy.toPhase(Phase.RESOLVED); //XXX: performance
 489.537 -                    TreePath path = handle.resolve(copy);
 489.538 -
 489.539 -                    while (path != null && path.getLeaf().getKind() != Kind.COMPILATION_UNIT && !DECLARATION.contains(path.getLeaf().getKind())) {
 489.540 -                        path = path.getParentPath();
 489.541 -                    }
 489.542 -
 489.543 -                    if (path.getLeaf().getKind() == Kind.COMPILATION_UNIT) {
 489.544 -                        return ;
 489.545 -                    }
 489.546 -
 489.547 -                    Tree top = path.getLeaf();
 489.548 -                    ModifiersTree modifiers = null;
 489.549 -
 489.550 -                    switch (top.getKind()) {
 489.551 -                        case ANNOTATION_TYPE:
 489.552 -                        case CLASS:
 489.553 -                        case ENUM:
 489.554 -                        case INTERFACE:
 489.555 -                            modifiers = ((ClassTree) top).getModifiers();
 489.556 -                            break;
 489.557 -                        case METHOD:
 489.558 -                            modifiers = ((MethodTree) top).getModifiers();
 489.559 -                            break;
 489.560 -                        case VARIABLE:
 489.561 -                            modifiers = ((VariableTree) top).getModifiers();
 489.562 -                            break;
 489.563 -                        default: assert false : "Unhandled Tree.Kind";  // NOI18N
 489.564 -                    }
 489.565 -
 489.566 -                    if (modifiers == null) {
 489.567 -                        return ;
 489.568 -                    }
 489.569 -
 489.570 -                    TypeElement el = copy.getElements().getTypeElement("java.lang.SuppressWarnings");  // NOI18N
 489.571 -
 489.572 -                    if (el == null) {
 489.573 -                        return ;
 489.574 -                    }
 489.575 -
 489.576 -                    LiteralTree[] keyLiterals = new LiteralTree[keys.length];
 489.577 -
 489.578 -                    for (int i = 0; i < keys.length; i++) {
 489.579 -                        keyLiterals[i] = copy.getTreeMaker().
 489.580 -                                Literal(keys[i]);
 489.581 -                    }
 489.582 -
 489.583 -                    ModifiersTree nueMods = GeneratorUtilities.get(copy).appendToAnnotationValue(modifiers, el, "value", keyLiterals);
 489.584 -
 489.585 -                    copy.rewrite(modifiers, nueMods);
 489.586 -                }
 489.587 -            }).commit();
 489.588 -
 489.589 -            return null;
 489.590 -        }
 489.591 -
 489.592 -        @Override
 489.593 -        public boolean equals(Object obj) {
 489.594 -            if (obj == null) {
 489.595 -                return false;
 489.596 -            }
 489.597 -            if (getClass() != obj.getClass()) {
 489.598 -                return false;
 489.599 -            }
 489.600 -            final FixImpl other = (FixImpl) obj;
 489.601 -            if (!Arrays.deepEquals(this.keys, other.keys)) {
 489.602 -                return false;
 489.603 -            }
 489.604 -            if (this.handle != other.handle && (this.handle == null || !this.handle.equals(other.handle))) {
 489.605 -                return false;
 489.606 -            }
 489.607 -            if (this.file != other.file && (this.file == null || !this.file.equals(other.file))) {
 489.608 -                return false;
 489.609 -            }
 489.610 -            return true;
 489.611 -        }
 489.612 -
 489.613 -        @Override
 489.614 -        public int hashCode() {
 489.615 -            int hash = 5;
 489.616 -            hash = 79 * hash + Arrays.deepHashCode(this.keys);
 489.617 -            hash = 79 * hash + (this.handle != null ? this.handle.hashCode() : 0);
 489.618 -            hash = 79 * hash + (this.file != null ? this.file.hashCode() : 0);
 489.619 -            return hash;
 489.620 -        }
 489.621 -    }
 489.622 -}
   490.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/Hint.java	Mon Dec 19 11:37:36 2016 +0100
   490.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   490.3 @@ -1,128 +0,0 @@
   490.4 -/*
   490.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   490.6 - *
   490.7 - * Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   490.8 - *
   490.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  490.10 - * Other names may be trademarks of their respective owners.
  490.11 - *
  490.12 - * The contents of this file are subject to the terms of either the GNU
  490.13 - * General Public License Version 2 only ("GPL") or the Common
  490.14 - * Development and Distribution License("CDDL") (collectively, the
  490.15 - * "License"). You may not use this file except in compliance with the
  490.16 - * License. You can obtain a copy of the License at
  490.17 - * http://www.netbeans.org/cddl-gplv2.html
  490.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  490.19 - * specific language governing permissions and limitations under the
  490.20 - * License.  When distributing the software, include this License Header
  490.21 - * Notice in each file and include the License file at
  490.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  490.23 - * particular file as subject to the "Classpath" exception as provided
  490.24 - * by Oracle in the GPL Version 2 section of the License file that
  490.25 - * accompanied this code. If applicable, add the following below the
  490.26 - * License Header, with the fields enclosed by brackets [] replaced by
  490.27 - * your own identifying information:
  490.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  490.29 - *
  490.30 - * If you wish your version of this file to be governed by only the CDDL
  490.31 - * or only the GPL Version 2, indicate your decision by adding
  490.32 - * "[Contributor] elects to include this software in this distribution
  490.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  490.34 - * single choice of license, a recipient has the option to distribute
  490.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  490.36 - * to extend the choice of license to its licensees as provided above.
  490.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  490.38 - * Version 2 license, then the option applies only if the new code is
  490.39 - * made subject to such option by the copyright holder.
  490.40 - *
  490.41 - * Contributor(s):
  490.42 - *
  490.43 - * Portions Copyrighted 2008-2010 Sun Microsystems, Inc.
  490.44 - */
  490.45 -
  490.46 -package org.netbeans.spi.java.hints;
  490.47 -
  490.48 -import java.lang.annotation.ElementType;
  490.49 -import java.lang.annotation.Retention;
  490.50 -import java.lang.annotation.RetentionPolicy;
  490.51 -import java.lang.annotation.Target;
  490.52 -import org.netbeans.spi.editor.hints.Severity;
  490.53 -
  490.54 -/** Description of a hint.
  490.55 - * When applied to a class, any enclosed method marked with a trigger
  490.56 - * will be considered to be part of this hint. When applied to a method, only this specific
  490.57 - * method will be considered to the part of the hint.
  490.58 - * Currently recognized triggers include {@link TriggerPattern} and {@link TriggerTreeKind}.
  490.59 - * @author lahvac, Petr Hrebejk
  490.60 - */
  490.61 -@Target({ElementType.TYPE, ElementType.METHOD})
  490.62 -@Retention(RetentionPolicy.SOURCE)
  490.63 -public @interface Hint {
  490.64 -    /**Manually specify the hint's id. Use only reorganizing code to keep compatibility with settings
  490.65 -     * from previous version. Id will be generated automatically is not specified.
  490.66 -     */
  490.67 -    public String id() default "";
  490.68 -    /** The hint's display name.
  490.69 -     */
  490.70 -    public String displayName();
  490.71 -    /** The hint's long description.
  490.72 -     */
  490.73 -    public String description();
  490.74 -    /**Category where the hint belongs.
  490.75 -     */
  490.76 -    public String category();
  490.77 -    /**Should the hint be enabled by default?*/
  490.78 -    public boolean enabled() default true;
  490.79 -    /**Default severity of the hint. {@link Severity#HINT} will typically be shown
  490.80 -     * only on the line with the caret.*/
  490.81 -    public Severity severity() default Severity.VERIFIER;
  490.82 -    /**Suppress warnings keys that should automatically suppress the hint.*/
  490.83 -    public String[] suppressWarnings() default {};
  490.84 -    /**A customizer that allows to customize hint's preferences.
  490.85 -     */
  490.86 -    public Class<? extends CustomizerProvider> customizerProvider() default CustomizerProvider.class;
  490.87 -    /**Whether the hint should be considered an {@link Kind#INSPECTION inspection}, i.e. it detects a code smell,
  490.88 -     * or otherwise leads to improving the code, or a {@link Kind#SUGGESTION}, which is simply
  490.89 -     * an offer to do automatically do something for the user.
  490.90 -     */
  490.91 -    public Kind hintKind() default Kind.INSPECTION;
  490.92 -    /**Specify various options for the hint*/
  490.93 -    public Options[] options() default {};
  490.94 -
  490.95 -    /**Whether the hint should be considered a {@link Kind#HINT hint}, e.g. it
  490.96 -     * detects a code smell, or otherwise leads to improving the code, or a {@link Kind#ACTION},
  490.97 -     * which is simply an offer to do automatically do something for the user.
  490.98 -     */
  490.99 -   public enum Kind {
 490.100 -       /**The hint represents a code-smell detector, or alike. It marks code that
 490.101 -        * is not correct (in some sense).
 490.102 -        */
 490.103 -       INSPECTION,
 490.104 -       
 490.105 -       /**The hint represents an offer to the user to automatically alter the code.
 490.106 -        * The transformation is not intended to improve the code, only allow the
 490.107 -        * user to do some kind of code transformation quickly.
 490.108 -        *
 490.109 -        * The only meaningful severity for suggestions if {@link Severity#CURRENT_LINE_WARNING}.
 490.110 -        */
 490.111 -       ACTION;
 490.112 -    }
 490.113 -
 490.114 -   /**Various options to altering the behavior of the hint.
 490.115 -    */
 490.116 -    public enum Options {
 490.117 -        /**The hint does not produce any automatic transformations that could be run
 490.118 -         * inside the Inspect&Refactor dialog.
 490.119 -         */
 490.120 -        QUERY,
 490.121 -        /**The hint cannot be run inside the Inspect&Refactor dialog.
 490.122 -         */
 490.123 -        NO_BATCH,
 490.124 -        /**
 490.125 -         * The hint requires heavyweight processing so it should be run explicitly only by Inspect, Refactor (or similar) 
 490.126 -         * features
 490.127 -         */
 490.128 -        HEAVY;
 490.129 -    }
 490.130 -
 490.131 -}
   491.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/HintContext.java	Mon Dec 19 11:37:36 2016 +0100
   491.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   491.3 @@ -1,230 +0,0 @@
   491.4 -/*
   491.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   491.6 - *
   491.7 - * Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   491.8 - *
   491.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  491.10 - * Other names may be trademarks of their respective owners.
  491.11 - *
  491.12 - * The contents of this file are subject to the terms of either the GNU
  491.13 - * General Public License Version 2 only ("GPL") or the Common
  491.14 - * Development and Distribution License("CDDL") (collectively, the
  491.15 - * "License"). You may not use this file except in compliance with the
  491.16 - * License. You can obtain a copy of the License at
  491.17 - * http://www.netbeans.org/cddl-gplv2.html
  491.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  491.19 - * specific language governing permissions and limitations under the
  491.20 - * License.  When distributing the software, include this License Header
  491.21 - * Notice in each file and include the License file at
  491.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  491.23 - * particular file as subject to the "Classpath" exception as provided
  491.24 - * by Oracle in the GPL Version 2 section of the License file that
  491.25 - * accompanied this code. If applicable, add the following below the
  491.26 - * License Header, with the fields enclosed by brackets [] replaced by
  491.27 - * your own identifying information:
  491.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  491.29 - *
  491.30 - * If you wish your version of this file to be governed by only the CDDL
  491.31 - * or only the GPL Version 2, indicate your decision by adding
  491.32 - * "[Contributor] elects to include this software in this distribution
  491.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  491.34 - * single choice of license, a recipient has the option to distribute
  491.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  491.36 - * to extend the choice of license to its licensees as provided above.
  491.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  491.38 - * Version 2 license, then the option applies only if the new code is
  491.39 - * made subject to such option by the copyright holder.
  491.40 - *
  491.41 - * Contributor(s):
  491.42 - *
  491.43 - * Portions Copyrighted 2008-2010 Sun Microsystems, Inc.
  491.44 - */
  491.45 -
  491.46 -package org.netbeans.spi.java.hints;
  491.47 -
  491.48 -import com.sun.source.util.TreePath;
  491.49 -import java.util.ArrayList;
  491.50 -import java.util.Collection;
  491.51 -import java.util.Collections;
  491.52 -import java.util.HashMap;
  491.53 -import java.util.LinkedList;
  491.54 -import java.util.List;
  491.55 -import java.util.Map;
  491.56 -import java.util.concurrent.atomic.AtomicBoolean;
  491.57 -import java.util.prefs.Preferences;
  491.58 -import javax.lang.model.type.TypeMirror;
  491.59 -import org.netbeans.api.java.source.CompilationInfo;
  491.60 -import org.netbeans.api.java.source.TreePathHandle;
  491.61 -import org.netbeans.modules.java.hints.providers.spi.HintMetadata;
  491.62 -import org.netbeans.modules.java.hints.spiimpl.MessageImpl;
  491.63 -import org.netbeans.modules.java.hints.spiimpl.SPIAccessor;
  491.64 -import org.netbeans.modules.java.hints.spiimpl.hints.GlobalProcessingContext;
  491.65 -import org.netbeans.modules.java.hints.spiimpl.options.HintsSettings;
  491.66 -import org.netbeans.spi.editor.hints.Severity;
  491.67 -import org.netbeans.spi.java.hints.Decision.Factory;
  491.68 -import org.netbeans.spi.java.hints.Hint.Kind;
  491.69 -
  491.70 -/**
  491.71 - *
  491.72 - * @author Jan Lahoda
  491.73 - */
  491.74 -public class HintContext {
  491.75 -
  491.76 -    private final CompilationInfo info;
  491.77 -    private final HintsSettings settings;
  491.78 -    private final Preferences preferences;
  491.79 -    private final Severity severity;
  491.80 -    private final HintMetadata metadata;
  491.81 -    private final GlobalProcessingContext globalContext;
  491.82 -    private final TreePath path;
  491.83 -    private final Map<String, TreePath> variables;
  491.84 -    private final Map<String, Collection<? extends TreePath>> multiVariables;
  491.85 -    private final Map<String, String> variableNames;
  491.86 -    private final Collection<? super MessageImpl> messages;
  491.87 -    private final Map<String, TypeMirror> constraints;
  491.88 -    private final boolean bulkMode;
  491.89 -    private final AtomicBoolean cancel;
  491.90 -    private final int caret;
  491.91 -
  491.92 -    private HintContext(CompilationInfo info, HintsSettings settings, HintMetadata metadata, GlobalProcessingContext globalContext, TreePath path, Map<String, TreePath> variables, Map<String, Collection<? extends TreePath>> multiVariables, Map<String, String> variableNames, Map<String, TypeMirror> constraints, Collection<? super MessageImpl> problems, boolean bulkMode, AtomicBoolean cancel, int caret) {
  491.93 -        this.info = info;
  491.94 -        this.settings = settings;
  491.95 -        this.preferences = metadata != null ? settings.getHintPreferences(metadata) : null;
  491.96 -        this.severity = preferences != null ? settings.getSeverity(metadata) : Severity.ERROR;
  491.97 -        this.metadata = metadata;
  491.98 -        this.globalContext = globalContext;
  491.99 -        this.path = path;
 491.100 -
 491.101 -        variables = new HashMap<String, TreePath>(variables);
 491.102 -        variables.put("$_", path);
 491.103 -        
 491.104 -        this.variables = variables;
 491.105 -        this.multiVariables = multiVariables;
 491.106 -        this.variableNames = variableNames;
 491.107 -        this.messages = problems;
 491.108 -        this.constraints = constraints;
 491.109 -        this.bulkMode = bulkMode;
 491.110 -        this.cancel = cancel;
 491.111 -        this.caret = caret;
 491.112 -    }
 491.113 -
 491.114 -    public CompilationInfo getInfo() {
 491.115 -        return info;
 491.116 -    }
 491.117 -
 491.118 -    public Preferences getPreferences() {
 491.119 -        return preferences;
 491.120 -    }
 491.121 -
 491.122 -    public Severity getSeverity() {
 491.123 -        return severity;
 491.124 -    }
 491.125 -
 491.126 -    public TreePath getPath() {
 491.127 -        return path;
 491.128 -    }
 491.129 -
 491.130 -    public Map<String, TreePath> getVariables() {
 491.131 -        return variables;
 491.132 -    }
 491.133 -
 491.134 -    public Map<String, Collection<? extends TreePath>> getMultiVariables() {
 491.135 -        return multiVariables;
 491.136 -    }
 491.137 -
 491.138 -    public Map<String, String> getVariableNames() {
 491.139 -        return variableNames;
 491.140 -    }
 491.141 -
 491.142 -    HintMetadata getHintMetadata() {
 491.143 -        return metadata;
 491.144 -    }
 491.145 -
 491.146 -    //TODO: not sure it should be here:
 491.147 -    public Map<String, TypeMirror> getConstraints() {
 491.148 -        return constraints;
 491.149 -    }
 491.150 -
 491.151 -    /**
 491.152 -     * Will be used only for refactoring(s), will be ignored for hints.
 491.153 -     * 
 491.154 -     * @param kind
 491.155 -     * @param text
 491.156 -     */
 491.157 -    public void reportMessage(MessageKind kind, String text) {
 491.158 -        messages.add(new MessageImpl(kind, text));
 491.159 -    }
 491.160 -
 491.161 -    /**Returns {@code true} if the hint is being run in over many files, {@code false}
 491.162 -     * if only the file opened in the editor is being inspected.
 491.163 -     *
 491.164 -     * @return {@code true} if the hint is being run in over many files.
 491.165 -     */
 491.166 -    public boolean isBulkMode() {
 491.167 -        return bulkMode;
 491.168 -    }
 491.169 -
 491.170 -    /**Returns {@code true} if the computation has been canceled.
 491.171 -     *
 491.172 -     * @return {@code true} if the computation has been canceled.
 491.173 -     */
 491.174 -    public boolean isCanceled() {
 491.175 -        return cancel.get();
 491.176 -    }
 491.177 -
 491.178 -    /**For suggestions, returns the caret location for the editor
 491.179 -     * for which the suggestion is being computed. Returns -1 for hints.
 491.180 -     *
 491.181 -     * @return for suggestions, returns the caret location, -1 otherwise
 491.182 -     */
 491.183 -    public int getCaretLocation() {
 491.184 -        return metadata.kind == Kind.ACTION ? caret : -1;
 491.185 -    }
 491.186 -    
 491.187 -    public <V, R, D extends Decision<V, R>> D findDecision(TreePathHandle forPath, Factory<V, R, D> f) {
 491.188 -        List<Decision<?, ?>> decs = globalContext.decisions.get(forPath);
 491.189 -
 491.190 -        if (decs == null) {
 491.191 -            globalContext.decisions.put(forPath, decs = new ArrayList<Decision<?, ?>>());
 491.192 -        }
 491.193 -
 491.194 -        for (Decision<?, ?> d : decs) {
 491.195 -            if (d.getClass() == f.decisionClass) {
 491.196 -                return f.decisionClass.cast(d);
 491.197 -            }
 491.198 -        }
 491.199 -
 491.200 -        D res = f.create(forPath);
 491.201 -
 491.202 -        decs.add((Decision<?, ?>) res);
 491.203 -
 491.204 -        return res;
 491.205 -    }
 491.206 -
 491.207 -    public Decision<?, ?> decision;
 491.208 -
 491.209 -    public Decision<?, ?> getDecision() {
 491.210 -        return decision;
 491.211 -    }
 491.212 -
 491.213 -    public enum MessageKind {
 491.214 -        WARNING, ERROR;
 491.215 -    }
 491.216 -    
 491.217 -    static {
 491.218 -        SPIAccessor.setINSTANCE(new SPIAccessor() {
 491.219 -            @Override public HintContext createHintContext(CompilationInfo info, HintsSettings settings, HintMetadata metadata, GlobalProcessingContext globalContext, TreePath path, Map<String, TreePath> variables, Map<String, Collection<? extends TreePath>> multiVariables, Map<String, String> variableNames, Map<String, TypeMirror> constraints, Collection<? super MessageImpl> problems, boolean bulkMode, AtomicBoolean cancel, int caret) {
 491.220 -                return new HintContext(info, settings, metadata, globalContext, path, variables, multiVariables, variableNames, constraints, problems, bulkMode, cancel, caret);
 491.221 -            }
 491.222 -            @Override public HintContext createHintContext(CompilationInfo info, HintsSettings settings, HintMetadata metadata, GlobalProcessingContext globalContext, TreePath path, Map<String, TreePath> variables, Map<String, Collection<? extends TreePath>> multiVariables, Map<String, String> variableNames) {
 491.223 -                return new HintContext(info, settings, metadata, globalContext, path, variables, multiVariables, variableNames, Collections.<String, TypeMirror>emptyMap(), new LinkedList<MessageImpl>(), false, new AtomicBoolean(), -1);
 491.224 -            }
 491.225 -            @Override public HintMetadata getHintMetadata(HintContext ctx) {
 491.226 -                return ctx.getHintMetadata();
 491.227 -            }
 491.228 -            @Override public HintsSettings getHintSettings(HintContext ctx) {
 491.229 -                return ctx.settings;
 491.230 -            }
 491.231 -        });
 491.232 -    }
 491.233 -}
   492.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/HintSeverity.java	Mon Dec 19 11:37:36 2016 +0100
   492.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   492.3 @@ -1,69 +0,0 @@
   492.4 -/*
   492.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   492.6 - *
   492.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
   492.8 - *
   492.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  492.10 - * Other names may be trademarks of their respective owners.
  492.11 - *
  492.12 - * The contents of this file are subject to the terms of either the GNU
  492.13 - * General Public License Version 2 only ("GPL") or the Common
  492.14 - * Development and Distribution License("CDDL") (collectively, the
  492.15 - * "License"). You may not use this file except in compliance with the
  492.16 - * License. You can obtain a copy of the License at
  492.17 - * http://www.netbeans.org/cddl-gplv2.html
  492.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  492.19 - * specific language governing permissions and limitations under the
  492.20 - * License.  When distributing the software, include this License Header
  492.21 - * Notice in each file and include the License file at
  492.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  492.23 - * particular file as subject to the "Classpath" exception as provided
  492.24 - * by Oracle in the GPL Version 2 section of the License file that
  492.25 - * accompanied this code. If applicable, add the following below the
  492.26 - * License Header, with the fields enclosed by brackets [] replaced by
  492.27 - * your own identifying information:
  492.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  492.29 - *
  492.30 - * If you wish your version of this file to be governed by only the CDDL
  492.31 - * or only the GPL Version 2, indicate your decision by adding
  492.32 - * "[Contributor] elects to include this software in this distribution
  492.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  492.34 - * single choice of license, a recipient has the option to distribute
  492.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  492.36 - * to extend the choice of license to its licensees as provided above.
  492.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  492.38 - * Version 2 license, then the option applies only if the new code is
  492.39 - * made subject to such option by the copyright holder.
  492.40 - *
  492.41 - * Contributor(s):
  492.42 - *
  492.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
  492.44 - */
  492.45 -package org.netbeans.spi.java.hints;
  492.46 -
  492.47 -import org.netbeans.spi.editor.hints.Severity;
  492.48 -
  492.49 -/** Severity of hint
  492.50 - *  <li><code>ERROR</code>  - will show up as error
  492.51 - *  <li><code>WARNING</code>  - will show up as warning
  492.52 - *  <li><code>CURRENT_LINE_WARNING</code>  - will only show up when the caret is placed in the erroneous element
  492.53 - * @author Petr Hrebejk
  492.54 - */
  492.55 -public enum HintSeverity {
  492.56 -    ERROR,
  492.57 -    WARNING,
  492.58 -    CURRENT_LINE_WARNING;
  492.59 -
  492.60 -    public Severity toEditorSeverity() {
  492.61 -        switch ( this ) {
  492.62 -            case ERROR:
  492.63 -                return Severity.ERROR;
  492.64 -            case WARNING:
  492.65 -                return Severity.VERIFIER;
  492.66 -            case CURRENT_LINE_WARNING:
  492.67 -                return Severity.HINT;
  492.68 -            default:
  492.69 -                return null;
  492.70 -        }
  492.71 -    }
  492.72 -}
   493.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/IntegerOption.java	Mon Dec 19 11:37:36 2016 +0100
   493.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   493.3 @@ -1,99 +0,0 @@
   493.4 -/*
   493.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   493.6 - *
   493.7 - * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
   493.8 - *
   493.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  493.10 - * Other names may be trademarks of their respective owners.
  493.11 - *
  493.12 - * The contents of this file are subject to the terms of either the GNU
  493.13 - * General Public License Version 2 only ("GPL") or the Common
  493.14 - * Development and Distribution License("CDDL") (collectively, the
  493.15 - * "License"). You may not use this file except in compliance with the
  493.16 - * License. You can obtain a copy of the License at
  493.17 - * http://www.netbeans.org/cddl-gplv2.html
  493.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  493.19 - * specific language governing permissions and limitations under the
  493.20 - * License.  When distributing the software, include this License Header
  493.21 - * Notice in each file and include the License file at
  493.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  493.23 - * particular file as subject to the "Classpath" exception as provided
  493.24 - * by Oracle in the GPL Version 2 section of the License file that
  493.25 - * accompanied this code. If applicable, add the following below the
  493.26 - * License Header, with the fields enclosed by brackets [] replaced by
  493.27 - * your own identifying information:
  493.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  493.29 - *
  493.30 - * If you wish your version of this file to be governed by only the CDDL
  493.31 - * or only the GPL Version 2, indicate your decision by adding
  493.32 - * "[Contributor] elects to include this software in this distribution
  493.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  493.34 - * single choice of license, a recipient has the option to distribute
  493.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  493.36 - * to extend the choice of license to its licensees as provided above.
  493.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  493.38 - * Version 2 license, then the option applies only if the new code is
  493.39 - * made subject to such option by the copyright holder.
  493.40 - *
  493.41 - * Contributor(s):
  493.42 - *
  493.43 - * Portions Copyrighted 2013 Sun Microsystems, Inc.
  493.44 - */
  493.45 -package org.netbeans.spi.java.hints;
  493.46 -
  493.47 -import java.lang.annotation.Documented;
  493.48 -import java.lang.annotation.ElementType;
  493.49 -import java.lang.annotation.Retention;
  493.50 -import java.lang.annotation.RetentionPolicy;
  493.51 -import java.lang.annotation.Target;
  493.52 -
  493.53 -/**
  493.54 - *  Declares an int-value option that affects hint processing.
  493.55 - *  If the Hint mixes integer and boolean options, the integer options
  493.56 - *  come first, boolean second in the UI.
  493.57 - * 
  493.58 - *  @author sdedic
  493.59 - */
  493.60 -@Retention(RetentionPolicy.SOURCE)
  493.61 -@Target(ElementType.FIELD)
  493.62 -@Documented
  493.63 -public @interface IntegerOption {
  493.64 -    /**
  493.65 -     * @return Display name of the option
  493.66 -     */
  493.67 -    public String displayName();
  493.68 -    
  493.69 -    /**
  493.70 -     * @return tooltip for mouse hover over the option
  493.71 -     */
  493.72 -    public String tooltip() default "";
  493.73 -    
  493.74 -    /**
  493.75 -     * @return default value for the option
  493.76 -     */
  493.77 -    public int defaultValue() default 0;
  493.78 -    
  493.79 -    /**
  493.80 -     * Minimum value for the option. If Integer.MIN_VALUE (the default),
  493.81 -     * no minimum will be enforced.
  493.82 -     * 
  493.83 -     * @return minimum value.
  493.84 -     */
  493.85 -    public int minValue() default 0;
  493.86 -    
  493.87 -    /**
  493.88 -     * Maximum value for the option. If Integer.MAX_VALUE (the default),
  493.89 -     * no maximum will be enforced. Please do choose a reasonable maximum value,
  493.90 -     * as the UI may size the input box to accommodate all digits of the maximum
  493.91 -     * permitted value, and the input box may seem unreasonably large.
  493.92 -     * 
  493.93 -     * @return maximum value
  493.94 -     */
  493.95 -    public int maxValue() default Integer.MAX_VALUE;
  493.96 -    
  493.97 -    /**
  493.98 -     * If non-zero, a spinner will be created with the specified step. If zero (the default),
  493.99 -     * a plain input will be presented. Negative values are not accepted at the moment and are reserved.
 493.100 -     */
 493.101 -    public int step() default 0;
 493.102 -}
   494.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/JavaFix.java	Mon Dec 19 11:37:36 2016 +0100
   494.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   494.3 @@ -1,309 +0,0 @@
   494.4 -/*
   494.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   494.6 - *
   494.7 - * Copyright 2008-2012 Oracle and/or its affiliates. All rights reserved.
   494.8 - *
   494.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  494.10 - * Other names may be trademarks of their respective owners.
  494.11 - *
  494.12 - * The contents of this file are subject to the terms of either the GNU
  494.13 - * General Public License Version 2 only ("GPL") or the Common
  494.14 - * Development and Distribution License("CDDL") (collectively, the
  494.15 - * "License"). You may not use this file except in compliance with the
  494.16 - * License. You can obtain a copy of the License at
  494.17 - * http://www.netbeans.org/cddl-gplv2.html
  494.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  494.19 - * specific language governing permissions and limitations under the
  494.20 - * License.  When distributing the software, include this License Header
  494.21 - * Notice in each file and include the License file at
  494.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  494.23 - * particular file as subject to the "Classpath" exception as provided
  494.24 - * by Oracle in the GPL Version 2 section of the License file that
  494.25 - * accompanied this code. If applicable, add the following below the
  494.26 - * License Header, with the fields enclosed by brackets [] replaced by
  494.27 - * your own identifying information:
  494.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  494.29 - *
  494.30 - * If you wish your version of this file to be governed by only the CDDL
  494.31 - * or only the GPL Version 2, indicate your decision by adding
  494.32 - * "[Contributor] elects to include this software in this distribution
  494.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  494.34 - * single choice of license, a recipient has the option to distribute
  494.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  494.36 - * to extend the choice of license to its licensees as provided above.
  494.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  494.38 - * Version 2 license, then the option applies only if the new code is
  494.39 - * made subject to such option by the copyright holder.
  494.40 - *
  494.41 - * Contributor(s):
  494.42 - *
  494.43 - * Portions Copyrighted 2008-2012 Sun Microsystems, Inc.
  494.44 - */
  494.45 -
  494.46 -package org.netbeans.spi.java.hints;
  494.47 -
  494.48 -import com.sun.source.util.TreePath;
  494.49 -import java.io.ByteArrayInputStream;
  494.50 -import java.io.ByteArrayOutputStream;
  494.51 -import java.io.IOException;
  494.52 -import java.io.InputStream;
  494.53 -import java.io.OutputStream;
  494.54 -import java.nio.ByteBuffer;
  494.55 -import java.util.Collection;
  494.56 -import java.util.Collections;
  494.57 -import java.util.HashMap;
  494.58 -import java.util.List;
  494.59 -import java.util.Map;
  494.60 -import java.util.logging.Level;
  494.61 -import java.util.logging.Logger;
  494.62 -import javax.lang.model.type.TypeMirror;
  494.63 -import javax.swing.text.BadLocationException;
  494.64 -import javax.swing.text.Document;
  494.65 -import org.netbeans.api.annotations.common.NonNull;
  494.66 -import org.netbeans.api.java.source.CompilationInfo;
  494.67 -import org.netbeans.api.java.source.TreePathHandle;
  494.68 -import org.netbeans.api.java.source.WorkingCopy;
  494.69 -import org.netbeans.api.queries.FileEncodingQuery;
  494.70 -import org.netbeans.modules.java.hints.spiimpl.JavaFixImpl;
  494.71 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchUtilities;
  494.72 -import org.netbeans.modules.refactoring.spi.RefactoringElementImplementation;
  494.73 -import org.netbeans.spi.editor.hints.ChangeInfo;
  494.74 -import org.netbeans.spi.editor.hints.Fix;
  494.75 -import org.openide.filesystems.FileObject;
  494.76 -import org.openide.util.Exceptions;
  494.77 -import org.openide.util.Parameters;
  494.78 -
  494.79 -/**A base class for fixes that modify Java source code. Using this class
  494.80 - * as a base class makes creating the fix somewhat simpler, but also supports
  494.81 - * running the hint in the Inspect&Transform dialog. The fix can be converted
  494.82 - * to {@link Fix} by means of the {@link #toEditorFix() } method.
  494.83 - *
  494.84 - * @see JavaFixUtilities for various predefined fixes.
  494.85 - * @author Jan Lahoda
  494.86 - */
  494.87 -public abstract class JavaFix {
  494.88 -
  494.89 -    private final TreePathHandle handle;
  494.90 -    private final Map<String, String> options;
  494.91 -
  494.92 -    /**Create JavaFix with the given base {@link TreePath}. The base {@link TreePath}
  494.93 -     * will be passed back to the real implementation of the fix.
  494.94 -     *
  494.95 -     * @param info a {@link CompilationInfo} from which the given {@link TreePath} originates
  494.96 -     * @param tp a {@link TreePath} that will be passed back to the
  494.97 -     *           {@link #performRewrite(org.netbeans.spi.java.hints.JavaFix.TransformationContext) } method
  494.98 -     */
  494.99 -    protected JavaFix(@NonNull CompilationInfo info, @NonNull TreePath tp) {
 494.100 -        this(info, tp, Collections.<String, String>emptyMap());
 494.101 -    }
 494.102 -
 494.103 -    JavaFix(CompilationInfo info, TreePath tp, Map<String, String> options) {
 494.104 -        this.handle = TreePathHandle.create(tp, info);
 494.105 -        this.options = Collections.unmodifiableMap(new HashMap<String, String>(options));
 494.106 -    }
 494.107 -
 494.108 -    /**Create JavaFix with the given base {@link TreePathHandle}. The base {@link TreePathHandle}
 494.109 -     * will be resolved and passed back to the real implementation of the fix.
 494.110 -     *
 494.111 -     * @param handle a {@link TreePathHandle} that will be resolved and passed back to the
 494.112 -     *              {@link #performRewrite(org.netbeans.spi.java.hints.JavaFix.TransformationContext) } method
 494.113 -     */
 494.114 -    protected JavaFix(@NonNull TreePathHandle handle) {
 494.115 -        this(handle, Collections.<String, String>emptyMap());
 494.116 -    }
 494.117 -
 494.118 -    JavaFix(TreePathHandle handle, Map<String, String> options) {
 494.119 -        this.handle = handle;
 494.120 -        this.options = Collections.unmodifiableMap(new HashMap<String, String>(options));
 494.121 -    }
 494.122 -
 494.123 -    /**The display text of the fix.
 494.124 -     *
 494.125 -     * @return the display text of the fix.
 494.126 -     */
 494.127 -    protected abstract @NonNull String getText();
 494.128 -
 494.129 -    /**Do the transformations needed to implement the hint's function.
 494.130 -     *
 494.131 -     * @param ctx a context over which the fix should operate
 494.132 -     * @throws Exception if something goes wrong while performing the transformation
 494.133 -     *                   - will be logged by the infrastructure
 494.134 -     */
 494.135 -    protected abstract void performRewrite(@NonNull TransformationContext ctx) throws Exception;
 494.136 -
 494.137 -    /**Convert this {@link JavaFix} into the Editor Hints {@link Fix}.
 494.138 -     *
 494.139 -     * @return a {@link Fix}, that when invoked, will invoke {@link #performRewrite(org.netbeans.spi.java.hints.JavaFix.TransformationContext) }
 494.140 -     * method on this {@link JavaFix}.
 494.141 -     */
 494.142 -    public final Fix toEditorFix() {
 494.143 -        return new JavaFixImpl(this);
 494.144 -    }
 494.145 -
 494.146 -    static {
 494.147 -        JavaFixImpl.Accessor.INSTANCE = new JavaFixImpl.Accessor() {
 494.148 -            @Override
 494.149 -            public String getText(JavaFix jf) {
 494.150 -                return jf.getText();
 494.151 -            }
 494.152 -            @Override
 494.153 -            public ChangeInfo process(JavaFix jf, WorkingCopy wc, boolean canShowUI, Map<FileObject, byte[]> resourceContent, Collection<? super RefactoringElementImplementation> fileChanges) throws Exception {
 494.154 -                TreePath tp = jf.handle.resolve(wc);
 494.155 -
 494.156 -                if (tp == null) {
 494.157 -                    Logger.getLogger(JavaFix.class.getName()).log(Level.SEVERE, "Cannot resolve handle={0}", jf.handle);
 494.158 -                    return null;
 494.159 -                }
 494.160 -
 494.161 -                jf.performRewrite(new TransformationContext(wc, tp, canShowUI, resourceContent, fileChanges));
 494.162 -
 494.163 -                return null;
 494.164 -            }
 494.165 -            @Override
 494.166 -            public FileObject getFile(JavaFix jf) {
 494.167 -                return jf.handle.getFileObject();
 494.168 -            }
 494.169 -            @Override
 494.170 -            public Map<String, String> getOptions(JavaFix jf) {
 494.171 -                return jf.options;
 494.172 -            }
 494.173 -
 494.174 -            @Override
 494.175 -            public Fix rewriteFix(CompilationInfo info, String displayName, TreePath what, String to, Map<String, TreePath> parameters, Map<String, Collection<? extends TreePath>> parametersMulti, Map<String, String> parameterNames, Map<String, TypeMirror> constraints, Map<String, String> options, String... imports) {
 494.176 -                return JavaFixUtilities.rewriteFix(info, displayName, what, to, parameters, parametersMulti, parameterNames, constraints, options, imports);
 494.177 -            }
 494.178 -
 494.179 -            @Override
 494.180 -            public Fix createSuppressWarningsFix(CompilationInfo compilationInfo, TreePath treePath, String... keys) {
 494.181 -                return ErrorDescriptionFactory.createSuppressWarningsFix(compilationInfo, treePath, keys);
 494.182 -            }
 494.183 -
 494.184 -            @Override
 494.185 -            public List<Fix> createSuppressWarnings(CompilationInfo compilationInfo, TreePath treePath, String... keys) {
 494.186 -                return ErrorDescriptionFactory.createSuppressWarnings(compilationInfo, treePath, keys);
 494.187 -            }
 494.188 -
 494.189 -            @Override
 494.190 -            public List<Fix> resolveDefaultFixes(HintContext ctx, Fix... provided) {
 494.191 -                return ErrorDescriptionFactory.resolveDefaultFixes(ctx, provided);
 494.192 -            }
 494.193 -        };
 494.194 -    }
 494.195 -
 494.196 -    /**A context that contains a reference to a {@link WorkingCopy} through which
 494.197 -     * modifications of Java source code can be made.
 494.198 -     *
 494.199 -     */
 494.200 -    public static final class TransformationContext {
 494.201 -        private final WorkingCopy workingCopy;
 494.202 -        private final TreePath path;
 494.203 -        private final boolean canShowUI;
 494.204 -        private final Map<FileObject, byte[]> resourceContentChanges;
 494.205 -        private final Collection<? super RefactoringElementImplementation> fileChanges;
 494.206 -        TransformationContext(WorkingCopy workingCopy, TreePath path, boolean canShowUI, Map<FileObject, byte[]> resourceContentChanges, Collection<? super RefactoringElementImplementation> fileChanges) {
 494.207 -            this.workingCopy = workingCopy;
 494.208 -            this.path = path;
 494.209 -            this.canShowUI = canShowUI;
 494.210 -            this.resourceContentChanges = resourceContentChanges;
 494.211 -            this.fileChanges = fileChanges;
 494.212 -        }
 494.213 -
 494.214 -        boolean isCanShowUI() {
 494.215 -            return canShowUI;
 494.216 -        }
 494.217 -
 494.218 -        /**Returns the {@link TreePath} that was passed to a {@link JavaFix} constructor.
 494.219 -         *
 494.220 -         * @return the {@link TreePath} that was passed to a {@link JavaFix} constructor.
 494.221 -         */
 494.222 -        public @NonNull TreePath getPath() {
 494.223 -            return path;
 494.224 -        }
 494.225 -
 494.226 -        /**A {@link WorkingCopy} over which the transformation should operate.
 494.227 -         * @return {@link WorkingCopy} over which the transformation should operate.
 494.228 -         */
 494.229 -        public @NonNull WorkingCopy getWorkingCopy() {
 494.230 -            return workingCopy;
 494.231 -        }
 494.232 -
 494.233 -        /**Allows access to non-Java resources. The content of this InputStream will
 494.234 -         * include all changes done through {@link #getResourceOutput(org.openide.filesystems.FileObject) }
 494.235 -         * before calling this method.
 494.236 -         *
 494.237 -         * @param file whose content should be returned
 494.238 -         * @return the file's content
 494.239 -         * @throws IOException if something goes wrong while opening the file
 494.240 -         * @throws IllegalArgumentException if {@code file} parameter is null, or
 494.241 -         *                                  if it represents a Java file
 494.242 -         */
 494.243 -        public @NonNull InputStream getResourceContent(@NonNull FileObject file) throws IOException, IllegalArgumentException {
 494.244 -            Parameters.notNull("file", file);
 494.245 -            if ("text/x-java".equals(file.getMIMEType("text/x-java")))
 494.246 -                throw new IllegalArgumentException("Cannot access Java files");
 494.247 -
 494.248 -            byte[] newContent = resourceContentChanges != null ? resourceContentChanges.get(file) : null;
 494.249 -
 494.250 -            if (newContent == null) {
 494.251 -                final Document doc = BatchUtilities.getDocument(file);
 494.252 -
 494.253 -                if (doc != null) {
 494.254 -                    final String[] result = new String[1];
 494.255 -
 494.256 -                    doc.render(new Runnable() {
 494.257 -                        @Override public void run() {
 494.258 -                            try {
 494.259 -                                result[0] = doc.getText(0, doc.getLength());
 494.260 -                            } catch (BadLocationException ex) {
 494.261 -                                Exceptions.printStackTrace(ex);
 494.262 -                            }
 494.263 -                        }
 494.264 -                    });
 494.265 -
 494.266 -                    if (result[0] != null) {
 494.267 -                        ByteBuffer encoded = FileEncodingQuery.getEncoding(file).encode(result[0]);
 494.268 -                        byte[] encodedBytes = new byte[encoded.remaining()];
 494.269 -
 494.270 -                        encoded.get(encodedBytes);
 494.271 -
 494.272 -                        return new ByteArrayInputStream(encodedBytes);
 494.273 -                    }
 494.274 -                }
 494.275 -                
 494.276 -                return file.getInputStream();
 494.277 -            } else {
 494.278 -                return new ByteArrayInputStream(newContent);
 494.279 -            }
 494.280 -        }
 494.281 -
 494.282 -        /**Record a changed version of a file. The changes will be applied altogether with
 494.283 -         * changes to the Java file. In Inspect&Transform, changes done through this
 494.284 -         * method will be part of the preview.
 494.285 -         *
 494.286 -         * @param file whose content should be changed
 494.287 -         * @return an {@link java.io.OutputStream} into which the new content of the file should be written
 494.288 -         * @throws IOException if something goes wrong while opening the file
 494.289 -         * @throws IllegalArgumentException if {@code file} parameter is null, or
 494.290 -         *                                  if it represents a Java file
 494.291 -         */
 494.292 -        public @NonNull OutputStream getResourceOutput(@NonNull final FileObject file) throws IOException {
 494.293 -            Parameters.notNull("file", file);
 494.294 -            if ("text/x-java".equals(file.getMIMEType("text/x-java")))
 494.295 -                throw new IllegalArgumentException("Cannot access Java files");
 494.296 -            if (resourceContentChanges == null) return file.getOutputStream();
 494.297 -
 494.298 -            return new ByteArrayOutputStream() {
 494.299 -                @Override public void close() throws IOException {
 494.300 -                    super.close();
 494.301 -                    resourceContentChanges.put(file, toByteArray());
 494.302 -                }
 494.303 -            };
 494.304 -        }
 494.305 -
 494.306 -        Collection<? super RefactoringElementImplementation> getFileChanges() {
 494.307 -            return fileChanges;
 494.308 -        }
 494.309 -
 494.310 -    }
 494.311 -
 494.312 -}
   495.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/JavaFixUtilities.java	Mon Dec 19 11:37:36 2016 +0100
   495.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   495.3 @@ -1,1642 +0,0 @@
   495.4 -/*
   495.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   495.6 - *
   495.7 - * Copyright 2012 Oracle and/or its affiliates. All rights reserved.
   495.8 - *
   495.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  495.10 - * Other names may be trademarks of their respective owners.
  495.11 - *
  495.12 - * The contents of this file are subject to the terms of either the GNU
  495.13 - * General Public License Version 2 only ("GPL") or the Common
  495.14 - * Development and Distribution License("CDDL") (collectively, the
  495.15 - * "License"). You may not use this file except in compliance with the
  495.16 - * License. You can obtain a copy of the License at
  495.17 - * http://www.netbeans.org/cddl-gplv2.html
  495.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  495.19 - * specific language governing permissions and limitations under the
  495.20 - * License.  When distributing the software, include this License Header
  495.21 - * Notice in each file and include the License file at
  495.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  495.23 - * particular file as subject to the "Classpath" exception as provided
  495.24 - * by Oracle in the GPL Version 2 section of the License file that
  495.25 - * accompanied this code. If applicable, add the following below the
  495.26 - * License Header, with the fields enclosed by brackets [] replaced by
  495.27 - * your own identifying information:
  495.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  495.29 - *
  495.30 - * If you wish your version of this file to be governed by only the CDDL
  495.31 - * or only the GPL Version 2, indicate your decision by adding
  495.32 - * "[Contributor] elects to include this software in this distribution
  495.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  495.34 - * single choice of license, a recipient has the option to distribute
  495.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  495.36 - * to extend the choice of license to its licensees as provided above.
  495.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  495.38 - * Version 2 license, then the option applies only if the new code is
  495.39 - * made subject to such option by the copyright holder.
  495.40 - *
  495.41 - * Contributor(s):
  495.42 - *
  495.43 - * Portions Copyrighted 2012 Sun Microsystems, Inc.
  495.44 - */
  495.45 -package org.netbeans.spi.java.hints;
  495.46 -
  495.47 -import com.sun.javadoc.Doc;
  495.48 -import com.sun.javadoc.Tag;
  495.49 -import com.sun.source.tree.AnnotationTree;
  495.50 -import com.sun.source.tree.AssignmentTree;
  495.51 -import com.sun.source.tree.BinaryTree;
  495.52 -import com.sun.source.tree.BlockTree;
  495.53 -import com.sun.source.tree.CaseTree;
  495.54 -import com.sun.source.tree.CatchTree;
  495.55 -import com.sun.source.tree.ClassTree;
  495.56 -import com.sun.source.tree.CompilationUnitTree;
  495.57 -import com.sun.source.tree.CompoundAssignmentTree;
  495.58 -import com.sun.source.tree.ExpressionStatementTree;
  495.59 -import com.sun.source.tree.ExpressionTree;
  495.60 -import com.sun.source.tree.IdentifierTree;
  495.61 -import com.sun.source.tree.IfTree;
  495.62 -import com.sun.source.tree.LambdaExpressionTree;
  495.63 -import com.sun.source.tree.LiteralTree;
  495.64 -import com.sun.source.tree.MemberSelectTree;
  495.65 -import com.sun.source.tree.MethodInvocationTree;
  495.66 -import com.sun.source.tree.MethodTree;
  495.67 -import com.sun.source.tree.ModifiersTree;
  495.68 -import com.sun.source.tree.NewArrayTree;
  495.69 -import com.sun.source.tree.NewClassTree;
  495.70 -import com.sun.source.tree.ParameterizedTypeTree;
  495.71 -import com.sun.source.tree.ParenthesizedTree;
  495.72 -import com.sun.source.tree.Scope;
  495.73 -import com.sun.source.tree.StatementTree;
  495.74 -import com.sun.source.tree.SwitchTree;
  495.75 -import com.sun.source.tree.Tree;
  495.76 -import com.sun.source.tree.Tree.Kind;
  495.77 -import com.sun.source.tree.TryTree;
  495.78 -import com.sun.source.tree.TypeParameterTree;
  495.79 -import com.sun.source.tree.UnaryTree;
  495.80 -import com.sun.source.tree.UnionTypeTree;
  495.81 -import com.sun.source.tree.VariableTree;
  495.82 -import com.sun.source.util.SourcePositions;
  495.83 -import com.sun.source.util.TreePath;
  495.84 -import com.sun.source.util.TreePathScanner;
  495.85 -import com.sun.source.util.TreeScanner;
  495.86 -import java.io.IOException;
  495.87 -import java.util.ArrayList;
  495.88 -import java.util.Arrays;
  495.89 -import java.util.Collection;
  495.90 -import java.util.Collections;
  495.91 -import java.util.EnumMap;
  495.92 -import java.util.EnumSet;
  495.93 -import java.util.HashMap;
  495.94 -import java.util.IdentityHashMap;
  495.95 -import java.util.Iterator;
  495.96 -import java.util.LinkedList;
  495.97 -import java.util.List;
  495.98 -import java.util.Map;
  495.99 -import java.util.Map.Entry;
 495.100 -import java.util.Set;
 495.101 -import java.util.concurrent.Callable;
 495.102 -import java.util.logging.Level;
 495.103 -import java.util.logging.Logger;
 495.104 -import java.util.regex.Matcher;
 495.105 -import javax.lang.model.element.Element;
 495.106 -import javax.lang.model.element.ElementKind;
 495.107 -import javax.lang.model.element.Modifier;
 495.108 -import javax.lang.model.element.TypeElement;
 495.109 -import javax.lang.model.type.TypeKind;
 495.110 -import javax.lang.model.type.TypeMirror;
 495.111 -import org.netbeans.api.java.classpath.ClassPath;
 495.112 -import org.netbeans.api.java.classpath.ClassPath.PathConversionMode;
 495.113 -import org.netbeans.api.java.queries.SourceForBinaryQuery;
 495.114 -import org.netbeans.api.java.source.ClasspathInfo;
 495.115 -import org.netbeans.api.java.source.ClasspathInfo.PathKind;
 495.116 -import org.netbeans.api.java.source.CompilationInfo;
 495.117 -import org.netbeans.api.java.source.SourceUtils;
 495.118 -import org.netbeans.api.java.source.TreeMaker;
 495.119 -import org.netbeans.api.java.source.TreePathHandle;
 495.120 -import org.netbeans.api.java.source.TypeMirrorHandle;
 495.121 -import org.netbeans.api.java.source.WorkingCopy;
 495.122 -import org.netbeans.api.java.source.matching.Occurrence;
 495.123 -import org.netbeans.api.java.source.matching.Pattern;
 495.124 -import org.netbeans.api.project.FileOwnerQuery;
 495.125 -import org.netbeans.api.project.Project;
 495.126 -import org.netbeans.modules.java.hints.spiimpl.Hacks;
 495.127 -import org.netbeans.modules.java.hints.spiimpl.Utilities;
 495.128 -import org.netbeans.modules.java.hints.spiimpl.ipi.upgrade.ProjectDependencyUpgrader;
 495.129 -import org.netbeans.modules.refactoring.spi.SimpleRefactoringElementImplementation;
 495.130 -import org.netbeans.spi.editor.hints.Fix;
 495.131 -import org.netbeans.spi.java.classpath.support.ClassPathSupport;
 495.132 -import org.netbeans.spi.java.hints.JavaFix.TransformationContext;
 495.133 -import org.openide.filesystems.FileObject;
 495.134 -import org.openide.filesystems.FileUtil;
 495.135 -import org.openide.loaders.DataFolder;
 495.136 -import org.openide.loaders.DataObject;
 495.137 -import org.openide.loaders.DataObjectNotFoundException;
 495.138 -import org.openide.modules.SpecificationVersion;
 495.139 -import org.openide.text.PositionBounds;
 495.140 -import org.openide.util.Exceptions;
 495.141 -import org.openide.util.Lookup;
 495.142 -import org.openide.util.NbBundle.Messages;
 495.143 -import org.openide.util.NbCollections;
 495.144 -
 495.145 -/**Factory methods for various predefined {@link JavaFix} implementations.
 495.146 - *
 495.147 - * @author lahvac
 495.148 - */
 495.149 -public class JavaFixUtilities {
 495.150 -
 495.151 -    /**Prepare a fix that will replace the given tree node ({@code what}) with the
 495.152 -     * given code. Any variables in the {@code to} pattern will be replaced with their
 495.153 -     * values from {@link HintContext#getVariables() }, {@link HintContext#getMultiVariables() }
 495.154 -     * and {@link HintContext#getVariableNames() }.
 495.155 -     *
 495.156 -     * @param ctx basic context for which the fix should be created
 495.157 -     * @param displayName the display name of the fix
 495.158 -     * @param what the tree node that should be replaced
 495.159 -     * @param to the new code that should replaced the {@code what} tree node
 495.160 -     * @return an editor fix that performs the required transformation
 495.161 -     */
 495.162 -    public static Fix rewriteFix(HintContext ctx, String displayName, TreePath what, final String to) {
 495.163 -        return rewriteFix(ctx.getInfo(), displayName, what, to, ctx.getVariables(), ctx.getMultiVariables(), ctx.getVariableNames(), ctx.getConstraints(), Collections.<String, String>emptyMap());
 495.164 -    }
 495.165 -
 495.166 -    static Fix rewriteFix(CompilationInfo info, String displayName, TreePath what, final String to, Map<String, TreePath> parameters, Map<String, Collection<? extends TreePath>> parametersMulti, final Map<String, String> parameterNames, Map<String, TypeMirror> constraints, Map<String, String> options, String... imports) {
 495.167 -        final Map<String, TreePathHandle> params = new HashMap<String, TreePathHandle>();
 495.168 -        final Map<String, Object> extraParamsData = new HashMap<String, Object>();
 495.169 -
 495.170 -        for (Entry<String, TreePath> e : parameters.entrySet()) {
 495.171 -            params.put(e.getKey(), TreePathHandle.create(e.getValue(), info));
 495.172 -            if (e.getValue() instanceof Callable) {
 495.173 -                try {
 495.174 -                    extraParamsData.put(e.getKey(), ((Callable) e.getValue()).call());
 495.175 -                } catch (Exception ex) {
 495.176 -                    Exceptions.printStackTrace(ex);
 495.177 -                }
 495.178 -            }
 495.179 -        }
 495.180 -
 495.181 -        final Map<String, Collection<TreePathHandle>> paramsMulti = new HashMap<String, Collection<TreePathHandle>>();
 495.182 -
 495.183 -        for (Entry<String, Collection<? extends TreePath>> e : parametersMulti.entrySet()) {
 495.184 -            Collection<TreePathHandle> tph = new LinkedList<TreePathHandle>();
 495.185 -
 495.186 -            for (TreePath tp : e.getValue()) {
 495.187 -                tph.add(TreePathHandle.create(tp, info));
 495.188 -            }
 495.189 -
 495.190 -            paramsMulti.put(e.getKey(), tph);
 495.191 -        }
 495.192 -
 495.193 -        final Map<String, TypeMirrorHandle<?>> constraintsHandles = new HashMap<String, TypeMirrorHandle<?>>();
 495.194 -
 495.195 -        for (Entry<String, TypeMirror> c : constraints.entrySet()) {
 495.196 -            constraintsHandles.put(c.getKey(), TypeMirrorHandle.create(c.getValue()));
 495.197 -        }
 495.198 -
 495.199 -        if (displayName == null) {
 495.200 -            displayName = defaultFixDisplayName(info, parameters, to);
 495.201 -        }
 495.202 -
 495.203 -        return new JavaFixRealImpl(info, what, options, displayName, to, params, extraParamsData, paramsMulti, parameterNames, constraintsHandles, Arrays.asList(imports)).toEditorFix();
 495.204 -    }
 495.205 -
 495.206 -    /**Creates a fix that removes the given code corresponding to the given tree
 495.207 -     * node from the source code.
 495.208 -     * 
 495.209 -     * @param ctx basic context for which the fix should be created
 495.210 -     * @param displayName the display name of the fix
 495.211 -     * @param what the tree node that should be removed
 495.212 -     * @return an editor fix that removes the give tree from the source code
 495.213 -     */
 495.214 -    public static Fix removeFromParent(HintContext ctx, String displayName, TreePath what) {
 495.215 -        return new RemoveFromParent(displayName, ctx.getInfo(), what).toEditorFix();
 495.216 -    }
 495.217 -
 495.218 -    private static String defaultFixDisplayName(CompilationInfo info, Map<String, TreePath> variables, String replaceTarget) {
 495.219 -        Map<String, String> stringsForVariables = new HashMap<String, String>();
 495.220 -
 495.221 -        for (Entry<String, TreePath> e : variables.entrySet()) {
 495.222 -            Tree t = e.getValue().getLeaf();
 495.223 -            SourcePositions sp = info.getTrees().getSourcePositions();
 495.224 -            int startPos = (int) sp.getStartPosition(info.getCompilationUnit(), t);
 495.225 -            int endPos = (int) sp.getEndPosition(info.getCompilationUnit(), t);
 495.226 -
 495.227 -            if (startPos >= 0 && endPos >= 0) {
 495.228 -                stringsForVariables.put(e.getKey(), info.getText().substring(startPos, endPos));
 495.229 -            } else {
 495.230 -                stringsForVariables.put(e.getKey(), "");
 495.231 -            }
 495.232 -        }
 495.233 -
 495.234 -        if (!stringsForVariables.containsKey("$this")) {
 495.235 -            //XXX: is this correct?
 495.236 -            stringsForVariables.put("$this", "this");
 495.237 -        }
 495.238 -
 495.239 -        for (Entry<String, String> e : stringsForVariables.entrySet()) {
 495.240 -            String quotedVariable = java.util.regex.Pattern.quote(e.getKey());
 495.241 -            String quotedTarget = Matcher.quoteReplacement(e.getValue());
 495.242 -            replaceTarget = replaceTarget.replaceAll(quotedVariable, quotedTarget);
 495.243 -        }
 495.244 -
 495.245 -        return "Rewrite to " + replaceTarget;
 495.246 -    }
 495.247 -
 495.248 -    private static void checkDependency(CompilationInfo copy, Element e, boolean canShowUI) {
 495.249 -        SpecificationVersion sv = computeSpecVersion(copy, e);
 495.250 -
 495.251 -        while (sv == null && e.getKind() != ElementKind.PACKAGE) {
 495.252 -            e = e.getEnclosingElement();
 495.253 -            sv = computeSpecVersion(copy, e);
 495.254 -        }
 495.255 -
 495.256 -        if (sv == null) {
 495.257 -            return ;
 495.258 -        }
 495.259 -
 495.260 -        Project currentProject = FileOwnerQuery.getOwner(copy.getFileObject());
 495.261 -
 495.262 -        if (currentProject == null) {
 495.263 -            return ;
 495.264 -        }
 495.265 -
 495.266 -        FileObject file = getFile(copy, e);
 495.267 -
 495.268 -        if (file == null) {
 495.269 -            return ;
 495.270 -        }
 495.271 -
 495.272 -        FileObject root = findRootForFile(file, copy.getClasspathInfo());
 495.273 -
 495.274 -        if (root == null) {
 495.275 -            return ;
 495.276 -        }
 495.277 -
 495.278 -        Project referedProject = FileOwnerQuery.getOwner(file);
 495.279 -
 495.280 -        if (referedProject != null && currentProject.getProjectDirectory().equals(referedProject.getProjectDirectory())) {
 495.281 -            return ;
 495.282 -        }
 495.283 -
 495.284 -        for (ProjectDependencyUpgrader pdu : Lookup.getDefault().lookupAll(ProjectDependencyUpgrader.class)) {
 495.285 -            if (pdu.ensureDependency(currentProject, root, sv, canShowUI)) {
 495.286 -                return ;
 495.287 -            }
 495.288 -        }
 495.289 -    }
 495.290 -
 495.291 -    private static java.util.regex.Pattern SPEC_VERSION = java.util.regex.Pattern.compile("[0-9]+(\\.[0-9]+)+");
 495.292 -
 495.293 -    static SpecificationVersion computeSpecVersion(CompilationInfo info, Element el) {
 495.294 -        if (!Utilities.isJavadocSupported(info)) return null;
 495.295 -
 495.296 -        Doc javaDoc = info.getElementUtilities().javaDocFor(el);
 495.297 -
 495.298 -        if (javaDoc == null) return null;
 495.299 -
 495.300 -        for (Tag since : javaDoc.tags("@since")) {
 495.301 -            String text = since.text();
 495.302 -
 495.303 -            Matcher m = SPEC_VERSION.matcher(text);
 495.304 -
 495.305 -            if (!m.find()) {
 495.306 -                continue;
 495.307 -            }
 495.308 -
 495.309 -            return new SpecificationVersion(m.group()/*ver.toString()*/);
 495.310 -        }
 495.311 -
 495.312 -        return null;
 495.313 -    }
 495.314 -
 495.315 -    @SuppressWarnings("deprecation")
 495.316 -    private static FileObject getFile(CompilationInfo copy, Element e) {
 495.317 -        return SourceUtils.getFile(e, copy.getClasspathInfo());
 495.318 -    }
 495.319 -
 495.320 -    private static FileObject findRootForFile(final FileObject file, final ClasspathInfo cpInfo) {
 495.321 -        ClassPath cp = ClassPathSupport.createProxyClassPath(
 495.322 -            new ClassPath[] {
 495.323 -                cpInfo.getClassPath(ClasspathInfo.PathKind.SOURCE),
 495.324 -                cpInfo.getClassPath(ClasspathInfo.PathKind.BOOT),
 495.325 -                cpInfo.getClassPath(ClasspathInfo.PathKind.COMPILE),
 495.326 -            });
 495.327 -
 495.328 -        FileObject root = cp.findOwnerRoot(file);
 495.329 -
 495.330 -        if (root != null) {
 495.331 -            return root;
 495.332 -        }
 495.333 -
 495.334 -        for (ClassPath.Entry e : cp.entries()) {
 495.335 -            FileObject[] sourceRoots = SourceForBinaryQuery.findSourceRoots(e.getURL()).getRoots();
 495.336 -
 495.337 -            if (sourceRoots.length == 0) continue;
 495.338 -
 495.339 -            ClassPath sourcePath = ClassPathSupport.createClassPath(sourceRoots);
 495.340 -
 495.341 -            root = sourcePath.findOwnerRoot(file);
 495.342 -
 495.343 -            if (root != null) {
 495.344 -                return root;
 495.345 -            }
 495.346 -        }
 495.347 -        return null;
 495.348 -    }
 495.349 -
 495.350 -    private static boolean isStaticElement(Element el) {
 495.351 -        if (el == null) return false;
 495.352 -
 495.353 -        if (el.asType() == null || el.asType().getKind() == TypeKind.ERROR) {
 495.354 -            return false;
 495.355 -        }
 495.356 -
 495.357 -        if (el.getModifiers().contains(Modifier.STATIC)) {
 495.358 -            //XXX:
 495.359 -            if (!el.getKind().isClass() && !el.getKind().isInterface()) {
 495.360 -                return false;
 495.361 -            }
 495.362 -
 495.363 -            return true;
 495.364 -        }
 495.365 -
 495.366 -        if (el.getKind().isClass() || el.getKind().isInterface()) {
 495.367 -            return el.getEnclosingElement().getKind() == ElementKind.PACKAGE;
 495.368 -        }
 495.369 -
 495.370 -        return false;
 495.371 -    }
 495.372 -
 495.373 -    private static class JavaFixRealImpl extends JavaFix {
 495.374 -        private final String displayName;
 495.375 -        private final Map<String, TreePathHandle> params;
 495.376 -        private final Map<String, Object> extraParamsData;
 495.377 -        private final Map<String, Collection<TreePathHandle>> paramsMulti;
 495.378 -        private final Map<String, String> parameterNames;
 495.379 -        private final Map<String, TypeMirrorHandle<?>> constraintsHandles;
 495.380 -        private final Iterable<? extends String> imports;
 495.381 -        private final String to;
 495.382 -
 495.383 -        public JavaFixRealImpl(CompilationInfo info, TreePath what, Map<String, String> options, String displayName, String to, Map<String, TreePathHandle> params, Map<String, Object> extraParamsData, Map<String, Collection<TreePathHandle>> paramsMulti, final Map<String, String> parameterNames, Map<String, TypeMirrorHandle<?>> constraintsHandles, Iterable<? extends String> imports) {
 495.384 -            super(info, what, options);
 495.385 -
 495.386 -            this.displayName = displayName;
 495.387 -            this.to = to;
 495.388 -            this.params = params;
 495.389 -            this.extraParamsData = extraParamsData;
 495.390 -            this.paramsMulti = paramsMulti;
 495.391 -            this.parameterNames = parameterNames;
 495.392 -            this.constraintsHandles = constraintsHandles;
 495.393 -            this.imports = imports;
 495.394 -        }
 495.395 -
 495.396 -        @Override
 495.397 -        protected String getText() {
 495.398 -            return displayName;
 495.399 -        }
 495.400 -
 495.401 -        @Override
 495.402 -        protected void performRewrite(TransformationContext ctx) {
 495.403 -            final WorkingCopy wc = ctx.getWorkingCopy();
 495.404 -            TreePath tp = ctx.getPath();
 495.405 -            final Map<String, TreePath> parameters = new HashMap<String, TreePath>();
 495.406 -
 495.407 -            for (Entry<String, TreePathHandle> e : params.entrySet()) {
 495.408 -                TreePath p = e.getValue().resolve(wc);
 495.409 -
 495.410 -                if (p == null) {
 495.411 -                    Logger.getLogger(JavaFix.class.getName()).log(Level.SEVERE, "Cannot resolve handle={0}", e.getValue());
 495.412 -                }
 495.413 -
 495.414 -                parameters.put(e.getKey(), p);
 495.415 -            }
 495.416 -
 495.417 -            final Map<String, Collection<TreePath>> parametersMulti = new HashMap<String, Collection<TreePath>>();
 495.418 -
 495.419 -            for (Entry<String, Collection<TreePathHandle>> e : paramsMulti.entrySet()) {
 495.420 -                Collection<TreePath> tps = new LinkedList<TreePath>();
 495.421 -
 495.422 -                for (TreePathHandle tph : e.getValue()) {
 495.423 -                    TreePath p = tph.resolve(wc);
 495.424 -
 495.425 -                    if (p == null) {
 495.426 -                        Logger.getLogger(JavaFix.class.getName()).log(Level.SEVERE, "Cannot resolve handle={0}", e.getValue());
 495.427 -                    }
 495.428 -
 495.429 -                    tps.add(p);
 495.430 -                }
 495.431 -
 495.432 -                parametersMulti.put(e.getKey(), tps);
 495.433 -            }
 495.434 -
 495.435 -            Map<String, TypeMirror> constraints = new HashMap<String, TypeMirror>();
 495.436 -
 495.437 -            for (Entry<String, TypeMirrorHandle<?>> c : constraintsHandles.entrySet()) {
 495.438 -                constraints.put(c.getKey(), c.getValue().resolve(wc));
 495.439 -            }
 495.440 -
 495.441 -            Scope scope = Utilities.constructScope(wc, constraints, imports);
 495.442 -
 495.443 -            assert scope != null;
 495.444 -
 495.445 -            Tree parsed = Utilities.parseAndAttribute(wc, to, scope);
 495.446 -            
 495.447 -            if (parsed.getKind() == Kind.EXPRESSION_STATEMENT && ExpressionTree.class.isAssignableFrom(tp.getLeaf().getKind().asInterface())) {
 495.448 -                parsed = ((ExpressionStatementTree) parsed).getExpression();
 495.449 -            }
 495.450 -            
 495.451 -            Map<Tree, Tree> rewriteFromTo = new IdentityHashMap<Tree, Tree>();
 495.452 -            Tree original;
 495.453 -
 495.454 -            if (Utilities.isFakeBlock(parsed)) {
 495.455 -                TreePath parent = tp.getParentPath();
 495.456 -                List<? extends StatementTree> statements = ((BlockTree) parsed).getStatements();
 495.457 -                
 495.458 -                if (tp.getLeaf().getKind() == Kind.BLOCK) {
 495.459 -                    BlockTree real = (BlockTree) tp.getLeaf();
 495.460 -                    rewriteFromTo.put(original = real, wc.getTreeMaker().Block(statements, real.isStatic()));
 495.461 -                } else {
 495.462 -                    statements = statements.subList(1, statements.size() - 1);
 495.463 -
 495.464 -                    if (parent.getLeaf().getKind() == Kind.BLOCK) {
 495.465 -                        List<StatementTree> newStatements = new LinkedList<StatementTree>();
 495.466 -
 495.467 -                        for (StatementTree st : ((BlockTree) parent.getLeaf()).getStatements()) {
 495.468 -                            if (st == tp.getLeaf()) {
 495.469 -                                newStatements.addAll(statements);
 495.470 -                            } else {
 495.471 -                                newStatements.add(st);
 495.472 -                            }
 495.473 -                        }
 495.474 -
 495.475 -                        rewriteFromTo.put(original = parent.getLeaf(), wc.getTreeMaker().Block(newStatements, ((BlockTree) parent.getLeaf()).isStatic()));
 495.476 -                    } else {
 495.477 -                        rewriteFromTo.put(original = tp.getLeaf(), wc.getTreeMaker().Block(statements, false));
 495.478 -                    }
 495.479 -                }
 495.480 -            } else if (Utilities.isFakeClass(parsed)) {
 495.481 -                TreePath parent = tp.getParentPath();
 495.482 -                List<? extends Tree> members = ((ClassTree) parsed).getMembers();
 495.483 -
 495.484 -                members = members.subList(1, members.size());
 495.485 -
 495.486 -                assert parent.getLeaf().getKind() == Kind.CLASS;
 495.487 -
 495.488 -                List<Tree> newMembers = new LinkedList<Tree>();
 495.489 -
 495.490 -                ClassTree ct = (ClassTree) parent.getLeaf();
 495.491 -
 495.492 -                for (Tree t : ct.getMembers()) {
 495.493 -                    if (t == tp.getLeaf()) {
 495.494 -                        newMembers.addAll(members);
 495.495 -                    } else {
 495.496 -                        newMembers.add(t);
 495.497 -                    }
 495.498 -                }
 495.499 -
 495.500 -                rewriteFromTo.put(original = parent.getLeaf(), wc.getTreeMaker().Class(ct.getModifiers(), ct.getSimpleName(), ct.getTypeParameters(), ct.getExtendsClause(), ct.getImplementsClause(), newMembers));
 495.501 -            } else if (tp.getLeaf().getKind() == Kind.BLOCK && parametersMulti.containsKey("$$1$") && parsed.getKind() != Kind.BLOCK && StatementTree.class.isAssignableFrom(parsed.getKind().asInterface())) {
 495.502 -                List<StatementTree> newStatements = new LinkedList<StatementTree>();
 495.503 -
 495.504 -                newStatements.add(wc.getTreeMaker().ExpressionStatement(wc.getTreeMaker().Identifier("$$1$")));
 495.505 -                newStatements.add((StatementTree) parsed);
 495.506 -                newStatements.add(wc.getTreeMaker().ExpressionStatement(wc.getTreeMaker().Identifier("$$2$")));
 495.507 -
 495.508 -                parsed = wc.getTreeMaker().Block(newStatements, ((BlockTree) tp.getLeaf()).isStatic());
 495.509 -
 495.510 -                rewriteFromTo.put(original = tp.getLeaf(), parsed);
 495.511 -            } else {
 495.512 -                while (   tp.getParentPath().getLeaf().getKind() == Kind.PARENTHESIZED
 495.513 -                       && tp.getLeaf().getKind() != parsed.getKind()
 495.514 -                       && tp.getParentPath() != null
 495.515 -                       && tp.getParentPath().getParentPath() != null
 495.516 -                       && !requiresParenthesis(parsed, tp.getParentPath().getLeaf(), tp.getParentPath().getParentPath().getLeaf())
 495.517 -                       && requiresParenthesis(tp.getLeaf(), tp.getParentPath().getLeaf(), tp.getParentPath().getParentPath().getLeaf()))
 495.518 -                    tp = tp.getParentPath();
 495.519 -                rewriteFromTo.put(original = tp.getLeaf(), parsed);
 495.520 -            }
 495.521 -
 495.522 -            //prevent generating QualIdents inside import clauses - might be better to solve that inside ImportAnalysis2,
 495.523 -            //but that seems not to be straightforward:
 495.524 -            boolean inImport = parsed.getKind() == Kind.IMPORT;
 495.525 -            boolean inPackage = false;
 495.526 -            TreePath w = tp;
 495.527 -
 495.528 -            while (!inImport && w != null) {
 495.529 -                inImport |= w.getLeaf().getKind() == Kind.IMPORT;
 495.530 -                inPackage |= w.getParentPath() != null && w.getParentPath().getLeaf().getKind() == Kind.COMPILATION_UNIT && ((CompilationUnitTree) w.getParentPath().getLeaf()).getPackageName() == w.getLeaf();
 495.531 -                w = w.getParentPath();
 495.532 -            }
 495.533 -
 495.534 -            final Set<Tree> originalTrees = Collections.newSetFromMap(new IdentityHashMap<Tree, Boolean>());
 495.535 -            
 495.536 -            new TreeScanner<Void, Void>() {
 495.537 -                @Override public Void scan(Tree tree, Void p) {
 495.538 -                    originalTrees.add(tree);
 495.539 -                    return super.scan(tree, p);
 495.540 -                }
 495.541 -            }.scan(original, null);
 495.542 -            
 495.543 -            new ReplaceParameters(wc, ctx.isCanShowUI(), inImport, parameters, extraParamsData, parametersMulti, parameterNames, rewriteFromTo, originalTrees).scan(new TreePath(tp.getParentPath(), rewriteFromTo.get(original)), null);
 495.544 -
 495.545 -            if (inPackage) {
 495.546 -                String newPackage = wc.getTreeUtilities().translate(wc.getCompilationUnit().getPackageName(), new IdentityHashMap<Tree, Tree>(rewriteFromTo))./*XXX: not correct*/toString();
 495.547 -
 495.548 -                ClassPath source = wc.getClasspathInfo().getClassPath(PathKind.SOURCE);
 495.549 -                FileObject ownerRoot = source.findOwnerRoot(wc.getFileObject());
 495.550 -
 495.551 -                if (ownerRoot != null) {
 495.552 -                    ctx.getFileChanges().add(new MoveFile(wc.getFileObject(), ownerRoot, newPackage.replace('.', '/')));
 495.553 -                } else {
 495.554 -                    Logger.getLogger(JavaFix.class.getName()).log(Level.WARNING, "{0} not on its source path ({1})", new Object[] {FileUtil.getFileDisplayName(wc.getFileObject()), source.toString(PathConversionMode.PRINT)});
 495.555 -                }
 495.556 -            }
 495.557 -            
 495.558 -            for (Entry<Tree, Tree> e : rewriteFromTo.entrySet()) {
 495.559 -                wc.rewrite(e.getKey(), e.getValue());
 495.560 -            }
 495.561 -        }
 495.562 -    }
 495.563 -
 495.564 -    private static final Set<Kind> NUMBER_LITERAL_KINDS = EnumSet.of(Kind.FLOAT_LITERAL, Kind.DOUBLE_LITERAL, Kind.INT_LITERAL, Kind.LONG_LITERAL);
 495.565 -
 495.566 -    private static class ReplaceParameters extends TreePathScanner<Number, Void> {
 495.567 -
 495.568 -        private final CompilationInfo info;
 495.569 -        private final TreeMaker make;
 495.570 -        private final boolean canShowUI;
 495.571 -        private final boolean inImport;
 495.572 -        private final Map<String, TreePath> parameters;
 495.573 -        private final Map<String, Object> extraParamsData;
 495.574 -        private final Map<String, Collection<TreePath>> parametersMulti;
 495.575 -        private final Map<String, String> parameterNames;
 495.576 -        private final Map<Tree, Tree> rewriteFromTo;
 495.577 -        private final Set<Tree> originalTrees;
 495.578 -
 495.579 -        public ReplaceParameters(WorkingCopy wc, boolean canShowUI, boolean inImport, Map<String, TreePath> parameters, Map<String, Object> extraParamsData, Map<String, Collection<TreePath>> parametersMulti, Map<String, String> parameterNames, Map<Tree, Tree> rewriteFromTo, Set<Tree> originalTrees) {
 495.580 -            this.parameters = parameters;
 495.581 -            this.info = wc;
 495.582 -            this.make = wc.getTreeMaker();
 495.583 -            this.canShowUI = canShowUI;
 495.584 -            this.inImport = inImport;
 495.585 -            this.extraParamsData = extraParamsData;
 495.586 -            this.parametersMulti = parametersMulti;
 495.587 -            this.parameterNames = parameterNames;
 495.588 -            this.rewriteFromTo = rewriteFromTo;
 495.589 -            this.originalTrees = originalTrees;
 495.590 -        }
 495.591 -
 495.592 -        @Override
 495.593 -        public Number visitIdentifier(IdentifierTree node, Void p) {
 495.594 -            String name = node.getName().toString();
 495.595 -            Tree newNode = handleIdentifier(name, node);
 495.596 -            
 495.597 -            if (newNode != null) {
 495.598 -                rewrite(node, newNode);
 495.599 -                if (NUMBER_LITERAL_KINDS.contains(newNode.getKind())) {
 495.600 -                    return (Number) ((LiteralTree) newNode).getValue();
 495.601 -                }
 495.602 -            }
 495.603 -
 495.604 -            Element e = info.getTrees().getElement(getCurrentPath());
 495.605 -
 495.606 -            if (e != null && isStaticElement(e) && !inImport) {
 495.607 -                rewrite(node, make.QualIdent(e));
 495.608 -            }
 495.609 -
 495.610 -            return super.visitIdentifier(node, p);
 495.611 -        }
 495.612 -
 495.613 -        @Override
 495.614 -        public Number visitTypeParameter(TypeParameterTree node, Void p) {
 495.615 -            String name = node.getName().toString();
 495.616 -            Tree newNode = handleIdentifier(name, node);
 495.617 -            
 495.618 -            if (newNode != null) {
 495.619 -                rewrite(node, newNode);
 495.620 -                if (NUMBER_LITERAL_KINDS.contains(newNode.getKind())) {
 495.621 -                    return (Number) ((LiteralTree) newNode).getValue();
 495.622 -                }
 495.623 -            }
 495.624 -            
 495.625 -            return super.visitTypeParameter(node, p);
 495.626 -        }
 495.627 -        
 495.628 -        private Tree handleIdentifier(String name, Tree node) {
 495.629 -            TreePath tp = parameters.get(name);
 495.630 -
 495.631 -            if (tp != null) {
 495.632 -                if (tp.getLeaf() instanceof Hacks.RenameTree) {
 495.633 -                    Hacks.RenameTree rt = (Hacks.RenameTree) tp.getLeaf();
 495.634 -                    return make.setLabel(rt.originalTree, rt.newName);
 495.635 -                }
 495.636 -                if (!parameterNames.containsKey(name)) {
 495.637 -                    Tree target = tp.getLeaf();
 495.638 -                    if (NUMBER_LITERAL_KINDS.contains(target.getKind())) {
 495.639 -                        return target;
 495.640 -                    }
 495.641 -                    //TODO: might also remove parenthesis, but needs to ensure the diff will still be minimal
 495.642 -//                    while (target.getKind() == Kind.PARENTHESIZED
 495.643 -//                           && !requiresParenthesis(((ParenthesizedTree) target).getExpression(), getCurrentPath().getParentPath().getLeaf())) {
 495.644 -//                        target = ((ParenthesizedTree) target).getExpression();
 495.645 -//                    }
 495.646 -                    if (   getCurrentPath().getParentPath() != null
 495.647 -                        && getCurrentPath().getParentPath().getLeaf().getKind() == Kind.LOGICAL_COMPLEMENT
 495.648 -                        && (   tp.getParentPath() == null
 495.649 -                            || tp.getParentPath().getLeaf().getKind() != Kind.LOGICAL_COMPLEMENT)) {
 495.650 -                        Tree negated = negate((ExpressionTree) tp.getLeaf(), getCurrentPath().getParentPath().getParentPath().getLeaf(), true);
 495.651 -                        
 495.652 -                        if (negated != null) {
 495.653 -                            rewrite(getCurrentPath().getParentPath().getLeaf(), negated);
 495.654 -                        }
 495.655 -                    }
 495.656 -                    if (requiresParenthesis(target, node, getCurrentPath().getParentPath().getLeaf())) {
 495.657 -                        target = make.Parenthesized((ExpressionTree) target);
 495.658 -                    }
 495.659 -                    return target;
 495.660 -                }
 495.661 -            }
 495.662 -
 495.663 -            String variableName = parameterNames.get(name);
 495.664 -
 495.665 -            if (variableName != null) {
 495.666 -                return make.Identifier(variableName);
 495.667 -            }
 495.668 -            
 495.669 -            return null;
 495.670 -        }
 495.671 -
 495.672 -        @Override
 495.673 -        public Number visitMemberSelect(MemberSelectTree node, Void p) {
 495.674 -            Element e = info.getTrees().getElement(getCurrentPath());
 495.675 -
 495.676 -            if (e != null && (e.getKind() != ElementKind.CLASS || ((TypeElement) e).asType().getKind() != TypeKind.ERROR)) {
 495.677 -                //check correct dependency:
 495.678 -                checkDependency(info, e, canShowUI);
 495.679 -
 495.680 -                if (isStaticElement(e) && !inImport) {
 495.681 -                    rewrite(node, make.QualIdent(e));
 495.682 -
 495.683 -                    return null;
 495.684 -                }
 495.685 -            }
 495.686 -            
 495.687 -            MemberSelectTree nue = node;
 495.688 -            String selectedName = node.getIdentifier().toString();
 495.689 -
 495.690 -            if (selectedName.startsWith("$") && parameterNames.get(selectedName) != null) {
 495.691 -                nue = make.MemberSelect(node.getExpression(), parameterNames.get(selectedName));
 495.692 -            }
 495.693 -
 495.694 -            if (nue.getExpression().getKind() == Kind.IDENTIFIER) {
 495.695 -                String name = ((IdentifierTree) nue.getExpression()).getName().toString();
 495.696 -
 495.697 -                if (name.startsWith("$") && parameters.get(name) == null) {
 495.698 -                    //XXX: unbound variable, use identifier instead of member select - may cause problems?
 495.699 -                    rewrite(node, make.Identifier(nue.getIdentifier()));
 495.700 -                    return null;
 495.701 -                }
 495.702 -            }
 495.703 -
 495.704 -            if (nue != node) {
 495.705 -                rewrite(node, nue);
 495.706 -            }
 495.707 -            
 495.708 -            return super.visitMemberSelect(node, p);
 495.709 -        }
 495.710 -
 495.711 -        @Override
 495.712 -        public Number visitVariable(VariableTree node, Void p) {
 495.713 -            String name = node.getName().toString();
 495.714 -
 495.715 -            if (name.startsWith("$")) {
 495.716 -                String nueName = parameterNames.get(name);
 495.717 -
 495.718 -                if (nueName != null) {
 495.719 -                    name = nueName;
 495.720 -                }
 495.721 -            }
 495.722 -            
 495.723 -            VariableTree nue = make.Variable(node.getModifiers(), name, node.getType(), resolveOptionalValue(node.getInitializer()));
 495.724 -
 495.725 -            rewrite(node, nue);
 495.726 -
 495.727 -            return super.visitVariable(nue, p);
 495.728 -        }
 495.729 -
 495.730 -        @Override
 495.731 -        public Number visitIf(IfTree node, Void p) {
 495.732 -            IfTree nue = make.If(node.getCondition(), node.getThenStatement(), resolveOptionalValue(node.getElseStatement()));
 495.733 -            
 495.734 -            rewrite(node, nue);
 495.735 -            
 495.736 -            return super.visitIf(nue, p);
 495.737 -        }
 495.738 -
 495.739 -        @Override
 495.740 -        public Number visitMethod(MethodTree node, Void p) {
 495.741 -            String name = node.getName().toString();
 495.742 -            String newName = name;
 495.743 -
 495.744 -            if (name.startsWith("$")) {
 495.745 -                if (parameterNames.containsKey(name)) {
 495.746 -                    newName = parameterNames.get(name);
 495.747 -                }
 495.748 -            }
 495.749 -
 495.750 -            List<? extends TypeParameterTree> typeParams = resolveMultiParameters(node.getTypeParameters());
 495.751 -            List<? extends VariableTree> params = resolveMultiParameters(node.getParameters());
 495.752 -            List<? extends ExpressionTree> thrown = resolveMultiParameters(node.getThrows());
 495.753 -            
 495.754 -            MethodTree nue = make.Method(node.getModifiers(), newName, node.getReturnType(), typeParams, params, thrown, node.getBody(), (ExpressionTree) node.getDefaultValue());
 495.755 -            
 495.756 -            rewrite(node, nue);
 495.757 -            
 495.758 -            return super.visitMethod(nue, p);
 495.759 -        }
 495.760 -
 495.761 -        @Override
 495.762 -        public Number visitClass(ClassTree node, Void p) {
 495.763 -            String name = node.getSimpleName().toString();
 495.764 -            String newName = name;
 495.765 -
 495.766 -            if (name.startsWith("$")) {
 495.767 -                if (parameterNames.containsKey(name)) {
 495.768 -                    newName = parameterNames.get(name);
 495.769 -                }
 495.770 -            }
 495.771 -
 495.772 -            List<? extends TypeParameterTree> typeParams = resolveMultiParameters(node.getTypeParameters());
 495.773 -            List<? extends Tree> implementsClauses = resolveMultiParameters(node.getImplementsClause());
 495.774 -            List<? extends Tree> members = resolveMultiParameters(Utilities.filterHidden(getCurrentPath(), node.getMembers()));
 495.775 -            Tree extend = resolveOptionalValue(node.getExtendsClause());
 495.776 -            ClassTree nue = make.Class(node.getModifiers(), newName, typeParams, extend, implementsClauses, members);
 495.777 -            
 495.778 -            rewrite(node, nue);
 495.779 -            
 495.780 -            return super.visitClass(nue, p);
 495.781 -        }
 495.782 -
 495.783 -        @Override
 495.784 -        public Number visitExpressionStatement(ExpressionStatementTree node, Void p) {
 495.785 -            CharSequence name = Utilities.getWildcardTreeName(node);
 495.786 -
 495.787 -            if (name != null) {
 495.788 -                TreePath tp = parameters.get(name.toString());
 495.789 -
 495.790 -                if (tp != null) {
 495.791 -                    rewrite(node, tp.getLeaf());
 495.792 -                    return null;
 495.793 -                }
 495.794 -            }
 495.795 -
 495.796 -            return super.visitExpressionStatement(node, p);
 495.797 -        }
 495.798 -
 495.799 -        @Override
 495.800 -        public Number visitLiteral(LiteralTree node, Void p) {
 495.801 -            if (node.getValue() instanceof Number) {
 495.802 -                return (Number) node.getValue();
 495.803 -            }
 495.804 -
 495.805 -            return super.visitLiteral(node, p);
 495.806 -        }
 495.807 -
 495.808 -        @Override
 495.809 -        public Number visitBinary(BinaryTree node, Void p) {
 495.810 -            Number left  = scan(node.getLeftOperand(), p);
 495.811 -            Number right = scan(node.getRightOperand(), p);
 495.812 -
 495.813 -            if (left != null && right != null) {
 495.814 -                Number result = null;
 495.815 -                switch (node.getKind()) {
 495.816 -                    case MULTIPLY:
 495.817 -                            if (left instanceof Double || right instanceof Double) {
 495.818 -                                result = left.doubleValue() * right.doubleValue();
 495.819 -                            } else if (left instanceof Float || right instanceof Float) {
 495.820 -                                result = left.floatValue() * right.floatValue();
 495.821 -                            } else if (left instanceof Long || right instanceof Long) {
 495.822 -                                result = left.longValue() * right.longValue();
 495.823 -                            } else if (left instanceof Integer || right instanceof Integer) {
 495.824 -                                result = left.intValue() * right.intValue();
 495.825 -                            } else {
 495.826 -                                throw new IllegalStateException("left=" + left.getClass() + ", right=" + right.getClass());
 495.827 -                            }
 495.828 -                            break;
 495.829 -
 495.830 -                    case DIVIDE:
 495.831 -                            if (left instanceof Double || right instanceof Double) {
 495.832 -                                result = left.doubleValue() / right.doubleValue();
 495.833 -                            } else if (left instanceof Float || right instanceof Float) {
 495.834 -                                result = left.floatValue() / right.floatValue();
 495.835 -                            } else if (left instanceof Long || right instanceof Long) {
 495.836 -                                result = left.longValue() / right.longValue();
 495.837 -                            } else if (left instanceof Integer || right instanceof Integer) {
 495.838 -                                result = left.intValue() / right.intValue();
 495.839 -                            } else {
 495.840 -                                throw new IllegalStateException("left=" + left.getClass() + ", right=" + right.getClass());
 495.841 -                            }
 495.842 -                            break;
 495.843 -
 495.844 -                    case REMAINDER:
 495.845 -                            if (left instanceof Double || right instanceof Double) {
 495.846 -                                result = left.doubleValue() % right.doubleValue();
 495.847 -                            } else if (left instanceof Float || right instanceof Float) {
 495.848 -                                result = left.floatValue() % right.floatValue();
 495.849 -                            } else if (left instanceof Long || right instanceof Long) {
 495.850 -                                result = left.longValue() % right.longValue();
 495.851 -                            } else if (left instanceof Integer || right instanceof Integer) {
 495.852 -                                result = left.intValue() % right.intValue();
 495.853 -                            } else {
 495.854 -                                throw new IllegalStateException("left=" + left.getClass() + ", right=" + right.getClass());
 495.855 -                            }
 495.856 -                            break;
 495.857 -
 495.858 -                    case PLUS:
 495.859 -                            if (left instanceof Double || right instanceof Double) {
 495.860 -                                result = left.doubleValue() + right.doubleValue();
 495.861 -                            } else if (left instanceof Float || right instanceof Float) {
 495.862 -                                result = left.floatValue() + right.floatValue();
 495.863 -                            } else if (left instanceof Long || right instanceof Long) {
 495.864 -                                result = left.longValue() + right.longValue();
 495.865 -                            } else if (left instanceof Integer || right instanceof Integer) {
 495.866 -                                result = left.intValue() + right.intValue();
 495.867 -                            } else {
 495.868 -                                throw new IllegalStateException("left=" + left.getClass() + ", right=" + right.getClass());
 495.869 -                            }
 495.870 -                            break;
 495.871 -
 495.872 -                    case MINUS:
 495.873 -                            if (left instanceof Double || right instanceof Double) {
 495.874 -                                result = left.doubleValue() - right.doubleValue();
 495.875 -                            } else if (left instanceof Float || right instanceof Float) {
 495.876 -                                result = left.floatValue() - right.floatValue();
 495.877 -                            } else if (left instanceof Long || right instanceof Long) {
 495.878 -                                result = left.longValue() - right.longValue();
 495.879 -                            } else if (left instanceof Integer || right instanceof Integer) {
 495.880 -                                result = left.intValue() - right.intValue();
 495.881 -                            } else {
 495.882 -                                throw new IllegalStateException("left=" + left.getClass() + ", right=" + right.getClass());
 495.883 -                            }
 495.884 -                            break;
 495.885 -
 495.886 -                    case LEFT_SHIFT:
 495.887 -                            if (left instanceof Long || right instanceof Long) {
 495.888 -                                result = left.longValue() << right.longValue();
 495.889 -                            } else if (left instanceof Integer || right instanceof Integer) {
 495.890 -                                result = left.intValue() << right.intValue();
 495.891 -                            } else {
 495.892 -                                throw new IllegalStateException("left=" + left.getClass() + ", right=" + right.getClass());
 495.893 -                            }
 495.894 -                            break;
 495.895 -
 495.896 -                    case RIGHT_SHIFT:
 495.897 -                            if (left instanceof Long || right instanceof Long) {
 495.898 -                                result = left.longValue() >> right.longValue();
 495.899 -                            } else if (left instanceof Integer || right instanceof Integer) {
 495.900 -                                result = left.intValue() >> right.intValue();
 495.901 -                            } else {
 495.902 -                                throw new IllegalStateException("left=" + left.getClass() + ", right=" + right.getClass());
 495.903 -                            }
 495.904 -                            break;
 495.905 -
 495.906 -                    case UNSIGNED_RIGHT_SHIFT:
 495.907 -                            if (left instanceof Long || right instanceof Long) {
 495.908 -                                result = left.longValue() >>> right.longValue();
 495.909 -                            } else if (left instanceof Integer || right instanceof Integer) {
 495.910 -                                result = left.intValue() >>> right.intValue();
 495.911 -                            } else {
 495.912 -                                throw new IllegalStateException("left=" + left.getClass() + ", right=" + right.getClass());
 495.913 -                            }
 495.914 -                            break;
 495.915 -
 495.916 -                    case AND:
 495.917 -                            if (left instanceof Long || right instanceof Long) {
 495.918 -                                result = left.longValue() & right.longValue();
 495.919 -                            } else if (left instanceof Integer || right instanceof Integer) {
 495.920 -                                result = left.intValue() & right.intValue();
 495.921 -                            } else {
 495.922 -                                throw new IllegalStateException("left=" + left.getClass() + ", right=" + right.getClass());
 495.923 -                            }
 495.924 -                            break;
 495.925 -
 495.926 -                    case XOR:
 495.927 -                            if (left instanceof Long || right instanceof Long) {
 495.928 -                                result = left.longValue() ^ right.longValue();
 495.929 -                            } else if (left instanceof Integer || right instanceof Integer) {
 495.930 -                                result = left.intValue() ^ right.intValue();
 495.931 -                            } else {
 495.932 -                                throw new IllegalStateException("left=" + left.getClass() + ", right=" + right.getClass());
 495.933 -                            }
 495.934 -                            break;
 495.935 -
 495.936 -                    case OR:
 495.937 -                            if (left instanceof Long || right instanceof Long) {
 495.938 -                                result = left.longValue() | right.longValue();
 495.939 -                            } else if (left instanceof Integer || right instanceof Integer) {
 495.940 -                                result = left.intValue() | right.intValue();
 495.941 -                            } else {
 495.942 -                                throw new IllegalStateException("left=" + left.getClass() + ", right=" + right.getClass());
 495.943 -                            }
 495.944 -                            break;
 495.945 -                }
 495.946 -
 495.947 -                if (result != null) {
 495.948 -                    rewrite(node, make.Literal(result));
 495.949 -
 495.950 -                    return result;
 495.951 -                }
 495.952 -            }
 495.953 -
 495.954 -            return null;
 495.955 -        }
 495.956 -
 495.957 -        @Override
 495.958 -        public Number visitUnary(UnaryTree node, Void p) {
 495.959 -            Number op  = scan(node.getExpression(), p);
 495.960 -
 495.961 -            if (op != null) {
 495.962 -                Number result = null;
 495.963 -                switch (node.getKind()) {
 495.964 -                    case UNARY_MINUS:
 495.965 -                            if (op instanceof Double) {
 495.966 -                                result = -op.doubleValue();
 495.967 -                            } else if (op instanceof Float) {
 495.968 -                                result = -op.floatValue();
 495.969 -                            } else if (op instanceof Long) {
 495.970 -                                result = -op.longValue();
 495.971 -                            } else if (op instanceof Integer) {
 495.972 -                                result = -op.intValue();
 495.973 -                            } else {
 495.974 -                                throw new IllegalStateException("op=" + op.getClass());
 495.975 -                            }
 495.976 -                            break;
 495.977 -                    case UNARY_PLUS:
 495.978 -                        result = op;
 495.979 -                        break;
 495.980 -                }
 495.981 -
 495.982 -                if (result != null) {
 495.983 -                    rewrite(node, make.Literal(result));
 495.984 -
 495.985 -                    return result;
 495.986 -                }
 495.987 -            }
 495.988 -
 495.989 -            return super.visitUnary(node, p);
 495.990 -        }
 495.991 -
 495.992 -        @Override
 495.993 -        public Number visitBlock(BlockTree node, Void p) {
 495.994 -            List<? extends StatementTree> nueStatement = resolveMultiParameters(node.getStatements());
 495.995 -            BlockTree nue = make.Block(nueStatement, node.isStatic());
 495.996 -
 495.997 -            rewrite(node, nue);
 495.998 -
 495.999 -            return super.visitBlock(nue, p);
495.1000 -        }
495.1001 -
495.1002 -        @Override
495.1003 -        public Number visitCase(CaseTree node, Void p) {
495.1004 -            List<? extends StatementTree> statements = (List<? extends StatementTree>) resolveMultiParameters(node.getStatements());
495.1005 -            CaseTree nue = make.Case(node.getExpression(), statements);
495.1006 -
495.1007 -            rewrite(node, nue);
495.1008 -            return super.visitCase(node, p);
495.1009 -        }
495.1010 -
495.1011 -        @Override
495.1012 -        public Number visitMethodInvocation(MethodInvocationTree node, Void p) {
495.1013 -            List<? extends ExpressionTree> typeArgs = (List<? extends ExpressionTree>) resolveMultiParameters(node.getTypeArguments());
495.1014 -            List<? extends ExpressionTree> args = resolveMultiParameters(node.getArguments());
495.1015 -            MethodInvocationTree nue = make.MethodInvocation(typeArgs, node.getMethodSelect(), args);
495.1016 -
495.1017 -            rewrite(node, nue);
495.1018 -
495.1019 -            return super.visitMethodInvocation(nue, p);
495.1020 -        }
495.1021 -
495.1022 -        @Override
495.1023 -        public Number visitNewClass(NewClassTree node, Void p) {
495.1024 -            List<? extends ExpressionTree> typeArgs = (List<? extends ExpressionTree>) resolveMultiParameters(node.getTypeArguments());
495.1025 -            List<? extends ExpressionTree> args = resolveMultiParameters(node.getArguments());
495.1026 -            NewClassTree nue = make.NewClass(node.getEnclosingExpression(), typeArgs, node.getIdentifier(), args, node.getClassBody());
495.1027 -
495.1028 -            rewrite(node, nue);
495.1029 -            return super.visitNewClass(nue, p);
495.1030 -        }
495.1031 -
495.1032 -        @Override
495.1033 -        public Number visitParameterizedType(ParameterizedTypeTree node, Void p) {
495.1034 -            List<? extends ExpressionTree> typeArgs = (List<? extends ExpressionTree>) resolveMultiParameters(node.getTypeArguments());
495.1035 -            ParameterizedTypeTree nue = make.ParameterizedType(node.getType(), typeArgs);
495.1036 -
495.1037 -            rewrite(node, nue);
495.1038 -            return super.visitParameterizedType(node, p);
495.1039 -        }
495.1040 -
495.1041 -        @Override
495.1042 -        public Number visitSwitch(SwitchTree node, Void p) {
495.1043 -            List<? extends CaseTree> cases = (List<? extends CaseTree>) resolveMultiParameters(node.getCases());
495.1044 -            SwitchTree nue = make.Switch(node.getExpression(), cases);
495.1045 -
495.1046 -            rewrite(node, nue);
495.1047 -            return super.visitSwitch(node, p);
495.1048 -        }
495.1049 -
495.1050 -        @Override
495.1051 -        public Number visitTry(TryTree node, Void p) {
495.1052 -            List<? extends Tree> resources = (List<? extends Tree>) resolveMultiParameters(node.getResources());
495.1053 -            List<? extends CatchTree> catches = (List<? extends CatchTree>) resolveMultiParameters(node.getCatches());
495.1054 -            TryTree nue = make.Try(resources, node.getBlock(), catches, node.getFinallyBlock());
495.1055 -
495.1056 -            rewrite(node, nue);
495.1057 -            return super.visitTry(node, p);
495.1058 -        }
495.1059 -
495.1060 -        @Override
495.1061 -        public Number visitModifiers(ModifiersTree node, Void p) {
495.1062 -            List<AnnotationTree> annotations = new ArrayList<AnnotationTree>(node.getAnnotations());
495.1063 -            IdentifierTree ident = !annotations.isEmpty() && annotations.get(0).getAnnotationType().getKind() == Kind.IDENTIFIER ? (IdentifierTree) annotations.get(0).getAnnotationType() : null;
495.1064 -
495.1065 -            if (ident != null) {
495.1066 -                annotations.remove(0);
495.1067 -                
495.1068 -                String name = ident.getName().toString();
495.1069 -                TreePath orig = parameters.get(name);
495.1070 -                ModifiersTree nue;
495.1071 -                
495.1072 -                if (orig != null && orig.getLeaf().getKind() == Kind.MODIFIERS) {
495.1073 -                    ModifiersTree origMods = (ModifiersTree) orig.getLeaf();
495.1074 -                    Object actualContent = extraParamsData.get(name);
495.1075 -                    Set<Modifier> actualFlags = EnumSet.noneOf(Modifier.class);
495.1076 -                    boolean[] actualAnnotationsMask = new boolean[0];
495.1077 -                    
495.1078 -                    if (actualContent instanceof Object[] && ((Object[]) actualContent)[0] instanceof Set) {
495.1079 -                        actualFlags.addAll(NbCollections.checkedSetByFilter((Set) ((Object[]) actualContent)[0], Modifier.class, false));
495.1080 -                    }
495.1081 -                    
495.1082 -                    if (actualContent instanceof Object[] && ((Object[]) actualContent)[1] instanceof boolean[]) {
495.1083 -                        actualAnnotationsMask = (boolean[]) ((Object[]) actualContent)[1];
495.1084 -                    }
495.1085 -                    
495.1086 -                    nue = origMods;
495.1087 -                    
495.1088 -                    for (Modifier m : origMods.getFlags()) {
495.1089 -                        if (actualFlags.contains(m)) continue;
495.1090 -                        nue = make.removeModifiersModifier(nue, m);
495.1091 -                    }
495.1092 -                    
495.1093 -                    for (Modifier m : node.getFlags()) {
495.1094 -                        nue = make.addModifiersModifier(nue, m);
495.1095 -                    }
495.1096 -                    
495.1097 -                    int ai = 0;
495.1098 -                    
495.1099 -                    OUTER: for (AnnotationTree a : origMods.getAnnotations()) {
495.1100 -                        if (actualAnnotationsMask.length <= ai || actualAnnotationsMask[ai++]) continue;
495.1101 -                        for (Iterator<AnnotationTree> it = annotations.iterator(); it.hasNext();) {
495.1102 -                            AnnotationTree toCheck = it.next();
495.1103 -                            Collection<? extends Occurrence> match = org.netbeans.api.java.source.matching.Matcher.create(info).setTreeTopSearch().setSearchRoot(new TreePath(getCurrentPath(), a)).match(Pattern.createSimplePattern(new TreePath(getCurrentPath(), toCheck)));
495.1104 -                            
495.1105 -                            if (!match.isEmpty()) {
495.1106 -                                //should be kept:
495.1107 -                                it.remove();
495.1108 -                                break OUTER;
495.1109 -                            }
495.1110 -                        }
495.1111 -                        
495.1112 -                        nue = make.removeModifiersAnnotation(nue, a);
495.1113 -                    }
495.1114 -                    
495.1115 -                    for (AnnotationTree a : annotations) {
495.1116 -                        nue = make.addModifiersAnnotation(nue, a);
495.1117 -                        scan(a, p);
495.1118 -                    }
495.1119 -                } else {
495.1120 -                    nue = make.removeModifiersAnnotation(node, 0);
495.1121 -                }
495.1122 -                
495.1123 -                rewrite(node, nue);
495.1124 -                
495.1125 -                return null;
495.1126 -            }
495.1127 -            
495.1128 -            return super.visitModifiers(node, p);
495.1129 -        }
495.1130 -
495.1131 -        @Override
495.1132 -        public Number visitNewArray(NewArrayTree node, Void p) {
495.1133 -            List<? extends ExpressionTree> dimensions = (List<? extends ExpressionTree>) resolveMultiParameters(node.getDimensions());
495.1134 -            List<? extends ExpressionTree> initializers = (List<? extends ExpressionTree>) resolveMultiParameters(node.getInitializers());
495.1135 -            NewArrayTree nue = make.NewArray(node.getType(), dimensions, initializers);
495.1136 -
495.1137 -            rewrite(node, nue);
495.1138 -            return super.visitNewArray(node, p);
495.1139 -        }
495.1140 -
495.1141 -        @Override
495.1142 -        public Number visitLambdaExpression(LambdaExpressionTree node, Void p) {
495.1143 -            List<? extends VariableTree> args = resolveMultiParameters(node.getParameters());
495.1144 -            LambdaExpressionTree nue = make.LambdaExpression(args, node.getBody());
495.1145 -
495.1146 -            rewrite(node, nue);
495.1147 -
495.1148 -            return super.visitLambdaExpression(node, p);
495.1149 -        }
495.1150 -
495.1151 -        @Override
495.1152 -        public Number visitAnnotation(AnnotationTree node, Void p) {
495.1153 -            List<? extends ExpressionTree> args = resolveMultiParameters(node.getArguments());
495.1154 -            AnnotationTree nue = make.Annotation(node.getAnnotationType(), args);
495.1155 -
495.1156 -            rewrite(node, nue);
495.1157 -
495.1158 -            return super.visitAnnotation(node, p);
495.1159 -        }
495.1160 -
495.1161 -        private <T extends Tree> List<T> resolveMultiParameters(List<T> list) {
495.1162 -            if (list == null) return null;
495.1163 -            if (!Utilities.containsMultistatementTrees(list)) return list;
495.1164 -
495.1165 -            List<T> result = new LinkedList<T>();
495.1166 -
495.1167 -            for (T t : list) {
495.1168 -                if (Utilities.isMultistatementWildcardTree(t)) {
495.1169 -                    Collection<TreePath> embedded = parametersMulti.get(Utilities.getWildcardTreeName(t).toString());
495.1170 -
495.1171 -                    if (embedded != null) {
495.1172 -                        for (TreePath tp : embedded) {
495.1173 -                            result.add((T) tp.getLeaf());
495.1174 -                        }
495.1175 -                    }
495.1176 -                } else {
495.1177 -                    result.add(t);
495.1178 -                }
495.1179 -            }
495.1180 -
495.1181 -            return result;
495.1182 -        }
495.1183 -        
495.1184 -        private <T extends Tree> T resolveOptionalValue(T in) {
495.1185 -            if (in != null && Utilities.isMultistatementWildcardTree(in)) {
495.1186 -                TreePath out = parameters.get(Utilities.getWildcardTreeName(in).toString());
495.1187 -                if (out != null) return (T) out.getLeaf();
495.1188 -                return null;
495.1189 -            }
495.1190 -            
495.1191 -            return in;
495.1192 -        }
495.1193 -
495.1194 -        private ExpressionTree negate(ExpressionTree original, Tree parent, boolean nullOnPlainNeg) {
495.1195 -            ExpressionTree newTree;
495.1196 -            switch (original.getKind()) {
495.1197 -                case PARENTHESIZED:
495.1198 -                    ExpressionTree expr = ((ParenthesizedTree) original).getExpression();
495.1199 -                    return make.Parenthesized(negate(expr, original, nullOnPlainNeg));
495.1200 -                case LOGICAL_COMPLEMENT:
495.1201 -                    newTree = ((UnaryTree) original).getExpression();
495.1202 -                    while (newTree.getKind() == Kind.PARENTHESIZED && !JavaFixUtilities.requiresParenthesis(((ParenthesizedTree) newTree).getExpression(), original, parent)) {
495.1203 -                        newTree = ((ParenthesizedTree) newTree).getExpression();
495.1204 -                    }
495.1205 -                    break;
495.1206 -                case NOT_EQUAL_TO:
495.1207 -                    newTree = negateBinaryOperator(original, Kind.EQUAL_TO, false);
495.1208 -                    break;
495.1209 -                case EQUAL_TO:
495.1210 -                    newTree = negateBinaryOperator(original, Kind.NOT_EQUAL_TO, false);
495.1211 -                    break;
495.1212 -                case BOOLEAN_LITERAL:
495.1213 -                    newTree = make.Literal(!(Boolean) ((LiteralTree) original).getValue());
495.1214 -                    break;
495.1215 -                case CONDITIONAL_AND:
495.1216 -                    newTree = negateBinaryOperator(original, Kind.CONDITIONAL_OR, true);
495.1217 -                    break;
495.1218 -                case CONDITIONAL_OR:
495.1219 -                    newTree = negateBinaryOperator(original, Kind.CONDITIONAL_AND, true);
495.1220 -                    break;
495.1221 -                case LESS_THAN:
495.1222 -                    newTree = negateBinaryOperator(original, Kind.GREATER_THAN_EQUAL, false);
495.1223 -                    break;
495.1224 -                case LESS_THAN_EQUAL:
495.1225 -                    newTree = negateBinaryOperator(original, Kind.GREATER_THAN, false);
495.1226 -                    break;
495.1227 -                case GREATER_THAN:
495.1228 -                    newTree = negateBinaryOperator(original, Kind.LESS_THAN_EQUAL, false);
495.1229 -                    break;
495.1230 -                case GREATER_THAN_EQUAL:
495.1231 -                    newTree = negateBinaryOperator(original, Kind.LESS_THAN, false);
495.1232 -                    break;
495.1233 -                default:
495.1234 -                    if (nullOnPlainNeg)
495.1235 -                        return null;
495.1236 -                    newTree = make.Unary(Kind.LOGICAL_COMPLEMENT, original);
495.1237 -            }
495.1238 -         
495.1239 -            if (JavaFixUtilities.requiresParenthesis(newTree, original, parent)) {
495.1240 -                newTree = make.Parenthesized(newTree);
495.1241 -            }
495.1242 -            
495.1243 -            return newTree;
495.1244 -        }
495.1245 -        
495.1246 -        private ExpressionTree negateBinaryOperator(Tree original, Kind newKind, boolean negateOperands) {
495.1247 -            BinaryTree bt = (BinaryTree) original;
495.1248 -            BinaryTree nonNegated = make.Binary(newKind,
495.1249 -                                                bt.getLeftOperand(),
495.1250 -                                                bt.getRightOperand());
495.1251 -            if (negateOperands) {
495.1252 -                ExpressionTree lo = negate(bt.getLeftOperand(), nonNegated, false);
495.1253 -                ExpressionTree ro = negate(bt.getRightOperand(), nonNegated, false);
495.1254 -                return make.Binary(newKind,
495.1255 -                                   lo != null ? lo : bt.getLeftOperand(),
495.1256 -                                   ro != null ? ro : bt.getRightOperand());
495.1257 -            }
495.1258 -            return nonNegated;
495.1259 -        }
495.1260 -        
495.1261 -        private void rewrite(Tree from, Tree to) {
495.1262 -            if (originalTrees.contains(from)) return ;
495.1263 -            rewriteFromTo.put(from, to);
495.1264 -        }
495.1265 -    }
495.1266 -
495.1267 -    private static final Map<Kind, Integer> OPERATOR_PRIORITIES;
495.1268 -
495.1269 -    static {
495.1270 -        OPERATOR_PRIORITIES = new EnumMap<Kind, Integer>(Kind.class);
495.1271 -
495.1272 -        OPERATOR_PRIORITIES.put(Kind.IDENTIFIER, 0);
495.1273 -
495.1274 -        for (Kind k : Kind.values()) {
495.1275 -            if (k.asInterface() == LiteralTree.class) {
495.1276 -                OPERATOR_PRIORITIES.put(k, 0);
495.1277 -            }
495.1278 -        }
495.1279 -
495.1280 -        OPERATOR_PRIORITIES.put(Kind.ARRAY_ACCESS, 1);
495.1281 -        OPERATOR_PRIORITIES.put(Kind.METHOD_INVOCATION, 1);
495.1282 -        OPERATOR_PRIORITIES.put(Kind.MEMBER_SELECT, 1);
495.1283 -        OPERATOR_PRIORITIES.put(Kind.POSTFIX_DECREMENT, 1);
495.1284 -        OPERATOR_PRIORITIES.put(Kind.POSTFIX_INCREMENT, 1);
495.1285 -        OPERATOR_PRIORITIES.put(Kind.NEW_ARRAY, 1);
495.1286 -        OPERATOR_PRIORITIES.put(Kind.NEW_CLASS, 1);
495.1287 -
495.1288 -        OPERATOR_PRIORITIES.put(Kind.BITWISE_COMPLEMENT, 2);
495.1289 -        OPERATOR_PRIORITIES.put(Kind.LOGICAL_COMPLEMENT, 2);
495.1290 -        OPERATOR_PRIORITIES.put(Kind.PREFIX_DECREMENT, 2);
495.1291 -        OPERATOR_PRIORITIES.put(Kind.PREFIX_INCREMENT, 2);
495.1292 -        OPERATOR_PRIORITIES.put(Kind.UNARY_MINUS, 2);
495.1293 -        OPERATOR_PRIORITIES.put(Kind.UNARY_PLUS, 2);
495.1294 -
495.1295 -        OPERATOR_PRIORITIES.put(Kind.TYPE_CAST, 3);
495.1296 -
495.1297 -        OPERATOR_PRIORITIES.put(Kind.DIVIDE, 4);
495.1298 -        OPERATOR_PRIORITIES.put(Kind.MULTIPLY, 4);
495.1299 -        OPERATOR_PRIORITIES.put(Kind.REMAINDER, 4);
495.1300 -
495.1301 -        OPERATOR_PRIORITIES.put(Kind.MINUS, 5);
495.1302 -        OPERATOR_PRIORITIES.put(Kind.PLUS, 5);
495.1303 -
495.1304 -        OPERATOR_PRIORITIES.put(Kind.LEFT_SHIFT, 6);
495.1305 -        OPERATOR_PRIORITIES.put(Kind.RIGHT_SHIFT, 6);
495.1306 -        OPERATOR_PRIORITIES.put(Kind.UNSIGNED_RIGHT_SHIFT, 6);
495.1307 -
495.1308 -        OPERATOR_PRIORITIES.put(Kind.INSTANCE_OF, 7);
495.1309 -        OPERATOR_PRIORITIES.put(Kind.GREATER_THAN, 7);
495.1310 -        OPERATOR_PRIORITIES.put(Kind.GREATER_THAN_EQUAL, 7);
495.1311 -        OPERATOR_PRIORITIES.put(Kind.LESS_THAN, 7);
495.1312 -        OPERATOR_PRIORITIES.put(Kind.LESS_THAN_EQUAL, 7);
495.1313 -
495.1314 -        OPERATOR_PRIORITIES.put(Kind.EQUAL_TO, 8);
495.1315 -        OPERATOR_PRIORITIES.put(Kind.NOT_EQUAL_TO, 8);
495.1316 -
495.1317 -        OPERATOR_PRIORITIES.put(Kind.AND, 9);
495.1318 -        OPERATOR_PRIORITIES.put(Kind.OR, 11);
495.1319 -        OPERATOR_PRIORITIES.put(Kind.XOR, 10);
495.1320 -
495.1321 -        OPERATOR_PRIORITIES.put(Kind.CONDITIONAL_AND, 12);
495.1322 -        OPERATOR_PRIORITIES.put(Kind.CONDITIONAL_OR, 13);
495.1323 -
495.1324 -        OPERATOR_PRIORITIES.put(Kind.CONDITIONAL_EXPRESSION, 14);
495.1325 -
495.1326 -        OPERATOR_PRIORITIES.put(Kind.AND_ASSIGNMENT, 15);
495.1327 -        OPERATOR_PRIORITIES.put(Kind.ASSIGNMENT, 15);
495.1328 -        OPERATOR_PRIORITIES.put(Kind.DIVIDE_ASSIGNMENT, 15);
495.1329 -        OPERATOR_PRIORITIES.put(Kind.LEFT_SHIFT_ASSIGNMENT, 15);
495.1330 -        OPERATOR_PRIORITIES.put(Kind.MINUS_ASSIGNMENT, 15);
495.1331 -        OPERATOR_PRIORITIES.put(Kind.MULTIPLY_ASSIGNMENT, 15);
495.1332 -        OPERATOR_PRIORITIES.put(Kind.OR_ASSIGNMENT, 15);
495.1333 -        OPERATOR_PRIORITIES.put(Kind.PLUS_ASSIGNMENT, 15);
495.1334 -        OPERATOR_PRIORITIES.put(Kind.REMAINDER_ASSIGNMENT, 15);
495.1335 -        OPERATOR_PRIORITIES.put(Kind.RIGHT_SHIFT_ASSIGNMENT, 15);
495.1336 -        OPERATOR_PRIORITIES.put(Kind.UNSIGNED_RIGHT_SHIFT_ASSIGNMENT, 15);
495.1337 -        OPERATOR_PRIORITIES.put(Kind.XOR_ASSIGNMENT, 15);
495.1338 -    }
495.1339 -
495.1340 -    /**Checks whether putting {@code inner} tree into {@code outter} tree,
495.1341 -     * when {@code original} is being replaced with {@code inner} requires parentheses.
495.1342 -     *
495.1343 -     * @param inner    the new tree node that will be placed under {@code outter}
495.1344 -     * @param original the tree node that is being replaced with {@code inner}
495.1345 -     * @param outter   the future parent node of {@code inner}
495.1346 -     * @return true if and only if inner needs to be wrapped using {@link TreeMaker#Parenthesized(com.sun.source.tree.ExpressionTree) }
495.1347 -     *              to keep the original meaning.
495.1348 -     */
495.1349 -    public static boolean requiresParenthesis(Tree inner, Tree original, Tree outter) {
495.1350 -        if (!ExpressionTree.class.isAssignableFrom(inner.getKind().asInterface())) return false;
495.1351 -        if (!ExpressionTree.class.isAssignableFrom(outter.getKind().asInterface())) return false;
495.1352 -
495.1353 -        if (outter.getKind() == Kind.PARENTHESIZED || inner.getKind() == Kind.PARENTHESIZED) return false;
495.1354 -
495.1355 -        if (outter.getKind() == Kind.METHOD_INVOCATION) {
495.1356 -            if (((MethodInvocationTree) outter).getArguments().contains(original)) return false;
495.1357 -        }
495.1358 -
495.1359 -        if (outter.getKind() == Kind.NEW_CLASS) {
495.1360 -            if (((NewClassTree) outter).getArguments().contains(original)) return false;
495.1361 -        }
495.1362 -
495.1363 -        Integer innerPriority = OPERATOR_PRIORITIES.get(inner.getKind());
495.1364 -        Integer outterPriority = OPERATOR_PRIORITIES.get(outter.getKind());
495.1365 -
495.1366 -        if (innerPriority == null || outterPriority == null) {
495.1367 -            Logger.getLogger(JavaFix.class.getName()).log(Level.WARNING, "Unknown tree kind(s): {0}/{1}", new Object[] {inner.getKind(), outter.getKind()});
495.1368 -            return true;
495.1369 -        }
495.1370 -
495.1371 -        if (innerPriority > outterPriority) {
495.1372 -            return true;
495.1373 -        }
495.1374 -
495.1375 -        if (innerPriority < outterPriority) {
495.1376 -            return false;
495.1377 -        }
495.1378 -
495.1379 -        //associativity
495.1380 -        if (BinaryTree.class.isAssignableFrom(outter.getKind().asInterface())) {
495.1381 -            BinaryTree ot = (BinaryTree) outter;
495.1382 -
495.1383 -            //TODO: for + it might be possible to skip the parenthesis:
495.1384 -            return ot.getRightOperand() == original;
495.1385 -        }
495.1386 -
495.1387 -        if (CompoundAssignmentTree.class.isAssignableFrom(outter.getKind().asInterface())) {
495.1388 -            CompoundAssignmentTree ot = (CompoundAssignmentTree) outter;
495.1389 -
495.1390 -            return ot.getVariable() == original;
495.1391 -        }
495.1392 -
495.1393 -        if (AssignmentTree.class.isAssignableFrom(outter.getKind().asInterface())) {
495.1394 -            AssignmentTree ot = (AssignmentTree) outter;
495.1395 -
495.1396 -            return ot.getVariable() == original;
495.1397 -        }
495.1398 -
495.1399 -        return false;
495.1400 -    }
495.1401 -
495.1402 -    private static final class RemoveFromParent extends JavaFix {
495.1403 -
495.1404 -        private final String displayName;
495.1405 -
495.1406 -        public RemoveFromParent(String displayName, CompilationInfo info, TreePath toRemove) {
495.1407 -            super(info, toRemove);
495.1408 -            this.displayName = displayName;
495.1409 -        }
495.1410 -
495.1411 -        @Override
495.1412 -        protected String getText() {
495.1413 -            return displayName;
495.1414 -        }
495.1415 -
495.1416 -        @Override
495.1417 -        protected void performRewrite(TransformationContext ctx) {
495.1418 -            WorkingCopy wc = ctx.getWorkingCopy();
495.1419 -            TreePath tp = ctx.getPath();
495.1420 -            
495.1421 -            doRemoveFromParent(wc, tp);
495.1422 -        }
495.1423 -        
495.1424 -        private void doRemoveFromParent(WorkingCopy wc, TreePath what) {
495.1425 -            TreeMaker make = wc.getTreeMaker();
495.1426 -            Tree leaf = what.getLeaf();
495.1427 -            Tree parentLeaf = what.getParentPath().getLeaf();
495.1428 -
495.1429 -            switch (parentLeaf.getKind()) {
495.1430 -                case ANNOTATION:
495.1431 -                    AnnotationTree at = (AnnotationTree) parentLeaf;
495.1432 -                    AnnotationTree newAnnot;
495.1433 -
495.1434 -                    newAnnot = make.removeAnnotationAttrValue(at, (ExpressionTree) leaf);
495.1435 -
495.1436 -                    wc.rewrite(at, newAnnot);
495.1437 -                    break;
495.1438 -                case BLOCK:
495.1439 -                    BlockTree bt = (BlockTree) parentLeaf;
495.1440 -
495.1441 -                    wc.rewrite(bt, make.removeBlockStatement(bt, (StatementTree) leaf));
495.1442 -                    break;
495.1443 -                case CASE:
495.1444 -                    CaseTree caseTree = (CaseTree) parentLeaf;
495.1445 -
495.1446 -                    wc.rewrite(caseTree, make.removeCaseStatement(caseTree, (StatementTree) leaf));
495.1447 -                    break;
495.1448 -                case CLASS:
495.1449 -                    ClassTree classTree = (ClassTree) parentLeaf;
495.1450 -                    ClassTree nueClassTree;
495.1451 -
495.1452 -                    if (classTree.getTypeParameters().contains(leaf)) {
495.1453 -                        nueClassTree = make.removeClassTypeParameter(classTree, (TypeParameterTree) leaf);
495.1454 -                    } else if (classTree.getExtendsClause() == leaf) {
495.1455 -                        nueClassTree = make.Class(classTree.getModifiers(), classTree.getSimpleName(), classTree.getTypeParameters(), null, classTree.getImplementsClause(), classTree.getMembers());
495.1456 -                    } else if (classTree.getImplementsClause().contains(leaf)) {
495.1457 -                        nueClassTree = make.removeClassImplementsClause(classTree, leaf);
495.1458 -                    } else if (classTree.getMembers().contains(leaf)) {
495.1459 -                        nueClassTree = make.removeClassMember(classTree, leaf);
495.1460 -                    } else {
495.1461 -                        throw new UnsupportedOperationException();
495.1462 -                    }
495.1463 -
495.1464 -                    wc.rewrite(classTree, nueClassTree);
495.1465 -                    break;
495.1466 -                case UNION_TYPE:
495.1467 -                    UnionTypeTree disjunct = (UnionTypeTree) parentLeaf;
495.1468 -                    List<? extends Tree> alternatives = new LinkedList<Tree>(disjunct.getTypeAlternatives());
495.1469 -
495.1470 -                    alternatives.remove(leaf);
495.1471 -
495.1472 -                    wc.rewrite(disjunct, make.UnionType(alternatives));
495.1473 -                    break;
495.1474 -                case METHOD:
495.1475 -                    MethodTree mTree = (MethodTree) parentLeaf;
495.1476 -                    MethodTree newMethod;
495.1477 -
495.1478 -                    if (mTree.getTypeParameters().contains(leaf)) {
495.1479 -                        newMethod = make.removeMethodTypeParameter(mTree, (TypeParameterTree) leaf);
495.1480 -                    } else if (mTree.getParameters().contains(leaf)) {
495.1481 -                        newMethod = make.removeMethodParameter(mTree, (VariableTree) leaf);
495.1482 -                    } else if (mTree.getThrows().contains(leaf)) {
495.1483 -                        newMethod = make.removeMethodThrows(mTree, (ExpressionTree) leaf);
495.1484 -                    } else {
495.1485 -                        throw new UnsupportedOperationException();
495.1486 -                    }
495.1487 -
495.1488 -                    wc.rewrite(mTree, newMethod);
495.1489 -                    break;
495.1490 -                case METHOD_INVOCATION:
495.1491 -                    MethodInvocationTree iTree = (MethodInvocationTree) parentLeaf;
495.1492 -                    MethodInvocationTree newInvocation;
495.1493 -
495.1494 -                    if (iTree.getTypeArguments().contains(leaf)) {
495.1495 -                        newInvocation = make.removeMethodInvocationTypeArgument(iTree, (ExpressionTree) leaf);
495.1496 -                    } else if (iTree.getArguments().contains(leaf)) {
495.1497 -                        newInvocation = make.removeMethodInvocationArgument(iTree, (ExpressionTree) leaf);
495.1498 -                    } else {
495.1499 -                        throw new UnsupportedOperationException();
495.1500 -                    }
495.1501 -
495.1502 -                    wc.rewrite(iTree, newInvocation);
495.1503 -                    break;
495.1504 -                case MODIFIERS:
495.1505 -                    ModifiersTree modsTree = (ModifiersTree) parentLeaf;
495.1506 -
495.1507 -                    wc.rewrite(modsTree, make.removeModifiersAnnotation(modsTree, (AnnotationTree) leaf));
495.1508 -                    break;
495.1509 -                case NEW_CLASS:
495.1510 -                    NewClassTree newCTree = (NewClassTree) parentLeaf;
495.1511 -                    NewClassTree newNCT;
495.1512 -
495.1513 -                    if (newCTree.getTypeArguments().contains(leaf)) {
495.1514 -                        newNCT = make.removeNewClassTypeArgument(newCTree, (ExpressionTree) leaf);
495.1515 -                    } else if (newCTree.getArguments().contains(leaf)) {
495.1516 -                        newNCT = make.removeNewClassArgument(newCTree, (ExpressionTree) leaf);
495.1517 -                    } else {
495.1518 -                        throw new UnsupportedOperationException();
495.1519 -                    }
495.1520 -
495.1521 -                    wc.rewrite(newCTree, newNCT);
495.1522 -                    break;
495.1523 -                case PARAMETERIZED_TYPE:
495.1524 -                    ParameterizedTypeTree parTree = (ParameterizedTypeTree) parentLeaf;
495.1525 -
495.1526 -                    wc.rewrite(parTree, make.removeParameterizedTypeTypeArgument(parTree, (ExpressionTree) leaf));
495.1527 -                    break;
495.1528 -                case SWITCH:
495.1529 -                    SwitchTree switchTree = (SwitchTree) parentLeaf;
495.1530 -                    SwitchTree newSwitch;
495.1531 -
495.1532 -                    if (switchTree.getCases().contains(leaf)) {
495.1533 -                        newSwitch = make.removeSwitchCase(switchTree, (CaseTree) leaf);
495.1534 -                    } else {
495.1535 -                        throw new UnsupportedOperationException();
495.1536 -                    }
495.1537 -
495.1538 -                    wc.rewrite(switchTree, newSwitch);
495.1539 -                    break;
495.1540 -                case TRY:
495.1541 -                    TryTree tryTree = (TryTree) parentLeaf;
495.1542 -                    TryTree newTry;
495.1543 -
495.1544 -                    if (tryTree.getResources().contains(leaf)) {
495.1545 -                        LinkedList<Tree> resources = new LinkedList<Tree>(tryTree.getResources());
495.1546 -
495.1547 -                        resources.remove(leaf);
495.1548 -
495.1549 -                        newTry = make.Try(resources, tryTree.getBlock(), tryTree.getCatches(), tryTree.getFinallyBlock());
495.1550 -                    } else if (tryTree.getCatches().contains(leaf)) {
495.1551 -                        newTry = make.removeTryCatch(tryTree, (CatchTree) leaf);
495.1552 -                    } else {
495.1553 -                        throw new UnsupportedOperationException();
495.1554 -                    }
495.1555 -
495.1556 -                    wc.rewrite(tryTree, newTry);
495.1557 -                    break;
495.1558 -                case EXPRESSION_STATEMENT:
495.1559 -                    doRemoveFromParent(wc, what.getParentPath());
495.1560 -                    break;
495.1561 -                default:
495.1562 -                    wc.rewrite(what.getLeaf(), make.Block(Collections.<StatementTree>emptyList(), false));
495.1563 -                    break;
495.1564 -            }
495.1565 -        }
495.1566 -
495.1567 -    }
495.1568 -
495.1569 -    //TODO: from FileMovePlugin
495.1570 -    private static class MoveFile extends SimpleRefactoringElementImplementation {
495.1571 -
495.1572 -        private FileObject toMove;
495.1573 -        private final FileObject sourceRoot;
495.1574 -        private final String targetFolderName;
495.1575 -
495.1576 -        public MoveFile(FileObject toMove, FileObject sourceRoot, String targetFolderName) {
495.1577 -            this.toMove = toMove;
495.1578 -            this.sourceRoot = sourceRoot;
495.1579 -            this.targetFolderName = targetFolderName;
495.1580 -        }
495.1581 -
495.1582 -        @Override
495.1583 -        @Messages({"#{0} - original file name", "TXT_MoveFile=Move {0}"})
495.1584 -        public String getText() {
495.1585 -            return Bundle.TXT_MoveFile(toMove.getNameExt());
495.1586 -        }
495.1587 -
495.1588 -        @Override
495.1589 -        public String getDisplayText() {
495.1590 -            return getText();
495.1591 -        }
495.1592 -
495.1593 -        DataFolder sourceFolder;
495.1594 -        DataObject source;
495.1595 -        @Override
495.1596 -        public void performChange() {
495.1597 -            try {
495.1598 -                FileObject target = FileUtil.createFolder(sourceRoot, targetFolderName);
495.1599 -                DataFolder targetFolder = DataFolder.findFolder(target);
495.1600 -                if (!toMove.isValid()) {
495.1601 -                    String path = FileUtil.getFileDisplayName(toMove);
495.1602 -                    Logger.getLogger(JavaFix.class.getName()).fine("Invalid FileObject " + path + "trying to recreate...");
495.1603 -                    toMove = FileUtil.toFileObject(FileUtil.toFile(toMove));
495.1604 -                    if (toMove==null) {
495.1605 -                        Logger.getLogger(JavaFix.class.getName()).severe("Invalid FileObject " + path + "\n. File not found.");
495.1606 -                        return;
495.1607 -                    }
495.1608 -                }
495.1609 -                source = DataObject.find(toMove);
495.1610 -                sourceFolder = source.getFolder();
495.1611 -                source.move(targetFolder);
495.1612 -            } catch (DataObjectNotFoundException ex) {
495.1613 -                ex.printStackTrace();
495.1614 -            } catch (IOException ex) {
495.1615 -                ex.printStackTrace();
495.1616 -            }
495.1617 -        }
495.1618 -
495.1619 -        @Override
495.1620 -        public void undoChange() {
495.1621 -            try {
495.1622 -                source.move(sourceFolder);
495.1623 -            } catch (DataObjectNotFoundException ex) {
495.1624 -                ex.printStackTrace();
495.1625 -            } catch (IOException ex) {
495.1626 -                ex.printStackTrace();
495.1627 -            }
495.1628 -        }
495.1629 -
495.1630 -        @Override
495.1631 -        public Lookup getLookup() {
495.1632 -            return Lookup.EMPTY;
495.1633 -        }
495.1634 -
495.1635 -        @Override
495.1636 -        public FileObject getParentFile() {
495.1637 -            return toMove;
495.1638 -        }
495.1639 -
495.1640 -        @Override
495.1641 -        public PositionBounds getPosition() {
495.1642 -            return null;
495.1643 -        }
495.1644 -    }
495.1645 -}
   496.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/MatcherUtilities.java	Mon Dec 19 11:37:36 2016 +0100
   496.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   496.3 @@ -1,157 +0,0 @@
   496.4 -/*
   496.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   496.6 - *
   496.7 - * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
   496.8 - *
   496.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  496.10 - * Other names may be trademarks of their respective owners.
  496.11 - *
  496.12 - * The contents of this file are subject to the terms of either the GNU
  496.13 - * General Public License Version 2 only ("GPL") or the Common
  496.14 - * Development and Distribution License("CDDL") (collectively, the
  496.15 - * "License"). You may not use this file except in compliance with the
  496.16 - * License. You can obtain a copy of the License at
  496.17 - * http://www.netbeans.org/cddl-gplv2.html
  496.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  496.19 - * specific language governing permissions and limitations under the
  496.20 - * License.  When distributing the software, include this License Header
  496.21 - * Notice in each file and include the License file at
  496.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  496.23 - * particular file as subject to the "Classpath" exception as provided
  496.24 - * by Oracle in the GPL Version 2 section of the License file that
  496.25 - * accompanied this code. If applicable, add the following below the
  496.26 - * License Header, with the fields enclosed by brackets [] replaced by
  496.27 - * your own identifying information:
  496.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  496.29 - *
  496.30 - * If you wish your version of this file to be governed by only the CDDL
  496.31 - * or only the GPL Version 2, indicate your decision by adding
  496.32 - * "[Contributor] elects to include this software in this distribution
  496.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  496.34 - * single choice of license, a recipient has the option to distribute
  496.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  496.36 - * to extend the choice of license to its licensees as provided above.
  496.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  496.38 - * Version 2 license, then the option applies only if the new code is
  496.39 - * made subject to such option by the copyright holder.
  496.40 - *
  496.41 - * Contributor(s):
  496.42 - *
  496.43 - * Portions Copyrighted 2009 Sun Microsystems, Inc.
  496.44 - */
  496.45 -
  496.46 -package org.netbeans.spi.java.hints;
  496.47 -
  496.48 -import com.sun.source.tree.BlockTree;
  496.49 -import com.sun.source.tree.Scope;
  496.50 -import com.sun.source.tree.StatementTree;
  496.51 -import com.sun.source.tree.Tree;
  496.52 -import com.sun.source.util.TreePath;
  496.53 -import java.util.Collection;
  496.54 -import java.util.Collections;
  496.55 -import java.util.HashMap;
  496.56 -import java.util.Iterator;
  496.57 -import java.util.List;
  496.58 -import java.util.Map;
  496.59 -import java.util.concurrent.atomic.AtomicBoolean;
  496.60 -import javax.lang.model.type.TypeMirror;
  496.61 -import org.netbeans.api.annotations.common.NonNull;
  496.62 -import org.netbeans.modules.java.hints.spiimpl.Utilities;
  496.63 -import org.netbeans.modules.java.hints.spiimpl.pm.PatternCompiler;
  496.64 -import org.netbeans.api.java.source.matching.Matcher;
  496.65 -import org.netbeans.api.java.source.matching.Occurrence;
  496.66 -import org.netbeans.api.java.source.matching.Pattern;
  496.67 -
  496.68 -/**XXX: cancelability
  496.69 - * TODO: needed?
  496.70 - *
  496.71 - * @author lahvac
  496.72 - */
  496.73 -public class MatcherUtilities {
  496.74 -
  496.75 -    public static boolean matches(@NonNull HintContext ctx, @NonNull TreePath variable, @NonNull String pattern) {
  496.76 -        return matches(ctx, variable, pattern, null, null, null);
  496.77 -    }
  496.78 -
  496.79 -    public static boolean matches(@NonNull HintContext ctx, @NonNull TreePath variable, @NonNull String pattern, boolean fillInVariablesHack) {
  496.80 -        return matches(ctx, variable, pattern, ctx.getVariables(), ctx.getMultiVariables(), ctx.getVariableNames());
  496.81 -    }
  496.82 -
  496.83 -    public static boolean matches(@NonNull HintContext ctx, @NonNull TreePath variable, @NonNull String pattern, Map<String, TreePath> outVariables, Map<String, Collection<? extends TreePath>> outMultiVariables, Map<String, String> outVariables2Names) {
  496.84 -        Pattern p = PatternCompiler.compile(ctx.getInfo(), pattern, Collections.<String, TypeMirror>emptyMap(), Collections.<String>emptyList());
  496.85 -        Map<String, TreePath> variables = new HashMap<String, TreePath>(ctx.getVariables());
  496.86 -        Map<String, Collection<? extends TreePath>> multiVariables = new HashMap<String, Collection<? extends TreePath>>(ctx.getMultiVariables());
  496.87 -        Map<String, String> variables2Names = new HashMap<String, String>(ctx.getVariableNames());
  496.88 -        Iterable<? extends Occurrence> occurrences = Matcher.create(ctx.getInfo()).setCancel(new AtomicBoolean()).setPresetVariable(variables, multiVariables, variables2Names).setSearchRoot(variable).setTreeTopSearch().match(p);
  496.89 -
  496.90 -        if (occurrences.iterator().hasNext()) {
  496.91 -            Occurrence od = occurrences.iterator().next();
  496.92 -            outVariables(outVariables, od.getVariables(), ctx.getVariables());
  496.93 -            outVariables(outMultiVariables, od.getMultiVariables(), ctx.getMultiVariables());
  496.94 -            outVariables(outVariables2Names, od.getVariables2Names(), ctx.getVariableNames());
  496.95 -
  496.96 -            return true;
  496.97 -        }
  496.98 -
  496.99 -        return false;
 496.100 -    }
 496.101 -
 496.102 -    public static boolean matches(@NonNull HintContext ctx, @NonNull Collection<? extends TreePath> variable, @NonNull String pattern, Map<String, TreePath> outVariables, Map<String, Collection<? extends TreePath>> outMultiVariables, Map<String, String> outVariables2Names) {
 496.103 -        Scope s = Utilities.constructScope(ctx.getInfo(), Collections.<String, TypeMirror>emptyMap());
 496.104 -        Tree  patternTree = Utilities.parseAndAttribute(ctx.getInfo(), pattern, s);
 496.105 -        List<? extends Tree> patternTrees;
 496.106 -
 496.107 -        if (Utilities.isFakeBlock(patternTree)) {
 496.108 -            List<? extends StatementTree> statements = ((BlockTree) patternTree).getStatements();
 496.109 -
 496.110 -            patternTrees = statements.subList(1, statements.size() - 1);
 496.111 -        } else {
 496.112 -            patternTrees = Collections.singletonList(patternTree);
 496.113 -        }
 496.114 -
 496.115 -        if (variable.size() != patternTrees.size()) return false;
 496.116 -        
 496.117 -        Map<String, TreePath> variables = new HashMap<String, TreePath>(ctx.getVariables());
 496.118 -        Map<String, Collection<? extends TreePath>> multiVariables = new HashMap<String, Collection<? extends TreePath>>(ctx.getMultiVariables());
 496.119 -        Map<String, String> variables2Names = new HashMap<String, String>(ctx.getVariableNames());
 496.120 -        Iterator<? extends TreePath> variableIt = variable.iterator();
 496.121 -        Iterator<? extends Tree> patternTreesIt = patternTrees.iterator();
 496.122 -
 496.123 -        while (variableIt.hasNext() && patternTreesIt.hasNext()) {
 496.124 -            TreePath patternTreePath = new TreePath(new TreePath(ctx.getInfo().getCompilationUnit()), patternTreesIt.next());
 496.125 -            Pattern p = Pattern.createPatternWithFreeVariables(patternTreePath, Collections.<String, TypeMirror>emptyMap());
 496.126 -            Iterable<? extends Occurrence> occurrences = Matcher.create(ctx.getInfo()).setCancel(new AtomicBoolean()).setPresetVariable(variables, multiVariables, variables2Names).setSearchRoot(variableIt.next()).setTreeTopSearch().match(p);
 496.127 -
 496.128 -            if (!occurrences.iterator().hasNext()) {
 496.129 -                return false;
 496.130 -            }
 496.131 -
 496.132 -            Occurrence od = occurrences.iterator().next();
 496.133 -
 496.134 -            variables = od.getVariables();
 496.135 -            multiVariables = od.getMultiVariables();
 496.136 -            variables2Names = od.getVariables2Names();
 496.137 -        }
 496.138 -
 496.139 -        if (variableIt.hasNext() == patternTreesIt.hasNext()) {
 496.140 -            outVariables(outVariables, variables, ctx.getVariables());
 496.141 -            outVariables(outMultiVariables, multiVariables, ctx.getMultiVariables());
 496.142 -            outVariables(outVariables2Names, variables2Names, ctx.getVariableNames());
 496.143 -
 496.144 -            return true;
 496.145 -        }
 496.146 -
 496.147 -        return false;
 496.148 -    }
 496.149 -
 496.150 -    private static <T> void outVariables(Map<String, T> outMap, Map<String, T> currentValues, Map<String, T> origValues) {
 496.151 -        if (outMap == null) return;
 496.152 -
 496.153 -        for (String key : origValues.keySet()) {
 496.154 -            currentValues.remove(key);
 496.155 -        }
 496.156 -
 496.157 -        outMap.putAll(currentValues);
 496.158 -    }
 496.159 -
 496.160 -}
   497.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/TriggerDecision.java	Mon Dec 19 11:37:36 2016 +0100
   497.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   497.3 @@ -1,59 +0,0 @@
   497.4 -/*
   497.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   497.6 - *
   497.7 - * Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   497.8 - *
   497.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  497.10 - * Other names may be trademarks of their respective owners.
  497.11 - *
  497.12 - * The contents of this file are subject to the terms of either the GNU
  497.13 - * General Public License Version 2 only ("GPL") or the Common
  497.14 - * Development and Distribution License("CDDL") (collectively, the
  497.15 - * "License"). You may not use this file except in compliance with the
  497.16 - * License. You can obtain a copy of the License at
  497.17 - * http://www.netbeans.org/cddl-gplv2.html
  497.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  497.19 - * specific language governing permissions and limitations under the
  497.20 - * License.  When distributing the software, include this License Header
  497.21 - * Notice in each file and include the License file at
  497.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  497.23 - * particular file as subject to the "Classpath" exception as provided
  497.24 - * by Oracle in the GPL Version 2 section of the License file that
  497.25 - * accompanied this code. If applicable, add the following below the
  497.26 - * License Header, with the fields enclosed by brackets [] replaced by
  497.27 - * your own identifying information:
  497.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  497.29 - *
  497.30 - * If you wish your version of this file to be governed by only the CDDL
  497.31 - * or only the GPL Version 2, indicate your decision by adding
  497.32 - * "[Contributor] elects to include this software in this distribution
  497.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  497.34 - * single choice of license, a recipient has the option to distribute
  497.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  497.36 - * to extend the choice of license to its licensees as provided above.
  497.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  497.38 - * Version 2 license, then the option applies only if the new code is
  497.39 - * made subject to such option by the copyright holder.
  497.40 - *
  497.41 - * Contributor(s):
  497.42 - *
  497.43 - * Portions Copyrighted 2008-2010 Sun Microsystems, Inc.
  497.44 - */
  497.45 -
  497.46 -package org.netbeans.spi.java.hints;
  497.47 -
  497.48 -import java.lang.annotation.ElementType;
  497.49 -import java.lang.annotation.Retention;
  497.50 -import java.lang.annotation.RetentionPolicy;
  497.51 -import java.lang.annotation.Target;
  497.52 -
  497.53 -/**
  497.54 - * @author lahvac
  497.55 - */
  497.56 -@Retention(RetentionPolicy.SOURCE)
  497.57 -@Target(ElementType.METHOD)
  497.58 -public @interface TriggerDecision {
  497.59 -
  497.60 -    public Class<? extends Decision<?, ?>> value();
  497.61 -
  497.62 -}
   498.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/TriggerPattern.java	Mon Dec 19 11:37:36 2016 +0100
   498.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   498.3 @@ -1,93 +0,0 @@
   498.4 -/*
   498.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   498.6 - *
   498.7 - * Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   498.8 - *
   498.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  498.10 - * Other names may be trademarks of their respective owners.
  498.11 - *
  498.12 - * The contents of this file are subject to the terms of either the GNU
  498.13 - * General Public License Version 2 only ("GPL") or the Common
  498.14 - * Development and Distribution License("CDDL") (collectively, the
  498.15 - * "License"). You may not use this file except in compliance with the
  498.16 - * License. You can obtain a copy of the License at
  498.17 - * http://www.netbeans.org/cddl-gplv2.html
  498.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  498.19 - * specific language governing permissions and limitations under the
  498.20 - * License.  When distributing the software, include this License Header
  498.21 - * Notice in each file and include the License file at
  498.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  498.23 - * particular file as subject to the "Classpath" exception as provided
  498.24 - * by Oracle in the GPL Version 2 section of the License file that
  498.25 - * accompanied this code. If applicable, add the following below the
  498.26 - * License Header, with the fields enclosed by brackets [] replaced by
  498.27 - * your own identifying information:
  498.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  498.29 - *
  498.30 - * If you wish your version of this file to be governed by only the CDDL
  498.31 - * or only the GPL Version 2, indicate your decision by adding
  498.32 - * "[Contributor] elects to include this software in this distribution
  498.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  498.34 - * single choice of license, a recipient has the option to distribute
  498.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  498.36 - * to extend the choice of license to its licensees as provided above.
  498.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  498.38 - * Version 2 license, then the option applies only if the new code is
  498.39 - * made subject to such option by the copyright holder.
  498.40 - *
  498.41 - * Contributor(s):
  498.42 - *
  498.43 - * Portions Copyrighted 2008-2010 Sun Microsystems, Inc.
  498.44 - */
  498.45 -
  498.46 -package org.netbeans.spi.java.hints;
  498.47 -
  498.48 -import java.lang.annotation.ElementType;
  498.49 -import java.lang.annotation.Retention;
  498.50 -import java.lang.annotation.RetentionPolicy;
  498.51 -import java.lang.annotation.Target;
  498.52 -import org.netbeans.spi.editor.hints.ErrorDescription;
  498.53 -
  498.54 -/**Find parts of the source code that satisfy the given pattern, and invoke the method
  498.55 - * that is annotated with this annotation.
  498.56 - *
  498.57 - * The method must be {@code public static}, the return type must either be assignable to
  498.58 - * {@link ErrorDescription} or to {@link Iterable}{@code <? extends }{@link ErrorDescription}{@code >}.
  498.59 - * Its sole parameter must be {@link HintContext}.
  498.60 - *
  498.61 - * @author lahvac
  498.62 - */
  498.63 -@Retention(RetentionPolicy.SOURCE)
  498.64 -@Target(ElementType.METHOD)
  498.65 -public @interface TriggerPattern {
  498.66 -
  498.67 -    /**
  498.68 -     * Pattern to match on.
  498.69 -     * The pattern consists of:
  498.70 -     * <ul>
  498.71 -     *     <li>a single Java expression</li>
  498.72 -     *     <li>a single Java statement</li>
  498.73 -     *     <li>multiple Java statements</li>
  498.74 -     *     <li>a Java field, method or class</li>
  498.75 -     * </ul>
  498.76 -     *
  498.77 -     * Variables (identifiers starting with {@code $}) can be used to replace part of the pattern.
  498.78 -     * During matching, the actual part of the AST that corresponds to the variable in the pattern
  498.79 -     * will be "bound" to the variable. Variables whose names that do not end with a {@code $} ("single" variables)
  498.80 -     * will be bound to exactly one AST node, whereas variables whose names end with a {@code $} ("multi" variables)
  498.81 -     * will be bound to any number of consecutive AST nodes (with the same AST node as a parent).
  498.82 -     *
  498.83 -     * The actual AST nodes that were bound to single variables are available through {@link HintContext#getVariables() },
  498.84 -     * nodes bound to multi variables are available through {@link HintContext#getMultiVariables() }.
  498.85 -     *
  498.86 -     * For variables that represent an expression, a type constraint can be specified using the
  498.87 -     * {@link #constraints() } attribute.
  498.88 -     *
  498.89 -     * All classes should be referred to using FQNs.
  498.90 -     */
  498.91 -    public String value();
  498.92 -    /**Expected types for variables from the {@link #value() pattern}.
  498.93 -     */
  498.94 -    public ConstraintVariableType[] constraints() default {};
  498.95 -
  498.96 -}
   499.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/TriggerPatterns.java	Mon Dec 19 11:37:36 2016 +0100
   499.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   499.3 @@ -1,60 +0,0 @@
   499.4 -/*
   499.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   499.6 - *
   499.7 - * Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   499.8 - *
   499.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  499.10 - * Other names may be trademarks of their respective owners.
  499.11 - *
  499.12 - * The contents of this file are subject to the terms of either the GNU
  499.13 - * General Public License Version 2 only ("GPL") or the Common
  499.14 - * Development and Distribution License("CDDL") (collectively, the
  499.15 - * "License"). You may not use this file except in compliance with the
  499.16 - * License. You can obtain a copy of the License at
  499.17 - * http://www.netbeans.org/cddl-gplv2.html
  499.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  499.19 - * specific language governing permissions and limitations under the
  499.20 - * License.  When distributing the software, include this License Header
  499.21 - * Notice in each file and include the License file at
  499.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  499.23 - * particular file as subject to the "Classpath" exception as provided
  499.24 - * by Oracle in the GPL Version 2 section of the License file that
  499.25 - * accompanied this code. If applicable, add the following below the
  499.26 - * License Header, with the fields enclosed by brackets [] replaced by
  499.27 - * your own identifying information:
  499.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  499.29 - *
  499.30 - * If you wish your version of this file to be governed by only the CDDL
  499.31 - * or only the GPL Version 2, indicate your decision by adding
  499.32 - * "[Contributor] elects to include this software in this distribution
  499.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  499.34 - * single choice of license, a recipient has the option to distribute
  499.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  499.36 - * to extend the choice of license to its licensees as provided above.
  499.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  499.38 - * Version 2 license, then the option applies only if the new code is
  499.39 - * made subject to such option by the copyright holder.
  499.40 - *
  499.41 - * Contributor(s):
  499.42 - *
  499.43 - * Portions Copyrighted 2008-2010 Sun Microsystems, Inc.
  499.44 - */
  499.45 -
  499.46 -package org.netbeans.spi.java.hints;
  499.47 -
  499.48 -import java.lang.annotation.ElementType;
  499.49 -import java.lang.annotation.Retention;
  499.50 -import java.lang.annotation.RetentionPolicy;
  499.51 -import java.lang.annotation.Target;
  499.52 -
  499.53 -/**Multiple {@link TriggerPattern}s.
  499.54 - *
  499.55 - * @author lahvac
  499.56 - */
  499.57 -@Retention(RetentionPolicy.SOURCE)
  499.58 -@Target(ElementType.METHOD)
  499.59 -public @interface TriggerPatterns {
  499.60 -
  499.61 -    public TriggerPattern[] value();
  499.62 -    
  499.63 -}
   500.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/TriggerTreeKind.java	Mon Dec 19 11:37:36 2016 +0100
   500.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   500.3 @@ -1,66 +0,0 @@
   500.4 -/*
   500.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   500.6 - *
   500.7 - * Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   500.8 - *
   500.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  500.10 - * Other names may be trademarks of their respective owners.
  500.11 - *
  500.12 - * The contents of this file are subject to the terms of either the GNU
  500.13 - * General Public License Version 2 only ("GPL") or the Common
  500.14 - * Development and Distribution License("CDDL") (collectively, the
  500.15 - * "License"). You may not use this file except in compliance with the
  500.16 - * License. You can obtain a copy of the License at
  500.17 - * http://www.netbeans.org/cddl-gplv2.html
  500.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  500.19 - * specific language governing permissions and limitations under the
  500.20 - * License.  When distributing the software, include this License Header
  500.21 - * Notice in each file and include the License file at
  500.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  500.23 - * particular file as subject to the "Classpath" exception as provided
  500.24 - * by Oracle in the GPL Version 2 section of the License file that
  500.25 - * accompanied this code. If applicable, add the following below the
  500.26 - * License Header, with the fields enclosed by brackets [] replaced by
  500.27 - * your own identifying information:
  500.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  500.29 - *
  500.30 - * If you wish your version of this file to be governed by only the CDDL
  500.31 - * or only the GPL Version 2, indicate your decision by adding
  500.32 - * "[Contributor] elects to include this software in this distribution
  500.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  500.34 - * single choice of license, a recipient has the option to distribute
  500.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  500.36 - * to extend the choice of license to its licensees as provided above.
  500.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  500.38 - * Version 2 license, then the option applies only if the new code is
  500.39 - * made subject to such option by the copyright holder.
  500.40 - *
  500.41 - * Contributor(s):
  500.42 - *
  500.43 - * Portions Copyrighted 2008-2010 Sun Microsystems, Inc.
  500.44 - */
  500.45 -
  500.46 -package org.netbeans.spi.java.hints;
  500.47 -
  500.48 -import com.sun.source.tree.Tree.Kind;
  500.49 -import com.sun.source.util.TreePath;
  500.50 -import java.lang.annotation.ElementType;
  500.51 -import java.lang.annotation.Retention;
  500.52 -import java.lang.annotation.RetentionPolicy;
  500.53 -import java.lang.annotation.Target;
  500.54 -
  500.55 -/**Invoke the method for {@link TreePath}s of the given kind.
  500.56 - *
  500.57 - * The method must be {@code public static}, the return type must either be assignable to
  500.58 - * {@link ErrorDescription} or to {@link Iterable}{@code <? extends }{@link ErrorDescription}{@code >}.
  500.59 - * Its sole parameter must be {@link HintContext}.
  500.60 - *
  500.61 - * @author lahvac
  500.62 - */
  500.63 -@Retention(RetentionPolicy.SOURCE)
  500.64 -@Target(ElementType.METHOD)
  500.65 -public @interface TriggerTreeKind {
  500.66 -
  500.67 -    public Kind[] value();
  500.68 -
  500.69 -}
   501.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/UseOptions.java	Mon Dec 19 11:37:36 2016 +0100
   501.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   501.3 @@ -1,64 +0,0 @@
   501.4 -/*
   501.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   501.6 - *
   501.7 - * Copyright 2012 Oracle and/or its affiliates. All rights reserved.
   501.8 - *
   501.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  501.10 - * Other names may be trademarks of their respective owners.
  501.11 - *
  501.12 - * The contents of this file are subject to the terms of either the GNU
  501.13 - * General Public License Version 2 only ("GPL") or the Common
  501.14 - * Development and Distribution License("CDDL") (collectively, the
  501.15 - * "License"). You may not use this file except in compliance with the
  501.16 - * License. You can obtain a copy of the License at
  501.17 - * http://www.netbeans.org/cddl-gplv2.html
  501.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  501.19 - * specific language governing permissions and limitations under the
  501.20 - * License.  When distributing the software, include this License Header
  501.21 - * Notice in each file and include the License file at
  501.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  501.23 - * particular file as subject to the "Classpath" exception as provided
  501.24 - * by Oracle in the GPL Version 2 section of the License file that
  501.25 - * accompanied this code. If applicable, add the following below the
  501.26 - * License Header, with the fields enclosed by brackets [] replaced by
  501.27 - * your own identifying information:
  501.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  501.29 - *
  501.30 - * If you wish your version of this file to be governed by only the CDDL
  501.31 - * or only the GPL Version 2, indicate your decision by adding
  501.32 - * "[Contributor] elects to include this software in this distribution
  501.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  501.34 - * single choice of license, a recipient has the option to distribute
  501.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  501.36 - * to extend the choice of license to its licensees as provided above.
  501.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  501.38 - * Version 2 license, then the option applies only if the new code is
  501.39 - * made subject to such option by the copyright holder.
  501.40 - *
  501.41 - * Contributor(s):
  501.42 - *
  501.43 - * Portions Copyrighted 2012 Sun Microsystems, Inc.
  501.44 - */
  501.45 -package org.netbeans.spi.java.hints;
  501.46 -
  501.47 -import java.lang.annotation.ElementType;
  501.48 -import java.lang.annotation.Retention;
  501.49 -import java.lang.annotation.RetentionPolicy;
  501.50 -import java.lang.annotation.Target;
  501.51 -
  501.52 -/**Specifies which options from the enclosing class should be used for this hint.
  501.53 - *
  501.54 - * Only applies to methods marked with the {@link Hint} annotation.
  501.55 - *
  501.56 - * @author lahvac
  501.57 - */
  501.58 -@Retention(RetentionPolicy.SOURCE)
  501.59 -@Target(ElementType.METHOD)
  501.60 -public @interface UseOptions {
  501.61 -
  501.62 -    /**Keys (values of the compile-time constants) of the options that should be used
  501.63 -     * for this hint method.
  501.64 -     */
  501.65 -    public String[] value();
  501.66 -    
  501.67 -}
   502.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/support/FixFactory.java	Mon Dec 19 11:37:36 2016 +0100
   502.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   502.3 @@ -1,171 +0,0 @@
   502.4 -/*
   502.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   502.6 - *
   502.7 - * Copyright 1997-2012 Oracle and/or its affiliates. All rights reserved.
   502.8 - *
   502.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  502.10 - * Other names may be trademarks of their respective owners.
  502.11 - *
  502.12 - * The contents of this file are subject to the terms of either the GNU
  502.13 - * General Public License Version 2 only ("GPL") or the Common
  502.14 - * Development and Distribution License("CDDL") (collectively, the
  502.15 - * "License"). You may not use this file except in compliance with the
  502.16 - * License. You can obtain a copy of the License at
  502.17 - * http://www.netbeans.org/cddl-gplv2.html
  502.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  502.19 - * specific language governing permissions and limitations under the
  502.20 - * License.  When distributing the software, include this License Header
  502.21 - * Notice in each file and include the License file at
  502.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  502.23 - * particular file as subject to the "Classpath" exception as provided
  502.24 - * by Oracle in the GPL Version 2 section of the License file that
  502.25 - * accompanied this code. If applicable, add the following below the
  502.26 - * License Header, with the fields enclosed by brackets [] replaced by
  502.27 - * your own identifying information:
  502.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  502.29 - *
  502.30 - * Contributor(s):
  502.31 - *
  502.32 - * Portions Copyrighted 2007-2012 Sun Microsystems, Inc.
  502.33 - */
  502.34 -package org.netbeans.spi.java.hints.support;
  502.35 -
  502.36 -import com.sun.source.tree.ModifiersTree;
  502.37 -import com.sun.source.tree.Tree.Kind;
  502.38 -import com.sun.source.util.TreePath;
  502.39 -import java.util.Collections;
  502.40 -import java.util.EnumSet;
  502.41 -import java.util.Set;
  502.42 -import javax.lang.model.element.Modifier;
  502.43 -import org.netbeans.api.java.source.CompilationInfo;
  502.44 -import org.netbeans.api.java.source.TreeMaker;
  502.45 -import org.netbeans.api.java.source.TreePathHandle;
  502.46 -import org.netbeans.api.java.source.WorkingCopy;
  502.47 -import org.netbeans.spi.editor.hints.Fix;
  502.48 -import org.netbeans.spi.java.hints.JavaFix;
  502.49 -import org.openide.util.Parameters;
  502.50 -
  502.51 -/** Factory for creating generally useful fixes. Currently, changes to the modifiers
  502.52 - *  are supported.
  502.53 - *
  502.54 - * @author Dusan Balek
  502.55 - */
  502.56 -public final class FixFactory {
  502.57 -
  502.58 -    private FixFactory() {}
  502.59 -
  502.60 -    /** Creates a fix, which when invoked adds a set of modifiers to the existing ones
  502.61 -     * @param compilationInfo CompilationInfo to work on
  502.62 -     * @param treePath TreePath to a ModifiersTree.
  502.63 -     * @param toAdd set of Modifiers to add
  502.64 -     * @param text text displayed as a fix description
  502.65 -     */
  502.66 -    public static final Fix addModifiersFix(CompilationInfo compilationInfo, TreePath treePath, Set<Modifier> toAdd, String text) {
  502.67 -        Parameters.notNull("compilationInfo", compilationInfo);
  502.68 -        Parameters.notNull("treePath", treePath);
  502.69 -        Parameters.notNull("toAdd", toAdd);
  502.70 -        Parameters.notNull("text", text);
  502.71 -
  502.72 -        return changeModifiersFix(compilationInfo, treePath, toAdd, Collections.<Modifier>emptySet(), text);
  502.73 -    }
  502.74 -
  502.75 -    /** Creates a fix, which when invoked removes a set of modifiers from the existing ones
  502.76 -     * @param compilationInfo CompilationInfo to work on
  502.77 -     * @param treePath TreePath to a ModifiersTree.
  502.78 -     * @param toRemove set of Modifiers to remove
  502.79 -     * @param text text displayed as a fix description
  502.80 -     */
  502.81 -    public static final Fix removeModifiersFix(CompilationInfo compilationInfo, TreePath treePath, Set<Modifier> toRemove, String text) {
  502.82 -        Parameters.notNull("compilationInfo", compilationInfo);
  502.83 -        Parameters.notNull("treePath", treePath);
  502.84 -        Parameters.notNull("toRemove", toRemove);
  502.85 -        Parameters.notNull("text", text);
  502.86 -
  502.87 -        return changeModifiersFix(compilationInfo, treePath, Collections.<Modifier>emptySet(), toRemove, text);
  502.88 -    }
  502.89 -
  502.90 -    /** Creates a fix, which when invoked changes the existing modifiers
  502.91 -     * @param compilationInfo CompilationInfo to work on
  502.92 -     * @param treePath TreePath to a ModifiersTree.
  502.93 -     * @param toAdd set of Modifiers to add
  502.94 -     * @param toRemove set of Modifiers to remove
  502.95 -     * @param text text displayed as a fix description
  502.96 -     */
  502.97 -    public static final Fix changeModifiersFix(CompilationInfo compilationInfo, TreePath treePath, Set<Modifier> toAdd, Set<Modifier> toRemove, String text) {
  502.98 -        Parameters.notNull("compilationInfo", compilationInfo);
  502.99 -        Parameters.notNull("treePath", treePath);
 502.100 -        Parameters.notNull("toAdd", toAdd);
 502.101 -        Parameters.notNull("toRemove", toRemove);
 502.102 -        Parameters.notNull("text", text);
 502.103 -
 502.104 -        if (treePath.getLeaf().getKind() != Kind.MODIFIERS) {
 502.105 -            return null;
 502.106 -        }
 502.107 -        return new ChangeModifiersFixImpl(TreePathHandle.create(treePath, compilationInfo), toAdd, toRemove, text).toEditorFix();
 502.108 -    }
 502.109 -
 502.110 -    private static final class ChangeModifiersFixImpl extends JavaFix {
 502.111 -
 502.112 -        private final TreePathHandle modsHandle;
 502.113 -        private final Set<Modifier> toAdd;
 502.114 -        private final Set<Modifier> toRemove;
 502.115 -        private final String text;
 502.116 -
 502.117 -        public ChangeModifiersFixImpl(TreePathHandle modsHandle, Set<Modifier> toAdd, Set<Modifier> toRemove, String text) {
 502.118 -            super(modsHandle);
 502.119 -            this.modsHandle = modsHandle;
 502.120 -            this.toAdd = toAdd;
 502.121 -            this.toRemove = toRemove;
 502.122 -            this.text = text;
 502.123 -        }
 502.124 -
 502.125 -        public String getText() {
 502.126 -            return text;
 502.127 -        }
 502.128 -
 502.129 -        @Override
 502.130 -        protected void performRewrite(TransformationContext ctx) {
 502.131 -            WorkingCopy wc = ctx.getWorkingCopy();
 502.132 -            TreePath path = ctx.getPath();
 502.133 -            TreeMaker make = wc.getTreeMaker();
 502.134 -            ModifiersTree newMods = (ModifiersTree) path.getLeaf();
 502.135 -            for (Modifier a : toAdd) {
 502.136 -                newMods = make.addModifiersModifier(newMods, a);
 502.137 -            }
 502.138 -            for (Modifier r : toRemove) {
 502.139 -                newMods = make.removeModifiersModifier(newMods, r);
 502.140 -            }
 502.141 -            wc.rewrite(path.getLeaf(), newMods);
 502.142 -        }
 502.143 -
 502.144 -        @Override
 502.145 -        public boolean equals(Object obj) {
 502.146 -            if (obj == null) {
 502.147 -                return false;
 502.148 -            }
 502.149 -            if (getClass() != obj.getClass()) {
 502.150 -                return false;
 502.151 -            }
 502.152 -            final ChangeModifiersFixImpl other = (ChangeModifiersFixImpl) obj;
 502.153 -            if (this.modsHandle != other.modsHandle && (this.modsHandle == null || !this.modsHandle.equals(other.modsHandle))) {
 502.154 -                return false;
 502.155 -            }
 502.156 -            if (this.toAdd != other.toAdd && (this.toAdd == null || !this.toAdd.equals(other.toAdd))) {
 502.157 -                return false;
 502.158 -            }
 502.159 -            if (this.toRemove != other.toRemove && (this.toRemove == null || !this.toRemove.equals(other.toRemove))) {
 502.160 -                return false;
 502.161 -            }
 502.162 -            return true;
 502.163 -        }
 502.164 -
 502.165 -        @Override
 502.166 -        public int hashCode() {
 502.167 -            int hash = 5;
 502.168 -            hash = 71 * hash + (this.modsHandle != null ? this.modsHandle.hashCode() : 0);
 502.169 -            hash = 71 * hash + (this.toAdd != null ? this.toAdd.hashCode() : 0);
 502.170 -            hash = 71 * hash + (this.toRemove != null ? this.toRemove.hashCode() : 0);
 502.171 -            return hash;
 502.172 -        }
 502.173 -    }
 502.174 -}
   503.1 --- a/sandbox/java.hints/spi.java.hints/src/org/netbeans/spi/java/hints/support/TransformationSupport.java	Mon Dec 19 11:37:36 2016 +0100
   503.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   503.3 @@ -1,311 +0,0 @@
   503.4 -/*
   503.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   503.6 - *
   503.7 - * Copyright 2012 Oracle and/or its affiliates. All rights reserved.
   503.8 - *
   503.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  503.10 - * Other names may be trademarks of their respective owners.
  503.11 - *
  503.12 - * The contents of this file are subject to the terms of either the GNU
  503.13 - * General Public License Version 2 only ("GPL") or the Common
  503.14 - * Development and Distribution License("CDDL") (collectively, the
  503.15 - * "License"). You may not use this file except in compliance with the
  503.16 - * License. You can obtain a copy of the License at
  503.17 - * http://www.netbeans.org/cddl-gplv2.html
  503.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  503.19 - * specific language governing permissions and limitations under the
  503.20 - * License.  When distributing the software, include this License Header
  503.21 - * Notice in each file and include the License file at
  503.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  503.23 - * particular file as subject to the "Classpath" exception as provided
  503.24 - * by Oracle in the GPL Version 2 section of the License file that
  503.25 - * accompanied this code. If applicable, add the following below the
  503.26 - * License Header, with the fields enclosed by brackets [] replaced by
  503.27 - * your own identifying information:
  503.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  503.29 - *
  503.30 - * If you wish your version of this file to be governed by only the CDDL
  503.31 - * or only the GPL Version 2, indicate your decision by adding
  503.32 - * "[Contributor] elects to include this software in this distribution
  503.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  503.34 - * single choice of license, a recipient has the option to distribute
  503.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  503.36 - * to extend the choice of license to its licensees as provided above.
  503.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  503.38 - * Version 2 license, then the option applies only if the new code is
  503.39 - * made subject to such option by the copyright holder.
  503.40 - *
  503.41 - * Contributor(s):
  503.42 - *
  503.43 - * Portions Copyrighted 2012 Sun Microsystems, Inc.
  503.44 - */
  503.45 -package org.netbeans.spi.java.hints.support;
  503.46 -
  503.47 -import com.sun.source.util.TreePath;
  503.48 -import java.util.*;
  503.49 -import java.util.Map.Entry;
  503.50 -import java.util.concurrent.atomic.AtomicBoolean;
  503.51 -import javax.lang.model.type.TypeMirror;
  503.52 -import org.netbeans.api.annotations.common.NonNull;
  503.53 -import org.netbeans.api.java.source.CompilationInfo;
  503.54 -import org.netbeans.api.java.source.ModificationResult;
  503.55 -import org.netbeans.api.java.source.TypeMirrorHandle;
  503.56 -import org.netbeans.api.java.source.WorkingCopy;
  503.57 -import org.netbeans.api.java.source.matching.Matcher;
  503.58 -import org.netbeans.api.java.source.matching.Occurrence;
  503.59 -import org.netbeans.api.java.source.matching.Pattern;
  503.60 -import org.netbeans.api.project.Project;
  503.61 -import org.netbeans.modules.java.hints.jackpot.spi.PatternConvertor;
  503.62 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
  503.63 -import org.netbeans.modules.java.hints.providers.spi.HintDescriptionFactory;
  503.64 -import org.netbeans.modules.java.hints.providers.spi.Trigger;
  503.65 -import org.netbeans.modules.java.hints.spiimpl.JavaFixImpl;
  503.66 -import org.netbeans.modules.java.hints.spiimpl.MessageImpl;
  503.67 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch;
  503.68 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.BatchResult;
  503.69 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchUtilities;
  503.70 -import org.netbeans.modules.java.hints.spiimpl.batch.ProgressHandleWrapper;
  503.71 -import org.netbeans.modules.java.hints.spiimpl.batch.Scopes;
  503.72 -import org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker;
  503.73 -import org.netbeans.modules.java.hints.spiimpl.options.HintsSettings;
  503.74 -import org.netbeans.modules.java.hints.spiimpl.pm.PatternCompiler;
  503.75 -import org.netbeans.modules.refactoring.spi.RefactoringElementImplementation;
  503.76 -import org.netbeans.spi.editor.hints.*;
  503.77 -import org.netbeans.spi.java.hints.HintContext;
  503.78 -import org.netbeans.spi.java.hints.JavaFix;
  503.79 -import org.openide.util.Exceptions;
  503.80 -
  503.81 -/**
  503.82 - * Static utility classes for processing jackpot patterns.
  503.83 - * <a href="https://bitbucket.org/jlahoda/jackpot30/wiki/RulesLanguage">Rules Language</a>
  503.84 - * @author Jan Becicka
  503.85 - * @since 1.1
  503.86 - */
  503.87 -public final class TransformationSupport {
  503.88 -
  503.89 -    private String jackpotPattern;
  503.90 -    private Transformer transformer;
  503.91 -    private AtomicBoolean cancel = new AtomicBoolean();
  503.92 -
  503.93 -    private TransformationSupport(String jackpotPattern, Transformer transformer) {
  503.94 -        this.jackpotPattern = jackpotPattern;
  503.95 -        this.transformer = transformer;
  503.96 -    }
  503.97 -    
  503.98 -    /**
  503.99 -     * Creates new TransformationSupport representing given jackpotPattern.
 503.100 -     * @param jackpotPattern
 503.101 -     * @return
 503.102 -     */
 503.103 -    public static @NonNull TransformationSupport create(@NonNull String jackpotPattern) {
 503.104 -        return new TransformationSupport(jackpotPattern, null);
 503.105 -    }
 503.106 -
 503.107 -    /**
 503.108 -     * Creates new TransformationSupport representing given jackpotPattern with custom Transformer.
 503.109 -     * @param inputJackpotPattern
 503.110 -     * @param t
 503.111 -     * @see Transformer
 503.112 -     * @return
 503.113 -     */
 503.114 -    public static @NonNull TransformationSupport create(@NonNull String inputJackpotPattern, @NonNull Transformer t) {
 503.115 -        return new TransformationSupport(inputJackpotPattern, t);
 503.116 -    }
 503.117 -
 503.118 -    /**
 503.119 -     * Option to cancel query.
 503.120 -     * @param cancel
 503.121 -     * @return
 503.122 -     */
 503.123 -    public @NonNull TransformationSupport setCancel(@NonNull AtomicBoolean cancel) {
 503.124 -        this.cancel = cancel;
 503.125 -        return this;
 503.126 -    }
 503.127 -
 503.128 -
 503.129 -    /**
 503.130 -     * Run current transformation on all projects and collect results.
 503.131 -     * @return collection of {@link ModificationResult}
 503.132 -     */
 503.133 -    public @NonNull Collection<? extends ModificationResult> processAllProjects() {
 503.134 -        if (transformer!=null) {
 503.135 -            return performTransformation(jackpotPattern, transformer, cancel);
 503.136 -        } else {
 503.137 -            return performTransformation(jackpotPattern, cancel);
 503.138 -        }
 503.139 -    }
 503.140 -
 503.141 -    
 503.142 -    /**
 503.143 -     * Process current transformation on given treePath and performs rewrite on
 503.144 -     * workingCopy.
 503.145 -     * @param workingCopy
 503.146 -     * @param treePath 
 503.147 -     */
 503.148 -    public void transformTreePath(@NonNull WorkingCopy workingCopy, @NonNull TreePath treePath) {
 503.149 -        if (transformer!=null) {
 503.150 -            throw new UnsupportedOperationException("Not implemented yet");
 503.151 -        } else {
 503.152 -            performTransformation(workingCopy, treePath, jackpotPattern, cancel);
 503.153 -        }
 503.154 -    }
 503.155 -
 503.156 -
 503.157 -    /**
 503.158 -     * Transformer callback which is called for each occurrence during processing 
 503.159 -     * of {@link #performTransformation(java.lang.String, org.netbeans.spi.java.hints.support.JackpotSupport.Transformer, java.util.concurrent.atomic.AtomicBoolean)    
 503.160 -     */
 503.161 -    public interface Transformer {
 503.162 -
 503.163 -        /**
 503.164 -         * Implement custom transformation of occurrence here.
 503.165 -         * @param copy
 503.166 -         * @param occurrence
 503.167 -         */
 503.168 -        public void transform(WorkingCopy copy, Occurrence occurrence);
 503.169 -
 503.170 -    }
 503.171 -    
 503.172 -    
 503.173 -    
 503.174 -    /**
 503.175 -     * Performs transformation described by jackpotPattern on given workingCopy.
 503.176 -     * @param workingCopy
 503.177 -     * @param jackpotPattern
 503.178 -     * @param cancel
 503.179 -     */
 503.180 -    private static void performTransformation(WorkingCopy workingCopy, TreePath on, String jackpotPattern, AtomicBoolean cancel) {
 503.181 -        Iterable<? extends HintDescription> hints = PatternConvertor.create(jackpotPattern);
 503.182 -        HintsInvoker inv = new HintsInvoker(HintsSettings.getSettingsFor(workingCopy.getFileObject()), cancel);
 503.183 -        Map<HintDescription, List<ErrorDescription>> computeHints = inv.computeHints(workingCopy, on, false, hints, new ArrayList<MessageImpl>());
 503.184 -        
 503.185 -        if (computeHints == null || cancel.get()) return ;
 503.186 -        
 503.187 -        List<ErrorDescription> errs = new ArrayList<ErrorDescription>();
 503.188 -        for (Entry<HintDescription, List<ErrorDescription>> entry: computeHints.entrySet()) {
 503.189 -            errs.addAll(entry.getValue());
 503.190 -        }
 503.191 -        List<MessageImpl> problems = new LinkedList<MessageImpl>();
 503.192 -
 503.193 -        try {
 503.194 -            if (BatchUtilities.applyFixes(workingCopy, Collections.<Project, Set<String>>emptyMap(), errs, null, new ArrayList<RefactoringElementImplementation>(), problems)) {
 503.195 -                throw new IllegalStateException();
 503.196 -            }
 503.197 -        } catch (IllegalStateException ex) {
 503.198 -            Exceptions.printStackTrace(ex);
 503.199 -        } catch (Exception ex) {
 503.200 -            Exceptions.printStackTrace(ex);
 503.201 -        }
 503.202 -
 503.203 -        if (!problems.isEmpty()) {
 503.204 -            throw new IllegalStateException(problems.get(0).text);
 503.205 -        }
 503.206 -    }
 503.207 -    
 503.208 -    /**
 503.209 -     * Performs jackpotPattern transformation in all open projects.
 503.210 -     * @param jackpotPattern
 503.211 -     * @param cancel
 503.212 -     * @return
 503.213 -     */
 503.214 -    private static  Collection<? extends ModificationResult> performTransformation(String jackpotPattern, AtomicBoolean cancel) {
 503.215 -        Collection<MessageImpl> problems = new LinkedList<MessageImpl>();
 503.216 -        BatchResult batchResult = BatchSearch.findOccurrences(PatternConvertor.create(jackpotPattern), Scopes.allOpenedProjectsScope());
 503.217 -        return BatchUtilities.applyFixes(batchResult, new ProgressHandleWrapper(1, 1), cancel, problems);
 503.218 -    }
 503.219 -    
 503.220 -    /**
 503.221 -     * Performs transformation defined by transformer on all occurrences, which matches inputJackpotPattern.
 503.222 -     * @param inputJackpotPattern
 503.223 -     * @param transformer
 503.224 -     * @return collection of ModificationResults.
 503.225 -     */
 503.226 -    private static Collection<? extends ModificationResult> performTransformation(final String inputJackpotPattern, final Transformer transformer, AtomicBoolean cancel) {
 503.227 -        List<HintDescription> descriptions = new ArrayList<HintDescription>();
 503.228 -
 503.229 -        for (HintDescription hd : PatternConvertor.create(inputJackpotPattern)) {
 503.230 -            final String triggerPattern = ((Trigger.PatternDescription) hd.getTrigger()).getPattern();
 503.231 -            descriptions.add(HintDescriptionFactory.create().setTrigger(hd.getTrigger()).setWorker(new HintDescription.Worker() {
 503.232 -                @Override public Collection<? extends ErrorDescription> createErrors(HintContext ctx) {
 503.233 -                    final Map<String, TypeMirrorHandle<?>> constraintsHandles = new HashMap<String, TypeMirrorHandle<?>>();
 503.234 -
 503.235 -                    for (Map.Entry<String, TypeMirror> c : ctx.getConstraints().entrySet()) {
 503.236 -                        constraintsHandles.put(c.getKey(), TypeMirrorHandle.create(c.getValue()));
 503.237 -                    }
 503.238 -
 503.239 -                    Fix fix = new JavaFix(ctx.getInfo(), ctx.getPath()) {
 503.240 -                        @Override protected String getText() {
 503.241 -                            return "";
 503.242 -                        }
 503.243 -                        @Override protected void performRewrite(JavaFix.TransformationContext ctx) {
 503.244 -                            WorkingCopy wc = ctx.getWorkingCopy();
 503.245 -                            Map<String, TypeMirror> constraints = new HashMap<String, TypeMirror>();
 503.246 -
 503.247 -                            for (Map.Entry<String, TypeMirrorHandle<?>> c : constraintsHandles.entrySet()) {
 503.248 -                                constraints.put(c.getKey(), c.getValue().resolve(wc));
 503.249 -                            }
 503.250 -
 503.251 -                            Pattern pattern = PatternCompiler.compile(wc, triggerPattern, constraints, Collections.<String>emptyList());
 503.252 -                            Collection<? extends Occurrence> occurrence = Matcher.create(wc).setTreeTopSearch().setSearchRoot(ctx.getPath()).match(pattern);
 503.253 -
 503.254 -                            assert occurrence.size() == 1;
 503.255 -
 503.256 -                            transformer.transform(wc, occurrence.iterator().next());
 503.257 -                        }
 503.258 -                    }.toEditorFix();
 503.259 -                    
 503.260 -                    return Collections.singletonList(ErrorDescriptionFactory.createErrorDescription(Severity.WARNING, "", Collections.singletonList(fix), ctx.getInfo().getFileObject(), 0, 0));
 503.261 -                }
 503.262 -            }).produce());
 503.263 -
 503.264 -        }
 503.265 -        
 503.266 -        BatchSearch.BatchResult batchResult = BatchSearch.findOccurrences(descriptions, Scopes.allOpenedProjectsScope());
 503.267 -        return BatchUtilities.applyFixes(batchResult, new ProgressHandleWrapper(1, 1), cancel, new ArrayList<MessageImpl>());
 503.268 -    }
 503.269 -    
 503.270 -    /**
 503.271 -     * Performs transformation described by transformationJackpotPattern on all occurences described by inputJackpotPattern.
 503.272 -     * @param inputJackpotPattern
 503.273 -     * @param transformationJackpotPattern
 503.274 -     * @param cancel 
 503.275 -     * @return
 503.276 -     */
 503.277 -    private static Collection<? extends ModificationResult> performTransformation(String inputJackpotPattern, final String transformationJackpotPattern, AtomicBoolean cancel) {
 503.278 -        return performTransformation(inputJackpotPattern, new Transformer() {
 503.279 -
 503.280 -            @Override
 503.281 -            public void transform(WorkingCopy copy, Occurrence occurrence) {
 503.282 -                try {
 503.283 -                    Fix toFix = TransformationSupport.rewriteFix(copy, "whatever", occurrence.getOccurrenceRoot(), transformationJackpotPattern, occurrence.getVariables(), occurrence.getMultiVariables(), occurrence.getVariables2Names(), Collections.<String, TypeMirror>emptyMap(), Collections.<String, String>emptyMap());
 503.284 -                    TransformationSupport.process(((JavaFixImpl) toFix).jf, copy, false, null, new ArrayList<RefactoringElementImplementation>());
 503.285 -                } catch (Exception ex) {
 503.286 -                    Exceptions.printStackTrace(ex);
 503.287 -                }
 503.288 -            }
 503.289 -        }, cancel);
 503.290 -    }
 503.291 -
 503.292 -    private static ChangeInfo process(JavaFix jf, WorkingCopy wc, boolean canShowUI, Map<org.openide.filesystems.FileObject, byte[]> resourceContent, Collection<? super RefactoringElementImplementation> fileChanges) throws Exception {
 503.293 -        return JavaFixImpl.Accessor.INSTANCE.process(jf, wc, canShowUI, resourceContent, fileChanges);
 503.294 -    }
 503.295 -
 503.296 -    /**
 503.297 -     * 
 503.298 -     * @param info
 503.299 -     * @param displayName
 503.300 -     * @param what
 503.301 -     * @param to
 503.302 -     * @param parameters
 503.303 -     * @param parametersMulti
 503.304 -     * @param parameterNames
 503.305 -     * @param constraints
 503.306 -     * @param options
 503.307 -     * @param imports
 503.308 -     * @return
 503.309 -     */
 503.310 -    private static Fix rewriteFix(CompilationInfo info, String displayName, TreePath what, final String to, Map<String, TreePath> parameters, Map<String, Collection<? extends TreePath>> parametersMulti, final Map<String, String> parameterNames, Map<String, TypeMirror> constraints, Map<String, String> options, String... imports) {
 503.311 -        return JavaFixImpl.Accessor.INSTANCE.rewriteFix(info, displayName, what, to, parameters, parametersMulti, parameterNames, constraints, options, imports);
 503.312 -    }
 503.313 -    
 503.314 -}
   504.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/providers/code/CodeHintProviderImplTest.java	Mon Dec 19 11:37:36 2016 +0100
   504.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   504.3 @@ -1,114 +0,0 @@
   504.4 -/*
   504.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   504.6 - *
   504.7 - * Copyright 2009-2010 Oracle and/or its affiliates. All rights reserved.
   504.8 - *
   504.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  504.10 - * Other names may be trademarks of their respective owners.
  504.11 - *
  504.12 - * The contents of this file are subject to the terms of either the GNU
  504.13 - * General Public License Version 2 only ("GPL") or the Common
  504.14 - * Development and Distribution License("CDDL") (collectively, the
  504.15 - * "License"). You may not use this file except in compliance with the
  504.16 - * License. You can obtain a copy of the License at
  504.17 - * http://www.netbeans.org/cddl-gplv2.html
  504.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  504.19 - * specific language governing permissions and limitations under the
  504.20 - * License.  When distributing the software, include this License Header
  504.21 - * Notice in each file and include the License file at
  504.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  504.23 - * particular file as subject to the "Classpath" exception as provided
  504.24 - * by Oracle in the GPL Version 2 section of the License file that
  504.25 - * accompanied this code. If applicable, add the following below the
  504.26 - * License Header, with the fields enclosed by brackets [] replaced by
  504.27 - * your own identifying information:
  504.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  504.29 - *
  504.30 - * If you wish your version of this file to be governed by only the CDDL
  504.31 - * or only the GPL Version 2, indicate your decision by adding
  504.32 - * "[Contributor] elects to include this software in this distribution
  504.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  504.34 - * single choice of license, a recipient has the option to distribute
  504.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  504.36 - * to extend the choice of license to its licensees as provided above.
  504.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  504.38 - * Version 2 license, then the option applies only if the new code is
  504.39 - * made subject to such option by the copyright holder.
  504.40 - *
  504.41 - * Contributor(s):
  504.42 - *
  504.43 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  504.44 - */
  504.45 -
  504.46 -package org.netbeans.modules.java.hints.providers.code;
  504.47 -
  504.48 -import com.sun.source.tree.Tree.Kind;
  504.49 -import java.util.Arrays;
  504.50 -import java.util.Collection;
  504.51 -import java.util.HashSet;
  504.52 -import java.util.Map;
  504.53 -import java.util.Set;
  504.54 -import org.junit.Test;
  504.55 -import org.netbeans.spi.java.hints.ConstraintVariableType;
  504.56 -import org.netbeans.spi.java.hints.Hint;
  504.57 -import org.netbeans.spi.java.hints.TriggerPattern;
  504.58 -import org.netbeans.spi.java.hints.TriggerTreeKind;
  504.59 -import org.netbeans.spi.java.hints.HintContext;
  504.60 -import static org.junit.Assert.*;
  504.61 -import org.netbeans.modules.java.hints.providers.code.CodeHintProviderImpl.WorkerImpl;
  504.62 -import org.netbeans.modules.java.hints.spiimpl.SPIAccessor;
  504.63 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
  504.64 -import org.netbeans.modules.java.hints.providers.spi.HintMetadata;
  504.65 -import org.netbeans.spi.editor.hints.ErrorDescription;
  504.66 -
  504.67 -/**
  504.68 - *
  504.69 - * @author lahvac
  504.70 - */
  504.71 -@Hint(displayName="foo", description="bar", id="hintPattern", category="general")
  504.72 -public class CodeHintProviderImplTest {
  504.73 -
  504.74 -    public CodeHintProviderImplTest() {
  504.75 -    }
  504.76 -
  504.77 -    @Test
  504.78 -    public void testComputeHints() throws Exception {
  504.79 -        Map<HintMetadata, ? extends Collection<? extends HintDescription>> hints = new CodeHintProviderImpl().computeHints();
  504.80 -
  504.81 -        Set<String> golden = new HashSet<String>(Arrays.asList(
  504.82 -            "$1.toURL():public static org.netbeans.spi.editor.hints.ErrorDescription org.netbeans.modules.java.hints.providers.code.CodeHintProviderImplTest.hintPattern1(org.netbeans.spi.java.hints.HintContext)",
  504.83 -            "[METHOD_INVOCATION]:public static org.netbeans.spi.editor.hints.ErrorDescription org.netbeans.modules.java.hints.providers.code.CodeHintProviderImplTest.hintPattern2(org.netbeans.spi.java.hints.HintContext)"
  504.84 -        ));
  504.85 -
  504.86 -        for (Collection<? extends HintDescription> hds : hints.values()) {
  504.87 -            for (HintDescription d : hds) {
  504.88 -                golden.remove(toString(d));
  504.89 -            }
  504.90 -        }
  504.91 -
  504.92 -        assertTrue(golden.toString(), golden.isEmpty());
  504.93 -    }
  504.94 -
  504.95 -    private static String toString(HintDescription hd) throws Exception {
  504.96 -        StringBuilder sb = new StringBuilder();
  504.97 -
  504.98 -        sb.append(hd.getTrigger());
  504.99 -        sb.append(":");
 504.100 -        
 504.101 -        //TODO: constraints
 504.102 -        sb.append(((WorkerImpl) hd.getWorker()).getMethod().toGenericString());
 504.103 -
 504.104 -        return sb.toString();
 504.105 -    }
 504.106 -
 504.107 -    @TriggerPattern(value="$1.toURL()", constraints=@ConstraintVariableType(variable="$1", type="java.io.File"))
 504.108 -    public static ErrorDescription hintPattern1(HintContext ctx) {
 504.109 -        return null;
 504.110 -    }
 504.111 -
 504.112 -    @TriggerTreeKind(Kind.METHOD_INVOCATION)
 504.113 -    public static ErrorDescription hintPattern2(HintContext ctx) {
 504.114 -        return null;
 504.115 -    }
 504.116 -
 504.117 -}
 504.118 \ No newline at end of file
   505.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/providers/code/FSWrapperTest.java	Mon Dec 19 11:37:36 2016 +0100
   505.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   505.3 @@ -1,221 +0,0 @@
   505.4 -/*
   505.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   505.6 - *
   505.7 - * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
   505.8 - *
   505.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  505.10 - * Other names may be trademarks of their respective owners.
  505.11 - *
  505.12 - * The contents of this file are subject to the terms of either the GNU
  505.13 - * General Public License Version 2 only ("GPL") or the Common
  505.14 - * Development and Distribution License("CDDL") (collectively, the
  505.15 - * "License"). You may not use this file except in compliance with the
  505.16 - * License. You can obtain a copy of the License at
  505.17 - * http://www.netbeans.org/cddl-gplv2.html
  505.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  505.19 - * specific language governing permissions and limitations under the
  505.20 - * License.  When distributing the software, include this License Header
  505.21 - * Notice in each file and include the License file at
  505.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  505.23 - * particular file as subject to the "Classpath" exception as provided
  505.24 - * by Oracle in the GPL Version 2 section of the License file that
  505.25 - * accompanied this code. If applicable, add the following below the
  505.26 - * License Header, with the fields enclosed by brackets [] replaced by
  505.27 - * your own identifying information:
  505.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  505.29 - *
  505.30 - * If you wish your version of this file to be governed by only the CDDL
  505.31 - * or only the GPL Version 2, indicate your decision by adding
  505.32 - * "[Contributor] elects to include this software in this distribution
  505.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  505.34 - * single choice of license, a recipient has the option to distribute
  505.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  505.36 - * to extend the choice of license to its licensees as provided above.
  505.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  505.38 - * Version 2 license, then the option applies only if the new code is
  505.39 - * made subject to such option by the copyright holder.
  505.40 - *
  505.41 - * Contributor(s):
  505.42 - *
  505.43 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  505.44 - */
  505.45 -
  505.46 -package org.netbeans.modules.java.hints.providers.code;
  505.47 -
  505.48 -import java.lang.annotation.Annotation;
  505.49 -import java.lang.reflect.AnnotatedElement;
  505.50 -import java.lang.reflect.Array;
  505.51 -import java.lang.reflect.Method;
  505.52 -import java.util.ArrayList;
  505.53 -import java.util.LinkedList;
  505.54 -import java.util.List;
  505.55 -import java.util.Map;
  505.56 -import java.util.prefs.Preferences;
  505.57 -import javax.sound.sampled.LineListener;
  505.58 -import javax.swing.JComponent;
  505.59 -import javax.swing.JPanel;
  505.60 -import static org.junit.Assert.assertEquals;
  505.61 -import static org.junit.Assert.assertNotNull;
  505.62 -import static org.junit.Assert.fail;
  505.63 -import org.junit.Test;
  505.64 -import org.netbeans.modules.java.hints.providers.code.FSWrapper.AnnotatableWrapper;
  505.65 -import org.netbeans.modules.java.hints.providers.code.FSWrapper.ClassWrapper;
  505.66 -import org.netbeans.modules.java.hints.providers.code.FSWrapper.MethodWrapper;
  505.67 -import org.netbeans.spi.java.hints.CustomizerProvider;
  505.68 -import org.netbeans.spi.java.hints.Hint;
  505.69 -import org.netbeans.spi.java.hints.HintContext;
  505.70 -import org.netbeans.spi.java.hints.TestAnnotations.TestAnnotation1;
  505.71 -import org.netbeans.spi.java.hints.TestAnnotations.TestAnnotation2;
  505.72 -import org.netbeans.spi.java.hints.TestAnnotations.TestAnnotation3;
  505.73 -import org.netbeans.spi.java.hints.TestAnnotations.TestEnum;
  505.74 -
  505.75 -/**
  505.76 - *
  505.77 - * @author lahvac
  505.78 - */
  505.79 -public class FSWrapperTest {
  505.80 -
  505.81 -    public FSWrapperTest() {
  505.82 -    }
  505.83 -
  505.84 -    @Test
  505.85 -    public void testWrappedClasses() throws Exception {
  505.86 -        Class[] classes = new Class[] {TestClass.class};
  505.87 -        Iterable<? extends ClassWrapper> wrapped = FSWrapper.listClasses();
  505.88 -
  505.89 -        OUTER: for (Class<?> c : classes) {
  505.90 -            for (ClassWrapper w : wrapped) {
  505.91 -                if (w.getName().equals(c.getName())) {
  505.92 -                    checkClassWrapper(c, w);
  505.93 -                    continue OUTER;
  505.94 -                }
  505.95 -            }
  505.96 -
  505.97 -            fail(c.getName());
  505.98 -        }
  505.99 -    }
 505.100 -
 505.101 -    private static void checkClassWrapper(Class<?> c, ClassWrapper cw) throws Exception {
 505.102 -        checkAnnotations(c, cw);
 505.103 -
 505.104 -        OUTER: for (Method m : c.getDeclaredMethods()) {
 505.105 -            if (m.getAnnotations().length == 0) continue;
 505.106 -            
 505.107 -            for (MethodWrapper wrapped : cw.getMethods()) {
 505.108 -                if (wrapped.getName().equals(m.getName())) {
 505.109 -                    assertEquals(m, FSWrapper.resolveMethod(wrapped.getClazz().getName(), wrapped.getName()));
 505.110 -                    checkAnnotations(m, wrapped);
 505.111 -                    continue OUTER;
 505.112 -                }
 505.113 -            }
 505.114 -            
 505.115 -            fail(m.getName());
 505.116 -        }
 505.117 -    }
 505.118 -
 505.119 -    private static void checkAnnotations(AnnotatedElement el, AnnotatableWrapper aw) throws Exception {
 505.120 -        for (Annotation ann : el.getAnnotations()) {
 505.121 -            Annotation wrapper = aw.getAnnotation(ann.annotationType());
 505.122 -
 505.123 -            assertNotNull(ann.annotationType().getName(), wrapper);
 505.124 -
 505.125 -            checkAnnotation(ann, wrapper);
 505.126 -        }
 505.127 -    }
 505.128 -
 505.129 -    private static void checkAnnotation(Annotation real, Annotation wrapped) throws Exception {
 505.130 -        for (Method m : real.annotationType().getDeclaredMethods()) {
 505.131 -            Object realValue = m.invoke(real);
 505.132 -            Object wrappedValue = m.invoke(wrapped);
 505.133 -
 505.134 -            checkValue(realValue, wrappedValue);
 505.135 -        }
 505.136 -    }
 505.137 -
 505.138 -    private static void checkValue(Object o1, Object o2) throws Exception {
 505.139 -        assertEquals(o1.getClass().isAnnotation(), o2.getClass().isAnnotation());
 505.140 -        if (o1.getClass().isAnnotation()) {
 505.141 -            assertEquals(((Annotation) o1).annotationType(), ((Annotation) o2).annotationType());
 505.142 -        } else {
 505.143 -            assertEquals(o1.getClass(), o2.getClass());
 505.144 -        }
 505.145 -
 505.146 -        if (o1.getClass().isArray()) {
 505.147 -            assertEquals(Array.getLength(o1), Array.getLength(o2));
 505.148 -
 505.149 -            for (int c = 0; c < Array.getLength(o1); c++) {
 505.150 -                checkValue(Array.get(o1, c), Array.get(o2, c));
 505.151 -            }
 505.152 -        } else if (o1.getClass().isAnnotation()) {
 505.153 -            checkAnnotation((Annotation) o1, (Annotation) o2);
 505.154 -        } else {
 505.155 -            assertEquals(o1, o2);
 505.156 -        }
 505.157 -    }
 505.158 -
 505.159 -    @Hint(displayName="foo", description="bar", category="")
 505.160 -    @TestAnnotation1(
 505.161 -        b1=true,
 505.162 -        b3=true,
 505.163 -        i1=42,
 505.164 -        i3=84,
 505.165 -        s1="a42",
 505.166 -        s3="a84",
 505.167 -        a1=@TestAnnotation2(a1=@TestAnnotation3(as1={"u1a2", "u1b2"}, as3="u1c2")),
 505.168 -//        a3=@TestAnnotation2(a1=@TestAnnotation3(as1={"u1a2", "u1b2"}, as3="u1c2")),
 505.169 -        c1=String.class,
 505.170 -        c3=String.class,
 505.171 -        e1=TestEnum.C,
 505.172 -        e3=TestEnum.D,
 505.173 -        ab1={false, true},
 505.174 -        ab3={false, true, false},
 505.175 -        ai1={84, 42},
 505.176 -        ai3={84, 42, 84},
 505.177 -        as1={"c42", "c84"},
 505.178 -        as3={"c42", "c84", "c42"},
 505.179 -        aa1={@TestAnnotation2(a1=@TestAnnotation3(as1={"u3a2", "u3b2"}, as3="u3c2")), @TestAnnotation2(a1=@TestAnnotation3(as1={"u4a2", "u4b2"}, as3="u4c2"))},
 505.180 -//        aa3={@TestAnnotation2(a1=@TestAnnotation3(as1={"u5a2", "u5b2"}, as3="u5c2")), @TestAnnotation2(a1=@TestAnnotation3(as1={"u6a2", "u6b2"}, as3="u6c2"))},
 505.181 -        ac1={List.class, Integer.class},
 505.182 -        ac3={LineListener.class, LinkedList.class},
 505.183 -        ae1={TestEnum.C, TestEnum.D},
 505.184 -        ae3={TestEnum.D, TestEnum.C}
 505.185 -    )
 505.186 -    public static class TestClass {
 505.187 -        @TestAnnotation1(
 505.188 -            b1=false,
 505.189 -            b2=true,
 505.190 -            i1=43,
 505.191 -            i2=85,
 505.192 -            s1="w42",
 505.193 -            s2="w84",
 505.194 -            a1=@TestAnnotation2(a1=@TestAnnotation3(as1={"u7a2", "u7b2"}, as3="u7c2")),
 505.195 -//            a2=@TestAnnotation2(a1=@TestAnnotation3(as1={"u8a2", "u8b2"}, as3="u8c2")),
 505.196 -            c1=String.class,
 505.197 -            c2=String.class,
 505.198 -            e1=TestEnum.C,
 505.199 -            e3=TestEnum.D,
 505.200 -            ab1={false, true},
 505.201 -            ab2={false, true, false},
 505.202 -            ai1={85, 43},
 505.203 -            ai2={85, 43, 85},
 505.204 -            as1={"d42", "d84"},
 505.205 -            as2={"e42", "e84", "e42"},
 505.206 -            aa1={@TestAnnotation2(a1=@TestAnnotation3(as1={"u9a2", "u9b2"}, as3="u9c2")), @TestAnnotation2(a1=@TestAnnotation3(as1={"uaa2", "u4b2"}, as3="uac2"))},
 505.207 -//            aa2={@TestAnnotation2(a1=@TestAnnotation3(as1={"uba2", "ubb2"}, as3="ubc2")), @TestAnnotation2(a1=@TestAnnotation3(as1={"uca2", "ucb2"}, as3="ucc2"))},
 505.208 -            ac1={ArrayList.class, Float.class},
 505.209 -            ac2={StringBuilder.class, Map.class},
 505.210 -            ae1={TestEnum.C, TestEnum.D},
 505.211 -            ae3={TestEnum.D, TestEnum.C}
 505.212 -        )
 505.213 -        public static void test(HintContext ctx) {
 505.214 -            
 505.215 -        }
 505.216 -    }
 505.217 -
 505.218 -    public static class CustomizerImpl implements CustomizerProvider {
 505.219 -        @Override public JComponent getCustomizer(Preferences prefs) {
 505.220 -            return new JPanel();
 505.221 -        }
 505.222 -    }
 505.223 -
 505.224 -}
   506.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/providers/code/TestAnnotations.java	Mon Dec 19 11:37:36 2016 +0100
   506.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   506.3 @@ -1,109 +0,0 @@
   506.4 -/*
   506.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   506.6 - *
   506.7 - * Copyright 2012 Oracle and/or its affiliates. All rights reserved.
   506.8 - *
   506.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  506.10 - * Other names may be trademarks of their respective owners.
  506.11 - *
  506.12 - * The contents of this file are subject to the terms of either the GNU
  506.13 - * General Public License Version 2 only ("GPL") or the Common
  506.14 - * Development and Distribution License("CDDL") (collectively, the
  506.15 - * "License"). You may not use this file except in compliance with the
  506.16 - * License. You can obtain a copy of the License at
  506.17 - * http://www.netbeans.org/cddl-gplv2.html
  506.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  506.19 - * specific language governing permissions and limitations under the
  506.20 - * License.  When distributing the software, include this License Header
  506.21 - * Notice in each file and include the License file at
  506.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  506.23 - * particular file as subject to the "Classpath" exception as provided
  506.24 - * by Oracle in the GPL Version 2 section of the License file that
  506.25 - * accompanied this code. If applicable, add the following below the
  506.26 - * License Header, with the fields enclosed by brackets [] replaced by
  506.27 - * your own identifying information:
  506.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  506.29 - *
  506.30 - * If you wish your version of this file to be governed by only the CDDL
  506.31 - * or only the GPL Version 2, indicate your decision by adding
  506.32 - * "[Contributor] elects to include this software in this distribution
  506.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  506.34 - * single choice of license, a recipient has the option to distribute
  506.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  506.36 - * to extend the choice of license to its licensees as provided above.
  506.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  506.38 - * Version 2 license, then the option applies only if the new code is
  506.39 - * made subject to such option by the copyright holder.
  506.40 - *
  506.41 - * Contributor(s):
  506.42 - *
  506.43 - * Portions Copyrighted 2012 Sun Microsystems, Inc.
  506.44 - */
  506.45 -//placed in this package intentionally: the JavaHintsAnnotationProcessor ignores all annotations outside this package
  506.46 -package org.netbeans.spi.java.hints;
  506.47 -
  506.48 -import java.lang.annotation.Retention;
  506.49 -import java.lang.annotation.RetentionPolicy;
  506.50 -
  506.51 -/**
  506.52 - *
  506.53 - * @author lahvac
  506.54 - */
  506.55 -public class TestAnnotations {
  506.56 -    
  506.57 -    @Retention(RetentionPolicy.RUNTIME)
  506.58 -    public @interface TestAnnotation1 {
  506.59 -        public boolean b1();
  506.60 -        public boolean b2() default false;
  506.61 -        public boolean b3() default false;
  506.62 -        public int     i1();
  506.63 -        public int     i2() default 1;
  506.64 -        public int     i3() default 1;
  506.65 -        public String  s1();
  506.66 -        public String  s2() default "";
  506.67 -        public String  s3() default "";
  506.68 -        public TestAnnotation2 a1();
  506.69 -//        public TestAnnotation2 a2() default @TestAnnotation2(a1=@TestAnnotation3(as1={"a", "b"}, as3="c"));
  506.70 -//        public TestAnnotation2 a3() default @TestAnnotation2(a1=@TestAnnotation3(as1={"a2", "b2"}, as3="c2"));
  506.71 -        public Class   c1();
  506.72 -        public Class   c2() default Void.class;
  506.73 -        public Class   c3() default Void.class;
  506.74 -        public TestEnum e1();
  506.75 -//        public TestEnum e2() default TestEnum.A;
  506.76 -        public TestEnum e3()/* default TestEnum.A*/;
  506.77 -        public boolean[] ab1();
  506.78 -        public boolean[] ab2() default false;
  506.79 -        public boolean[] ab3() default false;
  506.80 -        public int[]     ai1();
  506.81 -        public int[]     ai2() default 1;
  506.82 -        public int[]     ai3() default 1;
  506.83 -        public String[]  as1();
  506.84 -        public String[]  as2() default "";
  506.85 -        public String[]  as3() default "";
  506.86 -        public TestAnnotation2[] aa1();
  506.87 -//        public TestAnnotation2[] aa2() default @TestAnnotation2(a1=@TestAnnotation3(as1={"a", "b"}, as3="c"));
  506.88 -//        public TestAnnotation2[] aa3() default @TestAnnotation2(a1=@TestAnnotation3(as1={"a2", "b2"}, as3="c2"));
  506.89 -        public Class[]   ac1();
  506.90 -        public Class[]   ac2() default Void.class;
  506.91 -        public Class[]   ac3() default Void.class;
  506.92 -        public TestEnum[] ae1();
  506.93 -//        public TestEnum[] ae2() default TestEnum.A;
  506.94 -        public TestEnum[] ae3()/* default TestEnum.A*/;
  506.95 -    }
  506.96 -
  506.97 -    public @interface TestAnnotation2 {
  506.98 -        public TestAnnotation3 a1();
  506.99 -//        public TestAnnotation3 a2() default @TestAnnotation3(as1={"d", "e"}, as3="f");
 506.100 -//        public TestAnnotation3 a3() default @TestAnnotation3(as1={"g", "h"}, as3="i");
 506.101 -    }
 506.102 -
 506.103 -    public @interface TestAnnotation3 {
 506.104 -        public String[] as1();
 506.105 -        public String[] as2() default {""};
 506.106 -        public String[] as3() default {""};
 506.107 -    }
 506.108 -
 506.109 -    public enum TestEnum {
 506.110 -        A, B, C, D;
 506.111 -    }
 506.112 -}
   507.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/TestBase.java	Mon Dec 19 11:37:36 2016 +0100
   507.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   507.3 @@ -1,124 +0,0 @@
   507.4 -/*
   507.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   507.6 - *
   507.7 - * Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   507.8 - *
   507.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  507.10 - * Other names may be trademarks of their respective owners.
  507.11 - *
  507.12 - * The contents of this file are subject to the terms of either the GNU
  507.13 - * General Public License Version 2 only ("GPL") or the Common
  507.14 - * Development and Distribution License("CDDL") (collectively, the
  507.15 - * "License"). You may not use this file except in compliance with the
  507.16 - * License. You can obtain a copy of the License at
  507.17 - * http://www.netbeans.org/cddl-gplv2.html
  507.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  507.19 - * specific language governing permissions and limitations under the
  507.20 - * License.  When distributing the software, include this License Header
  507.21 - * Notice in each file and include the License file at
  507.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  507.23 - * particular file as subject to the "Classpath" exception as provided
  507.24 - * by Oracle in the GPL Version 2 section of the License file that
  507.25 - * accompanied this code. If applicable, add the following below the
  507.26 - * License Header, with the fields enclosed by brackets [] replaced by
  507.27 - * your own identifying information:
  507.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  507.29 - *
  507.30 - * If you wish your version of this file to be governed by only the CDDL
  507.31 - * or only the GPL Version 2, indicate your decision by adding
  507.32 - * "[Contributor] elects to include this software in this distribution
  507.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  507.34 - * single choice of license, a recipient has the option to distribute
  507.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  507.36 - * to extend the choice of license to its licensees as provided above.
  507.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  507.38 - * Version 2 license, then the option applies only if the new code is
  507.39 - * made subject to such option by the copyright holder.
  507.40 - *
  507.41 - * Contributor(s):
  507.42 - *
  507.43 - * Portions Copyrighted 2008-2009 Sun Microsystems, Inc.
  507.44 - */
  507.45 -
  507.46 -package org.netbeans.modules.java.hints.spiimpl;
  507.47 -
  507.48 -import java.io.File;
  507.49 -import javax.swing.text.Document;
  507.50 -import org.netbeans.api.java.lexer.JavaTokenId;
  507.51 -import org.netbeans.api.java.source.CompilationInfo;
  507.52 -import org.netbeans.api.java.source.JavaSource;
  507.53 -import org.netbeans.api.java.source.JavaSource.Phase;
  507.54 -import org.netbeans.api.java.source.SourceUtilsTestUtil;
  507.55 -import org.netbeans.api.java.source.TestUtilities;
  507.56 -import org.netbeans.api.lexer.Language;
  507.57 -import org.netbeans.junit.NbTestCase;
  507.58 -import org.netbeans.modules.java.source.TreeLoader;
  507.59 -import org.openide.cookies.EditorCookie;
  507.60 -import org.openide.filesystems.FileObject;
  507.61 -import org.openide.filesystems.FileUtil;
  507.62 -import org.openide.loaders.DataObject;
  507.63 -
  507.64 -/**
  507.65 - *
  507.66 - * @author Jan Lahoda
  507.67 - */
  507.68 -public class TestBase extends NbTestCase {
  507.69 -
  507.70 -    public TestBase(String name) {
  507.71 -        super(name);
  507.72 -    }
  507.73 -
  507.74 -    @Override
  507.75 -    protected void setUp() throws Exception {
  507.76 -        super.setUp();
  507.77 -        SourceUtilsTestUtil.prepareTest(new String[0], new Object[0]);
  507.78 -        TreeLoader.DISABLE_CONFINEMENT_TEST = true;
  507.79 -        clearWorkDir();
  507.80 -
  507.81 -        FileUtil.refreshFor(File.listRoots());
  507.82 -    }
  507.83 -
  507.84 -    private int workDirPart = 0;
  507.85 -    
  507.86 -    protected void prepareTest(String fileName, String code) throws Exception {
  507.87 -        FileObject workFO = FileUtil.createFolder(new File(getWorkDir(), String.valueOf(workDirPart++)));
  507.88 -
  507.89 -        assertNotNull(workFO);
  507.90 -
  507.91 -        workFO.refresh();
  507.92 -
  507.93 -        sourceRoot = workFO.createFolder("src");
  507.94 -        FileObject buildRoot  = workFO.createFolder("build");
  507.95 -        FileObject cache = workFO.createFolder("cache");
  507.96 -
  507.97 -        FileObject data = FileUtil.createData(sourceRoot, fileName);
  507.98 -        File dataFile = FileUtil.toFile(data);
  507.99 -
 507.100 -        assertNotNull(dataFile);
 507.101 -
 507.102 -        TestUtilities.copyStringToFile(dataFile, code);
 507.103 -
 507.104 -        SourceUtilsTestUtil.prepareTest(sourceRoot, buildRoot, cache);
 507.105 -
 507.106 -        DataObject od = DataObject.find(data);
 507.107 -        EditorCookie ec = od.getLookup().lookup(EditorCookie.class);
 507.108 -
 507.109 -        assertNotNull(ec);
 507.110 -
 507.111 -        doc = ec.openDocument();
 507.112 -        doc.putProperty(Language.class, JavaTokenId.language());
 507.113 -
 507.114 -        JavaSource js = JavaSource.forFileObject(data);
 507.115 -
 507.116 -        assertNotNull(js);
 507.117 -
 507.118 -        info = SourceUtilsTestUtil.getCompilationInfo(js, Phase.RESOLVED);
 507.119 -
 507.120 -        assertNotNull(info);
 507.121 -    }
 507.122 -
 507.123 -    protected FileObject sourceRoot;
 507.124 -    protected CompilationInfo info;
 507.125 -    protected Document doc;
 507.126 -
 507.127 -}
   508.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/TestCompilerSettings.java	Mon Dec 19 11:37:36 2016 +0100
   508.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   508.3 @@ -1,60 +0,0 @@
   508.4 -/*
   508.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   508.6 - *
   508.7 - * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
   508.8 - *
   508.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  508.10 - * Other names may be trademarks of their respective owners.
  508.11 - *
  508.12 - * The contents of this file are subject to the terms of either the GNU
  508.13 - * General Public License Version 2 only ("GPL") or the Common
  508.14 - * Development and Distribution License("CDDL") (collectively, the
  508.15 - * "License"). You may not use this file except in compliance with the
  508.16 - * License. You can obtain a copy of the License at
  508.17 - * http://www.netbeans.org/cddl-gplv2.html
  508.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  508.19 - * specific language governing permissions and limitations under the
  508.20 - * License.  When distributing the software, include this License Header
  508.21 - * Notice in each file and include the License file at
  508.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  508.23 - * particular file as subject to the "Classpath" exception as provided
  508.24 - * by Oracle in the GPL Version 2 section of the License file that
  508.25 - * accompanied this code. If applicable, add the following below the
  508.26 - * License Header, with the fields enclosed by brackets [] replaced by
  508.27 - * your own identifying information:
  508.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  508.29 - *
  508.30 - * If you wish your version of this file to be governed by only the CDDL
  508.31 - * or only the GPL Version 2, indicate your decision by adding
  508.32 - * "[Contributor] elects to include this software in this distribution
  508.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  508.34 - * single choice of license, a recipient has the option to distribute
  508.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  508.36 - * to extend the choice of license to its licensees as provided above.
  508.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  508.38 - * Version 2 license, then the option applies only if the new code is
  508.39 - * made subject to such option by the copyright holder.
  508.40 - *
  508.41 - * Contributor(s):
  508.42 - *
  508.43 - * Portions Copyrighted 2013 Sun Microsystems, Inc.
  508.44 - */
  508.45 -package org.netbeans.modules.java.hints.spiimpl;
  508.46 -
  508.47 -import org.netbeans.modules.java.source.tasklist.CompilerSettings;
  508.48 -import org.openide.filesystems.FileObject;
  508.49 -import org.openide.util.lookup.ServiceProvider;
  508.50 -
  508.51 -/**
  508.52 - *
  508.53 - * @author lahvac
  508.54 - */
  508.55 -@ServiceProvider(service=CompilerSettings.class, position=0, supersedes="org.netbeans.modules.java.hints.StandardJavacWarnings$CompilerSettingsImpl")
  508.56 -public class TestCompilerSettings extends CompilerSettings {
  508.57 -    public static String commandLine;
  508.58 -    @Override
  508.59 -    protected String buildCommandLine(FileObject file) {
  508.60 -        return commandLine;
  508.61 -    }
  508.62 -    
  508.63 -}
   509.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/TestUtilities.java	Mon Dec 19 11:37:36 2016 +0100
   509.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   509.3 @@ -1,67 +0,0 @@
   509.4 -/*
   509.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   509.6 - *
   509.7 - * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
   509.8 - *
   509.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  509.10 - * Other names may be trademarks of their respective owners.
  509.11 - *
  509.12 - * The contents of this file are subject to the terms of either the GNU
  509.13 - * General Public License Version 2 only ("GPL") or the Common
  509.14 - * Development and Distribution License("CDDL") (collectively, the
  509.15 - * "License"). You may not use this file except in compliance with the
  509.16 - * License. You can obtain a copy of the License at
  509.17 - * http://www.netbeans.org/cddl-gplv2.html
  509.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  509.19 - * specific language governing permissions and limitations under the
  509.20 - * License.  When distributing the software, include this License Header
  509.21 - * Notice in each file and include the License file at
  509.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  509.23 - * particular file as subject to the "Classpath" exception as provided
  509.24 - * by Oracle in the GPL Version 2 section of the License file that
  509.25 - * accompanied this code. If applicable, add the following below the
  509.26 - * License Header, with the fields enclosed by brackets [] replaced by
  509.27 - * your own identifying information:
  509.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  509.29 - *
  509.30 - * Contributor(s):
  509.31 - *
  509.32 - * Portions Copyrighted 2007 Sun Microsystems, Inc.
  509.33 - */
  509.34 -package org.netbeans.modules.java.hints.spiimpl;
  509.35 -
  509.36 -import junit.framework.Assert;
  509.37 -
  509.38 -/**
  509.39 - *
  509.40 - * @author Jan Lahoda
  509.41 - */
  509.42 -public class TestUtilities {
  509.43 -
  509.44 -    private TestUtilities() {
  509.45 -    }
  509.46 -
  509.47 -    public static String detectOffsets(String source, int[] positionOrSpan) {
  509.48 -        return detectOffsets(source, positionOrSpan, "\\|");
  509.49 -    }
  509.50 -
  509.51 -    public static String detectOffsets(String source, int[] positionOrSpan, String delimiter) {
  509.52 -        //for now, the position/span delimiter is '|', without possibility of escaping:
  509.53 -        String[] split = source.split(delimiter);
  509.54 -        
  509.55 -        Assert.assertTrue("incorrect number of position markers (|)", positionOrSpan.length == split.length - 1);
  509.56 -        
  509.57 -        StringBuilder sb = new StringBuilder();
  509.58 -        int index = 0;
  509.59 -        int offset = 0;
  509.60 -        
  509.61 -        for (String s : split) {
  509.62 -            sb.append(s);
  509.63 -            if (index < positionOrSpan.length)
  509.64 -                positionOrSpan[index++] = (offset += s.length());
  509.65 -        }
  509.66 -        
  509.67 -        return sb.toString();
  509.68 -    }
  509.69 -
  509.70 -}
   510.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/UtilitiesTest.java	Mon Dec 19 11:37:36 2016 +0100
   510.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   510.3 @@ -1,644 +0,0 @@
   510.4 -/*
   510.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   510.6 - *
   510.7 - * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
   510.8 - *
   510.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  510.10 - * Other names may be trademarks of their respective owners.
  510.11 - *
  510.12 - * The contents of this file are subject to the terms of either the GNU
  510.13 - * General Public License Version 2 only ("GPL") or the Common
  510.14 - * Development and Distribution License("CDDL") (collectively, the
  510.15 - * "License"). You may not use this file except in compliance with the
  510.16 - * License. You can obtain a copy of the License at
  510.17 - * http://www.netbeans.org/cddl-gplv2.html
  510.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  510.19 - * specific language governing permissions and limitations under the
  510.20 - * License.  When distributing the software, include this License Header
  510.21 - * Notice in each file and include the License file at
  510.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  510.23 - * particular file as subject to the "Classpath" exception as provided
  510.24 - * by Oracle in the GPL Version 2 section of the License file that
  510.25 - * accompanied this code. If applicable, add the following below the
  510.26 - * License Header, with the fields enclosed by brackets [] replaced by
  510.27 - * your own identifying information:
  510.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  510.29 - *
  510.30 - * If you wish your version of this file to be governed by only the CDDL
  510.31 - * or only the GPL Version 2, indicate your decision by adding
  510.32 - * "[Contributor] elects to include this software in this distribution
  510.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  510.34 - * single choice of license, a recipient has the option to distribute
  510.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  510.36 - * to extend the choice of license to its licensees as provided above.
  510.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  510.38 - * Version 2 license, then the option applies only if the new code is
  510.39 - * made subject to such option by the copyright holder.
  510.40 - *
  510.41 - * Contributor(s):
  510.42 - *
  510.43 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  510.44 - */
  510.45 -
  510.46 -package org.netbeans.modules.java.hints.spiimpl;
  510.47 -
  510.48 -import com.sun.source.tree.IfTree;
  510.49 -import com.sun.source.tree.LambdaExpressionTree;
  510.50 -import com.sun.source.tree.MemberSelectTree;
  510.51 -import com.sun.source.tree.ModifiersTree;
  510.52 -import com.sun.source.tree.Scope;
  510.53 -import com.sun.source.tree.Tree;
  510.54 -import com.sun.source.tree.Tree.Kind;
  510.55 -import com.sun.source.tree.VariableTree;
  510.56 -import com.sun.source.util.SourcePositions;
  510.57 -import com.sun.source.util.TreePath;
  510.58 -import com.sun.source.util.TreeScanner;
  510.59 -import com.sun.tools.javac.tree.JCTree;
  510.60 -import java.util.ArrayList;
  510.61 -import java.util.Arrays;
  510.62 -import java.util.Collection;
  510.63 -import java.util.Collections;
  510.64 -import java.util.LinkedList;
  510.65 -import java.util.List;
  510.66 -import javax.lang.model.element.Element;
  510.67 -import javax.lang.model.element.ElementKind;
  510.68 -import javax.lang.model.type.TypeMirror;
  510.69 -import javax.tools.Diagnostic;
  510.70 -import javax.tools.JavaFileObject;
  510.71 -import org.netbeans.api.java.classpath.ClassPath;
  510.72 -import org.netbeans.api.java.source.ClasspathInfo;
  510.73 -import org.netbeans.api.java.source.CompilationController;
  510.74 -import org.netbeans.api.java.source.JavaSource;
  510.75 -import org.netbeans.api.java.source.JavaSource.Phase;
  510.76 -import org.netbeans.api.java.source.Task;
  510.77 -import org.netbeans.junit.RandomlyFails;
  510.78 -import org.netbeans.modules.java.source.pretty.VeryPretty;
  510.79 -import org.netbeans.modules.java.source.save.DiffContext;
  510.80 -
  510.81 -/**
  510.82 - *
  510.83 - * @author lahvac
  510.84 - */
  510.85 -public class UtilitiesTest extends TestBase {
  510.86 -
  510.87 -    public UtilitiesTest(String name) {
  510.88 -        super(name);
  510.89 -    }
  510.90 -
  510.91 -    public void testParseAndAttributeExpressionStatement() throws Exception {
  510.92 -        prepareTest("test/Test.java", "package test; public class Test{}");
  510.93 -
  510.94 -        Scope s = Utilities.constructScope(info, Collections.singletonMap("$1", info.getTreeUtilities().parseType("int", info.getTopLevelElements().get(0))));
  510.95 -        Tree result = Utilities.parseAndAttribute(info, "$1 = 1;", s);
  510.96 -
  510.97 -        assertTrue(result.getKind().name(), result.getKind() == Kind.EXPRESSION_STATEMENT);
  510.98 -    }
  510.99 -
 510.100 -    public void testParseAndAttributeVariable() throws Exception {
 510.101 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.102 -
 510.103 -        Scope s = Utilities.constructScope(info, Collections.singletonMap("$1", info.getTreeUtilities().parseType("int", info.getTopLevelElements().get(0))));
 510.104 -        Tree result = Utilities.parseAndAttribute(info, "int $2 = $1;", s);
 510.105 -
 510.106 -        assertTrue(result.getKind().name(), result.getKind() == Kind.VARIABLE);
 510.107 -    }
 510.108 -
 510.109 -    public void testParseAndAttributeMultipleStatements() throws Exception {
 510.110 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.111 -
 510.112 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.113 -        Tree result = Utilities.parseAndAttribute(info, "String $2 = $1; int $l = $2.length(); System.err.println($l);", s);
 510.114 -
 510.115 -        assertTrue(result.getKind().name(), result.getKind() == Kind.BLOCK);
 510.116 -
 510.117 -        String golden = "{\n" +
 510.118 -                        "    $$1$;\n" +
 510.119 -                        "    String $2 = $1;\n" +
 510.120 -                        "    int $l = $2.length();\n" +
 510.121 -                        "    System.err.println($l);\n" +
 510.122 -                        "    $$2$;\n" +
 510.123 -                        "}";
 510.124 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.125 -    }
 510.126 -
 510.127 -    public void testParseAndAttributeMethod() throws Exception {
 510.128 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.129 -
 510.130 -        Scope s = Utilities.constructScope(info, Collections.singletonMap("$1", info.getTreeUtilities().parseType("int", info.getTopLevelElements().get(0))));
 510.131 -        String methodCode = "private int test(int i) { return i; }";
 510.132 -        Tree result = Utilities.parseAndAttribute(info, methodCode, s);
 510.133 -
 510.134 -        assertEquals(Kind.METHOD, result.getKind());
 510.135 -        assertEquals(methodCode.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " ").trim());
 510.136 -    }
 510.137 -
 510.138 -    public void testParseAndAttributeMultipleClassMembers() throws Exception {
 510.139 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.140 -
 510.141 -        Scope s = Utilities.constructScope(info, Collections.singletonMap("$1", info.getTreeUtilities().parseType("int", info.getTopLevelElements().get(0))));
 510.142 -        String code = "private int i; private int getI() { return i; } private void setI(int i) { this.i = i; }";
 510.143 -        Tree result = Utilities.parseAndAttribute(info, code, s);
 510.144 -
 510.145 -        String golden = "class $ {\n" +
 510.146 -                        "    $$1$;\n" +
 510.147 -                        "    private int i;\n" +
 510.148 -                        "    private int getI() {\n" +
 510.149 -                        "        return i;\n" +
 510.150 -                        "    }\n" +
 510.151 -                        "    private void setI(int i) {\n" +
 510.152 -                        "        this.i = i;\n" +
 510.153 -                        "    }\n" +
 510.154 -                        "}";
 510.155 -
 510.156 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " ").trim());
 510.157 -    }
 510.158 -
 510.159 -    public void testParseAndAttributeFieldModifiersVariable() throws Exception {
 510.160 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.161 -
 510.162 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.163 -        String code = "$mods$ java.lang.String $name;";
 510.164 -        Tree result = Utilities.parseAndAttribute(info, code, s);
 510.165 -
 510.166 -        String golden = "$mods$ java.lang.String $name";
 510.167 -
 510.168 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " ").trim());
 510.169 -    }
 510.170 -
 510.171 -    public void testParseAndAttributeIfWithParenthetised() throws Exception {
 510.172 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.173 -
 510.174 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.175 -        String code = "if ($c) { $1$; System.err.println('a'); $2$; }";
 510.176 -        Tree result = Utilities.parseAndAttribute(info, code, s);
 510.177 -
 510.178 -        IfTree it = (IfTree) result;
 510.179 -
 510.180 -        assertEquals(Kind.PARENTHESIZED, it.getCondition().getKind());
 510.181 -
 510.182 -        String golden = "if ($c) { $1$; System.err.println('a'); $2$; }";
 510.183 -
 510.184 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " ").trim());
 510.185 -    }
 510.186 -
 510.187 -    public void testParseAndAttributeMultipleStatements2() throws Exception {
 510.188 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.189 -
 510.190 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.191 -        Tree result = Utilities.parseAndAttribute(info, "$type $name = $map.get($key); if ($name == null) { $map.put($key, $name = $init); }", s);
 510.192 -
 510.193 -        assertTrue(result.getKind().name(), result.getKind() == Kind.BLOCK);
 510.194 -
 510.195 -        String golden = "{" +
 510.196 -                        "    $$1$;" +
 510.197 -                        "    $type $name = $map.get($key);" +
 510.198 -                        "    if ($name == null) {" +
 510.199 -                        "        $map.put($key, $name = $init);" +
 510.200 -                        "    }" +
 510.201 -                        "    $$2$;\n" +
 510.202 -                        "}";
 510.203 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.204 -    }
 510.205 -
 510.206 -    public void testParseAndAttributeMethodDeclarationWithMultiparameters() throws Exception {
 510.207 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.208 -
 510.209 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.210 -        Tree result = Utilities.parseAndAttribute(info, "public void t($params$) {}", s);
 510.211 -
 510.212 -        assertTrue(result.getKind().name(), result.getKind() == Kind.METHOD);
 510.213 -
 510.214 -        String golden = " public void t($params$) { }";
 510.215 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.216 -    }
 510.217 -
 510.218 -    public void testParseAndAttributeMethodModifiersVariable() throws Exception {
 510.219 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.220 -
 510.221 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.222 -        String code = "$mods$ $type $name() { $r$; }";
 510.223 -        Tree result = Utilities.parseAndAttribute(info, code, s);
 510.224 -
 510.225 -        String golden = "$mods$ $type $name() { $r$; }";
 510.226 -
 510.227 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " ").trim());
 510.228 -    }
 510.229 -
 510.230 -    public void testSimpleExpression() throws Exception {
 510.231 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.232 -
 510.233 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.234 -        Tree result = Utilities.parseAndAttribute(info, "$1.isDirectory()", s);
 510.235 -
 510.236 -        assertTrue(result.getKind().name(), result.getKind() == Kind.METHOD_INVOCATION);
 510.237 -
 510.238 -        String golden = "$1.isDirectory()";
 510.239 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.240 -    }
 510.241 -    
 510.242 -    public void testARMResourceVariable1() throws Exception {
 510.243 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.244 -
 510.245 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.246 -        Tree result = Utilities.parseAndAttribute(info, "try ($t$) { $stmts$; } catch $catches$", s);
 510.247 -
 510.248 -        assertTrue(result.getKind().name(), result.getKind() == Kind.TRY);
 510.249 -
 510.250 -        String golden = "try ($t$) { $stmts$; }$catches$";
 510.251 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.252 -    }
 510.253 -    
 510.254 -    public void testARMResourceVariable2() throws Exception {
 510.255 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.256 -
 510.257 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.258 -        Tree result = Utilities.parseAndAttribute(info, "try ($t$; $type $name = $init) { $stmts$; } catch $catches$", s);
 510.259 -
 510.260 -        assertTrue(result.getKind().name(), result.getKind() == Kind.TRY);
 510.261 -
 510.262 -        String golden = "try ($t$ final $type $name = $init;) { $stmts$; }$catches$";
 510.263 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.264 -    }
 510.265 -    
 510.266 -    public void testARMResourceNotVariable() throws Exception {
 510.267 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.268 -
 510.269 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.270 -        Tree result = Utilities.parseAndAttribute(info, "try ($t $n = $init$) { $stmts$; } catch $catches$", s);
 510.271 -
 510.272 -        assertTrue(result.getKind().name(), result.getKind() == Kind.TRY);
 510.273 -
 510.274 -        String golden = "try (final $t $n = $init$;) { $stmts$; }$catches$";
 510.275 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.276 -    }
 510.277 -
 510.278 -    public void testParseAndAttributeType() throws Exception {
 510.279 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.280 -
 510.281 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.282 -        Tree result = Utilities.parseAndAttribute(info, "\njava. util \n.List \n", s);
 510.283 -
 510.284 -        assertTrue(result.getKind().name(), result.getKind() == Kind.MEMBER_SELECT);
 510.285 -
 510.286 -        assertEquals(ElementKind.INTERFACE, info.getTrees().getElement(new TreePath(new TreePath(info.getCompilationUnit()), result)).getKind());
 510.287 -        assertEquals(info.getElements().getTypeElement("java.util.List"), info.getTrees().getElement(new TreePath(new TreePath(info.getCompilationUnit()), result)));
 510.288 -    }
 510.289 -    
 510.290 -    public void testCatchMultiparam() throws Exception {
 510.291 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.292 -
 510.293 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.294 -        Tree result = Utilities.parseAndAttribute(info, "try {\n }\n catch $catch$ finally {\n }\n", s);
 510.295 -
 510.296 -        assertTrue(result.getKind().name(), result.getKind() == Kind.TRY);
 510.297 -
 510.298 -        String golden = "try {\n }$catch$ finally {\n }";
 510.299 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.300 -    }
 510.301 -
 510.302 -    public void testCaseMultiparam() throws Exception {
 510.303 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.304 -
 510.305 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.306 -        Tree result = Utilities.parseAndAttribute(info, "switch ($v) {case $c1$ case 1: ; case $c2$; case 3: ;}", s);
 510.307 -
 510.308 -        assertTrue(result.getKind().name(), result.getKind() == Kind.SWITCH);
 510.309 -
 510.310 -        String golden = "switch ($v) { $c1$ case 1: ; $c2$ case 3: ; }";
 510.311 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.312 -    }
 510.313 -    
 510.314 -    public void testOrdinaryCatch() throws Exception {
 510.315 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.316 -
 510.317 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.318 -        Tree result = Utilities.parseAndAttribute(info, "try {\n }\n catch (NullPointerException ex) { } finally {\n }\n", s);
 510.319 -
 510.320 -        assertTrue(result.getKind().name(), result.getKind() == Kind.TRY);
 510.321 -
 510.322 -        String golden = "try {\n } catch (NullPointerException ex) { } finally {\n }";
 510.323 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.324 -    }
 510.325 -    
 510.326 -    public void testClassPattern() throws Exception {
 510.327 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.328 -
 510.329 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.330 -        Tree result = Utilities.parseAndAttribute(info, "$mods$ class $name extends java.util.LinkedList { $methods$; }\n", s);
 510.331 -
 510.332 -        assertTrue(result.getKind().name(), result.getKind() == Kind.CLASS);
 510.333 -
 510.334 -        String golden = " $mods$ class $name extends java.util.LinkedList { $name() { super(); } $methods$ }";
 510.335 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.336 -    }
 510.337 -
 510.338 -    public void testErrorsForPatterns1() throws Exception {
 510.339 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.340 -
 510.341 -        SourcePositions[] positions = new SourcePositions[1];
 510.342 -        Collection<Diagnostic<? extends JavaFileObject>> errors = new LinkedList<Diagnostic<? extends JavaFileObject>>();
 510.343 -        String code = "foo bar";
 510.344 -        Tree result = Utilities.parseAndAttribute(info, code, null, positions, errors);
 510.345 -
 510.346 -        assertDiagnostics(errors, "7-7:compiler.err.expected");
 510.347 -        assertPositions(result, positions[0], code, "foo", "foo bar");
 510.348 -    }
 510.349 -
 510.350 -    @RandomlyFails
 510.351 -    public void testErrorsForPatterns2() throws Exception {
 510.352 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.353 -
 510.354 -        SourcePositions[] positions = new SourcePositions[1];
 510.355 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.356 -        Collection<Diagnostic<? extends JavaFileObject>> errors = new LinkedList<Diagnostic<? extends JavaFileObject>>();
 510.357 -        String code = "$1.isDirectory()";
 510.358 -        Tree result = Utilities.parseAndAttribute(info, code, s, positions, errors);
 510.359 -
 510.360 -        assertDiagnostics(errors, "0-0:compiler.err.cant.resolve.location");
 510.361 -        assertPositions(result, positions[0], code, "$1", "$1.isDirectory", "$1.isDirectory()");
 510.362 -    }
 510.363 -
 510.364 -    public void testErrorsForPatterns3() throws Exception {
 510.365 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.366 -
 510.367 -        SourcePositions[] positions = new SourcePositions[1];
 510.368 -        Collection<Diagnostic<? extends JavaFileObject>> errors = new LinkedList<Diagnostic<? extends JavaFileObject>>();
 510.369 -        String code = "if ($cond) { foo() } else $else;";
 510.370 -        Tree result = Utilities.parseAndAttribute(info, code, null, positions, errors);
 510.371 -
 510.372 -        assertDiagnostics(errors, "18-18:compiler.err.expected");
 510.373 -        assertPositions(result, positions[0], code, "$cond", "$else", "$else;", "($cond)", "foo", "foo()", "foo() ", "if ($cond) { foo() } else $else;", "{ foo() }");
 510.374 -    }
 510.375 -
 510.376 -    public void testPositionsForCorrectStatement() throws Exception {
 510.377 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.378 -
 510.379 -        SourcePositions[] positions = new SourcePositions[1];
 510.380 -        Collection<Diagnostic<? extends JavaFileObject>> errors = new LinkedList<Diagnostic<? extends JavaFileObject>>();
 510.381 -        String code = "assert true;";
 510.382 -        Tree result = Utilities.parseAndAttribute(info, code, null, positions, errors);
 510.383 -
 510.384 -        assertTrue(errors.isEmpty());
 510.385 -        assertPositions(result, positions[0], code, "assert true;", "true");
 510.386 -    }
 510.387 -
 510.388 -    public void testCasePattern() throws Exception {
 510.389 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.390 -
 510.391 -        SourcePositions[] positions = new SourcePositions[1];
 510.392 -        Collection<Diagnostic<? extends JavaFileObject>> errors = new LinkedList<Diagnostic<? extends JavaFileObject>>();
 510.393 -        String code = "case $expr: foo bar $stmts$;\n";
 510.394 -        Tree result = Utilities.parseAndAttribute(info, code, null, positions, errors);
 510.395 -
 510.396 -        assertTrue(result.getKind().name(), result.getKind() == Kind.CASE);
 510.397 -
 510.398 -        String golden = "case $expr: foo bar; $stmts$; ";
 510.399 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.400 -        assertDiagnostics(errors, "19-19:compiler.err.expected");
 510.401 -        assertPositions(result, positions[0], code, "$expr", "$stmts$", "$stmts$;", "case $expr: foo bar $stmts$;", "foo", "foo bar ");
 510.402 -    }
 510.403 -
 510.404 -    public void testLambdaPattern() throws Exception {
 510.405 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.406 -
 510.407 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.408 -        Tree result = Utilities.parseAndAttribute(info, "new $type() {\n $mods$ $resultType $methodName($args$) {\n $statements$;\n }\n }\n", s);
 510.409 -
 510.410 -        assertTrue(result.getKind().name(), result.getKind() == Kind.NEW_CLASS);
 510.411 -
 510.412 -        String golden = "new $type(){ $mods$ $resultType $methodName($args$) { $statements$; } }";
 510.413 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.414 -
 510.415 -        Collection<Diagnostic<? extends JavaFileObject>> errors = new LinkedList<Diagnostic<? extends JavaFileObject>>();
 510.416 -
 510.417 -        result = Utilities.parseAndAttribute(info, "new $type() {\n $mods$ $resultType $methodName($args$) {\n $statements$;\n }\n }\n", null, errors);
 510.418 -        assertTrue(result.getKind().name(), result.getKind() == Kind.NEW_CLASS);
 510.419 -
 510.420 -        golden = "new $type(){ $mods$ $resultType $methodName($args$) { $statements$; } }";
 510.421 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.422 -        assertTrue(errors.toString(), errors.isEmpty());
 510.423 -    }
 510.424 -    
 510.425 -    public void testPackagePattern() throws Exception {
 510.426 -        prepareTest("test/a/Test.java", "package test.a; public class Test{}");
 510.427 -
 510.428 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.429 -        Tree result = Utilities.parseAndAttribute(info, "test.$1", s);
 510.430 -
 510.431 -        assertTrue(result.getKind().name(), result.getKind() == Kind.MEMBER_SELECT);
 510.432 -
 510.433 -        String golden = "test.$1";
 510.434 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.435 -        
 510.436 -        Element total = info.getTrees().getElement(new TreePath(new TreePath(info.getCompilationUnit()), result));
 510.437 -        
 510.438 -        assertTrue(Utilities.isError(total));
 510.439 -        
 510.440 -        Element testPack = info.getTrees().getElement(new TreePath(new TreePath(info.getCompilationUnit()), ((MemberSelectTree) result).getExpression()));
 510.441 -
 510.442 -        assertFalse(Utilities.isError(testPack));
 510.443 -        assertEquals(info.getElements().getPackageElement("test"), testPack);
 510.444 -    }
 510.445 -
 510.446 -    public void DtestMultiStatementVarWithModifiers() throws Exception {
 510.447 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.448 -
 510.449 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.450 -        Tree result = Utilities.parseAndAttribute(info, "$mods$ $type $name; $name = $init;", s);
 510.451 -
 510.452 -        assertTrue(result.getKind().name(), result.getKind() == Kind.BLOCK);
 510.453 -
 510.454 -        String golden = "{ $$1$; $mods$$type $name; $name = $init; $$2$; }";
 510.455 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.456 -    }
 510.457 -    
 510.458 -    public void testAnnotation() throws Exception {
 510.459 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.460 -
 510.461 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.462 -        Tree result = Utilities.parseAndAttribute(info, "@$annotation($args$)", s);
 510.463 -
 510.464 -        assertTrue(result.getKind().name(), result.getKind() == Kind.ANNOTATION);
 510.465 -
 510.466 -        String golden = "@$annotation(value = $args$)";
 510.467 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.468 -    }
 510.469 -
 510.470 -    public void testParseAndAttributeMultipleStatementsWithBefore() throws Exception {
 510.471 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.472 -
 510.473 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.474 -        Tree result = Utilities.parseAndAttribute(info, "$before$; String $2 = $1; int $l = $2.length(); System.err.println($l);", s);
 510.475 -
 510.476 -        assertTrue(result.getKind().name(), result.getKind() == Kind.BLOCK);
 510.477 -
 510.478 -        String golden = "{\n" +
 510.479 -                        "    $before$;\n" +
 510.480 -                        "    String $2 = $1;\n" +
 510.481 -                        "    int $l = $2.length();\n" +
 510.482 -                        "    System.err.println($l);\n" +
 510.483 -                        "    $$2$;\n" +
 510.484 -                        "}";
 510.485 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.486 -    }
 510.487 -    
 510.488 -    public void testParseAndAttributeMultipleStatementsWithAfter() throws Exception {
 510.489 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.490 -
 510.491 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.492 -        Tree result = Utilities.parseAndAttribute(info, "String $2 = $1; int $l = $2.length(); System.err.println($l); $after$;", s);
 510.493 -
 510.494 -        assertTrue(result.getKind().name(), result.getKind() == Kind.BLOCK);
 510.495 -
 510.496 -        String golden = "{\n" +
 510.497 -                        "    $$1$;\n" +
 510.498 -                        "    String $2 = $1;\n" +
 510.499 -                        "    int $l = $2.length();\n" +
 510.500 -                        "    System.err.println($l);\n" +
 510.501 -                        "    $after$;\n" +
 510.502 -                        "}";
 510.503 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.504 -    }
 510.505 -    
 510.506 -    public void testMethodFormalParams() throws Exception {
 510.507 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.508 -
 510.509 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.510 -        Tree result = Utilities.parseAndAttribute(info, "$mods$ $ret $name($pref$, $type $name, $suff$) throws $throws$ { $body$; }", s);
 510.511 -
 510.512 -        assertTrue(result.getKind().name(), result.getKind() == Kind.METHOD);
 510.513 -
 510.514 -        String golden = " $mods$ $ret $name($pref$, $type $name, $suff$) throws $throws$ { $body$; }";
 510.515 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " "));
 510.516 -    }
 510.517 -    
 510.518 -    public void testPartialModifiers() throws Exception {
 510.519 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.520 -
 510.521 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.522 -        Tree result = Utilities.parseAndAttribute(info, "$mods$ @Deprecated public $type $name;", s);
 510.523 -
 510.524 -        assertTrue(result.getKind().name(), result.getKind() == Kind.VARIABLE);
 510.525 -
 510.526 -        ModifiersTree mods = ((VariableTree) result).getModifiers();
 510.527 -        String golden = "$mods$,@Deprecated(), [public]";
 510.528 -        
 510.529 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), mods.getAnnotations().toString() + ", " + mods.getFlags().toString());
 510.530 -    }
 510.531 -    
 510.532 -    public void testBrokenPlatform226678() throws Exception {
 510.533 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.534 -
 510.535 -        JavaSource.create(ClasspathInfo.create(ClassPath.EMPTY, ClassPath.EMPTY, ClassPath.EMPTY), info.getFileObject()).runUserActionTask(new Task<CompilationController>() {
 510.536 -            @Override public void run(CompilationController parameter) throws Exception {
 510.537 -                parameter.toPhase(Phase.RESOLVED);
 510.538 -                info = parameter;
 510.539 -            }
 510.540 -        }, true);
 510.541 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.542 -        String methodCode = "private int test(int i) { return i; }";
 510.543 -        Tree result = Utilities.parseAndAttribute(info, methodCode, s);
 510.544 -
 510.545 -        assertEquals(Kind.METHOD, result.getKind());
 510.546 -        assertEquals(methodCode.replaceAll("[ \n\r]+", " "), result.toString().replaceAll("[ \n\r]+", " ").trim());
 510.547 -    }
 510.548 -    
 510.549 -    public void testLambdaExpression1() throws Exception {
 510.550 -        prepareTest("test/Test.java", "package test; public class Test{}");
 510.551 -
 510.552 -        Scope s = Utilities.constructScope(info, Collections.<String, TypeMirror>emptyMap());
 510.553 -        Tree result = Utilities.parseAndAttribute(info, "($args$) -> $expression", s);
 510.554 -
 510.555 -        assertTrue(result.getKind().name(), result.getKind() == Kind.LAMBDA_EXPRESSION);
 510.556 -
 510.557 -        LambdaExpressionTree let = (LambdaExpressionTree) result;
 510.558 -        
 510.559 -        assertEquals(Kind.IDENTIFIER, let.getParameters().get(0).getKind());
 510.560 -        String golden = "($args$)->$expression";
 510.561 -        
 510.562 -        assertEquals(golden.replaceAll("[ \n\r]+", " "), result.toString());
 510.563 -    }
 510.564 -    
 510.565 -    public void testToHumanReadableTime() {
 510.566 -        long time = 202;
 510.567 -        assertEquals(    "5s", Utilities.toHumanReadableTime(time +=           5 * 1000));
 510.568 -        assertEquals(  "3m5s", Utilities.toHumanReadableTime(time +=      3 * 60 * 1000));
 510.569 -        assertEquals("7h3m5s", Utilities.toHumanReadableTime(time += 7 * 60 * 60 * 1000));
 510.570 -    }
 510.571 -
 510.572 -    public void testGeneralization() throws Exception {
 510.573 -        performGeneralizationTest("package test;\n" +
 510.574 -                                  "public class Test {\n" +
 510.575 -                                  "    class Inner {\n" +
 510.576 -                                  "        Inner(int i) {}\n" +
 510.577 -                                  "    }\n" +
 510.578 -                                  "    public static void main(String[] args) {\n" +
 510.579 -                                  "        int i = 1;\n" +
 510.580 -                                  "        Test c = null;\n" +
 510.581 -                                  "        c.new Inner(i++) {};\n" +
 510.582 -                                  "    }\n" +
 510.583 -                                  "}\n",
 510.584 -                                  "package test;\n" +
 510.585 -                                  "public class Test {\n" +
 510.586 -                                  "    class Inner {\n" +
 510.587 -                                  "        Inner(int $0) { super(); }\n" +
 510.588 -                                  "    }\n" +
 510.589 -                                  "    public static void main(String[] $1) {\n" +
 510.590 -                                  "        int $2 = 1;\n" +
 510.591 -                                  "        Test $3 = null;\n" +
 510.592 -                                  "        $4;\n" + //XXX
 510.593 -                                  "    }\n" +
 510.594 -                                  "}\n");
 510.595 -    }
 510.596 -    private void performGeneralizationTest(String code, String generalized) throws Exception {
 510.597 -        prepareTest("test/Test.java", code);
 510.598 -
 510.599 -        Tree generalizedTree = Utilities.generalizePattern(info, new TreePath(info.getCompilationUnit()));
 510.600 -        VeryPretty vp = new VeryPretty(new DiffContext(info));
 510.601 -
 510.602 -        vp.print((JCTree) generalizedTree);
 510.603 -
 510.604 -        String repr = vp.toString();
 510.605 -
 510.606 -        assertEquals(generalized.replaceAll("[ \n\t]+", " "),
 510.607 -                     repr.replaceAll("[ \n\t]+", " "));
 510.608 -    }
 510.609 -
 510.610 -    private void assertDiagnostics(Collection<Diagnostic<? extends JavaFileObject>> errors, String... golden) {
 510.611 -        List<String> actual = new ArrayList<String>(errors.size());
 510.612 -
 510.613 -        for (Diagnostic<? extends JavaFileObject> d : errors) {
 510.614 -            actual.add(d.getStartPosition() + "-" + d.getEndPosition() + ":" + d.getCode());
 510.615 -        }
 510.616 -
 510.617 -        assertEquals(Arrays.asList(golden), actual);
 510.618 -    }
 510.619 -
 510.620 -    private void assertPositions(Tree t, final SourcePositions sp, final String code, String... golden) {
 510.621 -        final List<String> actual = new ArrayList<String>(golden.length);
 510.622 -
 510.623 -        new TreeScanner<Void, Void>() {
 510.624 -            @Override
 510.625 -            public Void scan(Tree node, Void p) {
 510.626 -                if (node != null) {
 510.627 -                    int start = (int) sp.getStartPosition(null, node);
 510.628 -                    int end = (int) sp.getEndPosition(null, node);
 510.629 -
 510.630 -                    if (start >= 0 && end >= 0) {
 510.631 -                        actual.add(code.substring(start, end));
 510.632 -                    }
 510.633 -                }
 510.634 -                return super.scan(node, p);
 510.635 -            }
 510.636 -        }.scan(t, null);
 510.637 -
 510.638 -        Collections.sort(actual);
 510.639 -
 510.640 -        List<String> goldenList = new ArrayList<String>(Arrays.asList(golden));
 510.641 -
 510.642 -        Collections.sort(goldenList);
 510.643 -
 510.644 -        assertEquals(goldenList, actual);
 510.645 -    }
 510.646 -
 510.647 -}
   511.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchSearchTest.java	Mon Dec 19 11:37:36 2016 +0100
   511.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   511.3 @@ -1,458 +0,0 @@
   511.4 -/*
   511.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   511.6 - *
   511.7 - * Copyright 2009-2011 Oracle and/or its affiliates. All rights reserved.
   511.8 - *
   511.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  511.10 - * Other names may be trademarks of their respective owners.
  511.11 - *
  511.12 - * The contents of this file are subject to the terms of either the GNU
  511.13 - * General Public License Version 2 only ("GPL") or the Common
  511.14 - * Development and Distribution License("CDDL") (collectively, the
  511.15 - * "License"). You may not use this file except in compliance with the
  511.16 - * License. You can obtain a copy of the License at
  511.17 - * http://www.netbeans.org/cddl-gplv2.html
  511.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  511.19 - * specific language governing permissions and limitations under the
  511.20 - * License.  When distributing the software, include this License Header
  511.21 - * Notice in each file and include the License file at
  511.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  511.23 - * particular file as subject to the "Classpath" exception as provided
  511.24 - * by Oracle in the GPL Version 2 section of the License file that
  511.25 - * accompanied this code. If applicable, add the following below the
  511.26 - * License Header, with the fields enclosed by brackets [] replaced by
  511.27 - * your own identifying information:
  511.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  511.29 - *
  511.30 - * If you wish your version of this file to be governed by only the CDDL
  511.31 - * or only the GPL Version 2, indicate your decision by adding
  511.32 - * "[Contributor] elects to include this software in this distribution
  511.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  511.34 - * single choice of license, a recipient has the option to distribute
  511.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  511.36 - * to extend the choice of license to its licensees as provided above.
  511.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  511.38 - * Version 2 license, then the option applies only if the new code is
  511.39 - * made subject to such option by the copyright holder.
  511.40 - *
  511.41 - * Contributor(s):
  511.42 - *
  511.43 - * Portions Copyrighted 2009-2011 Sun Microsystems, Inc.
  511.44 - */
  511.45 -package org.netbeans.modules.java.hints.spiimpl.batch;
  511.46 -
  511.47 -import org.netbeans.modules.java.hints.spiimpl.batch.TestUtils.File;
  511.48 -import org.netbeans.modules.java.hints.spiimpl.MessageImpl;
  511.49 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
  511.50 -import java.net.URL;
  511.51 -import java.util.ArrayList;
  511.52 -import java.util.Arrays;
  511.53 -import java.util.Collection;
  511.54 -import java.util.Collections;
  511.55 -import java.util.HashMap;
  511.56 -import java.util.HashSet;
  511.57 -import java.util.Iterator;
  511.58 -import java.util.LinkedList;
  511.59 -import java.util.List;
  511.60 -import java.util.Map;
  511.61 -import java.util.Map.Entry;
  511.62 -import java.util.Set;
  511.63 -import java.util.concurrent.atomic.AtomicBoolean;
  511.64 -import java.util.regex.Pattern;
  511.65 -import junit.framework.TestSuite;
  511.66 -import org.netbeans.api.java.classpath.ClassPath;
  511.67 -import org.netbeans.api.java.classpath.GlobalPathRegistry;
  511.68 -import org.netbeans.api.java.classpath.GlobalPathRegistryEvent;
  511.69 -import org.netbeans.api.java.classpath.GlobalPathRegistryListener;
  511.70 -import org.netbeans.api.java.source.CompilationController;
  511.71 -import org.netbeans.api.java.source.SourceUtilsTestUtil;
  511.72 -import org.netbeans.core.startup.Main;
  511.73 -import org.netbeans.junit.NbTestCase;
  511.74 -import org.netbeans.junit.NbTestSuite;
  511.75 -import org.netbeans.junit.RandomlyFails;
  511.76 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.BatchResult;
  511.77 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.Folder;
  511.78 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.Resource;
  511.79 -import org.netbeans.modules.parsing.impl.indexing.CacheFolder;
  511.80 -import org.netbeans.modules.parsing.impl.indexing.MimeTypes;
  511.81 -import org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater;
  511.82 -import org.netbeans.spi.editor.hints.ErrorDescription;
  511.83 -import org.netbeans.spi.java.classpath.ClassPathProvider;
  511.84 -import org.netbeans.spi.java.classpath.support.ClassPathSupport;
  511.85 -import org.openide.filesystems.FileObject;
  511.86 -import org.openide.filesystems.FileStateInvalidException;
  511.87 -import org.openide.filesystems.FileUtil;
  511.88 -
  511.89 -import org.openide.util.Exceptions;
  511.90 -import org.openide.util.lookup.ServiceProvider;
  511.91 -import static org.netbeans.modules.java.hints.spiimpl.batch.TestUtils.writeFilesAndWaitForScan;
  511.92 -import static org.netbeans.modules.java.hints.spiimpl.batch.TestUtils.prepareHints;
  511.93 -
  511.94 -/**
  511.95 - *
  511.96 - * @author lahvac
  511.97 - */
  511.98 -public class BatchSearchTest extends NbTestCase {
  511.99 -
 511.100 -    public BatchSearchTest(String name) {
 511.101 -        super(name);
 511.102 -    }
 511.103 -
 511.104 -    public static TestSuite suite() {
 511.105 -        TestSuite result = new NbTestSuite();
 511.106 -
 511.107 -        result.addTestSuite(BatchSearchTest.class);
 511.108 -//        result.addTest(new BatchSearchTest("testBatchSearchFolderRemoteIndex"));
 511.109 -
 511.110 -        return result;
 511.111 -    }
 511.112 -
 511.113 -    //XXX: copied from CustomIndexerImplTest:
 511.114 -    @Override
 511.115 -    protected void setUp() throws Exception {
 511.116 -        SourceUtilsTestUtil.prepareTest(new String[0], new Object[0]);
 511.117 -        Main.initializeURLFactory();
 511.118 -        org.netbeans.api.project.ui.OpenProjects.getDefault().getOpenProjects();
 511.119 -        prepareTest();
 511.120 -        MimeTypes.setAllMimeTypes(Collections.singleton("text/x-java"));
 511.121 -        sourceCP = ClassPathSupport.createClassPath(src1, src2);
 511.122 -        GlobalPathRegistry.getDefault().register(ClassPath.SOURCE, new ClassPath[] {sourceCP});
 511.123 -        RepositoryUpdater.getDefault().start(true);
 511.124 -        super.setUp();
 511.125 -    }
 511.126 -
 511.127 -    @Override
 511.128 -    protected void tearDown() throws Exception {
 511.129 -        super.tearDown();
 511.130 -        GlobalPathRegistry.getDefault().unregister(ClassPath.SOURCE, new ClassPath[] {sourceCP});
 511.131 -    }
 511.132 -
 511.133 -    public void testBatchSearch1() throws Exception {
 511.134 -        writeFilesAndWaitForScan(src1,
 511.135 -                                 new File("test/Test1.java", "package test; public class Test1 { private void test() { java.io.File f = null; f.isDirectory(); } }"),
 511.136 -                                 new File("test/Test2.java", "package test; public class Test2 { private void test() { new javax.swing.ImageIcon(null); } }"));
 511.137 -        writeFilesAndWaitForScan(src2,
 511.138 -                                 new File("test/Test1.java", "package test; public class Test1 { private void test() { java.io.File f = null; f.isDirectory(); } }"),
 511.139 -                                 new File("test/Test2.java", "package test; public class Test2 { private void test() { new javax.swing.ImageIcon(null); } }"));
 511.140 -
 511.141 -        Iterable<? extends HintDescription> hints = prepareHints("$1.isDirectory()");
 511.142 -        BatchResult result = BatchSearch.findOccurrences(hints, Scopes.allOpenedProjectsScope());
 511.143 -        Map<String, Iterable<String>> output = new HashMap<String, Iterable<String>>();
 511.144 -
 511.145 -        for (Entry<FileObject, Collection<? extends Resource>> e : result.getResourcesWithRoots().entrySet()) {
 511.146 -            Collection<String> resourcesRepr = new LinkedList<String>();
 511.147 -
 511.148 -            for (Resource r : e.getValue()) {
 511.149 -                resourcesRepr.add(r.getRelativePath());
 511.150 -            }
 511.151 -
 511.152 -            output.put(e.getKey().getURL().toExternalForm(), resourcesRepr);
 511.153 -        }
 511.154 -
 511.155 -        Map<String, Iterable<String>> golden = new HashMap<String, Iterable<String>>();
 511.156 -
 511.157 -        golden.put(src1.getURL().toExternalForm(), Arrays.asList("test/Test1.java"));
 511.158 -        golden.put(src2.getURL().toExternalForm(), Arrays.asList("test/Test1.java"));
 511.159 -
 511.160 -        assertEquals(golden, output);
 511.161 -    }
 511.162 -
 511.163 -    public void testBatchSearchSpan() throws Exception {
 511.164 -        String code = "package test;\n" +
 511.165 -                      "public class Test {\n" +
 511.166 -                      "    private void m() {\n" +
 511.167 -                      "        a(c.i().getFileObject());\n" +
 511.168 -                      "        if (span != null && span[0] != (-1) && span[1] != (-1));\n" +
 511.169 -                      "        c.i().getFileObject(\"\");\n" +
 511.170 -                      "    }\n" +
 511.171 -                      "}\n";
 511.172 -
 511.173 -        writeFilesAndWaitForScan(src1, new File("test/Test.java", code));
 511.174 -
 511.175 -        Iterable<? extends HintDescription> hints = prepareHints("$0.getFileObject($1)");
 511.176 -        BatchResult result = BatchSearch.findOccurrences(hints, Scopes.allOpenedProjectsScope());
 511.177 -
 511.178 -        assertEquals(1, result.getResources().size());
 511.179 -        Iterator<? extends Resource> resources = result.getResources().iterator().next().iterator();
 511.180 -        Resource r = resources.next();
 511.181 -
 511.182 -        assertFalse(resources.hasNext());
 511.183 -
 511.184 -        Set<String> snipets = new HashSet<String>();
 511.185 -
 511.186 -        for (int[] span : r.getCandidateSpans()) {
 511.187 -            snipets.add(code.substring(span[0], span[1]));
 511.188 -        }
 511.189 -
 511.190 -        Set<String> golden = new HashSet<String>(Arrays.asList("c.i().getFileObject(\"\")"));
 511.191 -        assertEquals(golden, snipets);
 511.192 -    }
 511.193 -
 511.194 -    @RandomlyFails
 511.195 -    public void testBatchSearchNotIndexed() throws Exception {
 511.196 -        writeFilesAndWaitForScan(src1,
 511.197 -                                 new File("test/Test1.java", "package test; public class Test1 { private void test() { java.io.File f = null; f.isDirectory(); } }"),
 511.198 -                                 new File("test/Test2.java", "package test; public class Test2 { private void test() { new javax.swing.ImageIcon(null); } }"));
 511.199 -        writeFilesAndWaitForScan(src3,
 511.200 -                                 new File("test/Test1.java", "package test; public class Test1 { private void test() { Test2 f = null; f.isDirectory(); } }"),
 511.201 -                                 new File("test/Test2.java", "package test; public class Test2 { public boolean isDirectory() {return false} }"));
 511.202 -
 511.203 -        Iterable<? extends HintDescription> hints = prepareHints("$1.isDirectory()", "$1", "test.Test2");
 511.204 -        BatchResult result = BatchSearch.findOccurrences(hints, Scopes.specifiedFoldersScope(Folder.convert(src1, src3, empty)));
 511.205 -        Map<String, Iterable<String>> output = new HashMap<String, Iterable<String>>();
 511.206 -
 511.207 -        for (Entry<FileObject, Collection<? extends Resource>> e : result.getResourcesWithRoots().entrySet()) {
 511.208 -            Collection<String> resourcesRepr = new LinkedList<String>();
 511.209 -
 511.210 -            for (Resource r : e.getValue()) {
 511.211 -                resourcesRepr.add(r.getRelativePath());
 511.212 -            }
 511.213 -
 511.214 -            output.put(e.getKey().getURL().toExternalForm(), resourcesRepr);
 511.215 -        }
 511.216 -
 511.217 -        Map<String, Iterable<String>> golden = new HashMap<String, Iterable<String>>();
 511.218 -
 511.219 -        golden.put(src1.getURL().toExternalForm(), Arrays.asList("test/Test1.java"));
 511.220 -        golden.put(src3.getURL().toExternalForm(), Arrays.asList("test/Test1.java"));
 511.221 -
 511.222 -        assertEquals(golden, output);
 511.223 -
 511.224 -        //check verification:
 511.225 -        Map<String, Map<String, Iterable<String>>> verifiedOutput = verifiedSpans(result, false);
 511.226 -        Map<String, Map<String, Iterable<String>>> verifiedGolden = new HashMap<String, Map<String, Iterable<String>>>();
 511.227 -
 511.228 -        verifiedGolden.put(src1.getURL().toExternalForm(), Collections.<String, Iterable<String>>singletonMap("test/Test1.java", Arrays.<String>asList()));
 511.229 -        verifiedGolden.put(src3.getURL().toExternalForm(), Collections.<String, Iterable<String>>singletonMap("test/Test1.java", Arrays.asList("0:75-0:86:verifier:")));
 511.230 -
 511.231 -        assertEquals(verifiedGolden, verifiedOutput);
 511.232 -    }
 511.233 -
 511.234 -    public void testBatchSearchForceIndexingOfProperDirectory() throws Exception {
 511.235 -        FileObject data = FileUtil.createFolder(workdir, "data");
 511.236 -        FileObject dataSrc1 = FileUtil.createFolder(data, "src1");
 511.237 -        FileObject dataSrc2 = FileUtil.createFolder(data, "src2");
 511.238 -        writeFilesAndWaitForScan(dataSrc1,
 511.239 -                                 new File("test/Test1.java", "package test; public class Test1 { private void test() { java.io.File f = null; f.isDirectory(); } }"),
 511.240 -                                 new File("test/Test2.java", "package test; public class Test2 { private void test() { new javax.swing.ImageIcon(null); } }"));
 511.241 -        writeFilesAndWaitForScan(dataSrc2,
 511.242 -                                 new File("test/Test1.java", "package test; public class Test1 { private void test() { Test2 f = null; f.isDirectory(); } }"),
 511.243 -                                 new File("test/Test2.java", "package test; public class Test2 { public boolean isDirectory() {return false} }"));
 511.244 -
 511.245 -        ClassPathProviderImpl.setSourceRoots(Arrays.asList(dataSrc1, dataSrc2));
 511.246 -
 511.247 -        Iterable<? extends HintDescription> hints = prepareHints("$1.isDirectory()", "$1", "test.Test2");
 511.248 -        BatchResult result = BatchSearch.findOccurrences(hints, Scopes.specifiedFoldersScope(Folder.convert(data)));
 511.249 -        Map<String, Iterable<String>> output = new HashMap<String, Iterable<String>>();
 511.250 -
 511.251 -        for (Entry<FileObject, Collection<? extends Resource>> e : result.getResourcesWithRoots().entrySet()) {
 511.252 -            Collection<String> resourcesRepr = new HashSet<String>();
 511.253 -
 511.254 -            for (Resource r : e.getValue()) {
 511.255 -                resourcesRepr.add(r.getRelativePath());
 511.256 -            }
 511.257 -
 511.258 -            output.put(e.getKey().getURL().toExternalForm(), resourcesRepr);
 511.259 -        }
 511.260 -
 511.261 -        Map<String, Iterable<String>> golden = new HashMap<String, Iterable<String>>();
 511.262 -
 511.263 -        golden.put(data.getURL().toExternalForm(), new HashSet<String>(Arrays.asList("src1/test/Test1.java", "src2/test/Test1.java")));
 511.264 -
 511.265 -        assertEquals(golden, output);
 511.266 -
 511.267 -        //check verification:
 511.268 -        final Set<FileObject> added = new HashSet<FileObject>();
 511.269 -        final Set<FileObject> removed = new HashSet<FileObject>();
 511.270 -
 511.271 -        GlobalPathRegistry.getDefault().addGlobalPathRegistryListener(new GlobalPathRegistryListener() {
 511.272 -            public void pathsAdded(GlobalPathRegistryEvent event) {
 511.273 -                for (ClassPath cp : event.getChangedPaths()) {
 511.274 -                    added.addAll(Arrays.asList(cp.getRoots()));
 511.275 -                }
 511.276 -            }
 511.277 -            public void pathsRemoved(GlobalPathRegistryEvent event) {
 511.278 -                for (ClassPath cp : event.getChangedPaths()) {
 511.279 -                    removed.addAll(Arrays.asList(cp.getRoots()));
 511.280 -                }
 511.281 -            }
 511.282 -        });
 511.283 -
 511.284 -//        verifiedGolden.put(data.getURL().toExternalForm(), Arrays.asList("0:75-0:86:verifier:TODO: No display name"));
 511.285 -        Map<String, Map<String, Iterable<String>>> verifiedOutput = verifiedSpans(result, false);
 511.286 -        Map<String, Map<String, Iterable<String>>> verifiedGolden = new HashMap<String, Map<String, Iterable<String>>>();
 511.287 -
 511.288 -        Map<String, Iterable<String>> verifiedGoldenPart = new HashMap<String, Iterable<String>>();
 511.289 -
 511.290 -        verifiedGoldenPart.put("src1/test/Test1.java", Arrays.<String>asList());
 511.291 -        verifiedGoldenPart.put("src2/test/Test1.java", Arrays.<String>asList("0:75-0:86:verifier:"));
 511.292 -
 511.293 -        verifiedGolden.put(data.getURL().toExternalForm(), verifiedGoldenPart);
 511.294 -
 511.295 -        assertEquals(verifiedGolden, verifiedOutput);
 511.296 -        assertEquals(new HashSet<FileObject>(Arrays.asList(dataSrc1, dataSrc2)), added);
 511.297 -        assertEquals(new HashSet<FileObject>(Arrays.asList(dataSrc1, dataSrc2)), removed);
 511.298 -    }
 511.299 -
 511.300 -    public void testBatchSearchFolderNoIndex() throws Exception {
 511.301 -        FileObject data = FileUtil.createFolder(workdir, "data");
 511.302 -        FileObject dataSrc1 = FileUtil.createFolder(data, "src1");
 511.303 -        FileObject dataSrc2 = FileUtil.createFolder(data, "src2");
 511.304 -        writeFilesAndWaitForScan(dataSrc1,
 511.305 -                                 new File("test/Test1.java", "package test; public class Test1 { private void test() { java.io.File f = null; f.isDirectory(); } }"),
 511.306 -                                 new File("test/Test2.java", "package test; public class Test2 { private void test() { new javax.swing.ImageIcon(null); } }"));
 511.307 -        writeFilesAndWaitForScan(dataSrc2,
 511.308 -                                 new File("test/Test1.java", "package test; public class Test1 { private void test() { Test2 f = null; f.isDirectory(); } }"),
 511.309 -                                 new File("test/Test2.java", "package test; public class Test2 { public boolean isDirectory() {return false} }"));
 511.310 -
 511.311 -        Iterable<? extends HintDescription> hints = prepareHints("$1.isDirectory()");
 511.312 -        BatchResult result = BatchSearch.findOccurrences(hints, Scopes.specifiedFoldersScope(Folder.convert(Collections.singleton(data)))); //XXX: should be a no-index variant!
 511.313 -        Map<String, Iterable<String>> output = toDebugOutput(result);
 511.314 -        Map<String, Iterable<String>> golden = new HashMap<String, Iterable<String>>();
 511.315 -
 511.316 -        golden.put(data.getURL().toExternalForm(), new HashSet<String>(Arrays.asList("src1/test/Test1.java", "src2/test/Test1.java")));
 511.317 -
 511.318 -        assertEquals(golden, output);
 511.319 -    }
 511.320 -
 511.321 -    private FileObject workdir;
 511.322 -    private FileObject src1;
 511.323 -    private FileObject src2;
 511.324 -    private FileObject src3;
 511.325 -    private FileObject empty;
 511.326 -    private ClassPath sourceCP;
 511.327 -
 511.328 -    private void prepareTest() throws Exception {
 511.329 -        workdir = SourceUtilsTestUtil.makeScratchDir(this);
 511.330 -
 511.331 -        src1 = FileUtil.createFolder(workdir, "src1");
 511.332 -        src2 = FileUtil.createFolder(workdir, "src2");
 511.333 -        src3 = FileUtil.createFolder(workdir, "src3");
 511.334 -        empty = FileUtil.createFolder(workdir, "empty");
 511.335 -
 511.336 -        ClassPathProviderImpl.setSourceRoots(Arrays.asList(src1, src2, src3));
 511.337 -
 511.338 -        FileObject cache = FileUtil.createFolder(workdir, "cache");
 511.339 -
 511.340 -        CacheFolder.setCacheFolder(cache);
 511.341 -    }
 511.342 -
 511.343 -    private Map<String, Iterable<String>> toDebugOutput(BatchResult result) throws Exception {
 511.344 -        Map<String, Iterable<String>> output = new HashMap<String, Iterable<String>>();
 511.345 -
 511.346 -        for (Entry<FileObject, Collection<? extends Resource>> e : result.getResourcesWithRoots().entrySet()) {
 511.347 -            Collection<String> resourcesRepr = new HashSet<String>();
 511.348 -
 511.349 -            for (Resource r : e.getValue()) {
 511.350 -                resourcesRepr.add(r.getRelativePath());
 511.351 -            }
 511.352 -
 511.353 -            output.put(e.getKey().getURL().toExternalForm(), resourcesRepr);
 511.354 -        }
 511.355 -
 511.356 -        return output;
 511.357 -    }
 511.358 -
 511.359 -    private Map<String, Map<String, Iterable<String>>> verifiedSpans(BatchResult candidates, boolean doNotRegisterClassPath) throws Exception {
 511.360 -        final Map<String, Map<String, Iterable<String>>> result = new HashMap<String, Map<String, Iterable<String>>>();
 511.361 -        List<MessageImpl> errors = new LinkedList<MessageImpl>();
 511.362 -        BatchSearch.getVerifiedSpans(candidates, new ProgressHandleWrapper(1), new BatchSearch.VerifiedSpansCallBack() {
 511.363 -            public void groupStarted() {}
 511.364 -            public boolean spansVerified(CompilationController wc, Resource r, Collection<? extends ErrorDescription> hints) throws Exception {
 511.365 -                Map<String, Iterable<String>> files = result.get(r.getRoot().getURL().toExternalForm());
 511.366 -
 511.367 -                if (files == null) {
 511.368 -                    result.put(r.getRoot().getURL().toExternalForm(), files = new HashMap<String, Iterable<String>>());
 511.369 -                }
 511.370 -
 511.371 -                Collection<String> currentHints = new LinkedList<String>();
 511.372 -
 511.373 -                for (ErrorDescription ed : hints) {
 511.374 -                    currentHints.add(ed.toString());
 511.375 -                }
 511.376 -
 511.377 -                files.put(r.getRelativePath(), currentHints);
 511.378 -
 511.379 -                return true;
 511.380 -            }
 511.381 -            public void groupFinished() {}
 511.382 -            public void cannotVerifySpan(Resource r) {
 511.383 -                fail("Cannot verify: " +r.getRelativePath());
 511.384 -            }
 511.385 -        }, doNotRegisterClassPath, errors, new AtomicBoolean());
 511.386 -
 511.387 -        return result;
 511.388 -    }
 511.389 -
 511.390 -    @ServiceProvider(service=ClassPathProvider.class)
 511.391 -    public static final class ClassPathProviderImpl implements ClassPathProvider {
 511.392 -
 511.393 -        private static Collection<FileObject> sourceRoots;
 511.394 -
 511.395 -        public synchronized static void setSourceRoots(Collection<FileObject> sourceRoots) {
 511.396 -            ClassPathProviderImpl.sourceRoots = sourceRoots;
 511.397 -        }
 511.398 -
 511.399 -        public synchronized static Collection<FileObject> getSourceRoots() {
 511.400 -            return sourceRoots;
 511.401 -        }
 511.402 -
 511.403 -        public synchronized ClassPath findClassPath(FileObject file, String type) {
 511.404 -            if (ClassPath.BOOT.equals(type)) {
 511.405 -                return ClassPathSupport.createClassPath(getBootClassPath().toArray(new URL[0]));
 511.406 -            }
 511.407 -
 511.408 -            if (ClassPath.COMPILE.equals(type)) {
 511.409 -                return ClassPathSupport.createClassPath(new URL[0]);
 511.410 -            }
 511.411 -
 511.412 -            if (ClassPath.SOURCE.equals(type) && sourceRoots != null) {
 511.413 -                for (FileObject sr : sourceRoots) {
 511.414 -                    if (file.equals(sr) || FileUtil.isParentOf(sr, file)) {
 511.415 -                        return ClassPathSupport.createClassPath(sr);
 511.416 -                    }
 511.417 -                }
 511.418 -            }
 511.419 -
 511.420 -            return null;
 511.421 -        }
 511.422 -
 511.423 -    }
 511.424 -
 511.425 -    //TODO: copied from SourceUtilsTestUtil:
 511.426 -    private static List<URL> bootClassPath;
 511.427 -
 511.428 -    public static synchronized List<URL> getBootClassPath() {
 511.429 -        if (bootClassPath == null) {
 511.430 -            try {
 511.431 -                String cp = System.getProperty("sun.boot.class.path");
 511.432 -                List<URL> urls = new ArrayList<URL>();
 511.433 -                String[] paths = cp.split(Pattern.quote(System.getProperty("path.separator")));
 511.434 -
 511.435 -                for (String path : paths) {
 511.436 -                    java.io.File f = new java.io.File(path);
 511.437 -
 511.438 -                    if (!f.canRead())
 511.439 -                        continue;
 511.440 -
 511.441 -                    FileObject fo = FileUtil.toFileObject(f);
 511.442 -
 511.443 -                    if (FileUtil.isArchiveFile(fo)) {
 511.444 -                        fo = FileUtil.getArchiveRoot(fo);
 511.445 -                    }
 511.446 -
 511.447 -                    if (fo != null) {
 511.448 -                        urls.add(fo.getURL());
 511.449 -                    }
 511.450 -                }
 511.451 -
 511.452 -                bootClassPath = urls;
 511.453 -            } catch (FileStateInvalidException e) {
 511.454 -                Exceptions.printStackTrace(e);
 511.455 -            }
 511.456 -        }
 511.457 -
 511.458 -        return bootClassPath;
 511.459 -    }
 511.460 -
 511.461 -}
   512.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchUtilitiesTest.java	Mon Dec 19 11:37:36 2016 +0100
   512.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   512.3 @@ -1,222 +0,0 @@
   512.4 -/*
   512.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   512.6 - *
   512.7 - * Copyright 2009-2011 Oracle and/or its affiliates. All rights reserved.
   512.8 - *
   512.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  512.10 - * Other names may be trademarks of their respective owners.
  512.11 - *
  512.12 - * The contents of this file are subject to the terms of either the GNU
  512.13 - * General Public License Version 2 only ("GPL") or the Common
  512.14 - * Development and Distribution License("CDDL") (collectively, the
  512.15 - * "License"). You may not use this file except in compliance with the
  512.16 - * License. You can obtain a copy of the License at
  512.17 - * http://www.netbeans.org/cddl-gplv2.html
  512.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  512.19 - * specific language governing permissions and limitations under the
  512.20 - * License.  When distributing the software, include this License Header
  512.21 - * Notice in each file and include the License file at
  512.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  512.23 - * particular file as subject to the "Classpath" exception as provided
  512.24 - * by Oracle in the GPL Version 2 section of the License file that
  512.25 - * accompanied this code. If applicable, add the following below the
  512.26 - * License Header, with the fields enclosed by brackets [] replaced by
  512.27 - * your own identifying information:
  512.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  512.29 - *
  512.30 - * If you wish your version of this file to be governed by only the CDDL
  512.31 - * or only the GPL Version 2, indicate your decision by adding
  512.32 - * "[Contributor] elects to include this software in this distribution
  512.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  512.34 - * single choice of license, a recipient has the option to distribute
  512.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  512.36 - * to extend the choice of license to its licensees as provided above.
  512.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  512.38 - * Version 2 license, then the option applies only if the new code is
  512.39 - * made subject to such option by the copyright holder.
  512.40 - *
  512.41 - * Contributor(s):
  512.42 - *
  512.43 - * Portions Copyrighted 2009-2011 Sun Microsystems, Inc.
  512.44 - */
  512.45 -package org.netbeans.modules.java.hints.spiimpl.batch;
  512.46 -
  512.47 -import org.netbeans.modules.java.hints.spiimpl.batch.TestUtils.File;
  512.48 -import org.netbeans.modules.java.hints.spiimpl.MessageImpl;
  512.49 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearchTest.ClassPathProviderImpl;
  512.50 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
  512.51 -import java.util.Arrays;
  512.52 -import java.util.Collection;
  512.53 -import java.util.Collections;
  512.54 -import java.util.HashMap;
  512.55 -import java.util.LinkedList;
  512.56 -import java.util.List;
  512.57 -import java.util.Map;
  512.58 -import java.util.concurrent.atomic.AtomicBoolean;
  512.59 -import org.netbeans.api.editor.mimelookup.MimePath;
  512.60 -import org.netbeans.api.java.classpath.ClassPath;
  512.61 -import org.netbeans.api.java.classpath.GlobalPathRegistry;
  512.62 -import org.netbeans.api.java.lexer.JavaTokenId;
  512.63 -import org.netbeans.api.java.source.ModificationResult;
  512.64 -import org.netbeans.api.java.source.SourceUtilsTestUtil;
  512.65 -import org.netbeans.api.java.source.TestUtilities;
  512.66 -import org.netbeans.api.lexer.InputAttributes;
  512.67 -import org.netbeans.api.lexer.Language;
  512.68 -import org.netbeans.api.lexer.LanguagePath;
  512.69 -import org.netbeans.api.lexer.Token;
  512.70 -import org.netbeans.core.startup.Main;
  512.71 -import org.netbeans.junit.NbTestCase;
  512.72 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.BatchResult;
  512.73 -import org.netbeans.modules.java.hints.spiimpl.batch.BatchSearch.Folder;
  512.74 -import org.netbeans.modules.java.source.parsing.JavacParser;
  512.75 -import org.netbeans.modules.parsing.impl.indexing.CacheFolder;
  512.76 -import org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater;
  512.77 -import org.netbeans.spi.editor.mimelookup.MimeDataProvider;
  512.78 -import org.netbeans.spi.java.classpath.support.ClassPathSupport;
  512.79 -import org.netbeans.spi.lexer.LanguageEmbedding;
  512.80 -import org.netbeans.spi.lexer.LanguageProvider;
  512.81 -import org.openide.LifecycleManager;
  512.82 -import org.openide.filesystems.FileObject;
  512.83 -import org.openide.filesystems.FileUtil;
  512.84 -
  512.85 -import org.openide.loaders.DataObject;
  512.86 -import org.openide.util.Lookup;
  512.87 -import org.openide.util.lookup.Lookups;
  512.88 -import org.openide.util.lookup.ServiceProvider;
  512.89 -import static org.netbeans.modules.java.hints.spiimpl.batch.TestUtils.writeFilesAndWaitForScan;
  512.90 -import static org.netbeans.modules.java.hints.spiimpl.batch.TestUtils.prepareHints;
  512.91 -import org.netbeans.modules.parsing.impl.indexing.MimeTypes;
  512.92 -
  512.93 -/**
  512.94 - *
  512.95 - * @author lahvac
  512.96 - */
  512.97 -public class BatchUtilitiesTest extends NbTestCase {
  512.98 -
  512.99 -    public BatchUtilitiesTest(String name) {
 512.100 -        super(name);
 512.101 -    }
 512.102 -
 512.103 -    //XXX: copied from CustomIndexerImplTest:
 512.104 -    @Override
 512.105 -    protected void setUp() throws Exception {
 512.106 -        SourceUtilsTestUtil.prepareTest(new String[] {"org/netbeans/modules/java/source/resources/layer.xml", "org/netbeans/lib/java/lexer/layer.xml"}, new Object[0]);
 512.107 -        Main.initializeURLFactory();
 512.108 -        org.netbeans.api.project.ui.OpenProjects.getDefault().getOpenProjects();
 512.109 -        prepareTest();
 512.110 -        MimeTypes.setAllMimeTypes(Collections.singleton("text/x-java"));
 512.111 -        GlobalPathRegistry.getDefault().register(ClassPath.SOURCE, new ClassPath[] {ClassPathSupport.createClassPath(src1, src2)});
 512.112 -        RepositoryUpdater.getDefault().start(true);
 512.113 -        super.setUp();
 512.114 -    }
 512.115 -
 512.116 -    public void testBatchSearchNotIndexed() throws Exception {
 512.117 -        writeFilesAndWaitForScan(src1,
 512.118 -                                 new File("test/Test1.java", "package test; public class Test1 { private void test() { java.io.File f = null; f.isDirectory(); } }"),
 512.119 -                                 new File("test/Test2.java", "package test; public class Test2 { private void test() { new javax.swing.ImageIcon(null); } }"));
 512.120 -        writeFilesAndWaitForScan(src3,
 512.121 -                                 new File("test/Test1.java", "package test; public class Test1 { private void test() { java.io.File f = null; f.isDirectory(); } }"),
 512.122 -                                 new File("test/Test2.java", "package test; public class Test2 { public boolean isDirectory() {return false} }"));
 512.123 -
 512.124 -        Iterable<? extends HintDescription> hints = prepareHints("$1.isDirectory() => !$1.isFile()", "$1", "java.io.File");
 512.125 -        BatchResult result = BatchSearch.findOccurrences(hints, Scopes.specifiedFoldersScope(Folder.convert(src1, src3, empty)));
 512.126 -        List<MessageImpl> problems = new LinkedList<MessageImpl>();
 512.127 -        Collection<? extends ModificationResult> changes = BatchUtilities.applyFixes(result, new ProgressHandleWrapper(100), new AtomicBoolean(), problems);
 512.128 -
 512.129 -        assertTrue(problems.toString(), problems.isEmpty());
 512.130 -
 512.131 -        Map<FileObject, String> file2New = new HashMap<FileObject, String>();
 512.132 -
 512.133 -        for (ModificationResult mr : changes) {
 512.134 -            for (FileObject file : mr.getModifiedFileObjects()) {
 512.135 -                assertNull(file2New.put(file, mr.getResultingSource(file)));
 512.136 -            }
 512.137 -        }
 512.138 -
 512.139 -        FileObject src1Test1 = src1.getFileObject("test/Test1.java");
 512.140 -        String src1Test1Real = file2New.remove(src1Test1);
 512.141 -        String src1Test1Golden = "package test; public class Test1 { private void test() { java.io.File f = null; !f.isFile(); } }";
 512.142 -
 512.143 -        assertEquals(src1Test1Golden, src1Test1Real);
 512.144 -
 512.145 -        FileObject src3Test1 = src3.getFileObject("test/Test1.java");
 512.146 -        String src3Test1Real = file2New.remove(src3Test1);
 512.147 -        String src3Test1Golden = "package test; public class Test1 { private void test() { java.io.File f = null; !f.isFile(); } }";
 512.148 -
 512.149 -        assertEquals(src3Test1Golden, src3Test1Real);
 512.150 -
 512.151 -        assertTrue(file2New.toString(), file2New.isEmpty());
 512.152 -    }
 512.153 -
 512.154 -//    public void testRemoveUnusedImports() throws Exception {
 512.155 -//        writeFilesAndWaitForScan(src1,
 512.156 -//                                 new File("test/Test1.java", "package test;\n import java.util.List;\n public class Test1 { }"));
 512.157 -//        writeFilesAndWaitForScan(src2,
 512.158 -//                                 new File("test/Test2.java", "package test;\n import java.util.LinkedList;\n public class Test2 { }"));
 512.159 -//
 512.160 -//        FileObject test1 = src1.getFileObject("test/Test1.java");
 512.161 -//        FileObject test2 = src2.getFileObject("test/Test2.java");
 512.162 -//
 512.163 -//        System.err.println(DataObject.find(test1).getClass());
 512.164 -//        BatchUtilities.removeUnusedImports(Arrays.asList(test1, test2));
 512.165 -//
 512.166 -//        LifecycleManager.getDefault().saveAll();
 512.167 -//
 512.168 -//        assertEquals("package test;\n public class Test1 { }", TestUtilities.copyFileToString(FileUtil.toFile(test1)));
 512.169 -//        assertEquals("package test;\n public class Test2 { }", TestUtilities.copyFileToString(FileUtil.toFile(test2)));
 512.170 -//    }
 512.171 -
 512.172 -    private FileObject src1;
 512.173 -    private FileObject src2;
 512.174 -    private FileObject src3;
 512.175 -    private FileObject empty;
 512.176 -
 512.177 -    private void prepareTest() throws Exception {
 512.178 -        FileObject workdir = SourceUtilsTestUtil.makeScratchDir(this);
 512.179 -
 512.180 -        src1 = FileUtil.createFolder(workdir, "src1");
 512.181 -        src2 = FileUtil.createFolder(workdir, "src2");
 512.182 -        src3 = FileUtil.createFolder(workdir, "src3");
 512.183 -        empty = FileUtil.createFolder(workdir, "empty");
 512.184 -
 512.185 -        ClassPathProviderImpl.setSourceRoots(Arrays.asList(src1, src2, src3));
 512.186 -
 512.187 -        FileObject cache = FileUtil.createFolder(workdir, "cache");
 512.188 -
 512.189 -        CacheFolder.setCacheFolder(cache);
 512.190 -    }
 512.191 -
 512.192 -    @ServiceProvider(service=MimeDataProvider.class)
 512.193 -    public static final class JavaLexerProvider implements MimeDataProvider {
 512.194 -
 512.195 -        private Lookup javaLookup = Lookups.fixed(JavaTokenId.language());
 512.196 -
 512.197 -        public Lookup getLookup(MimePath mimePath) {
 512.198 -            if (mimePath.getPath().endsWith(JavacParser.MIME_TYPE)) {
 512.199 -                return javaLookup;
 512.200 -            }
 512.201 -
 512.202 -            return Lookup.EMPTY;
 512.203 -        }
 512.204 -
 512.205 -    }
 512.206 -
 512.207 -    @ServiceProvider(service=LanguageProvider.class)
 512.208 -    public static final class JavaLanguageProvider extends LanguageProvider {
 512.209 -
 512.210 -        @Override
 512.211 -        public Language<?> findLanguage(String mimeType) {
 512.212 -            if ("text/x-java".equals(mimeType)) {
 512.213 -                return JavaTokenId.language();
 512.214 -            }
 512.215 -
 512.216 -            return null;
 512.217 -        }
 512.218 -
 512.219 -        @Override
 512.220 -        public LanguageEmbedding<?> findLanguageEmbedding(Token<?> token, LanguagePath languagePath, InputAttributes inputAttributes) {
 512.221 -            return null;
 512.222 -        }
 512.223 -
 512.224 -    }
 512.225 -}
   513.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/batch/ProgressHandleWrapperTest.java	Mon Dec 19 11:37:36 2016 +0100
   513.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   513.3 @@ -1,66 +0,0 @@
   513.4 -/*
   513.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   513.6 - *
   513.7 - * Copyright 2009-2011 Oracle and/or its affiliates. All rights reserved.
   513.8 - *
   513.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  513.10 - * Other names may be trademarks of their respective owners.
  513.11 - *
  513.12 - * The contents of this file are subject to the terms of either the GNU
  513.13 - * General Public License Version 2 only ("GPL") or the Common
  513.14 - * Development and Distribution License("CDDL") (collectively, the
  513.15 - * "License"). You may not use this file except in compliance with the
  513.16 - * License. You can obtain a copy of the License at
  513.17 - * http://www.netbeans.org/cddl-gplv2.html
  513.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  513.19 - * specific language governing permissions and limitations under the
  513.20 - * License.  When distributing the software, include this License Header
  513.21 - * Notice in each file and include the License file at
  513.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  513.23 - * particular file as subject to the "Classpath" exception as provided
  513.24 - * by Oracle in the GPL Version 2 section of the License file that
  513.25 - * accompanied this code. If applicable, add the following below the
  513.26 - * License Header, with the fields enclosed by brackets [] replaced by
  513.27 - * your own identifying information:
  513.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  513.29 - *
  513.30 - * If you wish your version of this file to be governed by only the CDDL
  513.31 - * or only the GPL Version 2, indicate your decision by adding
  513.32 - * "[Contributor] elects to include this software in this distribution
  513.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  513.34 - * single choice of license, a recipient has the option to distribute
  513.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  513.36 - * to extend the choice of license to its licensees as provided above.
  513.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  513.38 - * Version 2 license, then the option applies only if the new code is
  513.39 - * made subject to such option by the copyright holder.
  513.40 - *
  513.41 - * Contributor(s):
  513.42 - *
  513.43 - * Portions Copyrighted 2009-2011 Sun Microsystems, Inc.
  513.44 - */
  513.45 -package org.netbeans.modules.java.hints.spiimpl.batch;
  513.46 -
  513.47 -import org.netbeans.junit.NbTestCase;
  513.48 -
  513.49 -/**
  513.50 - *
  513.51 - * @author lahvac
  513.52 - */
  513.53 -public class ProgressHandleWrapperTest extends NbTestCase {
  513.54 -
  513.55 -    public ProgressHandleWrapperTest(String name) {
  513.56 -        super(name);
  513.57 -    }
  513.58 -
  513.59 -    public void testNoProgress() {
  513.60 -        ProgressHandleWrapper w = new ProgressHandleWrapper(new ProgressHandleWrapper.ProgressHandleAbstraction() {
  513.61 -            public void start(int totalWork) {}
  513.62 -            public void progress(int currentWorkDone) {}
  513.63 -            public void progress(String message) {}
  513.64 -            public void finish() {}
  513.65 -        }, 1);
  513.66 -        
  513.67 -        w.finish();
  513.68 -    }
  513.69 -}
   514.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/batch/TestUtils.java	Mon Dec 19 11:37:36 2016 +0100
   514.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   514.3 @@ -1,135 +0,0 @@
   514.4 -/*
   514.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   514.6 - *
   514.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
   514.8 - *
   514.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  514.10 - * Other names may be trademarks of their respective owners.
  514.11 - *
  514.12 - * The contents of this file are subject to the terms of either the GNU
  514.13 - * General Public License Version 2 only ("GPL") or the Common
  514.14 - * Development and Distribution License("CDDL") (collectively, the
  514.15 - * "License"). You may not use this file except in compliance with the
  514.16 - * License. You can obtain a copy of the License at
  514.17 - * http://www.netbeans.org/cddl-gplv2.html
  514.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  514.19 - * specific language governing permissions and limitations under the
  514.20 - * License.  When distributing the software, include this License Header
  514.21 - * Notice in each file and include the License file at
  514.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  514.23 - * particular file as subject to the "Classpath" exception as provided
  514.24 - * by Oracle in the GPL Version 2 section of the License file that
  514.25 - * accompanied this code. If applicable, add the following below the
  514.26 - * License Header, with the fields enclosed by brackets [] replaced by
  514.27 - * your own identifying information:
  514.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  514.29 - *
  514.30 - * If you wish your version of this file to be governed by only the CDDL
  514.31 - * or only the GPL Version 2, indicate your decision by adding
  514.32 - * "[Contributor] elects to include this software in this distribution
  514.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  514.34 - * single choice of license, a recipient has the option to distribute
  514.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  514.36 - * to extend the choice of license to its licensees as provided above.
  514.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  514.38 - * Version 2 license, then the option applies only if the new code is
  514.39 - * made subject to such option by the copyright holder.
  514.40 - *
  514.41 - * Contributor(s):
  514.42 - *
  514.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
  514.44 - */
  514.45 -package org.netbeans.modules.java.hints.spiimpl.batch;
  514.46 -
  514.47 -import java.util.Collection;
  514.48 -import java.util.Collections;
  514.49 -import org.netbeans.spi.java.hints.HintContext;
  514.50 -import org.netbeans.modules.java.hints.providers.spi.HintDescription.Worker;
  514.51 -import org.netbeans.modules.java.hints.providers.spi.Trigger.PatternDescription;
  514.52 -import org.netbeans.spi.java.hints.ErrorDescriptionFactory;
  514.53 -import org.netbeans.spi.editor.hints.ErrorDescription;
  514.54 -import org.netbeans.modules.java.hints.providers.spi.HintDescriptionFactory;
  514.55 -import java.util.HashMap;
  514.56 -import java.util.Map;
  514.57 -import org.netbeans.api.java.source.SourceUtils;
  514.58 -import org.netbeans.api.java.source.TestUtilities;
  514.59 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
  514.60 -import org.openide.filesystems.FileObject;
  514.61 -import org.openide.filesystems.FileUtil;
  514.62 -
  514.63 -import static org.junit.Assert.*;
  514.64 -import org.netbeans.spi.java.hints.JavaFixUtilities;
  514.65 -
  514.66 -/**
  514.67 - *
  514.68 - * @author lahvac
  514.69 - */
  514.70 -public class TestUtils {
  514.71 -
  514.72 -    public static void writeFiles(FileObject sourceRoot, File... files) throws Exception {
  514.73 -        for (FileObject c : sourceRoot.getChildren()) {
  514.74 -            c.delete();
  514.75 -        }
  514.76 -
  514.77 -        for (File f : files) {
  514.78 -            FileObject fo = FileUtil.createData(sourceRoot, f.filename);
  514.79 -            TestUtilities.copyStringToFile(fo, f.content);
  514.80 -        }
  514.81 -    }
  514.82 -
  514.83 -    public static void writeFilesAndWaitForScan(FileObject sourceRoot, File... files) throws Exception {
  514.84 -        writeFiles(sourceRoot, files);
  514.85 -        SourceUtils.waitScanFinished();
  514.86 -    }
  514.87 -    
  514.88 -    public static final class File {
  514.89 -        public final String filename;
  514.90 -        public final String content;
  514.91 -        public final boolean index;
  514.92 -
  514.93 -        public File(String filename, String content) {
  514.94 -            this(filename, content, true);
  514.95 -        }
  514.96 -
  514.97 -        public File(String filename, String content, boolean index) {
  514.98 -            this.filename = filename;
  514.99 -            this.content = content;
 514.100 -            this.index = index;
 514.101 -        }
 514.102 -    }
 514.103 -
 514.104 -    public static Iterable<? extends HintDescription> prepareHints(String rule, String... constraints) {
 514.105 -        final String[] split = rule.split("=>");
 514.106 -
 514.107 -        Worker w;
 514.108 -
 514.109 -        if (split.length == 2) {
 514.110 -            w = new HintDescription.Worker() {
 514.111 -                @Override public Collection<? extends ErrorDescription> createErrors(HintContext ctx) {
 514.112 -                    return Collections.singletonList(ErrorDescriptionFactory.forName(ctx, ctx.getPath(), "", JavaFixUtilities.rewriteFix(ctx, "", ctx.getPath(), split[1])));
 514.113 -                }
 514.114 -            };
 514.115 -        } else {
 514.116 -            w = new HintDescription.Worker() {
 514.117 -                @Override public Collection<? extends ErrorDescription> createErrors(HintContext ctx) {
 514.118 -                    return Collections.singletonList(ErrorDescriptionFactory.forName(ctx, ctx.getPath(), ""));
 514.119 -                }
 514.120 -            };
 514.121 -        }
 514.122 -
 514.123 -        assertTrue(constraints.length % 2 == 0);
 514.124 -
 514.125 -        Map<String, String> constr = new HashMap<String, String>();
 514.126 -
 514.127 -        for (int i = 0; i < constraints.length; i += 2) {
 514.128 -            constr.put(constraints[i], constraints[i + 1]);
 514.129 -        }
 514.130 -
 514.131 -        HintDescription hd = HintDescriptionFactory.create()
 514.132 -                                                   .setTrigger(PatternDescription.create(split[0], constr))
 514.133 -                                                   .setWorker(w)
 514.134 -                                                   .produce();
 514.135 -
 514.136 -        return Collections.singletonList(hd);
 514.137 -    }
 514.138 -}
   515.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/hints/HintsInvokerTest.java	Mon Dec 19 11:37:36 2016 +0100
   515.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   515.3 @@ -1,895 +0,0 @@
   515.4 -/*
   515.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   515.6 - *
   515.7 - * Copyright 2009-2010 Oracle and/or its affiliates. All rights reserved.
   515.8 - *
   515.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  515.10 - * Other names may be trademarks of their respective owners.
  515.11 - *
  515.12 - * The contents of this file are subject to the terms of either the GNU
  515.13 - * General Public License Version 2 only ("GPL") or the Common
  515.14 - * Development and Distribution License("CDDL") (collectively, the
  515.15 - * "License"). You may not use this file except in compliance with the
  515.16 - * License. You can obtain a copy of the License at
  515.17 - * http://www.netbeans.org/cddl-gplv2.html
  515.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  515.19 - * specific language governing permissions and limitations under the
  515.20 - * License.  When distributing the software, include this License Header
  515.21 - * Notice in each file and include the License file at
  515.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  515.23 - * particular file as subject to the "Classpath" exception as provided
  515.24 - * by Oracle in the GPL Version 2 section of the License file that
  515.25 - * accompanied this code. If applicable, add the following below the
  515.26 - * License Header, with the fields enclosed by brackets [] replaced by
  515.27 - * your own identifying information:
  515.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  515.29 - *
  515.30 - * If you wish your version of this file to be governed by only the CDDL
  515.31 - * or only the GPL Version 2, indicate your decision by adding
  515.32 - * "[Contributor] elects to include this software in this distribution
  515.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  515.34 - * single choice of license, a recipient has the option to distribute
  515.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  515.36 - * to extend the choice of license to its licensees as provided above.
  515.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  515.38 - * Version 2 license, then the option applies only if the new code is
  515.39 - * made subject to such option by the copyright holder.
  515.40 - *
  515.41 - * Contributor(s):
  515.42 - *
  515.43 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  515.44 - */
  515.45 -
  515.46 -package org.netbeans.modules.java.hints.spiimpl.hints;
  515.47 -
  515.48 -import com.sun.source.tree.Tree.Kind;
  515.49 -import com.sun.source.util.TreePath;
  515.50 -import java.util.Arrays;
  515.51 -import java.util.Collection;
  515.52 -import java.util.Collections;
  515.53 -import java.util.EnumSet;
  515.54 -import java.util.HashMap;
  515.55 -import java.util.LinkedList;
  515.56 -import java.util.List;
  515.57 -import java.util.Map;
  515.58 -import java.util.concurrent.atomic.AtomicBoolean;
  515.59 -import javax.swing.text.Document;
  515.60 -import static org.junit.Assert.*;
  515.61 -import org.netbeans.api.java.source.CompilationInfo;
  515.62 -import org.netbeans.modules.java.hints.spiimpl.TestBase;
  515.63 -import org.netbeans.spi.java.hints.HintContext;
  515.64 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
  515.65 -import org.netbeans.modules.java.hints.providers.spi.HintDescription.Worker;
  515.66 -import org.netbeans.modules.java.hints.providers.spi.HintDescriptionFactory;
  515.67 -import org.netbeans.modules.java.hints.providers.spi.HintMetadata;
  515.68 -import org.netbeans.modules.java.hints.providers.spi.HintMetadata.Options;
  515.69 -import org.netbeans.modules.java.hints.providers.spi.Trigger.Kinds;
  515.70 -import org.netbeans.modules.java.hints.providers.spi.Trigger.PatternDescription;
  515.71 -import org.netbeans.modules.java.hints.spiimpl.options.HintsSettings;
  515.72 -import org.netbeans.spi.java.hints.ErrorDescriptionFactory;
  515.73 -import org.netbeans.spi.editor.hints.ErrorDescription;
  515.74 -import org.netbeans.spi.editor.hints.Fix;
  515.75 -import org.netbeans.spi.java.hints.JavaFixUtilities;
  515.76 -import org.openide.LifecycleManager;
  515.77 -import org.openide.cookies.EditorCookie;
  515.78 -import org.openide.filesystems.FileObject;
  515.79 -import org.openide.loaders.DataObject;
  515.80 -
  515.81 -/**
  515.82 - *
  515.83 - * @author user
  515.84 - */
  515.85 -public class HintsInvokerTest extends TestBase {
  515.86 -
  515.87 -    public HintsInvokerTest(String name) {
  515.88 -        super(name);
  515.89 -    }
  515.90 -
  515.91 -//    public static TestSuite suite() {
  515.92 -//        NbTestSuite r = new NbTestSuite();
  515.93 -//        r.addTest(new HintsInvokerTest("testPatternVariable1"));
  515.94 -//        return r;
  515.95 -//    }
  515.96 -
  515.97 -    public void testPattern1() throws Exception {
  515.98 -        performAnalysisTest("test/Test.java",
  515.99 -                            "|package test;\n" +
 515.100 -                            "import java.io.File;\n" +
 515.101 -                            "public class Test {\n" +
 515.102 -                            "     private void test(File f) {\n" +
 515.103 -                            "         f.toURL();\n" +
 515.104 -                            "     }\n" +
 515.105 -                            "}\n",
 515.106 -                            "4:11-4:16:verifier:HINT");
 515.107 -    }
 515.108 -
 515.109 -    public void testPattern2() throws Exception {
 515.110 -        performAnalysisTest("test/Test.java",
 515.111 -                            "|package test;\n" +
 515.112 -                            "\n" +
 515.113 -                            "public class Test {\n" +
 515.114 -                            "     private void test(java.io.File f) {\n" +
 515.115 -                            "         f.toURL();\n" +
 515.116 -                            "     }\n" +
 515.117 -                            "}\n",
 515.118 -                            "4:11-4:16:verifier:HINT");
 515.119 -    }
 515.120 -
 515.121 -    public void testKind1() throws Exception {
 515.122 -        performAnalysisTest("test/Test.java",
 515.123 -                            "|package test;\n" +
 515.124 -                            "\n" +
 515.125 -                            "public class Test {\n" +
 515.126 -                            "     private void test(java.io.File f) {\n" +
 515.127 -                            "         f.toURL();\n" +
 515.128 -                            "     }\n" +
 515.129 -                            "}\n",
 515.130 -                            "4:11-4:16:verifier:HINT");
 515.131 -    }
 515.132 -
 515.133 -    public void DISABLEDtestPatternVariable1() throws Exception {
 515.134 -        performFixTest("test/Test.java",
 515.135 -                       "|package test;\n" +
 515.136 -                       "\n" +
 515.137 -                       "public class Test {\n" +
 515.138 -                       "     private void test() {\n" +
 515.139 -                       "         {\n" +
 515.140 -                       "             int y;\n" +
 515.141 -                       "             y = 1;\n" +
 515.142 -                       "         }\n" +
 515.143 -                       "         int z;\n" +
 515.144 -                       "         {\n" +
 515.145 -                       "             int y;\n" +
 515.146 -                       "             z = 1;\n" +
 515.147 -                       "         }\n" +
 515.148 -                       "     }\n" +
 515.149 -                       "}\n",
 515.150 -                       "4:9-7:10:verifier:HINT",
 515.151 -                       "FixImpl",
 515.152 -                       "package test; public class Test { private void test() { { int y = 1; } int z; { int y; z = 1; } } } ");
 515.153 -    }
 515.154 -
 515.155 -    public void testPatternAssert1() throws Exception {
 515.156 -        performAnalysisTest("test/Test.java",
 515.157 -                            "|package test;\n" +
 515.158 -                            "\n" +
 515.159 -                            "public class Test {\n" +
 515.160 -                            "     private void test() {\n" +
 515.161 -                            "         assert true : \"\";\n" +
 515.162 -                            "     }\n" +
 515.163 -                            "}\n",
 515.164 -                            "4:9-4:15:verifier:HINT");
 515.165 -    }
 515.166 -
 515.167 -    public void testPatternStatementAndSingleStatementBlockAreSame() throws Exception {
 515.168 -        performAnalysisTest("test/Test.java",
 515.169 -                            "|package test;\n" +
 515.170 -                            "\n" +
 515.171 -                            "public class Test {\n" +
 515.172 -                            "     private int test() {\n" +
 515.173 -                            "         if (true) {\n" +
 515.174 -                            "             return 0;\n" +
 515.175 -                            "         }\n" +
 515.176 -                            "     }\n" +
 515.177 -                            "}\n",
 515.178 -                            "4:9-4:11:verifier:HINT");
 515.179 -    }
 515.180 -
 515.181 -    public void testPatternFalseOccurrence() throws Exception {
 515.182 -        performAnalysisTest("test/Test.java",
 515.183 -                            "|package test;\n" +
 515.184 -                            "\n" +
 515.185 -                            "public class Test {\n" +
 515.186 -                            "     private int test(java.io.File f) {\n" +
 515.187 -                            "         f.toURI().toURL();\n" +
 515.188 -                            "     }\n" +
 515.189 -                            "}\n");
 515.190 -    }
 515.191 -
 515.192 -    public void testStatementVariables1() throws Exception {
 515.193 -        performFixTest("test/Test.java",
 515.194 -                       "|package test;\n" +
 515.195 -                       "\n" +
 515.196 -                       "public class Test {\n" +
 515.197 -                       "     private int test(java.io.File f) {\n" +
 515.198 -                       "         if (true)\n" +
 515.199 -                       "             System.err.println(1);\n" +
 515.200 -                       "         else\n" +
 515.201 -                       "             System.err.println(2);\n" +
 515.202 -                       "     }\n" +
 515.203 -                       "}\n",
 515.204 -                       "4:9-4:11:verifier:HINT",
 515.205 -                       "FixImpl",
 515.206 -                       ("package test;\n" +
 515.207 -                       "\n" +
 515.208 -                       "public class Test {\n" +
 515.209 -                       "     private int test(java.io.File f) {\n" +
 515.210 -                       "         if (false)\n" +
 515.211 -                       "             System.err.println(2);\n" +
 515.212 -                       "         else\n" +
 515.213 -                       "             System.err.println(1);\n" +
 515.214 -                       "     }\n" +
 515.215 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.216 -    }
 515.217 -
 515.218 -    public void testStatementVariables2() throws Exception {
 515.219 -        performFixTest("test/Test.java",
 515.220 -                       "|package test;\n" +
 515.221 -                       "\n" +
 515.222 -                       "public class Test {\n" +
 515.223 -                       "     private int test(java.io.File f) {\n" +
 515.224 -                       "         if (true)\n" +
 515.225 -                       "             return 1;\n" +
 515.226 -                       "         else\n" +
 515.227 -                       "             return 2;\n" +
 515.228 -                       "     }\n" +
 515.229 -                       "}\n",
 515.230 -                       "4:9-4:11:verifier:HINT",
 515.231 -                       "FixImpl",
 515.232 -                       ("package test;\n" +
 515.233 -                       "\n" +
 515.234 -                       "public class Test {\n" +
 515.235 -                       "     private int test(java.io.File f) {\n" +
 515.236 -                       "         if (false)\n" +
 515.237 -                       "             return 2;\n" +
 515.238 -                       "         else\n" +
 515.239 -                       "             return 1;\n" +
 515.240 -                       "     }\n" +
 515.241 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.242 -    }
 515.243 -
 515.244 -    public void testMultiStatementVariables1() throws Exception {
 515.245 -        performFixTest("test/Test.java",
 515.246 -                       "|package test;\n" +
 515.247 -                       "\n" +
 515.248 -                       "public class Test {\n" +
 515.249 -                       "     private int test(int j) {\n" +
 515.250 -                       "         j++;\n" +
 515.251 -                       "         j++;\n" +
 515.252 -                       "         int i = 3;\n" +
 515.253 -                       "         j++;\n" +
 515.254 -                       "         j++;\n" +
 515.255 -                       "         return i;\n" +
 515.256 -                       "     }\n" +
 515.257 -                       "}\n",
 515.258 -                       "3:29-10:6:verifier:HINT",
 515.259 -                       "FixImpl",
 515.260 -                       ("package test;\n" +
 515.261 -                       "\n" +
 515.262 -                       "public class Test {\n" +
 515.263 -                       "     private int test(int j) {\n" +
 515.264 -                       "         j++;\n" +
 515.265 -                       "         j++;\n" +
 515.266 -                       "         float i = 3;\n" +
 515.267 -                       "         j++;\n" +
 515.268 -                       "         j++;\n" +
 515.269 -                       "         return i;\n" +
 515.270 -                       "     }\n" +
 515.271 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.272 -    }
 515.273 -
 515.274 -    public void testMultiStatementVariables2() throws Exception {
 515.275 -        performFixTest("test/Test.java",
 515.276 -                       "|package test;\n" +
 515.277 -                       "\n" +
 515.278 -                       "public class Test {\n" +
 515.279 -                       "     private int test(int j) {\n" +
 515.280 -                       "         int i = 3;\n" +
 515.281 -                       "         return i;\n" +
 515.282 -                       "     }\n" +
 515.283 -                       "}\n",
 515.284 -                       "3:29-6:6:verifier:HINT",
 515.285 -                       "FixImpl",
 515.286 -                       ("package test;\n" +
 515.287 -                       "\n" +
 515.288 -                       "public class Test {\n" +
 515.289 -                       "     private int test(int j) {\n" +
 515.290 -                       "         float i = 3;\n" +
 515.291 -                       "         return i;\n" +
 515.292 -                       "     }\n" +
 515.293 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.294 -    }
 515.295 -
 515.296 -    public void testMultiStatementVariables3() throws Exception {
 515.297 -        performFixTest("test/Test.java",
 515.298 -                       "|package test;\n" +
 515.299 -                       "\n" +
 515.300 -                       "public class Test {\n" +
 515.301 -                       "     private int test() {\n" +
 515.302 -                       "         System.err.println();\n" +
 515.303 -                       "         System.err.println();\n" +
 515.304 -                       "         int i = 3;\n" +
 515.305 -                       "         System.err.println(i);\n" +
 515.306 -                       "         System.err.println(i);\n" +
 515.307 -                       "         return i;\n" +
 515.308 -                       "     }\n" +
 515.309 -                       "}\n",
 515.310 -                       "3:24-10:6:verifier:HINT",
 515.311 -                       "FixImpl",
 515.312 -                       ("package test;\n" +
 515.313 -                       "\n" +
 515.314 -                       "public class Test {\n" +
 515.315 -                       "     private int test() {\n" +
 515.316 -                       "         System.err.println();\n" +
 515.317 -                       "         System.err.println();\n" +
 515.318 -                       "         float i = 3;\n" +
 515.319 -                       "         System.err.println(i);\n" +
 515.320 -                       "         System.err.println(i);\n" +
 515.321 -                       "         return i;\n" +
 515.322 -                       "     }\n" +
 515.323 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.324 -    }
 515.325 -
 515.326 -    public void testMultiStatementVariablesAndBlocks() throws Exception {
 515.327 -        performFixTest("test/Test.java",
 515.328 -                       "|package test;\n" +
 515.329 -                       "\n" +
 515.330 -                       "public class Test {\n" +
 515.331 -                       "     private void test() {" +
 515.332 -                       "         if (true)\n" +
 515.333 -                       "             System.err.println();\n" +
 515.334 -                       "     }\n" +
 515.335 -                       "}\n",
 515.336 -                       "3:35-3:37:verifier:HINT",
 515.337 -                       "FixImpl",
 515.338 -                       ("package test;\n" +
 515.339 -                       "\n" +
 515.340 -                       "public class Test {\n" +
 515.341 -                       "     private void test() {" +
 515.342 -                       "         if (false) {\n" +
 515.343 -                       "             System.err.println();\n" +
 515.344 -                       "         }\n" +
 515.345 -                       "     }\n" +
 515.346 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.347 -    }
 515.348 -
 515.349 -    public void testOneStatement2MultipleBlock() throws Exception {
 515.350 -        performFixTest("test/Test.java",
 515.351 -                       "|package test;\n" +
 515.352 -                       "\n" +
 515.353 -                       "public class Test {\n" +
 515.354 -                       "     private void test() {\n" +
 515.355 -                       "         System.err.println(\"\");\n" +
 515.356 -                       "     }\n" +
 515.357 -                       "}\n",
 515.358 -                       "4:9-4:32:verifier:HINT",
 515.359 -                       "FixImpl",
 515.360 -                       ("package test;\n" +
 515.361 -                       "\n" +
 515.362 -                       "public class Test {\n" +
 515.363 -                       "     private void test() {\n" +
 515.364 -                       "         System.err.println(\"\");\n" +
 515.365 -                       "         System.err.println(\"\");\n" +
 515.366 -                       "     }\n" +
 515.367 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.368 -    }
 515.369 -
 515.370 -    public void testOneStatement2MultipleStatement() throws Exception {
 515.371 -        performFixTest("test/Test.java",
 515.372 -                       "|package test;\n" +
 515.373 -                       "\n" +
 515.374 -                       "public class Test {\n" +
 515.375 -                       "     private void test() {\n" +
 515.376 -                       "         if (true)\n" +
 515.377 -                       "             System.err.println(\"\");\n" +
 515.378 -                       "     }\n" +
 515.379 -                       "}\n",
 515.380 -                       "5:13-5:36:verifier:HINT",
 515.381 -                       "FixImpl",
 515.382 -                       ("package test;\n" +
 515.383 -                       "\n" +
 515.384 -                       "public class Test {\n" +
 515.385 -                       "     private void test() {\n" +
 515.386 -                       "         if (true) {\n" +
 515.387 -                       "             System.err.println(\"\");\n" +
 515.388 -                       "             System.err.println(\"\");\n" +
 515.389 -                       "         }\n" +
 515.390 -                       "     }\n" +
 515.391 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.392 -    }
 515.393 -
 515.394 -    public void testMultiple2OneStatement1() throws Exception {
 515.395 -        performFixTest("test/Test.java",
 515.396 -                       "|package test;\n" +
 515.397 -                       "\n" +
 515.398 -                       "public class Test {\n" +
 515.399 -                       "     private void test() {\n" +
 515.400 -                       "         System.err.println(\"\");\n" +
 515.401 -                       "         System.err.println(\"\");\n" +
 515.402 -                       "     }\n" +
 515.403 -                       "}\n",
 515.404 -                       "4:9-4:32:verifier:HINT",
 515.405 -                       "FixImpl",
 515.406 -                       ("package test;\n" +
 515.407 -                       "\n" +
 515.408 -                       "public class Test {\n" +
 515.409 -                       "     private void test() {\n" +
 515.410 -                       "         System.err.println(\"\");\n" +
 515.411 -                       "     }\n" +
 515.412 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.413 -    }
 515.414 -
 515.415 -    public void testMultiple2OneStatement2() throws Exception {
 515.416 -        performFixTest("test/Test.java",
 515.417 -                       "|package test;\n" +
 515.418 -                       "\n" +
 515.419 -                       "public class Test {\n" +
 515.420 -                       "     private void test() {\n" +
 515.421 -                       "         int i = 0;\n" +
 515.422 -                       "         System.err.println(\"\");\n" +
 515.423 -                       "         System.err.println(\"\");\n" +
 515.424 -                       "         i++;\n" +
 515.425 -                       "     }\n" +
 515.426 -                       "}\n",
 515.427 -                       "5:9-5:32:verifier:HINT",
 515.428 -                       "FixImpl",
 515.429 -                       ("package test;\n" +
 515.430 -                       "\n" +
 515.431 -                       "public class Test {\n" +
 515.432 -                       "     private void test() {\n" +
 515.433 -                       "         int i = 0;\n" +
 515.434 -                       "         System.err.println(\"\");\n" +
 515.435 -                       "         i++;\n" +
 515.436 -                       "     }\n" +
 515.437 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.438 -    }
 515.439 -
 515.440 -    public void testMemberSelectInsideMemberSelect() throws Exception {
 515.441 -        performFixTest("test/Test.java",
 515.442 -                       "|package test;\n" +
 515.443 -                       "\n" +
 515.444 -                       "public class Test {\n" +
 515.445 -                       "     public Test test;\n" +
 515.446 -                       "     public String name;\n" +
 515.447 -                       "     private void test() {\n" +
 515.448 -                       "         Test t = null;\n" +
 515.449 -                       "         String s = t.test.toString();\n" +
 515.450 -                       "     }\n" +
 515.451 -                       "}\n",
 515.452 -                       "7:22-7:26:verifier:HINT",
 515.453 -                       "FixImpl",
 515.454 -                       ("package test;\n" +
 515.455 -                       "\n" +
 515.456 -                       "public class Test {\n" +
 515.457 -                       "     public Test test;\n" +
 515.458 -                       "     public String name;\n" +
 515.459 -                       "     private void test() {\n" +
 515.460 -                       "         Test t = null;\n" +
 515.461 -                       "         String s = t.getTest().toString();\n" +
 515.462 -                       "     }\n" +
 515.463 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.464 -    }
 515.465 -
 515.466 -    public void testPackageInfo() throws Exception {
 515.467 -        performAnalysisTest("test/package-info.java",
 515.468 -                            "|package test;\n");
 515.469 -    }
 515.470 -
 515.471 -    public void testSuppressWarnings() throws Exception {
 515.472 -        performAnalysisTest("test/Test.java",
 515.473 -                            "|package test;\n" +
 515.474 -                            "@SuppressWarnings(\"test\")\n" +
 515.475 -                            "public class Test {\n" +
 515.476 -                            "     public Test test;\n" +
 515.477 -                            "     public String name;\n" +
 515.478 -                            "     private void test() {\n" +
 515.479 -                            "         Test t = null;\n" +
 515.480 -                            "         String s = t.test.toString();\n" +
 515.481 -                            "     }\n" +
 515.482 -                            "}\n");
 515.483 -    }
 515.484 -
 515.485 -    public void testRewriteOneToMultipleClassMembers() throws Exception {
 515.486 -        performFixTest("test/Test.java",
 515.487 -                       "|package test;\n" +
 515.488 -                       "\n" +
 515.489 -                       "public class Test {\n" +
 515.490 -                       "     private int i;\n" +
 515.491 -                       "}\n",
 515.492 -                       "3:17-3:18:verifier:HINT",
 515.493 -                       "FixImpl",
 515.494 -                       ("package test;\n" +
 515.495 -                       "\n" +
 515.496 -                       "public class Test {\n" +
 515.497 -                       "     private int i;\n" +
 515.498 -                       "     public int getI() {\n" +
 515.499 -                       "         return i;\n" +
 515.500 -                       "     }\n" +
 515.501 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.502 -    }
 515.503 -
 515.504 -    public void testImports1() throws Exception {
 515.505 -        performFixTest("test/Test.java",
 515.506 -                       "|package test;\n" +
 515.507 -                       "\n" +
 515.508 -                       "public class Test {\n" +
 515.509 -                       "     private void test() {\n" +
 515.510 -                       "         new java.util.LinkedList();\n" +
 515.511 -                       "     }" +
 515.512 -                       "}\n",
 515.513 -                       "4:9-4:35:verifier:HINT",
 515.514 -                       "FixImpl",
 515.515 -                       ("package test;\n" +
 515.516 -                       "import java.util.ArrayList;\n" +
 515.517 -                       "public class Test {\n" +
 515.518 -                       "     private void test() {\n" +
 515.519 -                       "         new ArrayList();\n" +
 515.520 -                       "     }" +
 515.521 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.522 -    }
 515.523 -
 515.524 -    public void testImports2() throws Exception {
 515.525 -        performFixTest("test/Test.java",
 515.526 -                       "|package test;\n" +
 515.527 -                       "import java.util.LinkedList;\n" +
 515.528 -                       "public class Test {\n" +
 515.529 -                       "     private void test() {\n" +
 515.530 -                       "         LinkedList l;\n" +
 515.531 -                       "     }" +
 515.532 -                       "}\n",
 515.533 -                       "4:20-4:21:verifier:HINT",
 515.534 -                       "FixImpl",
 515.535 -                       ("package test;\n" +
 515.536 -                       "import java.util.ArrayList;\n" +
 515.537 -                       "import java.util.LinkedList;\n" +
 515.538 -                       "public class Test {\n" +
 515.539 -                       "     private void test() {\n" +
 515.540 -                       "         ArrayList l;\n" +
 515.541 -                       "     }" +
 515.542 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.543 -    }
 515.544 -
 515.545 -    public void testMultiParameters() throws Exception {
 515.546 -        performFixTest("test/Test.java",
 515.547 -                       "|package test;\n" +
 515.548 -                       "import java.util.Arrays;\n" +
 515.549 -                       "public class Test {\n" +
 515.550 -                       "     { Arrays.asList(\"a\", \"b\", \"c\"); }\n" +
 515.551 -                       "}\n",
 515.552 -                       "3:14-3:20:verifier:HINT",
 515.553 -                       "FixImpl",
 515.554 -                       ("package test;\n" +
 515.555 -                       "import java.util.Arrays;\n" +
 515.556 -                       "public class Test {\n" +
 515.557 -                       "     { Arrays.asList(\"d\", \"a\", \"b\", \"c\"); }\n" +
 515.558 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.559 -    }
 515.560 -
 515.561 -    public void testTypeParametersMethod() throws Exception {
 515.562 -        performFixTest("test/Test.java",
 515.563 -                       "|package test;\n" +
 515.564 -                       "import java.util.Arrays;\n" +
 515.565 -                       "public class Test {\n" +
 515.566 -                       "     { Arrays.<String>asList(\"a\", \"b\", \"c\"); }\n" +
 515.567 -                       "}\n",
 515.568 -                       "3:22-3:28:verifier:HINT",
 515.569 -                       "FixImpl",
 515.570 -                       ("package test;\n" +
 515.571 -                       "import java.util.Arrays;\n" +
 515.572 -                       "public class Test {\n" +
 515.573 -                       "     { Arrays.<String>asList(\"d\", \"a\", \"b\", \"c\"); }\n" +
 515.574 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.575 -    }
 515.576 -
 515.577 -    public void testTypeParametersNewClass() throws Exception {
 515.578 -        performFixTest("test/Test.java",
 515.579 -                       "|package test;\n" +
 515.580 -                       "import java.util.Arrays;\n" +
 515.581 -                       "import java.util.HashSet;\n" +
 515.582 -                       "public class Test {\n" +
 515.583 -                       "     { new HashSet<String>(Arrays.<String>asList(\"a\", \"b\", \"c\")); }\n" +
 515.584 -                       "}\n",
 515.585 -                       "4:7-4:64:verifier:HINT",
 515.586 -                       "FixImpl",
 515.587 -                       ("package test;\n" +
 515.588 -                       "import java.util.Arrays;\n" +
 515.589 -                       "import java.util.HashSet;\n" +
 515.590 -                       "public class Test {\n" +
 515.591 -                       "     { new HashSet<String>(Arrays.<String>asList(\"d\", \"a\", \"b\", \"c\")); }\n" +
 515.592 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.593 -    }
 515.594 -
 515.595 -    public void testChangeFieldType1() throws Exception {
 515.596 -        performFixTest("test/Test.java",
 515.597 -                       "|package test;\n" +
 515.598 -                       "public class Test {\n" +
 515.599 -                       "     private String name = null;\n" +
 515.600 -                       "}\n",
 515.601 -                       "2:20-2:24:verifier:HINT",
 515.602 -                       "FixImpl",
 515.603 -                       ("package test;\n" +
 515.604 -                       "public class Test {\n" +
 515.605 -                       "     private CharSequence name = null;\n" +
 515.606 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.607 -    }
 515.608 -
 515.609 -    public void testChangeFieldType2() throws Exception {
 515.610 -        performFixTest("test/Test.java",
 515.611 -                       "|package test;\n" +
 515.612 -                       "public class Test {\n" +
 515.613 -                       "     String name = null;\n" +
 515.614 -                       "}\n",
 515.615 -                       "2:12-2:16:verifier:HINT",
 515.616 -                       "FixImpl",
 515.617 -                       ("package test;\n" +
 515.618 -                       "public class Test {\n" +
 515.619 -                       "     CharSequence name = null;\n" +
 515.620 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.621 -    }
 515.622 -
 515.623 -    public void testChangeFieldType3() throws Exception {
 515.624 -        performFixTest("test/Test.java",
 515.625 -                       "|package test;\n" +
 515.626 -                       "public class Test {\n" +
 515.627 -                       "     private static final String name = \"test\".substring(0, 4);\n" +
 515.628 -                       "}\n",
 515.629 -                       "2:33-2:37:verifier:HINT",
 515.630 -                       "FixImpl",
 515.631 -                       ("package test;\n" +
 515.632 -                       "public class Test {\n" +
 515.633 -                       "     private static final CharSequence name = \"test\".substring(0, 4);\n" +
 515.634 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.635 -    }
 515.636 -
 515.637 -    public void testIdentifier() throws Exception {
 515.638 -        performFixTest("test/Test.java",
 515.639 -                       "|package test;\n" +
 515.640 -                       "public class Test {\n" +
 515.641 -                       "     private int l;" +
 515.642 -                       "     {System.err.println(l);}\n" +
 515.643 -                       "}\n",
 515.644 -                       "2:44-2:45:verifier:HINT",
 515.645 -                       "FixImpl",
 515.646 -                       ("package test;\n" +
 515.647 -                       "public class Test {\n" +
 515.648 -                       "     private int l;" +
 515.649 -                       "     {System.err.println(2);}\n" +
 515.650 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.651 -    }
 515.652 -
 515.653 -    public void testLambda() throws Exception {
 515.654 -        performAnalysisTest("test/Test.java",
 515.655 -                       "|package test;\n" +
 515.656 -                       "public class Test {\n" +
 515.657 -                       "     { new java.io.FileFilter() {public boolean accept(java.io.File f) { return true; } } }\n" +
 515.658 -                       "}\n",
 515.659 -                       "2:7-2:89:verifier:HINT");
 515.660 -    }
 515.661 -
 515.662 -    public void testAddCasesToSwitch() throws Exception {
 515.663 -        performFixTest("test/Test.java",
 515.664 -                       "|package test;\n" +
 515.665 -                       "public class Test {\n" +
 515.666 -                       "     {\n" +
 515.667 -                       "         E e = null;\n" +
 515.668 -                       "         switch (e) {\n" +
 515.669 -                       "             case A: System.err.println(1); break;\n" +
 515.670 -                       "             case D: System.err.println(2); break;\n" +
 515.671 -                       "             case E: System.err.println(3); break;\n" +
 515.672 -                       "         }\n" +
 515.673 -                       "     }\n" +
 515.674 -                       "     public enum E {A, B, C, D, E, F;}\n" +
 515.675 -                       "}\n",
 515.676 -                       "4:9-4:15:verifier:HINT",
 515.677 -                       "FixImpl",
 515.678 -                       ("package test;\n" +
 515.679 -                       "public class Test {\n" +
 515.680 -                       "     {\n" +
 515.681 -                       "         E e = null;\n" +
 515.682 -                       "         switch (e) {\n" +
 515.683 -                       "             case A: System.err.println(1); break;\n" +
 515.684 -                       "             case B:case C:\n" +
 515.685 -//                       "             case C:\n" +
 515.686 -                       "             case D: System.err.println(2); break;\n" +
 515.687 -                       "             case E: System.err.println(3); break;\n" +
 515.688 -                       "         }\n" +
 515.689 -                       "     }\n" +
 515.690 -                       "     public enum E {A, B, C, D, E, F;}\n" +
 515.691 -                       "}\n").replaceAll("[ \t\n]+", " "));
 515.692 -    }
 515.693 -
 515.694 -    private static final Map<String, HintDescription> test2Hint;
 515.695 -
 515.696 -    static {
 515.697 -        test2Hint = new HashMap<String, HintDescription>();
 515.698 -        test2Hint.put("testPattern1", HintDescriptionFactory.create().setTrigger(PatternDescription.create("$1.toURL()", Collections.singletonMap("$1", "java.io.File"))).setWorker(new WorkerImpl()).produce());
 515.699 -        test2Hint.put("testPattern2", test2Hint.get("testPattern1"));
 515.700 -        test2Hint.put("testKind1", HintDescriptionFactory.create().setTrigger(new Kinds(EnumSet.of(Kind.METHOD_INVOCATION))).setWorker(new WorkerImpl()).produce());
 515.701 -        test2Hint.put("testPatternVariable1", HintDescriptionFactory.create().setTrigger(PatternDescription.create("{ $1 $2; $2 = $3; }", Collections.<String, String>emptyMap())).setWorker(new WorkerImpl("{ $1 $2 = $3; }")).produce());
 515.702 -        Map<String, String> constraints = new HashMap<String, String>();
 515.703 -
 515.704 -        constraints.put("$1", "boolean");
 515.705 -        constraints.put("$2", "java.lang.Object");
 515.706 -
 515.707 -        test2Hint.put("testPatternAssert1", HintDescriptionFactory.create().setTrigger(PatternDescription.create("assert $1 : $2;", constraints)).setWorker(new WorkerImpl()).produce());
 515.708 -        test2Hint.put("testPatternStatementAndSingleStatementBlockAreSame", HintDescriptionFactory.create().setTrigger(PatternDescription.create("if ($1) return $2;", Collections.<String, String>emptyMap())).setWorker(new WorkerImpl()).produce());
 515.709 -        test2Hint.put("testPatternFalseOccurrence", HintDescriptionFactory.create().setTrigger(PatternDescription.create("$1.toURL()", Collections.singletonMap("$1", "java.io.File"))).setWorker(new WorkerImpl()).produce());
 515.710 -        test2Hint.put("testStatementVariables1", HintDescriptionFactory.create().setTrigger(PatternDescription.create("if ($1) $2; else $3;", constraints)).setWorker(new WorkerImpl("if (!$1) $3; else $2;")).produce());
 515.711 -        test2Hint.put("testStatementVariables2", test2Hint.get("testStatementVariables1"));
 515.712 -        test2Hint.put("testMultiStatementVariables1", HintDescriptionFactory.create().setTrigger(PatternDescription.create("{ $pref$; int $i = 3; $inf$; return $i; }", Collections.<String, String>emptyMap())).setWorker(new WorkerImpl("{ $pref$; float $i = 3; $inf$; return $i; }")).produce());
 515.713 -        test2Hint.put("testMultiStatementVariables2", test2Hint.get("testMultiStatementVariables1"));
 515.714 -        test2Hint.put("testMultiStatementVariables3", test2Hint.get("testMultiStatementVariables1"));
 515.715 -        test2Hint.put("testMultiStatementVariablesAndBlocks", HintDescriptionFactory.create().setTrigger(PatternDescription.create("if ($c) {$s1$; System.err.println(); $s2$; }", Collections.<String, String>emptyMap())).setWorker(new WorkerImpl("if (!$c) {$s1$; System.err.println(); $s2$; }")).produce());
 515.716 -        test2Hint.put("testOneStatement2MultipleBlock", HintDescriptionFactory.create().setTrigger(PatternDescription.create("System.err.println($1);", Collections.<String, String>emptyMap())).setWorker(new WorkerImpl("System.err.println($1); System.err.println($1);")).produce());
 515.717 -        test2Hint.put("testOneStatement2MultipleStatement", test2Hint.get("testOneStatement2MultipleBlock"));
 515.718 -        test2Hint.put("testMultiple2OneStatement1", HintDescriptionFactory.create().setTrigger(PatternDescription.create("System.err.println($1); System.err.println($2);", Collections.<String, String>emptyMap())).setWorker(new WorkerImpl("System.err.println($1);")).produce());
 515.719 -        test2Hint.put("testMultiple2OneStatement2", test2Hint.get("testMultiple2OneStatement1"));
 515.720 -        test2Hint.put("testMemberSelectInsideMemberSelect", HintDescriptionFactory.create().setTrigger(PatternDescription.create("$Test.test", Collections.<String, String>singletonMap("$Test", "test.Test"))).setWorker(new WorkerImpl("$Test.getTest()")).produce());
 515.721 -        test2Hint.put("testPackageInfo", HintDescriptionFactory.create().setTrigger(PatternDescription.create("$Test.test", Collections.<String, String>singletonMap("$Test", "test.Test"))).setWorker(new WorkerImpl("$Test.getTest()")).produce());
 515.722 -        HintMetadata metadata = HintMetadata.Builder.create("no-id").addOptions(Options.NON_GUI).addSuppressWarnings("test").build();
 515.723 -        test2Hint.put("testSuppressWarnings", HintDescriptionFactory.create().setTrigger(PatternDescription.create("$Test.test", Collections.<String, String>singletonMap("$Test", "test.Test"))).setWorker(new WorkerImpl("$Test.getTest()")).setMetadata(metadata).produce());
 515.724 -        test2Hint.put("testRewriteOneToMultipleClassMembers", HintDescriptionFactory.create().setTrigger(PatternDescription.create("private int i;", Collections.<String, String>emptyMap())).setWorker(new WorkerImpl("private int i; public int getI() { return i; }")).produce());
 515.725 -//        test2Hint.put("testImports1", HintDescriptionFactory.create().setTrigger(PatternDescription.create("new LinkedList()", Collections.<String, String>emptyMap(), "import java.util.LinkedList;")).setWorker(new WorkerImpl("new ArrayList()", "import java.util.ArrayList;\n")).produce());
 515.726 -//        test2Hint.put("testImports2", HintDescriptionFactory.create().setTrigger(PatternDescription.create("LinkedList $0;", Collections.<String, String>emptyMap(), "import java.util.LinkedList;")).setWorker(new WorkerImpl("ArrayList $0;", "import java.util.ArrayList;\n")).produce());
 515.727 -        test2Hint.put("testImports1", HintDescriptionFactory.create().setTrigger(PatternDescription.create("new LinkedList()", Collections.<String, String>emptyMap(), "import java.util.LinkedList;")).setWorker(new WorkerImpl("new java.util.ArrayList()")).produce());
 515.728 -        test2Hint.put("testImports2", HintDescriptionFactory.create().setTrigger(PatternDescription.create("LinkedList $0;", Collections.<String, String>emptyMap(), "import java.util.LinkedList;")).setWorker(new WorkerImpl("java.util.ArrayList $0;")).produce());
 515.729 -        test2Hint.put("testMultiParameters", HintDescriptionFactory.create().setTrigger(PatternDescription.create("java.util.Arrays.asList($1$)", Collections.<String,String>emptyMap())).setWorker(new WorkerImpl("java.util.Arrays.asList(\"d\", $1$)")).produce());
 515.730 -        test2Hint.put("testTypeParametersMethod", HintDescriptionFactory.create().setTrigger(PatternDescription.create("java.util.Arrays.<$T>asList($1$)", Collections.<String,String>emptyMap())).setWorker(new WorkerImpl("java.util.Arrays.<$T>asList(\"d\", $1$)")).produce());
 515.731 -        test2Hint.put("testTypeParametersNewClass", HintDescriptionFactory.create().setTrigger(PatternDescription.create("new java.util.HashSet<$T1$>(java.util.Arrays.<$T$>asList($1$))", Collections.<String,String>emptyMap())).setWorker(new WorkerImpl("new java.util.HashSet<$T1$>(java.util.Arrays.<$T$>asList(\"d\", $1$))")).produce());
 515.732 -        test2Hint.put("testChangeFieldType1", HintDescriptionFactory.create().setTrigger(PatternDescription.create("$modifiers$ java.lang.String $name = $initializer;", Collections.<String, String>emptyMap())).setWorker(new WorkerImpl("$modifiers$ java.lang.CharSequence $name = $initializer;")).produce());
 515.733 -        test2Hint.put("testChangeFieldType2", test2Hint.get("testChangeFieldType1"));
 515.734 -        test2Hint.put("testChangeFieldType3", test2Hint.get("testChangeFieldType1"));
 515.735 -        test2Hint.put("testIdentifier", HintDescriptionFactory.create().setTrigger(PatternDescription.create("$i", Collections.<String, String>singletonMap("$i", "int"))).setWorker(new WorkerImpl("2")).produce());
 515.736 -        test2Hint.put("testLambda", HintDescriptionFactory.create().setTrigger(PatternDescription.create("new $type() { $mods$ $retType $name($params$) { $body$; } }", Collections.<String, String>emptyMap())).setWorker(new WorkerImpl()).produce());
 515.737 -        test2Hint.put("testAddCasesToSwitch", HintDescriptionFactory.create().setTrigger(PatternDescription.create("switch ($var) { case $c1$; case D: $stmts$; case $c2$; }", Collections.<String,String>singletonMap("$var", "test.Test.E"))).setWorker(new WorkerImpl("switch ($var) { case $c1$ case B: case C: case D: $stmts$; case $c2$ }")).produce());
 515.738 -    }
 515.739 -
 515.740 -//    @Override
 515.741 -    protected List<ErrorDescription> computeErrors(CompilationInfo info, TreePath path, int pos) {
 515.742 -        HintDescription hd = test2Hint.get(getName());
 515.743 -
 515.744 -        assertNotNull(hd);
 515.745 -
 515.746 -        return new HintsInvoker(HintsSettings.getGlobalSettings(), new AtomicBoolean()).computeHints(info, Collections.singletonList(hd));
 515.747 -    }
 515.748 -
 515.749 -//    @Override
 515.750 -    protected String toDebugString(CompilationInfo info, Fix f) {
 515.751 -        return "FixImpl";
 515.752 -    }
 515.753 -
 515.754 -//    @Override
 515.755 -//    public void testIssue105979() throws Exception {}
 515.756 -//
 515.757 -//    @Override
 515.758 -//    public void testIssue108246() throws Exception {}
 515.759 -//
 515.760 -//    @Override
 515.761 -//    public void testIssue113933() throws Exception {}
 515.762 -//
 515.763 -//    @Override
 515.764 -//    public void testNoHintsForSimpleInitialize() throws Exception {}
 515.765 -
 515.766 -    private static final class WorkerImpl implements Worker {
 515.767 -
 515.768 -        private final String fix;
 515.769 -
 515.770 -        public WorkerImpl() {
 515.771 -            this(null);
 515.772 -        }
 515.773 -
 515.774 -        public WorkerImpl(String fix) {
 515.775 -            this.fix = fix;
 515.776 -        }
 515.777 -
 515.778 -        public Collection<? extends ErrorDescription> createErrors(HintContext ctx) {
 515.779 -            if (ctx.getInfo().getTreeUtilities().isSynthetic(ctx.getPath())) {
 515.780 -                return null;
 515.781 -            }
 515.782 -
 515.783 -            List<Fix> fixes = new LinkedList<Fix>();
 515.784 -
 515.785 -            if (fix != null) {
 515.786 -                fixes.add(JavaFixUtilities.rewriteFix(ctx, "Rewrite", ctx.getPath(), fix));
 515.787 -            }
 515.788 -            
 515.789 -            return Collections.singletonList(ErrorDescriptionFactory.forName(ctx, ctx.getPath(), "HINT", fixes.toArray(new Fix[0])));
 515.790 -        }
 515.791 -    }
 515.792 -
 515.793 -
 515.794 -    //XXX:copied from TreeRuleTestBase:
 515.795 -
 515.796 -    protected void performAnalysisTest(String fileName, String code, String... golden) throws Exception {
 515.797 -        int[] offset = new int[1];
 515.798 -
 515.799 -        code = org.netbeans.modules.java.hints.spiimpl.TestUtilities.detectOffsets(code, offset);
 515.800 -
 515.801 -        performAnalysisTest(fileName, code, offset[0], golden);
 515.802 -    }
 515.803 -
 515.804 -    protected void performAnalysisTest(String fileName, String code, int pos, String... golden) throws Exception {
 515.805 -        prepareTest(fileName, code);
 515.806 -
 515.807 -        TreePath path = info.getTreeUtilities().pathFor(pos);
 515.808 -
 515.809 -        List<ErrorDescription> errors = computeErrors(info, path, pos);
 515.810 -        List<String> errorsNames = new LinkedList<String>();
 515.811 -
 515.812 -        errors = errors != null ? errors : Collections.<ErrorDescription>emptyList();
 515.813 -
 515.814 -        for (ErrorDescription e : errors) {
 515.815 -            errorsNames.add(e.toString());
 515.816 -        }
 515.817 -
 515.818 -        assertTrue("The warnings provided by the hint do not match expected warnings. Provided warnings: " + errorsNames.toString(), Arrays.equals(golden, errorsNames.toArray(new String[0])));
 515.819 -    }
 515.820 -
 515.821 -    protected String performFixTest(String fileName, String code, String errorDescriptionToString, String fixDebugString, String golden) throws Exception {
 515.822 -        int[] offset = new int[1];
 515.823 -
 515.824 -        code = org.netbeans.modules.java.hints.spiimpl.TestUtilities.detectOffsets(code, offset);
 515.825 -
 515.826 -        return performFixTest(fileName, code, offset[0], errorDescriptionToString, fixDebugString, golden);
 515.827 -    }
 515.828 -
 515.829 -    protected String performFixTest(String fileName, String code, int pos, String errorDescriptionToString, String fixDebugString, String golden) throws Exception {
 515.830 -        return performFixTest(fileName, code, pos, errorDescriptionToString, fixDebugString, fileName, golden);
 515.831 -    }
 515.832 -
 515.833 -    protected String performFixTest(String fileName, String code, String errorDescriptionToString, String fixDebugString, String goldenFileName, String golden) throws Exception {
 515.834 -        int[] offset = new int[1];
 515.835 -
 515.836 -        code = org.netbeans.modules.java.hints.spiimpl.TestUtilities.detectOffsets(code, offset);
 515.837 -
 515.838 -        return performFixTest(fileName, code, offset[0], errorDescriptionToString, fixDebugString, goldenFileName, golden);
 515.839 -    }
 515.840 -
 515.841 -    protected String performFixTest(String fileName, String code, int pos, String errorDescriptionToString, String fixDebugString, String goldenFileName, String golden) throws Exception {
 515.842 -        prepareTest(fileName, code);
 515.843 -
 515.844 -        TreePath path = info.getTreeUtilities().pathFor(pos);
 515.845 -
 515.846 -        List<ErrorDescription> errors = computeErrors(info, path, pos);
 515.847 -
 515.848 -        ErrorDescription toFix = null;
 515.849 -
 515.850 -        for (ErrorDescription d : errors) {
 515.851 -            if (errorDescriptionToString.equals(d.toString())) {
 515.852 -                toFix = d;
 515.853 -                break;
 515.854 -            }
 515.855 -        }
 515.856 -
 515.857 -        assertNotNull("Error: \"" + errorDescriptionToString + "\" not found. All ErrorDescriptions: " + errors.toString(), toFix);
 515.858 -
 515.859 -        assertTrue("Must be computed", toFix.getFixes().isComputed());
 515.860 -
 515.861 -        List<Fix> fixes = toFix.getFixes().getFixes();
 515.862 -        List<String> fixNames = new LinkedList<String>();
 515.863 -        Fix toApply = null;
 515.864 -
 515.865 -        for (Fix f : fixes) {
 515.866 -            if (fixDebugString.equals(toDebugString(info, f))) {
 515.867 -                toApply = f;
 515.868 -            }
 515.869 -
 515.870 -            fixNames.add(toDebugString(info, f));
 515.871 -        }
 515.872 -
 515.873 -        assertNotNull("Cannot find fix to invoke: " + fixNames.toString(), toApply);
 515.874 -
 515.875 -        toApply.implement();
 515.876 -
 515.877 -        FileObject toCheck = sourceRoot.getFileObject(goldenFileName);
 515.878 -
 515.879 -        assertNotNull(toCheck);
 515.880 -
 515.881 -        DataObject toCheckDO = DataObject.find(toCheck);
 515.882 -        EditorCookie ec = toCheckDO.getLookup().lookup(EditorCookie.class);
 515.883 -        Document toCheckDocument = ec.openDocument();
 515.884 -
 515.885 -        String realCode = toCheckDocument.getText(0, toCheckDocument.getLength());
 515.886 -
 515.887 -        //ignore whitespaces:
 515.888 -        realCode = realCode.replaceAll("[ \t\n]+", " ");
 515.889 -
 515.890 -        if (golden != null) {
 515.891 -            assertEquals("The output code does not match the expected code.", golden, realCode);
 515.892 -        }
 515.893 -
 515.894 -        LifecycleManager.getDefault().saveAll();
 515.895 -
 515.896 -        return realCode;
 515.897 -    }
 515.898 -}
 515.899 \ No newline at end of file
   516.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/pm/BulkSearchTestPerformer.java	Mon Dec 19 11:37:36 2016 +0100
   516.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   516.3 @@ -1,694 +0,0 @@
   516.4 -/*
   516.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   516.6 - *
   516.7 - * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
   516.8 - *
   516.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  516.10 - * Other names may be trademarks of their respective owners.
  516.11 - *
  516.12 - * The contents of this file are subject to the terms of either the GNU
  516.13 - * General Public License Version 2 only ("GPL") or the Common
  516.14 - * Development and Distribution License("CDDL") (collectively, the
  516.15 - * "License"). You may not use this file except in compliance with the
  516.16 - * License. You can obtain a copy of the License at
  516.17 - * http://www.netbeans.org/cddl-gplv2.html
  516.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  516.19 - * specific language governing permissions and limitations under the
  516.20 - * License.  When distributing the software, include this License Header
  516.21 - * Notice in each file and include the License file at
  516.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  516.23 - * particular file as subject to the "Classpath" exception as provided
  516.24 - * by Oracle in the GPL Version 2 section of the License file that
  516.25 - * accompanied this code. If applicable, add the following below the
  516.26 - * License Header, with the fields enclosed by brackets [] replaced by
  516.27 - * your own identifying information:
  516.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  516.29 - *
  516.30 - * If you wish your version of this file to be governed by only the CDDL
  516.31 - * or only the GPL Version 2, indicate your decision by adding
  516.32 - * "[Contributor] elects to include this software in this distribution
  516.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  516.34 - * single choice of license, a recipient has the option to distribute
  516.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  516.36 - * to extend the choice of license to its licensees as provided above.
  516.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  516.38 - * Version 2 license, then the option applies only if the new code is
  516.39 - * made subject to such option by the copyright holder.
  516.40 - *
  516.41 - * Contributor(s):
  516.42 - *
  516.43 - * Portions Copyrighted 2009 Sun Microsystems, Inc.
  516.44 - */
  516.45 -
  516.46 -package org.netbeans.modules.java.hints.spiimpl.pm;
  516.47 -
  516.48 -import org.netbeans.modules.java.hints.spiimpl.pm.BulkSearch.BulkPattern;
  516.49 -import org.netbeans.modules.java.hints.spiimpl.pm.BulkSearch.EncodingContext;
  516.50 -import com.sun.source.util.TreePath;
  516.51 -import java.io.ByteArrayInputStream;
  516.52 -import java.io.ByteArrayOutputStream;
  516.53 -import java.io.File;
  516.54 -import java.util.Arrays;
  516.55 -import java.util.Collection;
  516.56 -import java.util.Collections;
  516.57 -import java.util.HashMap;
  516.58 -import java.util.HashSet;
  516.59 -import java.util.LinkedList;
  516.60 -import java.util.List;
  516.61 -import java.util.Map;
  516.62 -import java.util.Map.Entry;
  516.63 -import java.util.Set;
  516.64 -import java.util.concurrent.atomic.AtomicBoolean;
  516.65 -import java.util.regex.Pattern;
  516.66 -import javax.swing.text.Document;
  516.67 -import org.netbeans.api.java.lexer.JavaTokenId;
  516.68 -import org.netbeans.api.java.source.CompilationInfo;
  516.69 -import org.netbeans.api.java.source.JavaSource;
  516.70 -import org.netbeans.api.java.source.JavaSource.Phase;
  516.71 -import org.netbeans.api.java.source.SourceUtilsTestUtil;
  516.72 -import org.netbeans.api.java.source.TestUtilities;
  516.73 -import org.netbeans.api.java.source.TreePathHandle;
  516.74 -import org.netbeans.api.lexer.Language;
  516.75 -import org.netbeans.junit.NbTestCase;
  516.76 -import org.netbeans.modules.java.source.TreeLoader;
  516.77 -import org.openide.cookies.EditorCookie;
  516.78 -import org.openide.filesystems.FileObject;
  516.79 -import org.openide.filesystems.FileUtil;
  516.80 -import org.openide.loaders.DataObject;
  516.81 -import static org.junit.Assert.*;
  516.82 -import org.netbeans.junit.RandomlyFails;
  516.83 -
  516.84 -/**
  516.85 - *
  516.86 - * @author lahvac
  516.87 - */
  516.88 -public abstract class BulkSearchTestPerformer extends NbTestCase {
  516.89 -
  516.90 -    public BulkSearchTestPerformer(String name) {
  516.91 -        super(name);
  516.92 -    }
  516.93 -
  516.94 -    @Override
  516.95 -    protected void setUp() throws Exception {
  516.96 -        super.setUp();
  516.97 -        SourceUtilsTestUtil.prepareTest(new String[] {"org/netbeans/modules/java/editor/resources/layer.xml"}, new Object[0]);
  516.98 -        TreeLoader.DISABLE_CONFINEMENT_TEST = true;
  516.99 -    }
 516.100 -
 516.101 -//    public static TestSuite suite() {
 516.102 -//        NbTestSuite s = new NbTestSuite();
 516.103 -//
 516.104 -//        s.addTestSuite(NFABasedBulkSearchTest.class);
 516.105 -//
 516.106 -//        return s;
 516.107 -//    }
 516.108 -
 516.109 -    public void testSimple1() throws Exception {
 516.110 -        performTest("package test; public class Test { private void test() { System.err./**/println(\"\");}}",
 516.111 -                    Collections.singletonMap("System.err.println(\"\")", Arrays.asList("System.err./**/println(\"\")")),
 516.112 -                    Arrays.asList("System.err.println(\"\" + \"\")"));
 516.113 -    }
 516.114 -
 516.115 -    public void testDontCare() throws Exception {
 516.116 -        performTest("package test; public class Test { private void test() { System.err./**/println(\"\" + \"\");}}",
 516.117 -                    Collections.singletonMap("System.err.println($1)", Arrays.asList("System.err./**/println(\"\" + \"\")")),
 516.118 -                    Collections.<String>emptyList());
 516.119 -    }
 516.120 -
 516.121 -    public void testMemberSelectAndIdentifier() throws Exception {
 516.122 -        performTest("package test; public class Test { private static void test() { test();}}",
 516.123 -                    Collections.singletonMap("test.Test.test()", Arrays.asList("test()")),
 516.124 -                    Collections.<String>emptyList());
 516.125 -    }
 516.126 -
 516.127 -    public void testUnpureMemberSelect() throws Exception {
 516.128 -        performTest("package test; public class Test { private static void test() { new StringBuilder().append(\"\");}}",
 516.129 -                    Collections.<String, List<String>>emptyMap(),
 516.130 -                    Arrays.asList("test.append(\"\")"));
 516.131 -    }
 516.132 -
 516.133 -    public void testMemberSelectWithVariables1() throws Exception {
 516.134 -        performTest("package test; public class Test { private static void test() { new StringBuilder().append(\"\");}}",
 516.135 -                    Collections.singletonMap("$0.append(\"\")", Arrays.asList("new StringBuilder().append(\"\")")),
 516.136 -                    Collections.<String>emptyList());
 516.137 -    }
 516.138 -
 516.139 -    public void testMemberSelectWithVariables2() throws Exception {
 516.140 -        performTest("package test; public class Test { private void append(char c) { append(\"\");}}",
 516.141 -                    Collections.singletonMap("$0.append(\"\")", Arrays.asList("append(\"\")")),
 516.142 -                    Collections.<String>emptyList());
 516.143 -    }
 516.144 -
 516.145 -    public void testLocalVariables() throws Exception {
 516.146 -        performTest("package test; public class Test { private void test() { { int y; y = 1; } }}",
 516.147 -                    Collections.singletonMap("{ int $1; $1 = 1; }", Arrays.asList("{ int y; y = 1; }")),
 516.148 -                    Collections.<String>emptyList());
 516.149 -    }
 516.150 -
 516.151 -    public void testAssert() throws Exception {
 516.152 -        performTest("package test; public class Test { private void test() { assert true : \"\"; }}",
 516.153 -                    Collections.singletonMap("assert $1 : $2;", Arrays.asList("assert true : \"\";")),
 516.154 -                    Collections.<String>emptyList());
 516.155 -    }
 516.156 -
 516.157 -    public void testStatementAndSingleBlockStatementAreSame1() throws Exception {
 516.158 -        performTest("package test; public class Test { private void test() { { int y; { y = 1; } } }}",
 516.159 -                    Collections.singletonMap("{ int $1; $1 = 1; }", Arrays.asList("{ int y; { y = 1; } }")),
 516.160 -                    Collections.<String>emptyList());
 516.161 -    }
 516.162 -
 516.163 -    public void testStatementAndSingleBlockStatementAreSame2() throws Exception {
 516.164 -        performTest("package test; public class Test { private void test() { { int y; y = 1; } }}",
 516.165 -                    Collections.singletonMap("{ int $1; { $1 = 1; } }", Arrays.asList("{ int y; y = 1; }")),
 516.166 -                    Collections.<String>emptyList());
 516.167 -    }
 516.168 -
 516.169 -    public void testStatementVariables1() throws Exception {
 516.170 -        performTest("package test; public class Test { public int test1() { if (true) return 1; else return 2; } }",
 516.171 -                    Collections.singletonMap("if ($1) $2; else $3;", Arrays.asList("if (true) return 1; else return 2;")),
 516.172 -                    Collections.<String>emptyList());
 516.173 -    }
 516.174 -
 516.175 -    public void testMultiStatementVariables1() throws Exception {
 516.176 -        performTest("package test; public class Test { public int test1(int i) { System.err.println(i); System.err.println(i); i = 3; System.err.println(i); System.err.println(i); return i; } }",
 516.177 -                    Collections.singletonMap("{ $s1$; i = 3; $s2$; return i; }", Arrays.asList("{ System.err.println(i); System.err.println(i); i = 3; System.err.println(i); System.err.println(i); return i; }")),
 516.178 -                    Collections.<String>emptyList());
 516.179 -    }
 516.180 -
 516.181 -    public void testMultiStatementVariables2() throws Exception {
 516.182 -        performTest("package test; public class Test { public int test1(int i) { i = 3; return i; } }",
 516.183 -                    Collections.singletonMap("{ $s1$; i = 3; $s2$; return i; }", Arrays.asList("{ i = 3; return i; }")),
 516.184 -                    Collections.<String>emptyList());
 516.185 -    }
 516.186 -
 516.187 -    public void testMultiStatementVariablesAndBlocks1() throws Exception {
 516.188 -        performTest("package test; public class Test { public void test1() { if (true) System.err.println(); } }",
 516.189 -                    Collections.singletonMap("if ($c) {$s1$; System.err.println(); $s2$; }", Arrays.asList("if (true) System.err.println();")),
 516.190 -                    Collections.<String>emptyList());
 516.191 -    }
 516.192 -
 516.193 -    public void testMultiStatementVariablesAndBlocks2() throws Exception {
 516.194 -        performTest("package test; public class Test { public void test1() { if (true) System.err.println(); } }",
 516.195 -                    Collections.singletonMap("if ($c) {$s1$; System.err.println(); }", Arrays.asList("if (true) System.err.println();")),
 516.196 -                    Collections.<String>emptyList());
 516.197 -    }
 516.198 -
 516.199 -    public void testMultiStatementVariablesAndBlocks3() throws Exception {
 516.200 -        performTest("package test; public class Test { public void test1() { if (true) System.err.println(); } }",
 516.201 -                    Collections.singletonMap("if ($c) {System.err.println(); $s2$; }", Arrays.asList("if (true) System.err.println();")),
 516.202 -                    Collections.<String>emptyList());
 516.203 -    }
 516.204 -
 516.205 -    public void testMultiStatementVariablesAndBlocks4() throws Exception {
 516.206 -        performTest("package test; public class Test { public void test1() { if (true) System.err.println(); } }",
 516.207 -                    Collections.singletonMap("{ $s1$; System.err.println(); $s2$; }", Arrays.asList("System.err.println();")),
 516.208 -                    Collections.<String>emptyList());
 516.209 -    }
 516.210 -
 516.211 -    public void testTwoPatterns() throws Exception {
 516.212 -        Map<String, List<String>> contained = new HashMap<String, List<String>>();
 516.213 -
 516.214 -        contained.put("if ($a) $ret = $b; else $ret = $c;", Arrays.asList("if (b) q = 2; else q = 3;"));
 516.215 -        contained.put("{ $p$; $T $v; if($a) $v = $b; else $v = $c; $q$; }", Arrays.asList("{ int q; if (b) q = 2; else q = 3; }"));
 516.216 -
 516.217 -        performTest("package test; public class Test { public void test1(boolean b) { int q; if (b) q = 2; else q = 3; } }",
 516.218 -                    contained,
 516.219 -                    Collections.<String>emptyList());
 516.220 -    }
 516.221 -
 516.222 -    public void testEffectiveNewClass() throws Exception {
 516.223 -        performTest("package test; import javax.swing.ImageIcon; public class Test { public void test1(java.awt.Image i) { new ImageIcon(i); new String(i); } }",
 516.224 -                    Collections.singletonMap("new javax.swing.ImageIcon($1)", Arrays.asList("new ImageIcon(i)")),
 516.225 -                    Collections.<String>emptyList());
 516.226 -    }
 516.227 -
 516.228 -    public void testSynchronizedAndMultiStatementVariables() throws Exception {
 516.229 -        performTest("package test; public class Test {public void test() { Object o = null; int i = 0; synchronized (o) {} } }",
 516.230 -                    Collections.singletonMap("synchronized($var) {$stmts$;}", Arrays.asList("synchronized (o) {}")),
 516.231 -                    Collections.<String>emptyList());
 516.232 -    }
 516.233 -
 516.234 -    public void testJackpot30_2() throws Exception {
 516.235 -        String code = "package test;\n" +
 516.236 -                      "public class Test {\n" +
 516.237 -                      "    private void m() {\n" +
 516.238 -                      "        a(c.i().getFileObject());\n" +
 516.239 -                      "        if (span != null && span[0] != (-1) && span[1] != (-1));\n" +
 516.240 -                      "    }\n" +
 516.241 -                      "}\n";
 516.242 -
 516.243 -        performTest(code,
 516.244 -                    Collections.<String, List<String>>emptyMap(),
 516.245 -                    Arrays.asList("$0.getFileObject($1)"));
 516.246 -    }
 516.247 -
 516.248 -    public void testIdentifierInPureMemberSelect() throws Exception {
 516.249 -        String code = "package test;\n" +
 516.250 -                       "public class Test {\n" +
 516.251 -                       "     public Test test;\n" +
 516.252 -                       "     public String name;\n" +
 516.253 -                       "     private void test() {\n" +
 516.254 -                       "         Test t = null;\n" +
 516.255 -                       "         String s = t.test.name;\n" +
 516.256 -                       "     }\n" +
 516.257 -                       "}\n";
 516.258 -
 516.259 -        performTest(code,
 516.260 -                    Collections.singletonMap("$Test.test", Arrays.asList("test", "t.test")),
 516.261 -                    Collections.<String>emptyList());
 516.262 -    }
 516.263 -
 516.264 -    @RandomlyFails
 516.265 -    public void testNoExponentialTimeComplexity() throws Exception {
 516.266 -        try {
 516.267 -        String code = "package test;\n" +
 516.268 -                      "public class Test {\n" +
 516.269 -                      "    private void test() {\n" +
 516.270 -                      "        Object o;\n" +
 516.271 -                      "        if(o == null) {\n" +
 516.272 -                      "            f(\"\");\n" +
 516.273 -                      "        }|\n" +
 516.274 -                      "    }\n" +
 516.275 -                      "}";
 516.276 -        String pattern = "{ $p$; $T $v; if($a) $v = $b; else $v = $c; }";
 516.277 -
 516.278 -        measure(code, "\na(\"\");", 5, pattern); //to load needed classes, etc.
 516.279 -
 516.280 -        int rep = 1;
 516.281 -        long baseline;
 516.282 -
 516.283 -        while (true) {
 516.284 -            baseline = measure(code, "\na(\"\");", rep, pattern);
 516.285 -
 516.286 -            if (baseline >= 2000) {
 516.287 -                break;
 516.288 -            }
 516.289 -
 516.290 -            rep *= 2;
 516.291 -        }
 516.292 -
 516.293 -        long doubleSize = measure(code, "\na(\"\");", 2 * rep, pattern);
 516.294 -
 516.295 -        assertTrue("baseline=" + baseline + ", actual=" + String.valueOf(doubleSize), doubleSize <= 4 * baseline);
 516.296 -        } catch (OutOfMemoryError oome) {
 516.297 -            //OK
 516.298 -        }
 516.299 -    }
 516.300 -
 516.301 -    public void testMultiParameter1() throws Exception {
 516.302 -        performTest("package test; public class Test { { java.util.Arrays.asList(\"a\", \"b\", \"c\"); } }",
 516.303 -                    Collections.singletonMap("java.util.Arrays.asList($params$)", Arrays.asList("java.util.Arrays.asList(\"a\", \"b\", \"c\")")),
 516.304 -                    Collections.<String>emptyList());
 516.305 -    }
 516.306 -
 516.307 -    public void testMultiParameter2() throws Exception {
 516.308 -        performTest("package test; public class Test { { java.util.Arrays.asList(); } }",
 516.309 -                    Collections.singletonMap("java.util.Arrays.asList($params$)", Arrays.asList("java.util.Arrays.asList()")),
 516.310 -                    Collections.<String>emptyList());
 516.311 -    }
 516.312 -
 516.313 -    public void testTypeParameter() throws Exception {
 516.314 -        performTest("package test; public class Test { { java.util.Arrays.<String>asList(); } }",
 516.315 -                    Collections.singletonMap("java.util.Arrays.<$1>asList($params$)", Arrays.asList("java.util.Arrays.<String>asList()")),
 516.316 -                    Collections.<String>emptyList());
 516.317 -    }
 516.318 -
 516.319 -    public void testField1() throws Exception {
 516.320 -        String code = "package test;\n" +
 516.321 -                       "public class Test {\n" +
 516.322 -                       "     String name = null;\n" +
 516.323 -                       "}\n";
 516.324 -
 516.325 -        performTest(code,
 516.326 -                    Collections.singletonMap("$modifiers$ java.lang.String $name = $initializer;", Arrays.asList("String name = null;")),
 516.327 -                    Collections.<String>emptyList());
 516.328 -    }
 516.329 -
 516.330 -    public void testField2() throws Exception {
 516.331 -        String code = "package test;\n" +
 516.332 -                       "public class Test {\n" +
 516.333 -                       "     private String name = null;\n" +
 516.334 -                       "}\n";
 516.335 -
 516.336 -        performTest(code,
 516.337 -                    Collections.singletonMap("$modifiers$ java.lang.String $name = $initializer;", Arrays.asList("private String name = null;")),
 516.338 -                    Collections.<String>emptyList());
 516.339 -    }
 516.340 -
 516.341 -    public void testMemberSelectWithVariable() throws Exception {
 516.342 -        String code = "package test;\n" +
 516.343 -                      "import java.util.Arrays;\n" +
 516.344 -                      "public class Test {" +
 516.345 -                      "     {\n" +
 516.346 -                      "          foo.bar(0, 3, 4);\n" +
 516.347 -                      "     }\n" +
 516.348 -                      "}\n";
 516.349 -
 516.350 -        performTest(code,
 516.351 -                    Collections.singletonMap("$foo.$bar($p1, $p2$)", Arrays.asList("foo.bar(0, 3, 4)")),
 516.352 -                    Collections.<String>emptyList());
 516.353 -    }
 516.354 -
 516.355 -    public void testCheckIdentifiers1() throws Exception {
 516.356 -        String code = "package test;\n" +
 516.357 -                      "import static java.util.Arrays.*;\n" +
 516.358 -                      "public class Test {" +
 516.359 -                      "     {\n" +
 516.360 -                      "          toString(new int[] {0, 3, 4});\n" +
 516.361 -                      "     }\n" +
 516.362 -                      "}\n";
 516.363 -
 516.364 -        performTest(code,
 516.365 -                    Collections.singletonMap("java.util.Arrays.toString($x)", Arrays.asList("toString(new int[] {0, 3, 4})")),
 516.366 -                    Collections.<String>emptyList());
 516.367 -    }
 516.368 -
 516.369 -    public void testCheckIdentifiers2() throws Exception {
 516.370 -        String code = "package test;\n" +
 516.371 -                      "public class Test {" +
 516.372 -                      "     {\n" +
 516.373 -                      "          toString(new int[] {0, 3, 4});\n" +
 516.374 -                      "     }\n" +
 516.375 -                      "}\n";
 516.376 -
 516.377 -        performTest(code,
 516.378 -                    Collections.<String, List<String>>emptyMap(),
 516.379 -                    Collections.singletonList("java.util.Arrays.toString($x)"));
 516.380 -    }
 516.381 -
 516.382 -    public void testCheckIdentifiers3() throws Exception {
 516.383 -        String code = "package test;\n" +
 516.384 -                      "import static java.util.Arrays.*;\n" +
 516.385 -                      "public class Test {" +
 516.386 -                      "     {\n" +
 516.387 -                      "          Foo.toString(new int[] {0, 3, 4});\n" +
 516.388 -                      "     }\n" +
 516.389 -                      "}\n";
 516.390 -
 516.391 -        performTest(code,
 516.392 -                    Collections.<String, List<String>>emptyMap(),
 516.393 -                    Collections.singletonList("java.util.Arrays.toString($x)"));
 516.394 -    }
 516.395 -
 516.396 -    public void testCheckIdentifiers4() throws Exception {
 516.397 -        String code = "package test;\n" +
 516.398 -                      "public class Test {" +
 516.399 -                      "     {\n" +
 516.400 -                      "          java.util.Arrays.toString(new int[] {0, 3, 4});\n" +
 516.401 -                      "     }\n" +
 516.402 -                      "}\n";
 516.403 -
 516.404 -        performTest(code,
 516.405 -                    Collections.singletonMap("Arrays", Arrays.asList("java.util.Arrays")), //could be imported in the input pattern
 516.406 -                    Collections.<String>emptyList());
 516.407 -    }
 516.408 -
 516.409 -    public void testLambdaInput() throws Exception {
 516.410 -        String code = "package test; public class Test {public void test() { new java.io.FilenameFilter() { public boolean accept(java.io.File dir, String name) { return true; } }; } }";
 516.411 -
 516.412 -        performTest(code,
 516.413 -                    Collections.singletonMap("new $type() {public $retType $name($params$) { $body$; } }", Arrays.asList("new java.io.FilenameFilter() { public boolean accept(java.io.File dir, String name) { return true; } }")),
 516.414 -
 516.415 -                    Collections.<String>emptyList());
 516.416 -    }
 516.417 -
 516.418 -    public void testDoubleCheckedLockingWithVariable() throws Exception {
 516.419 -        String dcl =  "if (o == null) {\n" +
 516.420 -                      "              Object o1 = new Object();\n" +
 516.421 -                      "              synchronized (Test.class) {\n" +
 516.422 -                      "                  if (o == null) {\n" +
 516.423 -                      "                      o = o1;\n" +
 516.424 -                      "                  }\n" +
 516.425 -                      "              }\n" +
 516.426 -                      "          }";
 516.427 -        String code = "package test;\n" +
 516.428 -                      "public class Test {\n" +
 516.429 -                      "     private Object o;\n" +
 516.430 -                      "     private void t() {\n" +
 516.431 -                      "          " + dcl + "\n" +
 516.432 -                      "     }\n" +
 516.433 -                      "}\n";
 516.434 -
 516.435 -        performTest(code,
 516.436 -                    Collections.singletonMap("if ($var == null) {$pref$; synchronized ($lock) { if ($var == null) { $init$; } } }", Arrays.asList(dcl)),
 516.437 -                    Collections.<String>emptyList());
 516.438 -    }
 516.439 -
 516.440 -    public void testMethodName1() throws Exception {
 516.441 -        String code = "package test; public class Test {public void test() { clone(); } }";
 516.442 -
 516.443 -        performTest(code,
 516.444 -                    Collections.<String, List<String>>emptyMap(),
 516.445 -                    Collections.<String>singletonList("public void clone() {$stmts$;}"));
 516.446 -    }
 516.447 -
 516.448 -    public void testMethodName2() throws Exception {
 516.449 -        String code = "package test; public class Test {public void test() { clone(); } }";
 516.450 -
 516.451 -        performTest(code,
 516.452 -                    Collections.singletonMap("public void test() {$stmts$;}", Arrays.asList("public void test() { clone(); }")),
 516.453 -                    Collections.<String>emptyList());
 516.454 -    }
 516.455 -    
 516.456 -    public void testBooleanLiterals() throws Exception {
 516.457 -        String code = "package test; public class Test { public void test() { if (false) { System.err.println(\"false\"); } if (true) { System.err.println(\"true\"); } } }";
 516.458 -
 516.459 -        performTest(code,
 516.460 -                    Collections.singletonMap("if (true) $then; else $else$;", Arrays.asList("if (true) { System.err.println(\"true\"); }")),
 516.461 -                    Collections.<String>emptyList());
 516.462 -    }
 516.463 -    
 516.464 -    public void testEfficientMultiMatching() throws Exception {
 516.465 -        String code = "package test; public class Test { private void m() {} }";
 516.466 -
 516.467 -        performTest(code,
 516.468 -                    Collections.<String, List<String>>emptyMap(),
 516.469 -                    Collections.singletonList("$mods$ class $name implements $i$ { }"));
 516.470 -    }
 516.471 -
 516.472 -    private long measure(String baseCode, String toInsert, int repetitions, String pattern) throws Exception {
 516.473 -        int pos = baseCode.indexOf('|');
 516.474 -
 516.475 -        assertTrue(pos != (-1));
 516.476 -
 516.477 -        baseCode = baseCode.replaceAll(Pattern.quote("|"), "");
 516.478 -        
 516.479 -        StringBuilder code = new StringBuilder(baseCode.length() + repetitions * toInsert.length());
 516.480 -
 516.481 -        code.append(baseCode);
 516.482 -        
 516.483 -        while (repetitions-- > 0) {
 516.484 -            code.insert(pos, toInsert);
 516.485 -        }
 516.486 -
 516.487 -        long startTime = System.currentTimeMillis();
 516.488 -
 516.489 -        performTest(code.toString(),
 516.490 -                    Collections.<String, List<String>>emptyMap(),
 516.491 -                    Arrays.asList(pattern));
 516.492 -
 516.493 -        long endTime = System.currentTimeMillis();
 516.494 -
 516.495 -        return endTime - startTime;
 516.496 -    }
 516.497 -
 516.498 -    public void XtestMeasureTime() throws Exception {
 516.499 -        String code = TestUtilities.copyFileToString(new File("/usr/local/home/lahvac/src/nb//outgoing/java.editor/src/org/netbeans/modules/editor/java/JavaCompletionProvider.java"));
 516.500 -        List<String> patterns = new LinkedList<String>();
 516.501 -
 516.502 -        for (int cntr = 0; cntr < 1000; cntr++) {
 516.503 -            patterns.add("System.err.println($1)");
 516.504 -        }
 516.505 -
 516.506 -        performTest(code,
 516.507 -                    Collections.<String, List<String>>emptyMap(),
 516.508 -                    patterns);
 516.509 -    }
 516.510 -
 516.511 -    public void testMatches1() throws Exception {
 516.512 -        performMatchesTest("package test; public class Test { private void test() { f.isDirectory(); } }", Arrays.asList("$1.isDirectory()", "new ImageIcon($1)"), true);
 516.513 -    }
 516.514 -
 516.515 -    public void testSerialization() throws Exception {
 516.516 -        String text = "package test; public class Test { public void test1(boolean b) { int q; if (b) q = 2; else q = 3; } }";
 516.517 -
 516.518 -        prepareTest("test/Test.java", text);
 516.519 -
 516.520 -        ByteArrayOutputStream out = new ByteArrayOutputStream();
 516.521 -        EncodingContext ec = new EncodingContext(out, false);
 516.522 -
 516.523 -        createSearch().encode(info.getCompilationUnit(), ec, new AtomicBoolean());
 516.524 -        
 516.525 -        boolean matches = createSearch().matches(new ByteArrayInputStream(out.toByteArray()), new AtomicBoolean(), createSearch().create(info, new AtomicBoolean(), "{ $p$; $T $v; if($a) $v = $b; else $v = $c; $q$; }"));
 516.526 -
 516.527 -        assertTrue(matches);
 516.528 -    }
 516.529 -
 516.530 -    public void testFrequencies() throws Exception {
 516.531 -        String text = "package test; public class Test { public void test1(boolean b) { java.io.File f = null; f.isDirectory(); f.isDirectory(); new javax.swing.ImageIcon(null); } }";
 516.532 -
 516.533 -        prepareTest("test/Test.java", text);
 516.534 -
 516.535 -        ByteArrayOutputStream out = new ByteArrayOutputStream();
 516.536 -        EncodingContext ec = new EncodingContext(out, false);
 516.537 -
 516.538 -        createSearch().encode(info.getCompilationUnit(), ec, new AtomicBoolean());
 516.539 -        
 516.540 -        Map<String, Integer> actual = createSearch().matchesWithFrequencies(new ByteArrayInputStream(out.toByteArray()), createSearch().create(info, new AtomicBoolean(), "$1.isDirectory()", "new ImageIcon($1)"), new AtomicBoolean());
 516.541 -        Map<String, Integer> golden = new HashMap<String, Integer>();
 516.542 -
 516.543 -        golden.put("$1.isDirectory()", 2);
 516.544 -        golden.put("new ImageIcon($1)", 1);
 516.545 -
 516.546 -        assertEquals(golden, actual);
 516.547 -    }
 516.548 -
 516.549 -    public void testPatternEncodingAndIdentifiers() throws Exception {
 516.550 -        String text = "package test; public class Test { }";
 516.551 -
 516.552 -        prepareTest("test/Test.java", text);
 516.553 -
 516.554 -        BulkPattern bp = createSearch().create(info, new AtomicBoolean(), "$0.isDirectory()");
 516.555 -
 516.556 -        assertEquals(Arrays.asList(new HashSet<String>(Arrays.asList("isDirectory"))), bp.getIdentifiers());
 516.557 -        //TODO: the actual code for kinds differs for NFABased search and REBased search:
 516.558 -//        assertEquals(Arrays.asList(new HashSet<String>(Arrays.asList(Kind.METHOD_INVOCATION.name()))), bp.getKinds());
 516.559 -    }
 516.560 -    
 516.561 -    public void testModifiersMultiVariable() throws Exception {
 516.562 -        String code = "package test;\n" +
 516.563 -                       "public class Test {\n" +
 516.564 -                       "     @Deprecated @Override public Test test;\n" +
 516.565 -                       "}\n";
 516.566 -
 516.567 -        performTest(code,
 516.568 -                    Collections.singletonMap("$mods$ @Deprecated public $type $name = $init$;", Arrays.asList("@Deprecated @Override public Test test;")),
 516.569 -                    Collections.<String>emptyList());
 516.570 -    }
 516.571 -
 516.572 -    protected abstract BulkSearch createSearch();
 516.573 -    
 516.574 -    private void performMatchesTest(String text, List<String> patterns, boolean golden) throws Exception {
 516.575 -        prepareTest("test/Test.java", text);
 516.576 -
 516.577 -        BulkPattern p = createSearch().create(info, new AtomicBoolean(), patterns);
 516.578 -
 516.579 -        boolean result = createSearch().matches(info, new AtomicBoolean(), new TreePath(info.getCompilationUnit()), p);
 516.580 -
 516.581 -        assertEquals(golden, result);
 516.582 -    }
 516.583 -    
 516.584 -    private void performTest(String text, Map<String, List<String>> containedPatterns, Collection<String> notContainedPatterns) throws Exception {
 516.585 -        prepareTest("test/Test.java", text);
 516.586 -
 516.587 -        List<String> patterns = new LinkedList<String>();
 516.588 -
 516.589 -        patterns.addAll(containedPatterns.keySet());
 516.590 -        patterns.addAll(notContainedPatterns);
 516.591 -
 516.592 -        long s1 = System.currentTimeMillis();
 516.593 -        BulkPattern p = createSearch().create(info, new AtomicBoolean(), patterns);
 516.594 -        long e1 = System.currentTimeMillis();
 516.595 -
 516.596 -//        System.err.println("create: " + (e1 - s1));
 516.597 -
 516.598 -        long s2 = System.currentTimeMillis();
 516.599 -        Map<String, Collection<TreePath>> result = createSearch().match(info, new AtomicBoolean(), new TreePath(info.getCompilationUnit()), p);
 516.600 -        long e2 = System.currentTimeMillis();
 516.601 -
 516.602 -//        System.err.println("match: " + (e2 - s2));
 516.603 -
 516.604 -        assertTrue(result.toString(), result.keySet().containsAll(containedPatterns.keySet()));
 516.605 -
 516.606 -        for (Entry<String, Collection<TreePath>> e : result.entrySet()) {
 516.607 -            List<String> actual = new LinkedList<String>();
 516.608 -
 516.609 -            for (TreePath tp : e.getValue()) {
 516.610 -                assertNotNull(TreePathHandle.create(tp, info).resolve(info));
 516.611 -                
 516.612 -                int start = (int) info.getTrees().getSourcePositions().getStartPosition(info.getCompilationUnit(), tp.getLeaf());
 516.613 -                int end   = (int) info.getTrees().getSourcePositions().getEndPosition(info.getCompilationUnit(), tp.getLeaf());
 516.614 -
 516.615 -                actual.add(info.getText().substring(start, end));
 516.616 -            }
 516.617 -
 516.618 -            assertEquals(e.getKey(), containedPatterns.get(e.getKey()), actual);
 516.619 -        }
 516.620 -
 516.621 -
 516.622 -        Set<String> none = new HashSet<String>(result.keySet());
 516.623 -
 516.624 -        none.retainAll(notContainedPatterns);
 516.625 -
 516.626 -        assertTrue(none.isEmpty());
 516.627 -
 516.628 -        if (!verifyIndexingData())
 516.629 -            return ;
 516.630 -        
 516.631 -        //ensure the returned identifiers/treeKinds are correct:
 516.632 -        ByteArrayOutputStream data = new ByteArrayOutputStream();
 516.633 -        EncodingContext ec = new EncodingContext(data, false);
 516.634 -        
 516.635 -        createSearch().encode(info.getCompilationUnit(), ec, new AtomicBoolean());
 516.636 -
 516.637 -        for (int i = 0; i < containedPatterns.size(); i++) {
 516.638 -            assertTrue("expected: " + p.getIdentifiers().get(i) + ", but exist only: " + ec.getIdentifiers(), ec.getIdentifiers().containsAll(p.getIdentifiers().get(i)));
 516.639 -            
 516.640 -            for (List<String> phrase : p.getRequiredContent().get(i)) {
 516.641 -                assertTrue("expected: " + phrase + ", but exist only: " + ec.getContent() + "(all phrases: " + p.getRequiredContent().get(i) + ")", Collections.indexOfSubList(ec.getContent(), phrase) != (-1));
 516.642 -            }
 516.643 -        }
 516.644 -
 516.645 -        data.close();
 516.646 -        assertEquals(!containedPatterns.isEmpty(), createSearch().matches(new ByteArrayInputStream(data.toByteArray()), new AtomicBoolean(), p));
 516.647 -    }
 516.648 -    
 516.649 -    private void prepareTest(String fileName, String code) throws Exception {
 516.650 -        clearWorkDir();
 516.651 -
 516.652 -        FileUtil.refreshFor(File.listRoots());
 516.653 -
 516.654 -        FileObject workFO = FileUtil.toFileObject(getWorkDir());
 516.655 -
 516.656 -        assertNotNull(workFO);
 516.657 -
 516.658 -        workFO.refresh();
 516.659 -
 516.660 -        sourceRoot = workFO.createFolder("src");
 516.661 -        FileObject buildRoot  = workFO.createFolder("build");
 516.662 -        FileObject cache = workFO.createFolder("cache");
 516.663 -
 516.664 -        FileObject data = FileUtil.createData(sourceRoot, fileName);
 516.665 -        File dataFile = FileUtil.toFile(data);
 516.666 -
 516.667 -        assertNotNull(dataFile);
 516.668 -
 516.669 -        TestUtilities.copyStringToFile(dataFile, code);
 516.670 -
 516.671 -        SourceUtilsTestUtil.prepareTest(sourceRoot, buildRoot, cache);
 516.672 -
 516.673 -        DataObject od = DataObject.find(data);
 516.674 -        EditorCookie ec = od.getLookup().lookup(EditorCookie.class);
 516.675 -
 516.676 -        assertNotNull(ec);
 516.677 -
 516.678 -        doc = ec.openDocument();
 516.679 -        doc.putProperty(Language.class, JavaTokenId.language());
 516.680 -
 516.681 -        JavaSource js = JavaSource.forFileObject(data);
 516.682 -
 516.683 -        assertNotNull(js);
 516.684 -
 516.685 -        info = SourceUtilsTestUtil.getCompilationInfo(js, Phase.RESOLVED);
 516.686 -
 516.687 -        assertNotNull(info);
 516.688 -    }
 516.689 -
 516.690 -    private FileObject sourceRoot;
 516.691 -    private CompilationInfo info;
 516.692 -    private Document doc;
 516.693 -
 516.694 -    protected boolean verifyIndexingData() {
 516.695 -        return true;
 516.696 -    }
 516.697 -}
   517.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/pm/CopyFinderBasedBulkSearchTest.java	Mon Dec 19 11:37:36 2016 +0100
   517.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   517.3 @@ -1,99 +0,0 @@
   517.4 -/*
   517.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   517.6 - *
   517.7 - * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
   517.8 - *
   517.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  517.10 - * Other names may be trademarks of their respective owners.
  517.11 - *
  517.12 - * The contents of this file are subject to the terms of either the GNU
  517.13 - * General Public License Version 2 only ("GPL") or the Common
  517.14 - * Development and Distribution License("CDDL") (collectively, the
  517.15 - * "License"). You may not use this file except in compliance with the
  517.16 - * License. You can obtain a copy of the License at
  517.17 - * http://www.netbeans.org/cddl-gplv2.html
  517.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  517.19 - * specific language governing permissions and limitations under the
  517.20 - * License.  When distributing the software, include this License Header
  517.21 - * Notice in each file and include the License file at
  517.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  517.23 - * particular file as subject to the "Classpath" exception as provided
  517.24 - * by Oracle in the GPL Version 2 section of the License file that
  517.25 - * accompanied this code. If applicable, add the following below the
  517.26 - * License Header, with the fields enclosed by brackets [] replaced by
  517.27 - * your own identifying information:
  517.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  517.29 - *
  517.30 - * If you wish your version of this file to be governed by only the CDDL
  517.31 - * or only the GPL Version 2, indicate your decision by adding
  517.32 - * "[Contributor] elects to include this software in this distribution
  517.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  517.34 - * single choice of license, a recipient has the option to distribute
  517.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  517.36 - * to extend the choice of license to its licensees as provided above.
  517.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  517.38 - * Version 2 license, then the option applies only if the new code is
  517.39 - * made subject to such option by the copyright holder.
  517.40 - *
  517.41 - * Contributor(s):
  517.42 - *
  517.43 - * Portions Copyrighted 2009 Sun Microsystems, Inc.
  517.44 - */
  517.45 -
  517.46 -package org.netbeans.modules.java.hints.spiimpl.pm;
  517.47 -
  517.48 -/**
  517.49 - *
  517.50 - * @author lahvac
  517.51 - */
  517.52 -public class CopyFinderBasedBulkSearchTest extends BulkSearchTestPerformer {
  517.53 -
  517.54 -    public CopyFinderBasedBulkSearchTest(String name) {
  517.55 -        super(name);
  517.56 -    }
  517.57 -
  517.58 -    @Override
  517.59 -    protected BulkSearch createSearch() {
  517.60 -        return new CopyFinderBasedBulkSearch();
  517.61 -    }
  517.62 -
  517.63 -    @Override
  517.64 -    protected boolean verifyIndexingData() {
  517.65 -        return false;
  517.66 -    }
  517.67 -
  517.68 -    @Override
  517.69 -    public void testSerialization() throws Exception {
  517.70 -        //XXX
  517.71 -    }
  517.72 -
  517.73 -    @Override
  517.74 -    public void testFrequencies() throws Exception {
  517.75 -        //XXX: serialization is a prerequisite
  517.76 -    }
  517.77 -
  517.78 -    @Override
  517.79 -    public void testPatternEncodingAndIdentifiers() throws Exception {
  517.80 -        //XXX
  517.81 -    }
  517.82 -
  517.83 -    @Override
  517.84 -    public void testNoExponentialTimeComplexity() throws Exception {
  517.85 -        //XXX
  517.86 -    }
  517.87 -
  517.88 -    @Override
  517.89 -    public void testCheckIdentifiers2() throws Exception {
  517.90 -        //not critical, only improves performance on vast amounts of sources,
  517.91 -        //and NFA based search is used in such case anyway.
  517.92 -        //XXX
  517.93 -    }
  517.94 -
  517.95 -    @Override
  517.96 -    public void testCheckIdentifiers3() throws Exception {
  517.97 -        //not critical, only improves performance on vast amounts of sources,
  517.98 -        //and NFA based search is used in such case anyway.
  517.99 -        //XXX
 517.100 -    }
 517.101 -
 517.102 -}
 517.103 \ No newline at end of file
   518.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/pm/NFABasedBulkSearchTest.java	Mon Dec 19 11:37:36 2016 +0100
   518.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   518.3 @@ -1,69 +0,0 @@
   518.4 -/*
   518.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   518.6 - *
   518.7 - * Copyright 2009-2010 Oracle and/or its affiliates. All rights reserved.
   518.8 - *
   518.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  518.10 - * Other names may be trademarks of their respective owners.
  518.11 - *
  518.12 - * The contents of this file are subject to the terms of either the GNU
  518.13 - * General Public License Version 2 only ("GPL") or the Common
  518.14 - * Development and Distribution License("CDDL") (collectively, the
  518.15 - * "License"). You may not use this file except in compliance with the
  518.16 - * License. You can obtain a copy of the License at
  518.17 - * http://www.netbeans.org/cddl-gplv2.html
  518.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  518.19 - * specific language governing permissions and limitations under the
  518.20 - * License.  When distributing the software, include this License Header
  518.21 - * Notice in each file and include the License file at
  518.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  518.23 - * particular file as subject to the "Classpath" exception as provided
  518.24 - * by Oracle in the GPL Version 2 section of the License file that
  518.25 - * accompanied this code. If applicable, add the following below the
  518.26 - * License Header, with the fields enclosed by brackets [] replaced by
  518.27 - * your own identifying information:
  518.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  518.29 - *
  518.30 - * If you wish your version of this file to be governed by only the CDDL
  518.31 - * or only the GPL Version 2, indicate your decision by adding
  518.32 - * "[Contributor] elects to include this software in this distribution
  518.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  518.34 - * single choice of license, a recipient has the option to distribute
  518.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  518.36 - * to extend the choice of license to its licensees as provided above.
  518.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  518.38 - * Version 2 license, then the option applies only if the new code is
  518.39 - * made subject to such option by the copyright holder.
  518.40 - *
  518.41 - * Contributor(s):
  518.42 - *
  518.43 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  518.44 - */
  518.45 -
  518.46 -package org.netbeans.modules.java.hints.spiimpl.pm;
  518.47 -
  518.48 -/**
  518.49 - *
  518.50 - * @author lahvac
  518.51 - */
  518.52 -public class NFABasedBulkSearchTest extends BulkSearchTestPerformer {
  518.53 -
  518.54 -    public NFABasedBulkSearchTest(String name) {
  518.55 -        super(name);
  518.56 -    }
  518.57 -
  518.58 -//    public static TestSuite suite() {
  518.59 -//        NbTestSuite r = new NbTestSuite();
  518.60 -//
  518.61 -//        r.addTest(new NFABasedBulkSearchTest("testField1"));
  518.62 -//        r.addTest(new NFABasedBulkSearchTest("testField2"));
  518.63 -//
  518.64 -//        return r;
  518.65 -//    }
  518.66 -
  518.67 -    @Override
  518.68 -    protected BulkSearch createSearch() {
  518.69 -        return new NFABasedBulkSearch();
  518.70 -    }
  518.71 -
  518.72 -}
   519.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/pm/PatternCompilerTest.java	Mon Dec 19 11:37:36 2016 +0100
   519.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   519.3 @@ -1,203 +0,0 @@
   519.4 -/*
   519.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   519.6 - *
   519.7 - * Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   519.8 - *
   519.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  519.10 - * Other names may be trademarks of their respective owners.
  519.11 - *
  519.12 - * The contents of this file are subject to the terms of either the GNU
  519.13 - * General Public License Version 2 only ("GPL") or the Common
  519.14 - * Development and Distribution License("CDDL") (collectively, the
  519.15 - * "License"). You may not use this file except in compliance with the
  519.16 - * License. You can obtain a copy of the License at
  519.17 - * http://www.netbeans.org/cddl-gplv2.html
  519.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  519.19 - * specific language governing permissions and limitations under the
  519.20 - * License.  When distributing the software, include this License Header
  519.21 - * Notice in each file and include the License file at
  519.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  519.23 - * particular file as subject to the "Classpath" exception as provided
  519.24 - * by Oracle in the GPL Version 2 section of the License file that
  519.25 - * accompanied this code. If applicable, add the following below the
  519.26 - * License Header, with the fields enclosed by brackets [] replaced by
  519.27 - * your own identifying information:
  519.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  519.29 - *
  519.30 - * If you wish your version of this file to be governed by only the CDDL
  519.31 - * or only the GPL Version 2, indicate your decision by adding
  519.32 - * "[Contributor] elects to include this software in this distribution
  519.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  519.34 - * single choice of license, a recipient has the option to distribute
  519.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  519.36 - * to extend the choice of license to its licensees as provided above.
  519.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  519.38 - * Version 2 license, then the option applies only if the new code is
  519.39 - * made subject to such option by the copyright holder.
  519.40 - *
  519.41 - * Contributor(s):
  519.42 - *
  519.43 - * Portions Copyrighted 2008-2009 Sun Microsystems, Inc.
  519.44 - */
  519.45 -
  519.46 -package org.netbeans.modules.java.hints.spiimpl.pm;
  519.47 -
  519.48 -import com.sun.source.tree.Tree;
  519.49 -import com.sun.source.util.SourcePositions;
  519.50 -import com.sun.source.util.TreePath;
  519.51 -import java.util.Arrays;
  519.52 -import java.util.HashMap;
  519.53 -import java.util.Iterator;
  519.54 -import java.util.Map;
  519.55 -import java.util.Map.Entry;
  519.56 -import java.util.concurrent.atomic.AtomicBoolean;
  519.57 -import org.netbeans.modules.java.hints.spiimpl.TestBase;
  519.58 -import org.netbeans.api.java.source.matching.Matcher;
  519.59 -import org.netbeans.api.java.source.matching.Occurrence;
  519.60 -import org.openide.util.Pair;
  519.61 -
  519.62 -/**
  519.63 - *
  519.64 - * @author Jan Lahoda
  519.65 - */
  519.66 -public class PatternCompilerTest extends TestBase {
  519.67 -
  519.68 -    public PatternCompilerTest(String name) {
  519.69 -        super(name);
  519.70 -    }
  519.71 -
  519.72 -    public void testSimple1() throws Exception {
  519.73 -        performVariablesTest("package test; public class Test {public void test() {int i = |1 + 2|;}}", "$1+$2",
  519.74 -                             Pair.<String, String>of("$1", "1"),
  519.75 -                             Pair.<String, String>of("$2", "2"));
  519.76 -    }
  519.77 -
  519.78 -    public void testTyped1() throws Exception {
  519.79 -        performVariablesTest("package test; public class Test {public void test() {|String.valueOf(\"t\")|;}}", "String.valueOf($1{String})",
  519.80 -                             Pair.<String, String>of("$1", "\"t\""));
  519.81 -    }
  519.82 -
  519.83 -//    public void testTyped2() throws Exception {
  519.84 -//        performVariablesTest("package test; public class Test {public void test() {|String.valueOf(\"t\")|;}}", "$2{java.lang.String}.valueOf($1{String})",
  519.85 -//                             new Pair<String, String>("$1", "\"t\""),
  519.86 -//                             new Pair<String, String>("$2", "String"));
  519.87 -//    }
  519.88 -
  519.89 -    public void testTyped3() throws Exception {
  519.90 -        performVariablesTest("package test; public class Test {public void test(String str) {|str.valueOf(\"t\")|;}}", "String.valueOf($1{String})",
  519.91 -                             Pair.<String, String>of("$1", "\"t\""));
  519.92 -    }
  519.93 -
  519.94 -    public void testTyped4() throws Exception {
  519.95 -        performVariablesTest("package test; public class Test {public void test() {|Integer.bitCount(1)|;}}", "$2{java.lang.String}.valueOf($1{String})",
  519.96 -                             (Pair[]) null);
  519.97 -    }
  519.98 -
  519.99 -    public void testTyped5() throws Exception {
 519.100 -        performVariablesTest("package test; public class Test {public void test() {java.io.File f = null; |f.toURI().toURL()|;}}", "$1{java.io.File}.toURL()",
 519.101 -                             (Pair[]) null);
 519.102 -    }
 519.103 -
 519.104 -    public void testTypedPrimitiveType() throws Exception {
 519.105 -        performVariablesTest("package test; public class Test {public void test(int i) {|test(1)|;}}", "$0{test.Test}.test($1{int})",
 519.106 -                             Pair.<String, String>of("$1", "1"));
 519.107 -    }
 519.108 -
 519.109 -    public void testMemberSelectVSIdentifier() throws Exception {
 519.110 -        performVariablesTest("package test; public class Test {void test1() {} void test2() {|test1()|;}}", "$1{test.Test}.test1()",
 519.111 -                             new Pair[0]);
 519.112 -    }
 519.113 -
 519.114 -    public void testSubClass() throws Exception {
 519.115 -        performVariablesTest("package test; public class Test {void test() {String s = null; |s.toString()|;}}", "$1{java.lang.CharSequence}.toString()",
 519.116 -                             Pair.<String, String>of("$1", "s"));
 519.117 -    }
 519.118 -
 519.119 -    public void testEquality1() throws Exception {
 519.120 -        performVariablesTest("package test; public class Test {void test() {|test()|;}}", "$1{test.Test}.test()",
 519.121 -                             new Pair[0]);
 519.122 -    }
 519.123 -
 519.124 -    public void testEquality2() throws Exception {
 519.125 -        performVariablesTest("package test; public class Test {void test() {String s = null; |String.valueOf(1).charAt(0)|;}}", "$1{java.lang.String}.charAt(0)",
 519.126 -                             Pair.<String, String>of("$1", "String.valueOf(1)"));
 519.127 -    }
 519.128 -
 519.129 -    public void testEquality3() throws Exception {
 519.130 -        performVariablesTest("package test; public class Test {void test() {String s = null; |s.charAt(0)|;}}", "java.lang.String.valueOf(1).charAt(0)",
 519.131 -                             (Pair[]) null);
 519.132 -    }
 519.133 -
 519.134 -    public void testType1() throws Exception {
 519.135 -        performVariablesTest("package test; public class Test {void test() {|String| s;}}", "java.lang.String",
 519.136 -                             new Pair[0]);
 519.137 -    }
 519.138 -
 519.139 -    public void testStatements1() throws Exception {
 519.140 -        performVariablesTest("package test; public class Test {void test() {|assert true : \"\";|}}", "assert $1{boolean} : $2{java.lang.Object};",
 519.141 -                             new Pair[0]);
 519.142 -    }
 519.143 -
 519.144 -    protected void performVariablesTest(String code, String pattern, Pair<String, String>... duplicates) throws Exception {
 519.145 -        String[] split = code.split("\\|");
 519.146 -
 519.147 -        assertEquals(Arrays.toString(split), 3, split.length);
 519.148 -
 519.149 -        int      start = split[0].length();
 519.150 -        int      end   = start + split[1].length();
 519.151 -
 519.152 -        code = split[0] + split[1] + split[2];
 519.153 -
 519.154 -        prepareTest("test/Test.java", code);
 519.155 -
 519.156 -        TreePath tp = info.getTreeUtilities().pathFor((start + end) / 2);
 519.157 -
 519.158 -        while (tp != null) {
 519.159 -            Tree t = tp.getLeaf();
 519.160 -            SourcePositions sp = info.getTrees().getSourcePositions();
 519.161 -
 519.162 -            if (   start == sp.getStartPosition(info.getCompilationUnit(), t)
 519.163 -                && end   == sp.getEndPosition(info.getCompilationUnit(), t)) {
 519.164 -                break;
 519.165 -            }
 519.166 -
 519.167 -            tp = tp.getParentPath();
 519.168 -        }
 519.169 -
 519.170 -        assertNotNull(tp);
 519.171 -
 519.172 -        //XXX:
 519.173 -        Iterator<? extends Occurrence> vars = Matcher.create(info).setCancel(new AtomicBoolean()).setSearchRoot(tp).setTreeTopSearch().match(PatternCompilerUtilities.compile(info, pattern)).iterator();
 519.174 -
 519.175 -        if (duplicates == null) {
 519.176 -            assertFalse(vars.hasNext());
 519.177 -            return ;
 519.178 -        }
 519.179 -
 519.180 -        assertNotNull(vars);
 519.181 -        assertTrue(vars.hasNext());
 519.182 -
 519.183 -        Map<String, String> actual = new HashMap<String, String>();
 519.184 -
 519.185 -        for (Entry<String, TreePath> e : vars.next().getVariables().entrySet()) {
 519.186 -            int[] span = new int[] {
 519.187 -                (int) info.getTrees().getSourcePositions().getStartPosition(info.getCompilationUnit(), e.getValue().getLeaf()),
 519.188 -                (int) info.getTrees().getSourcePositions().getEndPosition(info.getCompilationUnit(), e.getValue().getLeaf())
 519.189 -            };
 519.190 -
 519.191 -            actual.put(e.getKey(), info.getText().substring(span[0], span[1]));
 519.192 -        }
 519.193 -
 519.194 -        assertFalse(vars.hasNext());
 519.195 -
 519.196 -        for (Pair<String, String> dup : duplicates) {
 519.197 -            String span = actual.remove(dup.first());
 519.198 -
 519.199 -            if (span == null) {
 519.200 -                fail(dup.first());
 519.201 -            }
 519.202 -            assertEquals(dup.first()+ ":" + span, span, dup.second());
 519.203 -        }
 519.204 -    }
 519.205 -
 519.206 -}
   520.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/pm/PatternCompilerUtilities.java	Mon Dec 19 11:37:36 2016 +0100
   520.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   520.3 @@ -1,88 +0,0 @@
   520.4 -/*
   520.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   520.6 - *
   520.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
   520.8 - *
   520.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  520.10 - * Other names may be trademarks of their respective owners.
  520.11 - *
  520.12 - * The contents of this file are subject to the terms of either the GNU
  520.13 - * General Public License Version 2 only ("GPL") or the Common
  520.14 - * Development and Distribution License("CDDL") (collectively, the
  520.15 - * "License"). You may not use this file except in compliance with the
  520.16 - * License. You can obtain a copy of the License at
  520.17 - * http://www.netbeans.org/cddl-gplv2.html
  520.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  520.19 - * specific language governing permissions and limitations under the
  520.20 - * License.  When distributing the software, include this License Header
  520.21 - * Notice in each file and include the License file at
  520.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  520.23 - * particular file as subject to the "Classpath" exception as provided
  520.24 - * by Oracle in the GPL Version 2 section of the License file that
  520.25 - * accompanied this code. If applicable, add the following below the
  520.26 - * License Header, with the fields enclosed by brackets [] replaced by
  520.27 - * your own identifying information:
  520.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  520.29 - *
  520.30 - * If you wish your version of this file to be governed by only the CDDL
  520.31 - * or only the GPL Version 2, indicate your decision by adding
  520.32 - * "[Contributor] elects to include this software in this distribution
  520.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  520.34 - * single choice of license, a recipient has the option to distribute
  520.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  520.36 - * to extend the choice of license to its licensees as provided above.
  520.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  520.38 - * Version 2 license, then the option applies only if the new code is
  520.39 - * made subject to such option by the copyright holder.
  520.40 - *
  520.41 - * Contributor(s):
  520.42 - *
  520.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
  520.44 - */
  520.45 -package org.netbeans.modules.java.hints.spiimpl.pm;
  520.46 -
  520.47 -import java.util.Collections;
  520.48 -import java.util.HashMap;
  520.49 -import java.util.Map;
  520.50 -import java.util.regex.Matcher;
  520.51 -import javax.lang.model.type.TypeMirror;
  520.52 -import org.netbeans.api.java.source.CompilationInfo;
  520.53 -import org.netbeans.modules.java.hints.spiimpl.pm.PatternCompiler;
  520.54 -import org.netbeans.api.java.source.matching.Pattern;
  520.55 -import org.netbeans.modules.java.hints.spiimpl.Hacks;
  520.56 -
  520.57 -/**
  520.58 - *
  520.59 - * @author lahvac
  520.60 - */
  520.61 -public class PatternCompilerUtilities {
  520.62 -
  520.63 -    public static Pattern compile(CompilationInfo info, String pattern) {
  520.64 -        Map<String, TypeMirror> constraints = new HashMap<String, TypeMirror>();
  520.65 -        pattern = parseOutTypesFromPattern(info, pattern, constraints);
  520.66 -
  520.67 -        return PatternCompiler.compile(info, pattern, constraints, Collections.<String>emptyList());
  520.68 -    }
  520.69 -
  520.70 -    public static String parseOutTypesFromPattern(CompilationInfo info, String pattern, Map<String, TypeMirror> variablesToTypes) {
  520.71 -        java.util.regex.Pattern p = java.util.regex.Pattern.compile("(\\$[0-9])(\\{([^}]*)\\})?");
  520.72 -        StringBuilder filtered = new StringBuilder();
  520.73 -        Matcher m = p.matcher(pattern);
  520.74 -        int i = 0;
  520.75 -
  520.76 -        while (m.find()) {
  520.77 -            filtered.append(pattern.substring(i, m.start()));
  520.78 -            i = m.end();
  520.79 -
  520.80 -            String var  = m.group(1);
  520.81 -            String type = m.group(3);
  520.82 -
  520.83 -            filtered.append(var);
  520.84 -            variablesToTypes.put(var, type != null ? Hacks.parseFQNType(info, type) : null);
  520.85 -        }
  520.86 -
  520.87 -        filtered.append(pattern.substring(i));
  520.88 -
  520.89 -        return filtered.toString();
  520.90 -    }
  520.91 -}
   521.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/modules/java/hints/spiimpl/processor/JavaHintsAnnotationProcessorTest.java	Mon Dec 19 11:37:36 2016 +0100
   521.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   521.3 @@ -1,149 +0,0 @@
   521.4 -/*
   521.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   521.6 - *
   521.7 - * Copyright 2012 Oracle and/or its affiliates. All rights reserved.
   521.8 - *
   521.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  521.10 - * Other names may be trademarks of their respective owners.
  521.11 - *
  521.12 - * The contents of this file are subject to the terms of either the GNU
  521.13 - * General Public License Version 2 only ("GPL") or the Common
  521.14 - * Development and Distribution License("CDDL") (collectively, the
  521.15 - * "License"). You may not use this file except in compliance with the
  521.16 - * License. You can obtain a copy of the License at
  521.17 - * http://www.netbeans.org/cddl-gplv2.html
  521.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  521.19 - * specific language governing permissions and limitations under the
  521.20 - * License.  When distributing the software, include this License Header
  521.21 - * Notice in each file and include the License file at
  521.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  521.23 - * particular file as subject to the "Classpath" exception as provided
  521.24 - * by Oracle in the GPL Version 2 section of the License file that
  521.25 - * accompanied this code. If applicable, add the following below the
  521.26 - * License Header, with the fields enclosed by brackets [] replaced by
  521.27 - * your own identifying information:
  521.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  521.29 - *
  521.30 - * If you wish your version of this file to be governed by only the CDDL
  521.31 - * or only the GPL Version 2, indicate your decision by adding
  521.32 - * "[Contributor] elects to include this software in this distribution
  521.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  521.34 - * single choice of license, a recipient has the option to distribute
  521.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  521.36 - * to extend the choice of license to its licensees as provided above.
  521.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  521.38 - * Version 2 license, then the option applies only if the new code is
  521.39 - * made subject to such option by the copyright holder.
  521.40 - *
  521.41 - * Contributor(s):
  521.42 - *
  521.43 - * Portions Copyrighted 2012 Sun Microsystems, Inc.
  521.44 - */
  521.45 -package org.netbeans.modules.java.hints.spiimpl.processor;
  521.46 -
  521.47 -import java.io.ByteArrayOutputStream;
  521.48 -import java.io.File;
  521.49 -import org.netbeans.junit.NbTestCase;
  521.50 -import org.openide.util.test.AnnotationProcessorTestUtils;
  521.51 -import org.openide.util.test.TestFileUtils;
  521.52 -
  521.53 -/**
  521.54 - *
  521.55 - * @author lahvac
  521.56 - */
  521.57 -public class JavaHintsAnnotationProcessorTest extends NbTestCase {
  521.58 -
  521.59 -    public JavaHintsAnnotationProcessorTest(String name) {
  521.60 -        super(name);
  521.61 -    }
  521.62 -
  521.63 -    public void testErrors1() throws Exception {
  521.64 -        File src = new File(getWorkDir(), "src");
  521.65 -        File dest = new File(getWorkDir(), "classes");
  521.66 -        AnnotationProcessorTestUtils.makeSource(src, "p.H",
  521.67 -                "import org.netbeans.spi.java.hints.*;\n",
  521.68 -                "import org.netbeans.spi.editor.hints.*;\n",
  521.69 -                "@Hint(displayName=\"\", description=\"\", category=\"general\")\n",
  521.70 -                "public class H {\n",
  521.71 -                "    @TriggerPattern(\"$1.$2\")\n",
  521.72 -                "    public static String h1(HintContext ctx) { return null;}\n",
  521.73 -                "    @TriggerPattern(\"$1.$2.$3\")\n",
  521.74 -                "    public static ErrorDescription h2() { return null;}\n",
  521.75 -                "    @TriggerPatterns({@TriggerPattern(\"$1.$2.$3.$4\")})\n",
  521.76 -                "    private ErrorDescription h3(HintContext ctx) { return null;}\n",
  521.77 -                "    @TriggerPattern(value=\"$1.isEmpty()\", constraints=@ConstraintVariableType(variable=\"$unknown\", type=\"java.lang.String\"))\n",
  521.78 -                "    public static ErrorDescription h4(HintContext ctx) { return null;}\n",
  521.79 -                "}\n");
  521.80 -        TestFileUtils.writeFile(new File(src, "p/Bundle.properties"), "");
  521.81 -        ByteArrayOutputStream err = new ByteArrayOutputStream();
  521.82 -        assertFalse(AnnotationProcessorTestUtils.runJavac(src, null, dest, null, err));
  521.83 -        String errors = err.toString();
  521.84 -        assertTrue(errors.contains("error: The return type must be either org.netbeans.spi.editor.hints.ErrorDescription or java.util.List<org.netbeans.spi.editor.hints.ErrorDescription>"));
  521.85 -        assertTrue(errors.contains("error: The method must have exactly one parameter of type org.netbeans.spi.java.hints.HintContext"));
  521.86 -        assertTrue(errors.contains("error: The method must be static"));
  521.87 -        assertTrue(errors.contains("warning: Variable $unknown not used in the pattern"));
  521.88 -    }
  521.89 -
  521.90 -    public void testErrors2() throws Exception {
  521.91 -        File src = new File(getWorkDir(), "src");
  521.92 -        File dest = new File(getWorkDir(), "classes");
  521.93 -        AnnotationProcessorTestUtils.makeSource(src, "p.H",
  521.94 -                "import org.netbeans.spi.java.hints.*;\n",
  521.95 -                "import org.netbeans.spi.editor.hints.*;\n",
  521.96 -                "import java.util.*;\n",
  521.97 -                "@Hint(displayName=\"#DN_p.H\", description=\"#DESC_p.H\", category=\"general\")\n",
  521.98 -                "public class H {\n",
  521.99 -                "    @TriggerPattern(\"$1.$2.$3\")\n",
 521.100 -                "    public static List<ErrorDescription> hint(HintContext ctx) { return null;}\n",
 521.101 -                "}\n");
 521.102 -        TestFileUtils.writeFile(new File(src, "p/Bundle.properties"), "DN_p.H=DN_p.H\nDESC_p.H=DESC_p.H\n");
 521.103 -        ByteArrayOutputStream err = new ByteArrayOutputStream();
 521.104 -        assertTrue(AnnotationProcessorTestUtils.runJavac(src, null, dest, null, err));
 521.105 -    }
 521.106 -
 521.107 -    public void testCustomizerProvider() throws Exception {
 521.108 -        File src = new File(getWorkDir(), "src");
 521.109 -        File dest = new File(getWorkDir(), "classes");
 521.110 -        AnnotationProcessorTestUtils.makeSource(src, "p.H",
 521.111 -                "import org.netbeans.spi.java.hints.*;\n",
 521.112 -                "import org.netbeans.spi.editor.hints.*;\n",
 521.113 -                "import java.util.*;\n",
 521.114 -                "import java.util.prefs.*;\n",
 521.115 -                "import javax.swing.*;\n",
 521.116 -                "@Hint(displayName=\"dn\", description=\"desc\", category=\"general\", customizerProvider=H.Customizer.class)\n",
 521.117 -                "public class H {\n",
 521.118 -                "    @TriggerPattern(\"$1.$2.$3\")\n",
 521.119 -                "    public static List<ErrorDescription> hint(HintContext ctx) { return null;}\n",
 521.120 -                "    static final class Customizer implements CustomizerProvider {\n",
 521.121 -                "        @Override public JComponent getCustomizer(Preferences prefs) {\n",
 521.122 -                "            return new JPanel();\n",
 521.123 -                "        }\n",
 521.124 -                "    }\n",
 521.125 -                "}\n");
 521.126 -        TestFileUtils.writeFile(new File(src, "p/Bundle.properties"), "DN_p.H=DN_p.H\nDESC_p.H=DESC_p.H\n");
 521.127 -        ByteArrayOutputStream err = new ByteArrayOutputStream();
 521.128 -        assertFalse(AnnotationProcessorTestUtils.runJavac(src, null, dest, null, err));
 521.129 -        String errors = err.toString();
 521.130 -        assertTrue(errors.contains("error: Customizer provider must be public"));
 521.131 -        assertTrue(errors.contains("error: Customizer provider must provide a public default constructor"));
 521.132 -    }
 521.133 -
 521.134 -    public void testErrorsMessagesOnMethod() throws Exception {
 521.135 -        File src = new File(getWorkDir(), "src");
 521.136 -        File dest = new File(getWorkDir(), "classes");
 521.137 -        AnnotationProcessorTestUtils.makeSource(src, "p.H",
 521.138 -                "import org.netbeans.spi.java.hints.*;\n",
 521.139 -                "import org.netbeans.spi.editor.hints.*;\n",
 521.140 -                "import org.openide.util.NbBundle.Messages;\n",
 521.141 -                "import java.util.*;\n",
 521.142 -                "public class H {\n",
 521.143 -                "    @Hint(displayName=\"#DN_p.H\", description=\"#DESC_p.H\", category=\"general\")\n",
 521.144 -                "    @TriggerPattern(\"$1.$2.$3\")\n",
 521.145 -                "    @Messages({\"DN_p.H=1\", \"DESC_p.H=2\"})\n",
 521.146 -                "    public static List<ErrorDescription> hint(HintContext ctx) { return null;}\n",
 521.147 -                "}\n");
 521.148 -        ByteArrayOutputStream err = new ByteArrayOutputStream();
 521.149 -        boolean result = AnnotationProcessorTestUtils.runJavac(src, null, dest, null, err);
 521.150 -        assertTrue(err.toString(), result);
 521.151 -    }
 521.152 -}
   522.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/spi/java/hints/JavaFixUtilitiesTest.java	Mon Dec 19 11:37:36 2016 +0100
   522.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   522.3 @@ -1,1169 +0,0 @@
   522.4 -/*
   522.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   522.6 - *
   522.7 - * Copyright 2008-2010 Oracle and/or its affiliates. All rights reserved.
   522.8 - *
   522.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  522.10 - * Other names may be trademarks of their respective owners.
  522.11 - *
  522.12 - * The contents of this file are subject to the terms of either the GNU
  522.13 - * General Public License Version 2 only ("GPL") or the Common
  522.14 - * Development and Distribution License("CDDL") (collectively, the
  522.15 - * "License"). You may not use this file except in compliance with the
  522.16 - * License. You can obtain a copy of the License at
  522.17 - * http://www.netbeans.org/cddl-gplv2.html
  522.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  522.19 - * specific language governing permissions and limitations under the
  522.20 - * License.  When distributing the software, include this License Header
  522.21 - * Notice in each file and include the License file at
  522.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  522.23 - * particular file as subject to the "Classpath" exception as provided
  522.24 - * by Oracle in the GPL Version 2 section of the License file that
  522.25 - * accompanied this code. If applicable, add the following below the
  522.26 - * License Header, with the fields enclosed by brackets [] replaced by
  522.27 - * your own identifying information:
  522.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  522.29 - *
  522.30 - * If you wish your version of this file to be governed by only the CDDL
  522.31 - * or only the GPL Version 2, indicate your decision by adding
  522.32 - * "[Contributor] elects to include this software in this distribution
  522.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  522.34 - * single choice of license, a recipient has the option to distribute
  522.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  522.36 - * to extend the choice of license to its licensees as provided above.
  522.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  522.38 - * Version 2 license, then the option applies only if the new code is
  522.39 - * made subject to such option by the copyright holder.
  522.40 - *
  522.41 - * Contributor(s):
  522.42 - *
  522.43 - * Portions Copyrighted 2008-2010 Sun Microsystems, Inc.
  522.44 - */
  522.45 -
  522.46 -package org.netbeans.spi.java.hints;
  522.47 -
  522.48 -import org.netbeans.modules.java.hints.providers.spi.HintDescriptionFactory;
  522.49 -import org.netbeans.modules.java.hints.providers.spi.HintDescription;
  522.50 -import com.sun.source.tree.ClassTree;
  522.51 -import com.sun.source.tree.ExpressionTree;
  522.52 -import com.sun.source.tree.VariableTree;
  522.53 -import com.sun.source.util.TreePath;
  522.54 -import java.util.Collection;
  522.55 -import java.util.Collections;
  522.56 -import java.util.HashMap;
  522.57 -import java.util.List;
  522.58 -import java.util.Map;
  522.59 -import java.util.Map.Entry;
  522.60 -import java.util.concurrent.atomic.AtomicBoolean;
  522.61 -import javax.lang.model.element.ExecutableElement;
  522.62 -import javax.lang.model.element.TypeElement;
  522.63 -import javax.lang.model.type.TypeMirror;
  522.64 -import javax.lang.model.util.ElementFilter;
  522.65 -import org.netbeans.modules.java.hints.spiimpl.TestBase;
  522.66 -import org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker;
  522.67 -import org.netbeans.modules.java.hints.providers.spi.Trigger.PatternDescription;
  522.68 -import org.netbeans.modules.java.hints.spiimpl.options.HintsSettings;
  522.69 -import org.netbeans.modules.java.hints.spiimpl.pm.PatternCompilerUtilities;
  522.70 -import org.netbeans.spi.editor.hints.ErrorDescription;
  522.71 -import org.netbeans.spi.editor.hints.Fix;
  522.72 -import org.openide.LifecycleManager;
  522.73 -import org.openide.modules.SpecificationVersion;
  522.74 -import org.openide.util.MapFormat;
  522.75 -
  522.76 -/**
  522.77 - *
  522.78 - * @author Jan Lahoda
  522.79 - */
  522.80 -public class JavaFixUtilitiesTest extends TestBase {
  522.81 -
  522.82 -    public JavaFixUtilitiesTest(String name) {
  522.83 -        super(name);
  522.84 -    }
  522.85 -
  522.86 -    public void testSimple() throws Exception {
  522.87 -        SpecificationVersion v = computeSpecVersion("/**\n" +
  522.88 -                                                    " * @since 1.5\n" +
  522.89 -                                                    " */\n");
  522.90 -
  522.91 -        assertEquals(0, v.compareTo(new SpecificationVersion("1.5")));
  522.92 -    }
  522.93 -
  522.94 -    public void testSimpleDate() throws Exception {
  522.95 -        SpecificationVersion v = computeSpecVersion("/**\n" +
  522.96 -                                                    " * @since 1.5 (16 May 2005)\n" +
  522.97 -                                                    " */\n");
  522.98 -
  522.99 -        assertEquals(0, v.compareTo(new SpecificationVersion("1.5")));
 522.100 -    }
 522.101 -
 522.102 -    public void testLongText() throws Exception {
 522.103 -        SpecificationVersion v = computeSpecVersion("/**\n" +
 522.104 -                                                    " * @since 1.123.2.1 - branch propsheet_issue_29447\n" +
 522.105 -                                                    " */\n");
 522.106 -
 522.107 -        assertEquals(0, v.compareTo(new SpecificationVersion("1.123.2.1")));
 522.108 -    }
 522.109 -
 522.110 -    public void testModuleName() throws Exception {
 522.111 -        SpecificationVersion v = computeSpecVersion("/**\n" +
 522.112 -                                                    " * @since org.openide.filesystems 7.15\n" +
 522.113 -                                                    " */\n");
 522.114 -
 522.115 -        assertEquals(0, v.compareTo(new SpecificationVersion("7.15")));
 522.116 -    }
 522.117 -
 522.118 -    public void testModuleNameMajor() throws Exception {
 522.119 -        SpecificationVersion v = computeSpecVersion("/**\n" +
 522.120 -                                                    " * @since org.openide/1 4.42\n" +
 522.121 -                                                    " */\n");
 522.122 -
 522.123 -        assertEquals(0, v.compareTo(new SpecificationVersion("4.42")));
 522.124 -    }
 522.125 -
 522.126 -    public void testEnd() throws Exception {
 522.127 -        SpecificationVersion v = computeSpecVersion("/**\n" +
 522.128 -                                                    " * @since 1.5 */\n");
 522.129 -
 522.130 -        assertEquals(0, v.compareTo(new SpecificationVersion("1.5")));
 522.131 -    }
 522.132 -
 522.133 -    public void testOpenAPI() throws Exception {
 522.134 -        SpecificationVersion v = computeSpecVersion("/**\n" +
 522.135 -                                                    " * @since OpenAPI version 2.12" +
 522.136 -                                                    " */\n");
 522.137 -
 522.138 -        assertEquals(0, v.compareTo(new SpecificationVersion("2.12")));
 522.139 -
 522.140 -    }
 522.141 -
 522.142 -    private SpecificationVersion computeSpecVersion(String javadoc) throws Exception {
 522.143 -        prepareTest("test/Test.java",
 522.144 -                    "package test;\n" +
 522.145 -                    "public class Test {\n" +
 522.146 -                    javadoc +
 522.147 -                    "     public void test() {\n" +
 522.148 -                    "     }\n" +
 522.149 -                    "}\n");
 522.150 -
 522.151 -        TypeElement te = info.getElements().getTypeElement("test.Test");
 522.152 -        ExecutableElement method = ElementFilter.methodsIn(te.getEnclosedElements()).iterator().next();
 522.153 -
 522.154 -        return JavaFixUtilities.computeSpecVersion(info, method);
 522.155 -    }
 522.156 -
 522.157 -    public void testArithmetic1() throws Exception {
 522.158 -        performArithmeticTest("1 + 2", "3");
 522.159 -        performArithmeticTest("1f + 2", "3.0F");
 522.160 -        performArithmeticTest("1 + 2f", "3.0F");
 522.161 -        performArithmeticTest("1.0 + 2f", "3.0");
 522.162 -        performArithmeticTest("1 + 2.0", "3.0");
 522.163 -        performArithmeticTest("1L + 2", "3L");
 522.164 -    }
 522.165 -
 522.166 -    public void testArithmetic2() throws Exception {
 522.167 -        performArithmeticTest("1 * 2", "2");
 522.168 -        performArithmeticTest("1f * 2", "2.0F");
 522.169 -        performArithmeticTest("1 * 2f", "2.0F");
 522.170 -        performArithmeticTest("1.0 * 2f", "2.0");
 522.171 -        performArithmeticTest("1 * 2.0", "2.0");
 522.172 -        performArithmeticTest("1L * 2", "2L");
 522.173 -    }
 522.174 -
 522.175 -    public void testArithmetic3() throws Exception {
 522.176 -        performArithmeticTest("4 / 2", "2");
 522.177 -        performArithmeticTest("4f / 2", "2.0F");
 522.178 -        performArithmeticTest("4 / 2f", "2.0F");
 522.179 -        performArithmeticTest("4.0 / 2f", "2.0");
 522.180 -        performArithmeticTest("4 / 2.0", "2.0");
 522.181 -        performArithmeticTest("4L / 2", "2L");
 522.182 -    }
 522.183 -
 522.184 -    public void testArithmetic4() throws Exception {
 522.185 -        performArithmeticTest("5 % 2", "1");
 522.186 -        performArithmeticTest("5f % 2", "1.0F");
 522.187 -        performArithmeticTest("5 % 2f", "1.0F");
 522.188 -        performArithmeticTest("5.0 % 2f", "1.0");
 522.189 -        performArithmeticTest("5 % 2.0", "1.0");
 522.190 -        performArithmeticTest("5L % 2", "1L");
 522.191 -    }
 522.192 -
 522.193 -    public void testArithmetic5() throws Exception {
 522.194 -        performArithmeticTest("5 - 2", "3");
 522.195 -        performArithmeticTest("5f - 2", "3.0F");
 522.196 -        performArithmeticTest("5 - 2f", "3.0F");
 522.197 -        performArithmeticTest("5.0 - 2f", "3.0");
 522.198 -        performArithmeticTest("5 - 2.0", "3.0");
 522.199 -        performArithmeticTest("5L - 2", "3L");
 522.200 -    }
 522.201 -
 522.202 -    public void testArithmetic6() throws Exception {
 522.203 -        performArithmeticTest("5 | 2", "7");
 522.204 -        performArithmeticTest("5L | 2", "7L");
 522.205 -        performArithmeticTest("5 | 2L", "7L");
 522.206 -    }
 522.207 -
 522.208 -    public void testArithmetic7() throws Exception {
 522.209 -        performArithmeticTest("5 & 4", "4");
 522.210 -        performArithmeticTest("5L & 4", "4L");
 522.211 -        performArithmeticTest("5 & 4L", "4L");
 522.212 -    }
 522.213 -
 522.214 -    public void testArithmetic8() throws Exception {
 522.215 -        performArithmeticTest("5 ^ 4", "1");
 522.216 -        performArithmeticTest("5L ^ 4", "1L");
 522.217 -        performArithmeticTest("5 ^ 4L", "1L");
 522.218 -    }
 522.219 -
 522.220 -    public void testArithmetic9() throws Exception {
 522.221 -        performArithmeticTest("5 << 2", "20");
 522.222 -        performArithmeticTest("5L << 2", "20L");
 522.223 -        performArithmeticTest("5 << 2L", "20L");
 522.224 -    }
 522.225 -
 522.226 -    public void testArithmeticA() throws Exception {
 522.227 -        performArithmeticTest("-20 >> 2", "-5");
 522.228 -        performArithmeticTest("-20L >> 2", "-5L");
 522.229 -        performArithmeticTest("-20 >> 2L", "-5L");
 522.230 -    }
 522.231 -
 522.232 -    public void testArithmeticB() throws Exception {
 522.233 -        performArithmeticTest("-20 >>> 2", "1073741819");
 522.234 -    }
 522.235 -
 522.236 -    public void testArithmeticC() throws Exception {
 522.237 -        performArithmeticTest("0 + -20", "-20");
 522.238 -        performArithmeticTest("0 + +20", "20");
 522.239 -    }
 522.240 -
 522.241 -    public void testArithmeticComplex() throws Exception {
 522.242 -        performArithmeticTest("1 + 2 * 4 - 5", "4");
 522.243 -        performArithmeticTest("1f + 2 * 4.0 - 5", "4.0");
 522.244 -        performArithmeticTest("1L + 2 * 4 - 5", "4L");
 522.245 -    }
 522.246 -
 522.247 -    private static final String ARITHMETIC = "public class Test { private Object o = __VAL__; }";
 522.248 -    private void performArithmeticTest(String orig, String nue) throws Exception {
 522.249 -        String code = replace("0");
 522.250 -
 522.251 -        prepareTest("Test.java", code);
 522.252 -        ClassTree clazz = (ClassTree) info.getCompilationUnit().getTypeDecls().get(0);
 522.253 -        VariableTree variable = (VariableTree) clazz.getMembers().get(1);
 522.254 -        ExpressionTree init = variable.getInitializer();
 522.255 -        TreePath tp = new TreePath(new TreePath(new TreePath(new TreePath(info.getCompilationUnit()), clazz), variable), init);
 522.256 -        Fix fix = JavaFixUtilities.rewriteFix(info, "A", tp, orig, Collections.<String, TreePath>emptyMap(), Collections.<String, Collection<? extends TreePath>>emptyMap(), Collections.<String, String>emptyMap(), Collections.<String, TypeMirror>emptyMap(), Collections.<String, String>emptyMap());
 522.257 -        fix.implement();
 522.258 -
 522.259 -        String golden = replace(nue);
 522.260 -        String out = doc.getText(0, doc.getLength());
 522.261 -
 522.262 -        assertEquals(golden, out);
 522.263 -
 522.264 -        LifecycleManager.getDefault().saveAll();
 522.265 -    }
 522.266 -
 522.267 -    private static String replace(String val) {
 522.268 -        MapFormat f = new MapFormat(Collections.singletonMap("VAL", val));
 522.269 -
 522.270 -        f.setLeftBrace("__");
 522.271 -        f.setRightBrace("__");
 522.272 -
 522.273 -        return f.format(ARITHMETIC);
 522.274 -    }
 522.275 -
 522.276 -    public void testRewriteWithParenthesis1() throws Exception {
 522.277 -        performRewriteTest("package test;\n" +
 522.278 -                           "public class Test {\n" +
 522.279 -                           "    int i = new String(\"a\" + \"b\").length();\n" +
 522.280 -                           "}\n",
 522.281 -                           "new String($1)=>$1",
 522.282 -                           "package test;\n" +
 522.283 -                           "public class Test {\n" +
 522.284 -		           "    int i = (\"a\" + \"b\").length();\n" +
 522.285 -		           "}\n");
 522.286 -    }
 522.287 -
 522.288 -    public void testRewriteWithParenthesis2() throws Exception {
 522.289 -        performRewriteTest("package test;\n" +
 522.290 -                           "public class Test {\n" +
 522.291 -                           "    int i = Integer.valueOf(1 + 2) * 3;\n" +
 522.292 -                           "}\n",
 522.293 -                           "Integer.valueOf($1)=>$1",
 522.294 -                           "package test;\n" +
 522.295 -                           "public class Test {\n" +
 522.296 -		           "    int i = (1 + 2) * 3;\n" +
 522.297 -		           "}\n");
 522.298 -    }
 522.299 -
 522.300 -    public void testRewriteWithoutParenthesis1() throws Exception {
 522.301 -        performRewriteTest("package test;\n" +
 522.302 -                           "public class Test {\n" +
 522.303 -                           "    int i = new String(\"a\" + \"b\").length();\n" +
 522.304 -                           "}\n",
 522.305 -                           "new String($1)=>java.lang.String.format(\"%s%s\", $1, \"\")",
 522.306 -                           "package test;\n" +
 522.307 -                           "public class Test {\n" +
 522.308 -		           "    int i = String.format(\"%s%s\", \"a\" + \"b\", \"\").length();\n" +
 522.309 -		           "}\n");
 522.310 -    }
 522.311 -
 522.312 -    public void testRewriteWithoutParenthesis2() throws Exception {
 522.313 -        performRewriteTest("package test;\n" +
 522.314 -                           "public class Test {\n" +
 522.315 -                           "    String s = (\"a\" + \"b\").intern();\n" +
 522.316 -                           "}\n",
 522.317 -                           "($1).intern()=>$1",
 522.318 -                           "package test;\n" +
 522.319 -                           "public class Test {\n" +
 522.320 -		           "    String s = \"a\" + \"b\";\n" +
 522.321 -		           "}\n");
 522.322 -    }
 522.323 -
 522.324 -    public void testRewriteWithoutParenthesis3() throws Exception {
 522.325 -        performRewriteTest("package test;\n" +
 522.326 -                           "public class Test {\n" +
 522.327 -                           "    int i = Integer.valueOf(1 + 2) + 3;\n" +
 522.328 -                           "}\n",
 522.329 -                           "Integer.valueOf($1)=>$1",
 522.330 -                           "package test;\n" +
 522.331 -                           "public class Test {\n" +
 522.332 -		           "    int i = 1 + 2 + 3;\n" +
 522.333 -		           "}\n");
 522.334 -    }
 522.335 -
 522.336 -    public void testRewriteWithoutParenthesis4() throws Exception {
 522.337 -        performRewriteTest("package test;\n" +
 522.338 -                           "public class Test {\n" +
 522.339 -                           "    int i = Integer.valueOf(1 * 2) + 3;\n" +
 522.340 -                           "}\n",
 522.341 -                           "Integer.valueOf($1)=>$1",
 522.342 -                           "package test;\n" +
 522.343 -                           "public class Test {\n" +
 522.344 -		           "    int i = 1 * 2 + 3;\n" +
 522.345 -		           "}\n");
 522.346 -    }
 522.347 -
 522.348 -    public void testRewriteWithoutParenthesis5() throws Exception {
 522.349 -        performRewriteTest("package test;\n" +
 522.350 -                           "public class Test {\n" +
 522.351 -                           "    int i = new Integer(1 * 2).hashCode();\n" +
 522.352 -                           "}\n",
 522.353 -                           "$1.hashCode()=>$1.hashCode()",
 522.354 -                           "package test;\n" +
 522.355 -                           "public class Test {\n" +
 522.356 -		           "    int i = new Integer(1 * 2).hashCode();\n" +
 522.357 -		           "}\n");
 522.358 -    }
 522.359 -
 522.360 -    public void testRewriteWithoutParenthesis6() throws Exception {
 522.361 -        performRewriteTest("package test;\n" +
 522.362 -                           "public class Test {\n" +
 522.363 -                           "    {\n" +
 522.364 -                           "        System.err.println(\"a\" + 1);\n" +
 522.365 -                           "    }\n" +
 522.366 -                           "}\n",
 522.367 -                           "System.err.println($t)=>D.println($t)",
 522.368 -                           "package test;\n" +
 522.369 -                           "public class Test {\n" +
 522.370 -                           "    {\n" +
 522.371 -                           "        D.println(\"a\" + 1);\n" +
 522.372 -                           "    }\n" +
 522.373 -		           "}\n");
 522.374 -    }
 522.375 -
 522.376 -    public void testRewriteWithoutParenthesis7() throws Exception {
 522.377 -        performRewriteTest("package test;\n" +
 522.378 -                           "public class Test {\n" +
 522.379 -                           "    {\n" +
 522.380 -                           "        new String(\"a\" + 1);\n" +
 522.381 -                           "    }\n" +
 522.382 -                           "}\n",
 522.383 -                           "new String($t)=>new D($t)",
 522.384 -                           "package test;\n" +
 522.385 -                           "public class Test {\n" +
 522.386 -                           "    {\n" +
 522.387 -                           "        new D(\"a\" + 1);\n" +
 522.388 -                           "    }\n" +
 522.389 -		           "}\n");
 522.390 -    }
 522.391 -
 522.392 -    public void testTopLevelRewriteWithoutParenthesis1() throws Exception {
 522.393 -        performRewriteTest("package test;\n" +
 522.394 -                           "public class Test {\n" +
 522.395 -                           "    int i = (1 + 2) * 2;\n" +
 522.396 -                           "}\n",
 522.397 -                           "$1 + $2=>3",
 522.398 -                           "package test;\n" +
 522.399 -                           "public class Test {\n" +
 522.400 -		           "    int i = 3 * 2;\n" +
 522.401 -		           "}\n");
 522.402 -    }
 522.403 -
 522.404 -    public void testTopLevelRewriteKeepParenthesis1() throws Exception {
 522.405 -        performRewriteTest("package test;\n" +
 522.406 -                           "public class Test {\n" +
 522.407 -                           "    int i = (1 * 2) + 2;\n" +
 522.408 -                           "}\n",
 522.409 -                           "$1 * $2=>2",
 522.410 -                           "package test;\n" +
 522.411 -                           "public class Test {\n" +
 522.412 -		           "    int i = (2) + 2;\n" +
 522.413 -		           "}\n");
 522.414 -    }
 522.415 -
 522.416 -    public void testTopLevelRewriteKeepParenthesis2() throws Exception {
 522.417 -        performRewriteTest("package test;\n" +
 522.418 -                           "public class Test {\n" +
 522.419 -                           "    { if (1 > 2) ; }\n" +
 522.420 -                           "}\n",
 522.421 -                           "$1 > $2=>false",
 522.422 -                           "package test;\n" +
 522.423 -                           "public class Test {\n" +
 522.424 -                           "    { if (false) ; }\n" +
 522.425 -		           "}\n");
 522.426 -    }
 522.427 -    
 522.428 -    public void testRewriteCatchMultiVariable() throws Exception {
 522.429 -        performRewriteTest("package test;\n" +
 522.430 -                           "public class Test {\n" +
 522.431 -                           "    { try { } catch {NullPointerException ex} { } }\n" +
 522.432 -                           "}\n",
 522.433 -                           "try { } catch $catches$ => try { new Object(); } catch $catches$",
 522.434 -                           "package test;\n" +
 522.435 -                           "public class Test {\n" +
 522.436 -                           //XXX: whitespaces:
 522.437 -                           "    {  try {new Object();\n } catch {NullPointerException ex} { } }\n" +
 522.438 -//                           "    { try {      new Object();\n } catch {NullPointerException ex} { } }\n" +
 522.439 -		           "}\n");
 522.440 -    }
 522.441 -
 522.442 -    public void testRewriteCaseMultiVariable() throws Exception {
 522.443 -        performRewriteTest("package test;\n" +
 522.444 -                           "public class Test {\n" +
 522.445 -                           "    { int i = 0; switch (i) {case 0: System.err.println(1); break; case 1: System.err.println(2); break; case 2: System.err.println(3); break; }\n" +
 522.446 -                           "}\n",
 522.447 -                           "switch ($v) { case $p$ case 2: $stmts$; } => switch ($v) { case $p$ case 3: $stmts$; }",
 522.448 -                           "package test;\n" +
 522.449 -                           "public class Test {\n" +
 522.450 -                           "    { int i = 0; switch (i) {case 0: System.err.println(1); break; case 1: System.err.println(2); break; case 3: System.err.println(3); break; }\n" +
 522.451 -		           "}\n");
 522.452 -    }
 522.453 -
 522.454 -    public void testRewriteMemberSelectVariable() throws Exception {
 522.455 -        performRewriteTest("package test;\n" +
 522.456 -                           "public class Test {\n" +
 522.457 -                           "    { java.io.File f = null; boolean b = f.isDirectory(); }\n" +
 522.458 -                           "}\n",
 522.459 -                           "$file.$m() => foo.Bar.$m($file)",
 522.460 -                           "package test;\n" +
 522.461 -                           "public class Test {\n" +
 522.462 -                           "    { java.io.File f = null; boolean b = foo.Bar.isDirectory(f); }\n" +
 522.463 -		           "}\n");
 522.464 -    }
 522.465 -    
 522.466 -    public void testRewriteIdent2IdentMemberSelectPattern() throws Exception {
 522.467 -        performRewriteTest("package test;\n" +
 522.468 -                           "public class Test {\n" +
 522.469 -                           "    private boolean b; private void t() { boolean c = b; }\n" +
 522.470 -                           "}\n",
 522.471 -                           "$0{test.Test}.b => !$0.b",
 522.472 -                           "package test;\n" +
 522.473 -                           "public class Test {\n" +
 522.474 -                           "    private boolean b; private void t() { boolean c = !b; }\n" +
 522.475 -		           "}\n");
 522.476 -    }
 522.477 -
 522.478 -    public void testCarefulRewriteInImports() throws Exception {
 522.479 -        performRewriteTest("package test;\n" +
 522.480 -                           "import javax.swing.text.AbstractDocument;\n" +
 522.481 -                           "public class Test {\n" +
 522.482 -                           "}\n",
 522.483 -                           "javax.swing.text.AbstractDocument => javax.swing.text.Document",
 522.484 -                           "package test;\n" +
 522.485 -                           "import javax.swing.text.Document;\n" +
 522.486 -                           "public class Test {\n" +
 522.487 -		           "}\n");
 522.488 -    }
 522.489 -
 522.490 -    public void testRemoveFromParent1() throws Exception {
 522.491 -        performRemoveFromParentTest("package test;\n" +
 522.492 -                                    "public class Test {\n" +
 522.493 -                                    "    private int I;" +
 522.494 -                                    "}\n",
 522.495 -                                    "$mods$ int $f;",
 522.496 -                                    "package test;\n" +
 522.497 -                                    "public class Test {\n" +
 522.498 -                                    "}\n");
 522.499 -    }
 522.500 -
 522.501 -    public void testRemoveFromParent2() throws Exception {
 522.502 -        performRemoveFromParentTest("package test;\n" +
 522.503 -                                    "public class Test extends java.util.ArrayList {\n" +
 522.504 -                                    "}\n",
 522.505 -                                    "java.util.ArrayList",
 522.506 -                                    "package test;\n" +
 522.507 -                                    "public class Test {\n" +
 522.508 -                                    "}\n");
 522.509 -    }
 522.510 -    
 522.511 -    public void testRemoveFromParentExpressionStatement206116() throws Exception {
 522.512 -        performRemoveFromParentTest("package test;\n" +
 522.513 -                           "import java.io.InputStream;\n" +
 522.514 -                           "public class Test {\n" +
 522.515 -                           "    private void t() throws Exception {\n" +
 522.516 -                           "        System.err.println();\n" +
 522.517 -                           "        System.err.println(\"a\");\n" +
 522.518 -                           "    }\n" +
 522.519 -                           "}\n",
 522.520 -                           "System.err.println()",
 522.521 -                           "package test;\n" +
 522.522 -                           "import java.io.InputStream;\n" +
 522.523 -                           "public class Test {\n" +
 522.524 -                           "    private void t() throws Exception {\n" +
 522.525 -                           "        System.err.println(\"a\");\n" +
 522.526 -                           "    }\n" +
 522.527 -		           "}\n");
 522.528 -    }
 522.529 -
 522.530 -    public void testUnresolvableTarget() throws Exception {
 522.531 -        performRewriteTest("package test;\n" +
 522.532 -                           "public class Test extends java.util.ArrayList {\n" +
 522.533 -                           "}\n",
 522.534 -                           "java.util.ArrayList => Test",
 522.535 -                           "package test;\n" +
 522.536 -                           "public class Test extends Test {\n" +
 522.537 -                           "}\n");
 522.538 -    }
 522.539 -
 522.540 -    public void testTryWithResourceTarget() throws Exception {
 522.541 -        performRewriteTest("package test;\n" +
 522.542 -                           "import java.io.InputStream;\n" +
 522.543 -                           "public class Test {\n" +
 522.544 -                           "    private void t() throws Exception {\n" +
 522.545 -                           "        InputStream in = null;\n" +
 522.546 -                           "        try {\n" +
 522.547 -                           "        } finally {\n" +
 522.548 -                           "            in.close()\n" +
 522.549 -                           "        }\n" +
 522.550 -                           "    }\n" +
 522.551 -                           "}\n",
 522.552 -                           "$type $var = $init; try {} finally {$var.close();} => try ($type $var = $init) {} finally {$var.close();}",
 522.553 -                           "package test;\n" +
 522.554 -                           "import java.io.InputStream;\n" +
 522.555 -                           "public class Test {\n" +
 522.556 -                           "    private void t() throws Exception {\n" +
 522.557 -//                           "        try (InputStream in = null) {\n" +
 522.558 -                           //XXX:
 522.559 -                           "        try (final InputStream in = null) {\n" +
 522.560 -                           "        } finally {\n" +
 522.561 -                           "            in.close()\n" +
 522.562 -                           "        }\n" +
 522.563 -                           "    }\n" +
 522.564 -		           "}\n");
 522.565 -    }
 522.566 -
 522.567 -    public void testSingle2MultipleStatements() throws Exception {
 522.568 -        performRewriteTest("package test;\n" +
 522.569 -                           "import java.io.InputStream;\n" +
 522.570 -                           "public class Test {\n" +
 522.571 -                           "    private void t() throws Exception {\n" +
 522.572 -                           "        int i = 0;\n" +
 522.573 -                           "    }\n" +
 522.574 -                           "}\n",
 522.575 -                           "$type $var = $init; => $type $var; $var = $init;",
 522.576 -                           "package test;\n" +
 522.577 -                           "import java.io.InputStream;\n" +
 522.578 -                           "public class Test {\n" +
 522.579 -                           "    private void t() throws Exception {\n" +
 522.580 -                           "        int i;\n" +
 522.581 -                           "        i = 0;\n" +
 522.582 -                           "    }\n" +
 522.583 -		           "}\n");
 522.584 -    }
 522.585 -    
 522.586 -    public void testSingle2MultipleStatements2() throws Exception {
 522.587 -        performRewriteTest("package test;\n" +
 522.588 -                           "import java.io.InputStream;\n" +
 522.589 -                           "public class Test {\n" +
 522.590 -                           "    private void t() throws Exception {\n" +
 522.591 -                           "        while (true)\n" +
 522.592 -                           "            if (true) {\n" +
 522.593 -                           "                System.err.println();\n" +
 522.594 -                           "            }\n" +
 522.595 -                           "    }\n" +
 522.596 -                           "}\n",
 522.597 -                           "if (true) $then; => if (true) $then; System.err.println();",
 522.598 -                           "package test;\n" +
 522.599 -                           "import java.io.InputStream;\n" +
 522.600 -                           "public class Test {\n" +
 522.601 -                           "    private void t() throws Exception {\n" +
 522.602 -                           "        while (true) {\n" +
 522.603 -                           "            if (true) {\n" +
 522.604 -                           "                System.err.println();\n" +
 522.605 -                           "            }\n" +
 522.606 -                           "            System.err.println();\n" +
 522.607 -                           "        }\n" +
 522.608 -                           "    }\n" +
 522.609 -		           "}\n");
 522.610 -    }
 522.611 -    
 522.612 -    public void testMultipleStatementsWrapComments1() throws Exception {
 522.613 -        performRewriteTest("package test;\n" +
 522.614 -                           "import java.io.InputStream;\n" +
 522.615 -                           "public class Test {\n" +
 522.616 -                           "    private void t() throws Exception {\n" +
 522.617 -                           "        if (1 == 1) {\n" +
 522.618 -                           "            System.err.println();\n" +
 522.619 -                           "            System.err.println(\"a\");\n" +
 522.620 -                           "            \n" +
 522.621 -                           "            \n" +
 522.622 -                           "            //C\n" +
 522.623 -                           "            System.err.println(\"b\");\n" +
 522.624 -                           "        }\n" +
 522.625 -                           "    }\n" +
 522.626 -                           "}\n",
 522.627 -                           "if ($cond) { System.err.println(); $stmts$;} => while ($cond) { $stmts$;}",
 522.628 -                           "package test;\n" +
 522.629 -                           "import java.io.InputStream;\n" +
 522.630 -                           "public class Test {\n" +
 522.631 -                           "    private void t() throws Exception {\n" +
 522.632 -                           "        while (1 == 1) {\n" +
 522.633 -                           "            System.err.println(\"a\");\n" +
 522.634 -                           "            \n" +
 522.635 -                           "            \n" +
 522.636 -                           "            //C\n" +
 522.637 -                           "            System.err.println(\"b\");\n" +
 522.638 -                           "        }\n" +
 522.639 -                           "    }\n" +
 522.640 -		           "}\n");
 522.641 -    }
 522.642 -    
 522.643 -    public void testMultipleStatementsWrapComments2() throws Exception {
 522.644 -        performRewriteTest("package test;\n" +
 522.645 -                           "import java.io.InputStream;\n" +
 522.646 -                           "public class Test {\n" +
 522.647 -                           "    private void t() throws Exception {\n" +
 522.648 -                           "        if (1 == 1) {\n" +
 522.649 -                           "            System.err.println();\n" +
 522.650 -                           "            System.err.println(\"a\");\n" +
 522.651 -                           "            \n" +
 522.652 -                           "            \n" +
 522.653 -                           "            //C\n" +
 522.654 -                           "            System.err.println(\"b\");\n" +
 522.655 -                           "        }\n" +
 522.656 -                           "    }\n" +
 522.657 -                           "}\n",
 522.658 -                           "if ($cond) { $stmts$;} => while ($cond) { $stmts$;}",
 522.659 -                           "package test;\n" +
 522.660 -                           "import java.io.InputStream;\n" +
 522.661 -                           "public class Test {\n" +
 522.662 -                           "    private void t() throws Exception {\n" +
 522.663 -                           "        while (1 == 1) {\n" +
 522.664 -                           "            System.err.println();\n" +
 522.665 -                           "            System.err.println(\"a\");\n" +
 522.666 -                           "            \n" +
 522.667 -                           "            \n" +
 522.668 -                           "            //C\n" +
 522.669 -                           "            System.err.println(\"b\");\n" +
 522.670 -                           "        }\n" +
 522.671 -                           "    }\n" +
 522.672 -		           "}\n");
 522.673 -    }
 522.674 -    
 522.675 -    public void testReplaceTypeParameters1() throws Exception {
 522.676 -        performRewriteTest("package test;\n" +
 522.677 -                           "import java.io.InputStream;\n" +
 522.678 -                           "public class Test {\n" +
 522.679 -                           "    private <A, B> void t() {\n" +
 522.680 -                           "    }\n" +
 522.681 -                           "}\n",
 522.682 -                           "$mods$ <$O, $T> $ret $name() { $body$; } => $mods$ <$T, $O> $ret $name() { $body$; }",
 522.683 -                           "package test;\n" +
 522.684 -                           "import java.io.InputStream;\n" +
 522.685 -                           "public class Test {\n" +
 522.686 -                           "    private <B, A> void t() {\n" +
 522.687 -                           "    }\n" +
 522.688 -		           "}\n");
 522.689 -    }
 522.690 -    
 522.691 -    public void testReplaceTypeParameters2() throws Exception {
 522.692 -        performRewriteTest("package test;\n" +
 522.693 -                           "import java.io.InputStream;\n" +
 522.694 -                           "public class Test {\n" +
 522.695 -                           "    private <A, B> void t() {\n" +
 522.696 -                           "    }\n" +
 522.697 -                           "}\n",
 522.698 -                           "$mods$ <$T$> $ret $name() { $body$; } => $mods$ <C, $T$> $ret $name() { $body$; }",
 522.699 -                           "package test;\n" +
 522.700 -                           "import java.io.InputStream;\n" +
 522.701 -                           "public class Test {\n" +
 522.702 -                           "    private <C, A, B> void t() {\n" +
 522.703 -                           "    }\n" +
 522.704 -		           "}\n");
 522.705 -    }
 522.706 -    
 522.707 -    public void testAdd2Modifiers() throws Exception {
 522.708 -        performRewriteTest("package test;\n" +
 522.709 -                           "import java.io.InputStream;\n" +
 522.710 -                           "public class Test {\n" +
 522.711 -                           "    void t() {\n" +
 522.712 -                           "    }\n" +
 522.713 -                           "}\n",
 522.714 -                           "$mods$ $ret $name() { $body$; } => $mods$ @java.lang.Deprecated private $ret $name() { $body$; }",
 522.715 -                           "package test;\n" +
 522.716 -                           "import java.io.InputStream;\n" +
 522.717 -                           "public class Test {\n" +
 522.718 -                           "    @Deprecated\n" +
 522.719 -                           "    private void t() {\n" +
 522.720 -                           "    }\n" +
 522.721 -		           "}\n");
 522.722 -    }
 522.723 -    
 522.724 -    public void testReplaceInModifiers() throws Exception {
 522.725 -        performRewriteTest("package test;\n" +
 522.726 -                           "import java.io.InputStream;\n" +
 522.727 -                           "public class Test {\n" +
 522.728 -                           "    public @Override void t() {\n" +
 522.729 -                           "    }\n" +
 522.730 -                           "}\n",
 522.731 -                           "$mods$ public @Override $ret $name() { $body$; } => $mods$ private @Deprecated $ret $name() { $body$; }",
 522.732 -                           "package test;\n" +
 522.733 -                           "import java.io.InputStream;\n" +
 522.734 -                           "public class Test {\n" +
 522.735 -                           "    private @Deprecated void t() {\n" +
 522.736 -                           "    }\n" +
 522.737 -		           "}\n");
 522.738 -    }
 522.739 -    
 522.740 -    public void testKeepInModifiers() throws Exception {
 522.741 -        performRewriteTest("package test;\n" +
 522.742 -                           "import java.io.InputStream;\n" +
 522.743 -                           "public class Test {\n" +
 522.744 -                           "    public @Override void t() {\n" +
 522.745 -                           "    }\n" +
 522.746 -                           "}\n",
 522.747 -                           "$mods$ public @Override $ret $name() { $body$; } => $mods$ public @Override $ret $name() { $body$; }",
 522.748 -                           "package test;\n" +
 522.749 -                           "import java.io.InputStream;\n" +
 522.750 -                           "public class Test {\n" +
 522.751 -                           "    public @Override void t() {\n" +
 522.752 -                           "    }\n" +
 522.753 -		           "}\n");
 522.754 -    }
 522.755 -    
 522.756 -    public void testRemoveInModifiers() throws Exception {
 522.757 -        performRewriteTest("package test;\n" +
 522.758 -                           "import java.io.InputStream;\n" +
 522.759 -                           "public class Test {\n" +
 522.760 -                           "    public static @Deprecated @Override void t() {\n" +
 522.761 -                           "    }\n" +
 522.762 -                           "}\n",
 522.763 -                           "$mods$ public @Override $ret $name() { $body$; } => $mods$ $ret $name() { $body$; }",
 522.764 -                           "package test;\n" +
 522.765 -                           "import java.io.InputStream;\n" +
 522.766 -                           "public class Test {\n" +
 522.767 -                           "    static @Deprecated void t() {\n" +
 522.768 -                           "    }\n" +
 522.769 -		           "}\n");
 522.770 -    }
 522.771 -    
 522.772 -    public void testRewriteMethodParametersWildcard() throws Exception {
 522.773 -        performRewriteTest("package test;\n" +
 522.774 -                           "import java.io.InputStream;\n" +
 522.775 -                           "public class Test {\n" +
 522.776 -                           "    public static void t() {\n" +
 522.777 -                           "    }\n" +
 522.778 -                           "}\n",
 522.779 -                           "$mods$ void $name($args$) { $body$; } => $mods$ int $name($args$) { $body$; }",
 522.780 -                           "package test;\n" +
 522.781 -                           "import java.io.InputStream;\n" +
 522.782 -                           "public class Test {\n" +
 522.783 -                           "    public static int t() {\n" +
 522.784 -                           "    }\n" +
 522.785 -		           "}\n");
 522.786 -    }
 522.787 -    
 522.788 -    public void testRewriteClass() throws Exception {
 522.789 -        performRewriteTest("package test;\n" +
 522.790 -                           "public class Test {\n" +
 522.791 -                           "}\n",
 522.792 -                           "$mods$ class $name<$tp$> extends $e$ implements $i$ { $members$; } => $mods$ @java.lang.Deprecated class $name<$tp$> extends $e$ implements $i$ { $members$; }",
 522.793 -                           "package test;\n" +
 522.794 -                           "@Deprecated\n" +
 522.795 -                           "public class Test {\n" +
 522.796 -		           "}\n");
 522.797 -    }
 522.798 -    
 522.799 -    public void testOptionalVariableInitializer1() throws Exception {
 522.800 -        performRewriteTest("package test;\n" +
 522.801 -                           "public class Test {\n" +
 522.802 -                           "    private int I;\n" +
 522.803 -                           "}\n",
 522.804 -                           "$mods$ int $name = $init$; => $mods$ long $name = $init$;",
 522.805 -                           "package test;\n" +
 522.806 -                           "public class Test {\n" +
 522.807 -                           "    private long I;\n" +
 522.808 -		           "}\n");
 522.809 -    }
 522.810 -    
 522.811 -    public void testOptionalVariableInitializer2() throws Exception {
 522.812 -        performRewriteTest("package test;\n" +
 522.813 -                           "public class Test {\n" +
 522.814 -                           "    private int I = 1;\n" +
 522.815 -                           "}\n",
 522.816 -                           "$mods$ int $name = $init$; => $mods$ long $name = $init$;",
 522.817 -                           "package test;\n" +
 522.818 -                           "public class Test {\n" +
 522.819 -                           "    private long I = 1;\n" +
 522.820 -		           "}\n");
 522.821 -    }
 522.822 -    
 522.823 -    public void testOptionalElse1() throws Exception {
 522.824 -        performRewriteTest("package test;\n" +
 522.825 -                           "public class Test {\n" +
 522.826 -                           "    {\n" +
 522.827 -                           "        if (true) System.err.println(\"a\");\n" +
 522.828 -                           "    }\n" +
 522.829 -                           "}\n",
 522.830 -                           "if (true) $then else $else$; => if (false) $then else $else$;",
 522.831 -                           "package test;\n" +
 522.832 -                           "public class Test {\n" +
 522.833 -                           "    {\n" +
 522.834 -                           "        if (false) System.err.println(\"a\");\n" +
 522.835 -                           "    }\n" +
 522.836 -		           "}\n");
 522.837 -    }
 522.838 -    
 522.839 -    public void testOptionalElse2() throws Exception {
 522.840 -        performRewriteTest("package test;\n" +
 522.841 -                           "public class Test {\n" +
 522.842 -                           "    {\n" +
 522.843 -                           "        if (true) System.err.println(\"a\");\n" +
 522.844 -                           "        else System.err.println(\"b\");\n" +
 522.845 -                           "    }\n" +
 522.846 -                           "}\n",
 522.847 -                           "if (true) $then else $else$; => if (false) $then else $else$;",
 522.848 -                           "package test;\n" +
 522.849 -                           "public class Test {\n" +
 522.850 -                           "    {\n" +
 522.851 -                           "        if (false) System.err.println(\"a\");\n" +
 522.852 -                           "        else System.err.println(\"b\");\n" +
 522.853 -                           "    }\n" +
 522.854 -		           "}\n");
 522.855 -    }
 522.856 -    
 522.857 -    public void testMultiNewArray() throws Exception {
 522.858 -        performRewriteTest("package test;\n" +
 522.859 -                           "public class Test {\n" +
 522.860 -                           "    private static void t(Object... obj) {\n" +
 522.861 -                           "        Test.t(1);\n" +
 522.862 -                           "    }\n" +
 522.863 -                           "}\n",
 522.864 -                           "test.Test.t($args$) => test.Test.t(new Object[] {$args$})",
 522.865 -                           "package test;\n" +
 522.866 -                           "public class Test {\n" +
 522.867 -                           "    private static void t(Object... obj) {\n" +
 522.868 -                           "        Test.t(new Object[]{1});\n" +
 522.869 -                           "    }\n" +
 522.870 -		           "}\n");
 522.871 -    }
 522.872 -
 522.873 -    public void testFakeBlock2FakeBlock191283() throws Exception {
 522.874 -        performRewriteTest("package test;\n" +
 522.875 -                           "import java.io.InputStream;\n" +
 522.876 -                           "public class Test {\n" +
 522.877 -                           "    private void t() throws Exception {\n" +
 522.878 -                           "        System.err.println(1);\n" +
 522.879 -                           "        lock();\n" +
 522.880 -                           "        System.err.println(2);\n" +
 522.881 -                           "        unlock();\n" +
 522.882 -                           "        System.err.println(3);\n" +
 522.883 -                           "    }\n" +
 522.884 -                           "    private static void lock() {}\n" +
 522.885 -                           "    private static void unlock() {}\n" +
 522.886 -                           "}\n",
 522.887 -                           "test.Test.lock(); $i$; test.Test.unlock(); => lock(); try { $i$; } finally { unlock(); }",
 522.888 -                           "package test;\n" +
 522.889 -                           "import java.io.InputStream;\n" +
 522.890 -                           "public class Test {\n" +
 522.891 -                           "    private void t() throws Exception {\n" +
 522.892 -                           "        System.err.println(1);\n" +
 522.893 -                           "        lock();\n" +
 522.894 -                           "        try {\n" +
 522.895 -                           "            System.err.println(2);\n" +
 522.896 -                           "        } finally {\n" +
 522.897 -                           "            unlock();\n" +
 522.898 -                           "        }\n" +
 522.899 -                           "        System.err.println(3);\n" +
 522.900 -                           "    }\n" +
 522.901 -                           "    private static void lock() {}\n" +
 522.902 -                           "    private static void unlock() {}\n" +
 522.903 -		           "}\n");
 522.904 -    }
 522.905 -    
 522.906 -    public void testOptimizeNegExpression() throws Exception {
 522.907 -        performRewriteTest("package test;\n" +
 522.908 -                           "public class Test {\n" +
 522.909 -                           "    private static void t(int i) {\n" +
 522.910 -                           "        if (i == 0) {\n" +
 522.911 -                           "            System.err.println(1);\n" +
 522.912 -                           "        } else {\n" +
 522.913 -                           "            System.err.println(2);\n" +
 522.914 -                           "        }\n" +
 522.915 -                           "    }\n" +
 522.916 -                           "}\n",
 522.917 -                           "if ($cond) $then; else $else; => if (!$cond) $else; else $then;",
 522.918 -                           "package test;\n" +
 522.919 -                           "public class Test {\n" +
 522.920 -                           "    private static void t(int i) {\n" +
 522.921 -                           "        if (i != 0) {\n" +
 522.922 -                           "            System.err.println(2);\n" +
 522.923 -                           "        } else {\n" +
 522.924 -                           "            System.err.println(1);\n" +
 522.925 -                           "        }\n" +
 522.926 -                           "    }\n" +
 522.927 -		           "}\n");
 522.928 -    }
 522.929 -    
 522.930 -    public void testDontOptimizeNegExpression() throws Exception {
 522.931 -        performRewriteTest("package test;\n" +
 522.932 -                           "public class Test {\n" +
 522.933 -                           "    private static void t(int i) {\n" +
 522.934 -                           "        if (!(i == 0)) {\n" +
 522.935 -                           "            System.err.println(1);\n" +
 522.936 -                           "        } else {\n" +
 522.937 -                           "            System.err.println(2);\n" +
 522.938 -                           "        }\n" +
 522.939 -                           "    }\n" +
 522.940 -                           "}\n",
 522.941 -                           "if (!$cond) $then; else $else; => if (!$cond) $else; else $then;",
 522.942 -                           "package test;\n" +
 522.943 -                           "public class Test {\n" +
 522.944 -                           "    private static void t(int i) {\n" +
 522.945 -                           "        if (!(i == 0)) {\n" +
 522.946 -                           "            System.err.println(2);\n" +
 522.947 -                           "        } else {\n" +
 522.948 -                           "            System.err.println(1);\n" +
 522.949 -                           "        }\n" +
 522.950 -                           "    }\n" +
 522.951 -		           "}\n");
 522.952 -    }
 522.953 -    
 522.954 -    public void testCannotOptimizeNegExpression() throws Exception {
 522.955 -        performRewriteTest("package test;\n" +
 522.956 -                           "public class Test {\n" +
 522.957 -                           "    private static void t(String str) {\n" +
 522.958 -                           "        if (str.isEmpty()) {\n" +
 522.959 -                           "            System.err.println(1);\n" +
 522.960 -                           "        } else {\n" +
 522.961 -                           "            System.err.println(2);\n" +
 522.962 -                           "        }\n" +
 522.963 -                           "    }\n" +
 522.964 -                           "}\n",
 522.965 -                           "if ($cond) $then; else $else; => if (!$cond) $else; else $then;",
 522.966 -                           "package test;\n" +
 522.967 -                           "public class Test {\n" +
 522.968 -                           "    private static void t(String str) {\n" +
 522.969 -                           "        if (!str.isEmpty()) {\n" +
 522.970 -                           "            System.err.println(2);\n" +
 522.971 -                           "        } else {\n" +
 522.972 -                           "            System.err.println(1);\n" +
 522.973 -                           "        }\n" +
 522.974 -                           "    }\n" +
 522.975 -		           "}\n");
 522.976 -    }
 522.977 -    
 522.978 -    public void testOptimizeNegExpressionNeg() throws Exception {
 522.979 -        performOptimizeNegExpressionTest("!s.isEmpty()", "s.isEmpty()");
 522.980 -    }
 522.981 -    
 522.982 -    public void testOptimizeNegExpressionParens() throws Exception {
 522.983 -        performOptimizeNegExpressionTest("!(a.length == 0)", "a.length == 0");
 522.984 -    }
 522.985 -    
 522.986 -    public void testOptimizeNegExpressionEquals() throws Exception {
 522.987 -        performOptimizeNegExpressionTest("i == 0", "i != 0");
 522.988 -    }
 522.989 -    
 522.990 -    public void testOptimizeNegExpressionNotEquals() throws Exception {
 522.991 -        performOptimizeNegExpressionTest("i != 0", "i == 0");
 522.992 -    }
 522.993 -    
 522.994 -    public void testOptimizeNegExpressionTrue() throws Exception {
 522.995 -        performOptimizeNegExpressionTest("true", "false");
 522.996 -    }
 522.997 -    
 522.998 -    public void testOptimizeNegExpressionFalse() throws Exception {
 522.999 -        performOptimizeNegExpressionTest("false", "true");
522.1000 -    }
522.1001 -    
522.1002 -    public void testOptimizeNegExpressionDeMorganAnd() throws Exception {
522.1003 -        performOptimizeNegExpressionTest("a.length != 0 && true", "a.length == 0 || false");
522.1004 -    }
522.1005 -    
522.1006 -    public void testOptimizeNegExpressionDeMorganOr() throws Exception {
522.1007 -        performOptimizeNegExpressionTest("args.length != 0 || false", "args.length == 0 && true");
522.1008 -    }
522.1009 -    
522.1010 -    public void testOptimizeNegExpressionLess() throws Exception {
522.1011 -        performOptimizeNegExpressionTest("i < 0", "i >= 0");
522.1012 -    }
522.1013 -    
522.1014 -    public void testOptimizeNegExpressionLessEq() throws Exception {
522.1015 -        performOptimizeNegExpressionTest("i <= 0", "i > 0");
522.1016 -    }
522.1017 -    
522.1018 -    public void testOptimizeNegExpressionGreater() throws Exception {
522.1019 -        performOptimizeNegExpressionTest("i > 0", "i <= 0");
522.1020 -    }
522.1021 -    
522.1022 -    public void testOptimizeNegExpressionGreaterEq() throws Exception {
522.1023 -        performOptimizeNegExpressionTest("i >= 0", "i < 0");
522.1024 -    }
522.1025 -    
522.1026 -    public void testOptimizeNegExpressionAnd() throws Exception {
522.1027 -        performOptimizeNegExpressionTest("b1 && b2", "!b1 || !b2");
522.1028 -    }
522.1029 -    
522.1030 -    public void test229785a() throws Exception {
522.1031 -        performOptimizeNegExpressionTest("(a[0] == null && a[1] != null) || (a[0] != null && !a[0].equals(a[1]))", "(a[0] != null || a[1] == null) && (a[0] == null || a[0].equals(a[1]))");
522.1032 -    }
522.1033 -    
522.1034 -    public void test229785b() throws Exception {
522.1035 -        performOptimizeNegExpressionTest("a[0] == null && a[1] != null || a[0] != null && !a[0].equals(a[1])", "(a[0] != null || a[1] == null) && (a[0] == null || a[0].equals(a[1]))");
522.1036 -    }
522.1037 -    
522.1038 -    private void performOptimizeNegExpressionTest(String origExpr, String newExpr) throws Exception {
522.1039 -        performRewriteTest("package test;\n" +
522.1040 -                           "public class Test {\n" +
522.1041 -                           "    private static void t(String s, int i, boolean b1, boolean b2, String... a) {\n" +
522.1042 -                           "        if (" + origExpr + ") {\n" +
522.1043 -                           "            System.err.println(1);\n" +
522.1044 -                           "        } else {\n" +
522.1045 -                           "            System.err.println(2);\n" +
522.1046 -                           "        }\n" +
522.1047 -                           "    }\n" +
522.1048 -                           "}\n",
522.1049 -                           "if ($cond) $then; else $else; => if (!$cond) $else; else $then;",
522.1050 -                           "package test;\n" +
522.1051 -                           "public class Test {\n" +
522.1052 -                           "    private static void t(String s, int i, boolean b1, boolean b2, String... a) {\n" +
522.1053 -                           "        if (" + newExpr + ") {\n" +
522.1054 -                           "            System.err.println(2);\n" +
522.1055 -                           "        } else {\n" +
522.1056 -                           "            System.err.println(1);\n" +
522.1057 -                           "        }\n" +
522.1058 -                           "    }\n" +
522.1059 -		           "}\n");
522.1060 -    }
522.1061 -    
522.1062 -    public void testExpression2ExpressionStatementTolerance227429() throws Exception {
522.1063 -        performRewriteTest("package test;\n" +
522.1064 -                           "public class Test {\n" +
522.1065 -                           "    private static void t() {\n" +
522.1066 -                           "        System.err.println(1);\n" +
522.1067 -                           "    }\n" +
522.1068 -                           "}\n",
522.1069 -                           "java.lang.System.err.println($args$) => java.lang.System.out.println($args$);",
522.1070 -                           "package test;\n" +
522.1071 -                           "public class Test {\n" +
522.1072 -                           "    private static void t() {\n" +
522.1073 -                           "        System.out.println(1);\n" +
522.1074 -                           "    }\n" +
522.1075 -		           "}\n");
522.1076 -    }
522.1077 -    
522.1078 -    public void testSplitIfOr() throws Exception {
522.1079 -        performRewriteTest("package test;\n" +
522.1080 -                           "public class Test {\n" +
522.1081 -                           "    private static void t(int i) {\n" +
522.1082 -                           "        if (i == 0 || i == 1) {\n" +
522.1083 -                           "            System.err.println();\n" +
522.1084 -                           "        }\n" +
522.1085 -                           "    }\n" +
522.1086 -                           "}\n",
522.1087 -                           "if ($cond1 || $cond2) $then; => if ($cond1) $then; else if ($cond2) $then;",
522.1088 -                           "package test;\n" +
522.1089 -                           "public class Test {\n" +
522.1090 -                           "    private static void t(int i) {\n" +
522.1091 -                           "        if (i == 0) {\n" +
522.1092 -                           "            System.err.println();\n" +
522.1093 -                           "        } else if (i == 1) {\n" +
522.1094 -                           "            System.err.println();\n" +
522.1095 -                           "        }\n" +
522.1096 -                           "    }\n" +
522.1097 -		           "}\n");
522.1098 -    }
522.1099 -    
522.1100 -    public void testLambdaExpr2Block() throws Exception {
522.1101 -        performRewriteTest("package test;\n" +
522.1102 -                           "import java.util.*;\n" +
522.1103 -                           "public class Test {\n" +
522.1104 -                           "    public void main(List<String> list) {\n" +
522.1105 -                           "        Collections.sort(list, (l, r) -> l.compareTo(r));\n" +
522.1106 -                           "    }\n" +
522.1107 -                           "}\n",
522.1108 -                           "($args$) -> $expr => ($args$) -> { return $expr; }",
522.1109 -                           "package test;\n" +
522.1110 -                           "import java.util.*;\n" +
522.1111 -                           "public class Test {\n" +
522.1112 -                           "    public void main(List<String> list) {\n" +
522.1113 -                           "        Collections.sort(list, (l, r) -> {\n" +
522.1114 -                           "            return l.compareTo(r);\n" +
522.1115 -                           "        });\n" +
522.1116 -                           "    }\n" +
522.1117 -		           "}\n");
522.1118 -    }
522.1119 -    
522.1120 -    public void performRewriteTest(String code, String rule, String golden) throws Exception {
522.1121 -	prepareTest("test/Test.java", code);
522.1122 -
522.1123 -        final String[] split = rule.split("=>");
522.1124 -        assertEquals(2, split.length);
522.1125 -        Map<String, TypeMirror> variablesToTypesTM = new HashMap<String, TypeMirror>();
522.1126 -        String plainRule = PatternCompilerUtilities.parseOutTypesFromPattern(info, split[0], variablesToTypesTM);
522.1127 -        Map<String, String> variablesToTypes = new HashMap<String, String>();
522.1128 -        for (Entry<String, TypeMirror> e : variablesToTypesTM.entrySet()) {
522.1129 -            if (e.getValue() == null) continue;
522.1130 -            variablesToTypes.put(e.getKey(), e.getValue().toString());
522.1131 -        }
522.1132 -        HintDescription hd = HintDescriptionFactory.create()
522.1133 -                                                   .setTrigger(PatternDescription.create(plainRule, variablesToTypes))
522.1134 -                                                   .setWorker(new HintDescription.Worker() {
522.1135 -            @Override public Collection<? extends ErrorDescription> createErrors(HintContext ctx) {
522.1136 -                return Collections.singletonList(ErrorDescriptionFactory.forName(ctx, ctx.getPath(), "", JavaFixUtilities.rewriteFix(ctx, "", ctx.getPath(), split[1])));
522.1137 -            }
522.1138 -        }).produce();
522.1139 -
522.1140 -        List<ErrorDescription> computeHints = new HintsInvoker(HintsSettings.getGlobalSettings(), new AtomicBoolean()).computeHints(info, Collections.singleton(hd));
522.1141 -
522.1142 -        assertEquals(computeHints.toString(), 1, computeHints.size());
522.1143 -
522.1144 -        Fix fix = computeHints.get(0).getFixes().getFixes().get(0);
522.1145 -
522.1146 -	fix.implement();
522.1147 -
522.1148 -        assertEquals(golden, doc.getText(0, doc.getLength()));
522.1149 -    }
522.1150 -
522.1151 -    public void performRemoveFromParentTest(String code, String rule, String golden) throws Exception {
522.1152 -	prepareTest("test/Test.java", code);
522.1153 -
522.1154 -        HintDescription hd = HintDescriptionFactory.create()
522.1155 -                                                   .setTrigger(PatternDescription.create(rule, Collections.<String, String>emptyMap()))
522.1156 -                                                   .setWorker(new HintDescription.Worker() {
522.1157 -            @Override public Collection<? extends ErrorDescription> createErrors(HintContext ctx) {
522.1158 -                return Collections.singletonList(ErrorDescriptionFactory.forName(ctx, ctx.getPath(), "", JavaFixUtilities.removeFromParent(ctx, "", ctx.getPath())));
522.1159 -            }
522.1160 -        }).produce();
522.1161 -
522.1162 -        List<ErrorDescription> computeHints = new HintsInvoker(HintsSettings.getGlobalSettings(), new AtomicBoolean()).computeHints(info, Collections.singleton(hd));
522.1163 -
522.1164 -        assertEquals(computeHints.toString(), 1, computeHints.size());
522.1165 -
522.1166 -        Fix fix = computeHints.get(0).getFixes().getFixes().get(0);
522.1167 -
522.1168 -	fix.implement();
522.1169 -
522.1170 -        assertEquals(golden, doc.getText(0, doc.getLength()));
522.1171 -    }
522.1172 -}
   523.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/spi/java/hints/MatcherUtilitiesTest.java	Mon Dec 19 11:37:36 2016 +0100
   523.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   523.3 @@ -1,113 +0,0 @@
   523.4 -/*
   523.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   523.6 - *
   523.7 - * Copyright 2009-2010 Oracle and/or its affiliates. All rights reserved.
   523.8 - *
   523.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  523.10 - * Other names may be trademarks of their respective owners.
  523.11 - *
  523.12 - * The contents of this file are subject to the terms of either the GNU
  523.13 - * General Public License Version 2 only ("GPL") or the Common
  523.14 - * Development and Distribution License("CDDL") (collectively, the
  523.15 - * "License"). You may not use this file except in compliance with the
  523.16 - * License. You can obtain a copy of the License at
  523.17 - * http://www.netbeans.org/cddl-gplv2.html
  523.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  523.19 - * specific language governing permissions and limitations under the
  523.20 - * License.  When distributing the software, include this License Header
  523.21 - * Notice in each file and include the License file at
  523.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  523.23 - * particular file as subject to the "Classpath" exception as provided
  523.24 - * by Oracle in the GPL Version 2 section of the License file that
  523.25 - * accompanied this code. If applicable, add the following below the
  523.26 - * License Header, with the fields enclosed by brackets [] replaced by
  523.27 - * your own identifying information:
  523.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  523.29 - *
  523.30 - * If you wish your version of this file to be governed by only the CDDL
  523.31 - * or only the GPL Version 2, indicate your decision by adding
  523.32 - * "[Contributor] elects to include this software in this distribution
  523.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  523.34 - * single choice of license, a recipient has the option to distribute
  523.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  523.36 - * to extend the choice of license to its licensees as provided above.
  523.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  523.38 - * Version 2 license, then the option applies only if the new code is
  523.39 - * made subject to such option by the copyright holder.
  523.40 - *
  523.41 - * Contributor(s):
  523.42 - *
  523.43 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  523.44 - */
  523.45 -
  523.46 -package org.netbeans.spi.java.hints;
  523.47 -
  523.48 -import com.sun.source.util.TreePath;
  523.49 -import java.util.Collection;
  523.50 -import java.util.Collections;
  523.51 -import java.util.HashMap;
  523.52 -import java.util.Map;
  523.53 -import java.util.regex.Pattern;
  523.54 -import org.netbeans.modules.java.hints.spiimpl.SPIAccessor;
  523.55 -import org.netbeans.modules.java.hints.spiimpl.TestBase;
  523.56 -import org.netbeans.modules.java.hints.spiimpl.options.HintsSettings;
  523.57 -
  523.58 -/**
  523.59 - *
  523.60 - * @author lahvac
  523.61 - */
  523.62 -public class MatcherUtilitiesTest extends TestBase {
  523.63 -
  523.64 -    public MatcherUtilitiesTest(String name) {
  523.65 -        super(name);
  523.66 -    }
  523.67 -
  523.68 -    public void testParentMatches1() throws Exception {
  523.69 -        String code = "package test; public class Test { private int test() { int i = 0; i = test(|); } }";
  523.70 -        int pos = code.indexOf("|");
  523.71 -
  523.72 -        code = code.replaceAll(Pattern.quote("|"), "");
  523.73 -
  523.74 -        prepareTest("test/Test.java", code);
  523.75 -
  523.76 -        TreePath tp = info.getTreeUtilities().pathFor(pos);
  523.77 -        HintContext ctx = SPIAccessor.getINSTANCE().createHintContext(info, HintsSettings.getGlobalSettings(), null, null, tp, Collections.<String, TreePath>emptyMap(), Collections.<String, Collection<? extends TreePath>>emptyMap(), Collections.<String, String>emptyMap());
  523.78 -
  523.79 -        assertTrue(MatcherUtilities.matches(ctx, ctx.getPath().getParentPath(), "$0 = $_"));
  523.80 -    }
  523.81 -
  523.82 -    public void testParentMatches2() throws Exception {
  523.83 -        String code = "package test; public class Test { private int test() { int i = test(|); } }";
  523.84 -        int pos = code.indexOf("|");
  523.85 -
  523.86 -        code = code.replaceAll(Pattern.quote("|"), "");
  523.87 -
  523.88 -        prepareTest("test/Test.java", code);
  523.89 -
  523.90 -        TreePath tp = info.getTreeUtilities().pathFor(pos);
  523.91 -        HintContext ctx = SPIAccessor.getINSTANCE().createHintContext(info, HintsSettings.getGlobalSettings(), null, null, tp, Collections.<String, TreePath>emptyMap(), Collections.<String, Collection<? extends TreePath>>emptyMap(), Collections.<String, String>emptyMap());
  523.92 -
  523.93 -        assertTrue(MatcherUtilities.matches(ctx, ctx.getPath().getParentPath(), "$1 $0 = $_;"));
  523.94 -    }
  523.95 -
  523.96 -    public void testOutVariables1() throws Exception {
  523.97 -        String code = "package test; public class Test { private int test() { int i = test(|); } }";
  523.98 -        int pos = code.indexOf("|");
  523.99 -
 523.100 -        code = code.replaceAll(Pattern.quote("|"), "");
 523.101 -
 523.102 -        prepareTest("test/Test.java", code);
 523.103 -
 523.104 -        TreePath tp = info.getTreeUtilities().pathFor(pos);
 523.105 -        HintContext ctx = SPIAccessor.getINSTANCE().createHintContext(info, HintsSettings.getGlobalSettings(), null, null, tp, Collections.<String, TreePath>emptyMap(), Collections.<String, Collection<? extends TreePath>>emptyMap(), Collections.<String, String>emptyMap());
 523.106 -
 523.107 -        Map<String, TreePath> outVariables = new HashMap<String, TreePath>();
 523.108 -        Map<String, Collection<? extends TreePath>> outMultiVariables = new HashMap<String, Collection<? extends TreePath>>();
 523.109 -        Map<String, String> outVariables2Names = new HashMap<String, String>();
 523.110 -
 523.111 -        assertTrue(MatcherUtilities.matches(ctx, ctx.getPath().getParentPath(), "$1 $0 = $_;", outVariables, outMultiVariables, outVariables2Names));
 523.112 -        assertEquals("int", outVariables.get("$1").getLeaf().toString());
 523.113 -        assertEquals("i", outVariables2Names.get("$0"));
 523.114 -    }
 523.115 -
 523.116 -}
 523.117 \ No newline at end of file
   524.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/spi/java/hints/TestUtils.java	Mon Dec 19 11:37:36 2016 +0100
   524.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   524.3 @@ -1,69 +0,0 @@
   524.4 -/*
   524.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   524.6 - *
   524.7 - * Copyright 2015 Oracle and/or its affiliates. All rights reserved.
   524.8 - *
   524.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  524.10 - * Other names may be trademarks of their respective owners.
  524.11 - *
  524.12 - * The contents of this file are subject to the terms of either the GNU
  524.13 - * General Public License Version 2 only ("GPL") or the Common
  524.14 - * Development and Distribution License("CDDL") (collectively, the
  524.15 - * "License"). You may not use this file except in compliance with the
  524.16 - * License. You can obtain a copy of the License at
  524.17 - * http://www.netbeans.org/cddl-gplv2.html
  524.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  524.19 - * specific language governing permissions and limitations under the
  524.20 - * License.  When distributing the software, include this License Header
  524.21 - * Notice in each file and include the License file at
  524.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  524.23 - * particular file as subject to the "Classpath" exception as provided
  524.24 - * by Oracle in the GPL Version 2 section of the License file that
  524.25 - * accompanied this code. If applicable, add the following below the
  524.26 - * License Header, with the fields enclosed by brackets [] replaced by
  524.27 - * your own identifying information:
  524.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  524.29 - *
  524.30 - * If you wish your version of this file to be governed by only the CDDL
  524.31 - * or only the GPL Version 2, indicate your decision by adding
  524.32 - * "[Contributor] elects to include this software in this distribution
  524.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  524.34 - * single choice of license, a recipient has the option to distribute
  524.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  524.36 - * to extend the choice of license to its licensees as provided above.
  524.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  524.38 - * Version 2 license, then the option applies only if the new code is
  524.39 - * made subject to such option by the copyright holder.
  524.40 - *
  524.41 - * Contributor(s):
  524.42 - *
  524.43 - * Portions Copyrighted 2015 Sun Microsystems, Inc.
  524.44 - */
  524.45 -package org.netbeans.spi.java.hints;
  524.46 -
  524.47 -import org.netbeans.api.editor.mimelookup.MimePath;
  524.48 -import org.netbeans.modules.editor.impl.DocumentFactoryImpl;
  524.49 -import org.netbeans.spi.editor.mimelookup.MimeDataProvider;
  524.50 -import org.openide.util.Lookup;
  524.51 -import org.openide.util.lookup.Lookups;
  524.52 -import org.openide.util.lookup.ServiceProvider;
  524.53 -
  524.54 -/**
  524.55 - *
  524.56 - * @author lahvac
  524.57 - */
  524.58 -public class TestUtils {
  524.59 -
  524.60 -    @ServiceProvider(service = MimeDataProvider.class)
  524.61 -    public static final class MimeDataProviderImpl implements MimeDataProvider {
  524.62 -
  524.63 -        private final Lookup l = Lookups.singleton(new DocumentFactoryImpl());
  524.64 -
  524.65 -        @Override
  524.66 -        public Lookup getLookup(MimePath mimePath) {
  524.67 -            return "text/x-java".equals(mimePath.getPath()) ? l : Lookup.EMPTY;
  524.68 -        }
  524.69 -
  524.70 -    }
  524.71 -
  524.72 -}
   525.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/spi/java/hints/matching/CopyFinderTest.java	Mon Dec 19 11:37:36 2016 +0100
   525.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   525.3 @@ -1,1612 +0,0 @@
   525.4 -/*
   525.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   525.6 - *
   525.7 - * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
   525.8 - *
   525.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  525.10 - * Other names may be trademarks of their respective owners.
  525.11 - *
  525.12 - * The contents of this file are subject to the terms of either the GNU
  525.13 - * General Public License Version 2 only ("GPL") or the Common
  525.14 - * Development and Distribution License("CDDL") (collectively, the
  525.15 - * "License"). You may not use this file except in compliance with the
  525.16 - * License. You can obtain a copy of the License at
  525.17 - * http://www.netbeans.org/cddl-gplv2.html
  525.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  525.19 - * specific language governing permissions and limitations under the
  525.20 - * License.  When distributing the software, include this License Header
  525.21 - * Notice in each file and include the License file at
  525.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  525.23 - * particular file as subject to the "Classpath" exception as provided
  525.24 - * by Oracle in the GPL Version 2 section of the License file that
  525.25 - * accompanied this code. If applicable, add the following below the
  525.26 - * License Header, with the fields enclosed by brackets [] replaced by
  525.27 - * your own identifying information:
  525.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  525.29 - *
  525.30 - * Contributor(s):
  525.31 - *
  525.32 - * Portions Copyrighted 2007-2010 Sun Microsystems, Inc.
  525.33 - */
  525.34 -package org.netbeans.spi.java.hints.matching;
  525.35 -
  525.36 -import com.sun.source.tree.BlockTree;
  525.37 -import com.sun.source.tree.StatementTree;
  525.38 -import com.sun.source.tree.Tree;
  525.39 -import com.sun.source.tree.VariableTree;
  525.40 -import com.sun.source.util.SourcePositions;
  525.41 -import com.sun.source.util.TreePath;
  525.42 -import com.sun.source.util.TreePathScanner;
  525.43 -import java.io.File;
  525.44 -import java.util.Arrays;
  525.45 -import java.util.Collection;
  525.46 -import java.util.Collections;
  525.47 -import java.util.EnumSet;
  525.48 -import java.util.HashMap;
  525.49 -import java.util.HashSet;
  525.50 -import java.util.LinkedList;
  525.51 -import java.util.List;
  525.52 -import java.util.Map;
  525.53 -import java.util.Map.Entry;
  525.54 -import java.util.Set;
  525.55 -import java.util.concurrent.atomic.AtomicBoolean;
  525.56 -import javax.lang.model.element.VariableElement;
  525.57 -import javax.lang.model.type.TypeMirror;
  525.58 -import javax.swing.text.Document;
  525.59 -import org.netbeans.api.java.lexer.JavaTokenId;
  525.60 -import org.netbeans.api.java.source.CompilationInfo;
  525.61 -import org.netbeans.api.java.source.JavaSource;
  525.62 -import org.netbeans.api.java.source.JavaSource.Phase;
  525.63 -import org.netbeans.api.java.source.SourceUtilsTestUtil;
  525.64 -import org.netbeans.api.java.source.TestUtilities;
  525.65 -import org.netbeans.api.java.source.TreePathHandle;
  525.66 -import org.netbeans.api.java.source.matching.MatchingTestAccessor;
  525.67 -import org.netbeans.api.java.source.matching.Pattern;
  525.68 -import org.netbeans.api.lexer.Language;
  525.69 -import org.netbeans.junit.NbTestCase;
  525.70 -import org.netbeans.modules.java.hints.introduce.IntroduceMethodFix;
  525.71 -import org.netbeans.modules.java.hints.spiimpl.pm.BulkSearch;
  525.72 -import org.netbeans.modules.java.hints.spiimpl.pm.BulkSearch.BulkPattern;
  525.73 -import org.netbeans.modules.java.hints.spiimpl.pm.PatternCompiler;
  525.74 -import org.netbeans.modules.java.hints.spiimpl.pm.PatternCompilerUtilities;
  525.75 -import org.netbeans.modules.java.source.matching.CopyFinder;
  525.76 -import org.netbeans.modules.java.source.matching.CopyFinder.Cancel;
  525.77 -import org.netbeans.modules.java.source.matching.CopyFinder.Options;
  525.78 -import org.netbeans.modules.java.source.matching.CopyFinder.VariableAssignments;
  525.79 -import org.openide.cookies.EditorCookie;
  525.80 -import org.openide.filesystems.FileObject;
  525.81 -import org.openide.filesystems.FileUtil;
  525.82 -import org.openide.loaders.DataObject;
  525.83 -
  525.84 -/**
  525.85 - *
  525.86 - * @author Jan Lahoda
  525.87 - */
  525.88 -public class CopyFinderTest extends NbTestCase {
  525.89 -
  525.90 -    public CopyFinderTest(String testName) {
  525.91 -        super(testName);
  525.92 -    }
  525.93 -
  525.94 -//    public static TestSuite suite() {
  525.95 -//        NbTestSuite nb = new NbTestSuite();
  525.96 -//
  525.97 -//        nb.addTest(new CopyFinderTest("testCorrectSite3"));
  525.98 -//
  525.99 -//        return nb;
 525.100 -//    }
 525.101 -
 525.102 -    @Override
 525.103 -    protected void setUp() throws Exception {
 525.104 -        SourceUtilsTestUtil.prepareTest(new String[0], new Object[0]);
 525.105 -        super.setUp();
 525.106 -    }
 525.107 -
 525.108 -    public void testSimple1() throws Exception {
 525.109 -        performTest("package test; public class Test {public void test() {int i = 0; y = i + i; y = i + i;}}", 90 - 22, 95 - 22, 101 - 22, 106 - 22);
 525.110 -    }
 525.111 -
 525.112 -//    public void testSimple2() throws Exception {
 525.113 -//        performTest("package test; public class Test {public void test() {int i = 0; y = i + i; y = i + i + i;}}", 90 - 22, 95 - 22, 101 - 22, 106 - 22);
 525.114 -//    }
 525.115 -
 525.116 -    public void testSimple3() throws Exception {
 525.117 -        performTest("package test; public class Test {public void test() {int i = System.currentTimeMillis(); y = System.currentTimeMillis();}}", 83 - 22, 109 - 22, 115 - 22, 141 - 22);
 525.118 -    }
 525.119 -
 525.120 -    public void testSimple4() throws Exception {
 525.121 -        performTest("package test; import java.util.ArrayList; public class Test {public void test() {Object o = new ArrayList<String>();o = new ArrayList<String>();}}", 114 - 22, 137- 22, 142 - 22, 165 - 22);
 525.122 -    }
 525.123 -
 525.124 -    public void testSimple5() throws Exception {
 525.125 -        performTest("package test; public class Test {public void test() {Object o = null; String s = (String) o; s = (String) o; s = (String) null; o = (Object) o;}}", 103 - 22, 113 - 22, 119 - 22, 129 - 22);
 525.126 -    }
 525.127 -
 525.128 -    public void testSimple6() throws Exception {
 525.129 -        performTest("package test; public class Test {public void test() {int i = 0; y = i + i; y = i + i;} public void test2() {int i = 0; y = i + i; y = i + i;}}", 90 - 22, 95 - 22, 101 - 22, 106 - 22);
 525.130 -    }
 525.131 -
 525.132 -    public void testSimple7() throws Exception {
 525.133 -        performTest("package test; public class Test {public void test() {int i = 0; y = i != 0 ? i + i : i * i; y = i != 0 ? i + i : i * i; y = i != 1 ? i + i : i * i; y = i == 0 ? i + i : i * i; y = i != 0 ? i * i : i * i; y = i != 0 ? i + i : i + i; y = i != 0 ? i + i : i * 1;}}", 90 - 22, 112 - 22, 118 - 22, 140 - 22);
 525.134 -    }
 525.135 -
 525.136 -    public void testSimple8() throws Exception {
 525.137 -        performTest("package test; public class Test {public void test() {int i = 0; int y = -i; y = -i; y = +i; y = +y;}}", 94 - 22, 96 - 22, 102 - 22, 104 - 22);
 525.138 -    }
 525.139 -
 525.140 -    public void testSimple9() throws Exception {
 525.141 -        performTest("package test; public class Test {public void test() {int i = 0; int y = i *= 9; y = i *= 9; y = i /= 9; y = i *= 8; y = y *= 9;}}", 94 - 22, 100 - 22, 106 - 22, 112 - 22);
 525.142 -    }
 525.143 -
 525.144 -    public void testSimple10() throws Exception {
 525.145 -        performTest("package test; public class Test {public void test() {int[] i = null; int y = i[1]; y = i[1]; y = i[y]; y = i[0];}}", 99 - 22, 103 - 22, 109 - 22, 113 - 22);
 525.146 -    }
 525.147 -
 525.148 -    public void testSimple11() throws Exception {
 525.149 -        performTest("package test; public class Test {public void test() {int[] i = new int[0]; i = new int[0]; i = new int[1];}}", 85 - 22, 95 - 22, 101 - 22, 111 - 22);
 525.150 -    }
 525.151 -
 525.152 -    public void testSimple12() throws Exception {
 525.153 -        performTest("package test; public class Test {public void test() {int[] i = new int[1]; i = new int[1]; i = new int[0];}}", 85 - 22, 95 - 22, 101 - 22, 111 - 22);
 525.154 -    }
 525.155 -
 525.156 -    public void testSimple13() throws Exception {
 525.157 -        performTest("package test; public class Test {public void test() {int i = 0; int y = (i); y = (i); y = i;}}", 94 - 22, 97 - 22, 103 - 22, 106 - 22);
 525.158 -    }
 525.159 -
 525.160 -    public void testSimple14() throws Exception {
 525.161 -        performTest("package test; public class Test {public void test() {Object o = null; boolean b = o instanceof String; b = o instanceof String; b = o instanceof Object;}}", 104 - 22, 123 - 22, 129 - 22, 148 - 22);
 525.162 -    }
 525.163 -
 525.164 -    public void testSimple15() throws Exception {
 525.165 -        performTest("package test; public class Test {private int x = 1; private int y = 1; public void test() {int x = 1; int y = 1;}}", 90 - 22, 91 - 22, 71 - 22, 72 - 22, 121 - 22, 122 - 22, 132 - 22, 133 - 22);
 525.166 -    }
 525.167 -
 525.168 -    public void testSimple16() throws Exception {
 525.169 -        performTest("package test; public class Test {public void test(int i) {int y = \"\".length(); test(\"\".length());} }", 88 - 22, 99 - 22, 106 - 22, 117 - 22);
 525.170 -    }
 525.171 -
 525.172 -    public void testSimple17() throws Exception {
 525.173 -        performTest("package test; public class Test {public void test2() {int a = test(test(test(1))); a = test(test(test(1))); a = test(test(test(1)));} public int test(int i) {return 0;} }", 94 - 22, 101 - 22, 119 - 22, 126 - 22, 144 - 22, 151 - 22);
 525.174 -    }
 525.175 -
 525.176 -    public void testMemberSelectAndIdentifierAreSame() throws Exception {
 525.177 -        performTest("package test; import static java.lang.String.*; public class Test {public void test1() {|String.valueOf(2)|; |valueOf(2)|;} }");
 525.178 -    }
 525.179 -
 525.180 -    public void testVariables1() throws Exception {
 525.181 -        performVariablesTest("package test; import static java.lang.String.*; public class Test {public void test1() {String.valueOf(2+4);} }",
 525.182 -                             "java.lang.String.valueOf($1)",
 525.183 -                             new Pair[] {new Pair<String, int[]>("$1", new int[] {134 - 31, 137 - 31})},
 525.184 -                             new Pair[0]);
 525.185 -    }
 525.186 -
 525.187 -    public void testAssert1() throws Exception {
 525.188 -        performTest("package test; public class Test {public void test() {int i = 0; |assert i == 1;| |assert i == 1;|}}");
 525.189 -    }
 525.190 -
 525.191 -    public void testReturn1() throws Exception {
 525.192 -        performTest("package test; public class Test {public int test1() {|return 1;|} public int test2() {|return 1;|}}");
 525.193 -    }
 525.194 -
 525.195 -    public void testIf1() throws Exception {
 525.196 -        performTest("package test; public class Test {public void test() { int i = 0; int j; |if (i == 0) {j = 1;} else {j = 2;}| |if (i == 0) {j = 1;} else {j = 2;}| } }");
 525.197 -    }
 525.198 -
 525.199 -    public void testExpressionStatement1() throws Exception {
 525.200 -        performTest("package test; public class Test {public void test() { int i = 0; |i = 1;| |i = 1;| } }");
 525.201 -    }
 525.202 -
 525.203 -    public void testBlock1() throws Exception {
 525.204 -        performTest("package test; public class Test {public void test() { int i = 0; |{i = 1;}| |{i = 1;}| } }");
 525.205 -    }
 525.206 -
 525.207 -    public void testSynchronized1() throws Exception {
 525.208 -        performTest("package test; public class Test {public void test() { Object o = null; int i = 0; |synchronized (o) {i = 1;}| |synchronized (o) {i = 1;}| } }");
 525.209 -    }
 525.210 -
 525.211 -//    public void testEnhancedForLoop() throws Exception {
 525.212 -//        performTest("package test; public class Test {public void test(Iterable<String> i) { |for (String s : i) { System.err.println(); }| |for (String s : i) { System.err.println(); }| }");
 525.213 -//    }
 525.214 -
 525.215 -//    public void testConstants() throws Exception {
 525.216 -//        performTest("package test; public class Test {public static final int A = 3; public void test() { int i = |3|; i = |test.Test.A|; } }");
 525.217 -//    }
 525.218 -
 525.219 -    public void testOverridingImplementing1() throws Exception {
 525.220 -        performVariablesTest("package test; public class Test implements Runnable { { this.run(); } public void run() { } } }",
 525.221 -                             "$0{java.lang.Runnable}.run()",
 525.222 -                             new Pair[] {new Pair<String, int[]>("$0", new int[] {56, 60})},
 525.223 -                             new Pair[0]);
 525.224 -    }
 525.225 -
 525.226 -    public void testMemberSelectCCE() throws Exception {
 525.227 -        //should not throw a CCE
 525.228 -        //(selected regions are not duplicates)
 525.229 -        performTest("package test; public class Test {public static class T extends Test { public void test() { |Test.test|(); |System.err.println|(); } } }", false);
 525.230 -    }
 525.231 -
 525.232 -    public void testLocalVariable() throws Exception {
 525.233 -        performVariablesTest("package test; public class Test {public void test1() { { int y; y = 1; } int z; { int y; z = 1; } } }",
 525.234 -                             "{ int $1; $1 = 1; }",
 525.235 -                             new Pair[0],
 525.236 -                             new Pair[] {new Pair<String, String>("$1", "y")});
 525.237 -    }
 525.238 -
 525.239 -    public void testStatementAndSingleBlockStatementAreSame1() throws Exception {
 525.240 -        performVariablesTest("package test; public class Test {public void test1() { { int x; { x = 1; } } } }",
 525.241 -                             "{ int $1; $1 = 1; }",
 525.242 -                             new Pair[0],
 525.243 -                             new Pair[] {new Pair<String, String>("$1", "x")});
 525.244 -    }
 525.245 -
 525.246 -    public void testStatementAndSingleBlockStatementAreSame2() throws Exception {
 525.247 -        performVariablesTest("package test; public class Test {public void test1() { { int x; x = 1; } } }",
 525.248 -                             "{ int $1; { $1 = 1; } }",
 525.249 -                             new Pair[0],
 525.250 -                             new Pair[] {new Pair<String, String>("$1", "x")});
 525.251 -    }
 525.252 -
 525.253 -    public void testStatementVariables() throws Exception {
 525.254 -        performVariablesTest("package test; public class Test {public int test1() { if (true) return 1; else return 2; } }",
 525.255 -                             "if ($1) $2; else $3;",
 525.256 -                             new Pair[] {
 525.257 -                                  new Pair<String, int[]>("$1", new int[] {89 - 31, 93 - 31}),
 525.258 -                                  new Pair<String, int[]>("$2", new int[] {95 - 31, 104 - 31}),
 525.259 -                                  new Pair<String, int[]>("$3", new int[] {110 - 31, 119 - 31})
 525.260 -                             },
 525.261 -                             new Pair[0]);
 525.262 -    }
 525.263 -
 525.264 -    public void testThrowStatement() throws Exception {
 525.265 -        performVariablesTest("package test; public class Test {public void test() { throw new NullPointerException(); throw new IllegalStateException();} }",
 525.266 -                             "throw new NullPointerException()",
 525.267 -                             new Pair[0],
 525.268 -                             new Pair[0]);
 525.269 -    }
 525.270 -
 525.271 -    public void testMultiStatementVariables1() throws Exception {
 525.272 -        performVariablesTest("package test; public class Test { public int test1() { System.err.println(); System.err.println(); int i = 3; System.err.println(i); System.err.println(i); return i; } }",
 525.273 -                             "{ $s1$; int $i = 3; $s2$; return $i; }",
 525.274 -                             new Pair[0],
 525.275 -                             new Pair[] {
 525.276 -                                  new Pair<String, int[]>("$s1$", new int[] {55, 76, 77, 98}),
 525.277 -                                  new Pair<String, int[]>("$s2$", new int[] {110, 132, 133, 155})
 525.278 -                             },
 525.279 -                             new Pair[] {new Pair<String, String>("$i", "i")});
 525.280 -    }
 525.281 -
 525.282 -    public void testMultiStatementVariables2() throws Exception {
 525.283 -        performVariablesTest("package test; public class Test { public int test1() { int i = 3; return i; } }",
 525.284 -                             "{ $s1$; int $i = 3; $s2$; return $i; }",
 525.285 -                             new Pair[0],
 525.286 -                             new Pair[] {
 525.287 -                                  new Pair<String, int[]>("$s1$", new int[] {}),
 525.288 -                                  new Pair<String, int[]>("$s2$", new int[] {}),
 525.289 -                             },
 525.290 -                             new Pair[] {new Pair<String, String>("$i", "i")});
 525.291 -    }
 525.292 -
 525.293 -    public void testMultiStatementVariablesAndBlocks1() throws Exception {
 525.294 -        performVariablesTest("package test; public class Test { public void test1() { if (true) System.err.println(); } }",
 525.295 -                             "if ($c) {$s1$; System.err.println(); $s2$; }",
 525.296 -                             new Pair[] {new Pair<String, int[]>("$c", new int[] {60, 64})},
 525.297 -                             new Pair[] {
 525.298 -                                  new Pair<String, int[]>("$s1$", new int[] {}),
 525.299 -                                  new Pair<String, int[]>("$s2$", new int[] {}),
 525.300 -                             },
 525.301 -                             new Pair[0]);
 525.302 -    }
 525.303 -
 525.304 -    public void testMultiStatementVariablesAndBlocks2() throws Exception {
 525.305 -        performVariablesTest("package test; public class Test { public void test1() { if (true) System.err.println(); } }",
 525.306 -                             "if ($c) {$s1$; System.err.println(); }",
 525.307 -                             new Pair[] {new Pair<String, int[]>("$c", new int[] {60, 64})},
 525.308 -                             new Pair[] {
 525.309 -                                  new Pair<String, int[]>("$s1$", new int[] {}),
 525.310 -                             },
 525.311 -                             new Pair[0]);
 525.312 -    }
 525.313 -
 525.314 -    public void testMultiStatementVariablesAndBlocks3() throws Exception {
 525.315 -        performVariablesTest("package test; public class Test { public void test1() { if (true) System.err.println(); } }",
 525.316 -                             "if ($c) {System.err.println(); $s2$; }",
 525.317 -                             new Pair[] {new Pair<String, int[]>("$c", new int[] {60, 64})},
 525.318 -                             new Pair[] {
 525.319 -                                  new Pair<String, int[]>("$s2$", new int[] {}),
 525.320 -                             },
 525.321 -                             new Pair[0]);
 525.322 -    }
 525.323 -
 525.324 -    public void testMultiStatementVariablesAndBlocks4() throws Exception {
 525.325 -        performVariablesTest("package test; public class Test { public void test1() { if (true) System.err.println(); } }",
 525.326 -                             "if ($c) { $s$; }",
 525.327 -                             new Pair[] {new Pair<String, int[]>("$c", new int[] {60, 64})},
 525.328 -                             new Pair[] {
 525.329 -                                  new Pair<String, int[]>("$s$", new int[] {66, 87}),
 525.330 -                             },
 525.331 -                             new Pair[0]);
 525.332 -    }
 525.333 -
 525.334 -    public void testVariableVerification() throws Exception {
 525.335 -        performVariablesTest("package test; public class Test { public void test1(String[] a, String[] b) { for (int c = 0; c < a.length; c++) { String s = b[c]; System.err.println(s); } } }",
 525.336 -                             "for(int $i = 0; $i < $array.length; $i++) { $T $var = $array[$i]; $stmts$; }",
 525.337 -                             new Pair[0],
 525.338 -                             new Pair[0],
 525.339 -                             new Pair[0],
 525.340 -                             true);
 525.341 -    }
 525.342 -
 525.343 -    public void testFor() throws Exception {
 525.344 -        performVariablesTest("package test; public class Test { public void test1(String[] a) { for (int c = 0; c < a.length; c++) { String s = a[c]; System.err.println(s); } } }",
 525.345 -                             "for(int $i = 0; $i < $array.length; $i++) { $T $var = $array[$i]; $stmts$; }",
 525.346 -                             new Pair[] {
 525.347 -                                  new Pair<String, int[]>("$array", new int[] {117 - 31, 118 - 31}),
 525.348 -                                  new Pair<String, int[]>("$T", new int[] {134 - 31, 140 - 31}),
 525.349 -                             },
 525.350 -                             new Pair[] {
 525.351 -                                  new Pair<String, int[]>("$stmts$", new int[] {151 - 31, 173 - 31}),
 525.352 -                             },
 525.353 -                             new Pair[] {
 525.354 -                                  new Pair<String, String>("$i", "c"),
 525.355 -                                  new Pair<String, String>("$var", "s"),
 525.356 -                             });
 525.357 -    }
 525.358 -
 525.359 -    public void testEnhancedFor() throws Exception {
 525.360 -        performVariablesTest("package test; public class Test { public void test1(String[] a) { for (String s : a) { System.err.println(s); } } }",
 525.361 -                             "for($T $var : $array) { $stmts$; }",
 525.362 -                             new Pair[] {
 525.363 -                                  new Pair<String, int[]>("$array", new int[] {113 - 31, 114 - 31}),
 525.364 -                                  new Pair<String, int[]>("$T", new int[] {102 - 31, 108 - 31}),
 525.365 -                             },
 525.366 -                             new Pair[] {
 525.367 -                                  new Pair<String, int[]>("$stmts$", new int[] {118 - 31, 140 - 31}),
 525.368 -                             },
 525.369 -                             new Pair[] {
 525.370 -                                  new Pair<String, String>("$var", "s"),
 525.371 -                             });
 525.372 -    }
 525.373 -
 525.374 -    public void testWhile() throws Exception {
 525.375 -        performVariablesTest("package test; public class Test { public void test1(String[] a) { int c = 0; while  (c < a.length) { String s = a[c]; System.err.println(s); c++; } } }",
 525.376 -                             "while ($i < $array.length) { $T $var = $array[$i]; $stmts$; $i++; }",
 525.377 -                             new Pair[] {
 525.378 -                                  new Pair<String, int[]>("$array", new int[] {120 - 31, 121 - 31}),
 525.379 -                                  new Pair<String, int[]>("$T", new int[] {132 - 31, 138 - 31}),
 525.380 -                                  new Pair<String, int[]>("$i", new int[] {116 - 31, 117 - 31}),
 525.381 -                             },
 525.382 -                             new Pair[] {
 525.383 -                                  new Pair<String, int[]>("$stmts$", new int[] {149 - 31, 171 - 31}),
 525.384 -                             },
 525.385 -                             new Pair[] {
 525.386 -                                  new Pair<String, String>("$var", "s"),
 525.387 -                             });
 525.388 -    }
 525.389 -
 525.390 -    public void testDoWhile() throws Exception {
 525.391 -        performVariablesTest("package test; public class Test { public void test1(String[] a) { int c = 0; do { String s = a[c]; System.err.println(s); c++; } while  (c < a.length); } }",
 525.392 -                             "do { $T $var = $array[$i]; $stmts$; $i++; } while ($i < $array.length);",
 525.393 -                             new Pair[] {
 525.394 -                                  new Pair<String, int[]>("$array", new int[] {124 - 31, 125 - 31}),
 525.395 -                                  new Pair<String, int[]>("$T", new int[] {113 - 31, 119 - 31}),
 525.396 -                                  new Pair<String, int[]>("$i", new int[] {126 - 31, 127 - 31}),
 525.397 -                             },
 525.398 -                             new Pair[] {
 525.399 -                                  new Pair<String, int[]>("$stmts$", new int[] {130 - 31, 152 - 31}),
 525.400 -                             },
 525.401 -                             new Pair[] {
 525.402 -                                  new Pair<String, String>("$var", "s"),
 525.403 -                             });
 525.404 -    }
 525.405 -
 525.406 -    public void testArrayType() throws Exception {
 525.407 -        performVariablesTest("package test; public class Test { public void test1() { int[][] a; } }",
 525.408 -                             "$T[]",
 525.409 -                             new Pair[] {
 525.410 -                                  new Pair<String, int[]>("$T", new int[] {87 - 31, /*92*//*XXX:*/94 - 31}),
 525.411 -                             },
 525.412 -                             new Pair[0],
 525.413 -                             new Pair[0]);
 525.414 -    }
 525.415 -
 525.416 -    public void testSemiMatchPackage() throws Exception {
 525.417 -        performVariablesTest("package test; import javax.lang.model.type.TypeMirror; public class Test { }",
 525.418 -                             "$T{java.lang.Object}.type",
 525.419 -                             new Pair[0],
 525.420 -                             new Pair[0],
 525.421 -                             new Pair[0],
 525.422 -                             true);
 525.423 -    }
 525.424 -
 525.425 -    public void testNullType() throws Exception {
 525.426 -        performVariablesTest("package javax.lang.model.type; public class Test { }",
 525.427 -                             "$T{java.lang.Object}.type",
 525.428 -                             new Pair[0],
 525.429 -                             new Pair[0],
 525.430 -                             new Pair[0],
 525.431 -                             true);
 525.432 -    }
 525.433 -
 525.434 -    public void testTryCatch() throws Exception {
 525.435 -        performVariablesTest("package test; import java.io.*; public class Test { public void test() { InputStream ins = null; try { ins = new FileInputStream(\"\"); } catch (IOException e) { e.printStackTrace(); } finally {ins.close();} } }",
 525.436 -                             "try {$stmts$;} catch (java.io.IOException $e) {$e.printStackTrace();} finally {$finally$;}",
 525.437 -                             new Pair[] {
 525.438 -                                   new Pair<String, int[]>("$e", new int[] {176 - 31 - 2, 189 - 31 - 2}),
 525.439 -                             },
 525.440 -                             new Pair[] {
 525.441 -                                  new Pair<String, int[]>("$stmts$", new int[] {134 - 31, 166 - 31 - 2}),
 525.442 -                                  new Pair<String, int[]>("$finally$", new int[] {225 - 31 - 2, 237 - 31 - 2}),
 525.443 -                             },
 525.444 -                             new Pair[] {
 525.445 -                                  new Pair<String, String>("$e", "e"),
 525.446 -                             });
 525.447 -    }
 525.448 -
 525.449 -    public void testMultiParameters1() throws Exception {
 525.450 -        performVariablesTest("package test; public class Test { { java.util.Arrays.asList(\"a\", \"b\", \"c\"); }",
 525.451 -                             "java.util.Arrays.asList($1$)",
 525.452 -                             new Pair[] {
 525.453 -                             },
 525.454 -                             new Pair[] {
 525.455 -                                new Pair<String, int[]>("$1$", new int[] {60, 63, 65, 68, 70, 73}),
 525.456 -                             },
 525.457 -                             new Pair[] {
 525.458 -                             });
 525.459 -    }
 525.460 -
 525.461 -    public void testMultiParameters2() throws Exception {
 525.462 -        performVariablesTest("package test; public class Test { { java.util.Arrays.asList(new String(\"a\"), \"b\", \"c\"); }",
 525.463 -                             "java.util.Arrays.asList(new String(\"a\"), $1$)",
 525.464 -                             new Pair[] {
 525.465 -                             },
 525.466 -                             new Pair[] {
 525.467 -                                new Pair<String, int[]>("$1$", new int[] {77, 80, 82, 85}),
 525.468 -                             },
 525.469 -                             new Pair[] {
 525.470 -                             });
 525.471 -    }
 525.472 -
 525.473 -    public void testMultiParameters3() throws Exception {
 525.474 -        performVariablesTest("package test; public class Test { { java.util.Arrays.asList(); }",
 525.475 -                             "java.util.Arrays.asList($1$)",
 525.476 -                             new Pair[] {
 525.477 -                             },
 525.478 -                             new Pair[] {
 525.479 -                                new Pair<String, int[]>("$1$", new int[] {}),
 525.480 -                             },
 525.481 -                             new Pair[] {
 525.482 -                             });
 525.483 -    }
 525.484 -
 525.485 -    public void testTypeParameters() throws Exception {
 525.486 -        performVariablesTest("package test; public class Test { { java.util.Arrays.<String>asList(\"a\", \"b\"); }",
 525.487 -                             "java.util.Arrays.<$1>asList($1$)",
 525.488 -                             new Pair[] {
 525.489 -                                   new Pair<String, int[]>("$1", new int[] {85 - 31, 91 - 31}),
 525.490 -                             },
 525.491 -                             new Pair[] {
 525.492 -                             },
 525.493 -                             new Pair[] {
 525.494 -                             });
 525.495 -    }
 525.496 -
 525.497 -    public void testModifiers() throws Exception {
 525.498 -        performVariablesTest("package test; public class Test { private String s; }",
 525.499 -                             "$mods$ java.lang.String $name;",
 525.500 -                             new Pair[] {
 525.501 -                                 new Pair<String, int[]>("$name", new int[] {65 - 31, 82 - 31}),
 525.502 -                                 new Pair<String, int[]>("$mods$", new int[] {65 - 31, 72 - 31}), //XXX: shouldn't this be a multi-variable?
 525.503 -                             },
 525.504 -                             new Pair[] {
 525.505 -                             },
 525.506 -                             new Pair[] {
 525.507 -                                  new Pair<String, String>("$name", "s"),
 525.508 -                             });
 525.509 -    }
 525.510 -
 525.511 -    public void testVariableIsFullPattern1() throws Exception {
 525.512 -        performVariablesTest("package test; public class Test { private int a; {System.err.println(a);} }",
 525.513 -                             "$0{int}",
 525.514 -                             new Pair[] {
 525.515 -                                 new Pair<String, int[]>("$0", new int[] {100 - 31, 101 - 31}),
 525.516 -                             },
 525.517 -                             new Pair[] {
 525.518 -                             },
 525.519 -                             new Pair[] {
 525.520 -                             });
 525.521 -    }
 525.522 -
 525.523 -    public void testVariableIsFullPattern2() throws Exception {
 525.524 -        performVariablesTest("package test; public class Test { private int a; {System.err.println(a);} }",
 525.525 -                             "$0{int}",
 525.526 -                             new Pair[] {
 525.527 -                                 new Pair<String, int[]>("$0", new int[] {100 - 31, 101 - 31}),
 525.528 -                             },
 525.529 -                             new Pair[] {
 525.530 -                             },
 525.531 -                             new Pair[] {
 525.532 -                             },
 525.533 -                             false,
 525.534 -                             true);
 525.535 -    }
 525.536 -
 525.537 -    public void testNoCCEForVariableName() throws Exception {
 525.538 -        performVariablesTest("package test; public class Test { { int[] arr = null; int a; arr[a] = 0;} }",
 525.539 -                             "int $a; $a = 0;",
 525.540 -                             new Pair[] {
 525.541 -                             },
 525.542 -                             new Pair[] {
 525.543 -                             },
 525.544 -                             new Pair[] {
 525.545 -                             },
 525.546 -                             true,
 525.547 -                             true);
 525.548 -    }
 525.549 -
 525.550 -    public void testVerifySameTrees1() throws Exception {
 525.551 -        performVariablesTest("package test; public class Test { { if (true) { System.err.println(); } else { System.err.println(); System.err.println(); } } }",
 525.552 -                             "if ($c) $s; else $s;",
 525.553 -                             new Pair[] {
 525.554 -                             },
 525.555 -                             new Pair[] {
 525.556 -                             },
 525.557 -                             new Pair[] {
 525.558 -                             },
 525.559 -                             true,
 525.560 -                             true);
 525.561 -    }
 525.562 -
 525.563 -    public void testVerifySameTreesMultiVariables1() throws Exception {
 525.564 -        performVariablesTest("package test; public class Test { { if (true) { System.err.println(); System.err.println(); } else { System.err.println(); System.err.println(); System.err.println(); } } }",
 525.565 -                             "if ($c) { $s$;} else { $s$; }",
 525.566 -                             new Pair[] {
 525.567 -                             },
 525.568 -                             new Pair[] {
 525.569 -                             },
 525.570 -                             new Pair[] {
 525.571 -                             },
 525.572 -                             true,
 525.573 -                             true);
 525.574 -    }
 525.575 -
 525.576 -    public void testVerifySameTreesMultiVariables2() throws Exception {
 525.577 -        performVariablesTest("package test; public class Test { { if (true) { System.err.println(1); System.err.println(); } else System.err.println(1); } }",
 525.578 -                             "if ($c) { System.err.println(1); $s2$; } else { System.err.println(1); $s2$; }",
 525.579 -                             new Pair[] {
 525.580 -                             },
 525.581 -                             new Pair[] {
 525.582 -                             },
 525.583 -                             new Pair[] {
 525.584 -                             },
 525.585 -                             true,
 525.586 -                             true);
 525.587 -    }
 525.588 -
 525.589 -    public void testVerifySameTreesMultiVariables3() throws Exception {
 525.590 -        performVariablesTest("package test; public class Test { { if (true) { System.err.println(); System.err.println(1); } else System.err.println(1); } }",
 525.591 -                             "if ($c) { $s1$; System.err.println(1); } else { $s1$; System.err.println(1); }",
 525.592 -                             new Pair[] {
 525.593 -                             },
 525.594 -                             new Pair[] {
 525.595 -                             },
 525.596 -                             new Pair[] {
 525.597 -                             },
 525.598 -                             true,
 525.599 -                             true);
 525.600 -    }
 525.601 -
 525.602 -    public void XtestVerifySameTreesMultiVariables4() throws Exception {
 525.603 -        performVariablesTest("package test; public class Test { { if (true) { System.err.println(); System.err.println(1); System.err.println(); } else System.err.println(1); } }",
 525.604 -                             "if ($c) { $s1$; System.err.println(1); $s2$; } else { $s1$; System.err.println(1); $s2$; }",
 525.605 -                             new Pair[] {
 525.606 -                             },
 525.607 -                             new Pair[] {
 525.608 -                             },
 525.609 -                             new Pair[] {
 525.610 -                             },
 525.611 -                             true,
 525.612 -                             true);
 525.613 -    }
 525.614 -
 525.615 -    public void testVerifySameTreesMultiVariables5() throws Exception {
 525.616 -        performVariablesTest("package test; public class Test { { if (true) { System.err.println(1); } else System.err.println(2); } }",
 525.617 -                             "if ($c) { $s$; } else { $s$; }",
 525.618 -                             new Pair[] {
 525.619 -                             },
 525.620 -                             new Pair[] {
 525.621 -                             },
 525.622 -                             new Pair[] {
 525.623 -                             },
 525.624 -                             true,
 525.625 -                             true);
 525.626 -    }
 525.627 -
 525.628 -    public void testSimpleRemapping1() throws Exception {
 525.629 -        performRemappingTest("package test;\n" +
 525.630 -                             "public class Test {\n" +
 525.631 -                             "    void t1() {\n" +
 525.632 -                             "        int i = 0;\n" +
 525.633 -                             "        |System.err.println(i);|\n" +
 525.634 -                             "    }\n" +
 525.635 -                             "    void t2() {\n" +
 525.636 -                             "        int a = 0;\n" +
 525.637 -                             "        |System.err.println(a);|\n" +
 525.638 -                             "    }\n" +
 525.639 -                             "}\n",
 525.640 -                             "i",
 525.641 -                             Options.ALLOW_REMAP_VARIABLE_TO_EXPRESSION);
 525.642 -    }
 525.643 -
 525.644 -    public void testSimpleRemapping2() throws Exception {
 525.645 -        performRemappingTest("package test;\n" +
 525.646 -                             "public class Test {\n" +
 525.647 -                             "    void t1() {\n" +
 525.648 -                             "        int i = 0;\n" +
 525.649 -                             "        |System.err.println(i);\n" +
 525.650 -                             "         int i2 = 0;\n" +
 525.651 -                             "         System.err.println(i2);|\n" +
 525.652 -                             "    }\n" +
 525.653 -                             "    void t2() {\n" +
 525.654 -                             "        int a = 0;\n" +
 525.655 -                             "        |System.err.println(a);\n" +
 525.656 -                             "         int a2 = 0;\n" +
 525.657 -                             "         System.err.println(a2);|\n" +
 525.658 -                             "    }\n" +
 525.659 -                             "}\n",
 525.660 -                             "i",
 525.661 -                             Options.ALLOW_REMAP_VARIABLE_TO_EXPRESSION);
 525.662 -    }
 525.663 -
 525.664 -    public void testSimpleRemapping3() throws Exception {
 525.665 -        performRemappingTest("package test;\n" +
 525.666 -                             "public class Test {\n" +
 525.667 -                             "    void t1() {\n" +
 525.668 -                             "        |int i = 0;\n" +
 525.669 -                             "         System.err.println(i);\n" +
 525.670 -                             "         int i2 = 0;\n" +
 525.671 -                             "         System.err.println(i2);|\n" +
 525.672 -                             "    }\n" +
 525.673 -                             "    void t2() {\n" +
 525.674 -                             "        |int a = 0;\n" +
 525.675 -                             "         System.err.println(a);\n" +
 525.676 -                             "         int a2 = 0;\n" +
 525.677 -                             "         System.err.println(a2);|\n" +
 525.678 -                             "    }\n" +
 525.679 -                             "}\n",
 525.680 -                             "",
 525.681 -                             Options.ALLOW_REMAP_VARIABLE_TO_EXPRESSION);
 525.682 -    }
 525.683 -
 525.684 -    public void testSimpleRemapping4() throws Exception {
 525.685 -        performRemappingTest("package test;\n" +
 525.686 -                             "public class Test {\n" +
 525.687 -                             "    void t1() {\n" +
 525.688 -                             "        int i = 0;\n" +
 525.689 -                             "        |System.err.println(i);|\n" +
 525.690 -                             "    }\n" +
 525.691 -                             "    void t2() {\n" +
 525.692 -                             "        int[] a = {0};\n" +
 525.693 -                             "        |System.err.println(a[0]);|\n" +
 525.694 -                             "    }\n" +
 525.695 -                             "}\n",
 525.696 -                             "i",
 525.697 -                             Options.ALLOW_REMAP_VARIABLE_TO_EXPRESSION);
 525.698 -    }
 525.699 -
 525.700 -    public void testPreventRemapOnExpressions1() throws Exception {
 525.701 -        performRemappingTest("package test;\n" +
 525.702 -                             "public class Test {\n" +
 525.703 -                             "    void t1() {\n" +
 525.704 -                             "        Throwable t = null;\n" +
 525.705 -                             "        |System.err.println(t);|\n" +
 525.706 -                             "    }\n" +
 525.707 -                             "    void t2() {\n" +
 525.708 -                             "        Throwable t = null;\n" +
 525.709 -                             "        |System.err.println(t.getCause());|\n" +
 525.710 -                             "    }\n" +
 525.711 -                             "}\n",
 525.712 -                             "t",
 525.713 -                             Options.ALLOW_REMAP_VARIABLE_TO_EXPRESSION);
 525.714 -    }
 525.715 -
 525.716 -    public void testPreventRemapOnExpressions2() throws Exception {
 525.717 -        performRemappingTest("package test;\n" +
 525.718 -                             "public class Test {\n" +
 525.719 -                             "    void t1() {\n" +
 525.720 -                             "        Throwable t = null;\n" +
 525.721 -                             "        |System.err.println(t);|\n" +
 525.722 -                             "    }\n" +
 525.723 -                             "    void t2() {\n" +
 525.724 -                             "        Throwable t = null;\n" +
 525.725 -                             "        System.err.println(t.getCause());\n" +
 525.726 -                             "    }\n" +
 525.727 -                             "}\n",
 525.728 -                             "t");
 525.729 -    }
 525.730 -
 525.731 -    public void testVariableMemberSelect() throws Exception {
 525.732 -        performVariablesTest("package test; public class Test {public void test(String str) { str.length(); str.length(); } public void test1(String str) { str.length(); str.isEmpty(); } }",
 525.733 -                             "{ $str.$method(); $str.$method(); }",
 525.734 -                             new Pair[0],
 525.735 -                             new Pair[] {new Pair<String, String>("$method", "length")});
 525.736 -    }
 525.737 -
 525.738 -    public void testCorrectSite1() throws Exception {
 525.739 -        performVariablesTest("package test; public class Test { public void test(Object o) { o.wait(); } }",
 525.740 -                             "$s{java.util.concurrent.locks.Condition}.wait()",
 525.741 -                             new Pair[0],
 525.742 -                             new Pair[0],
 525.743 -                             new Pair[0],
 525.744 -                             true);
 525.745 -    }
 525.746 -
 525.747 -    public void testCorrectSite2() throws Exception {
 525.748 -        performVariablesTest("package test; public class Test { public void test(Object o) { wait(); } }",
 525.749 -                             "$s{java.util.concurrent.locks.Condition}.wait()",
 525.750 -                             new Pair[0],
 525.751 -                             new Pair[0],
 525.752 -                             new Pair[0],
 525.753 -                             true);
 525.754 -    }
 525.755 -
 525.756 -    public void testCorrectSite3() throws Exception {
 525.757 -        performVariablesTest("package test; public abstract class Test implements java.util.concurrent.locks.Condition { public void test() { new Runnable() { public void run() { wait(); } } } }",
 525.758 -                             "$0{java.util.concurrent.locks.Condition}.wait()",
 525.759 -                             new Pair[0],// {new Pair<String, int[]>("$s", new int[] {-1, -1})},
 525.760 -                             new Pair[0],
 525.761 -                             new Pair[0]);
 525.762 -    }
 525.763 -
 525.764 -    public void testCorrectSite4() throws Exception {
 525.765 -        performVariablesTest("package test; public class Test { public void test() { foo.stop(); } }",
 525.766 -                             "$0{java.lang.Thread}.stop()",
 525.767 -                             new Pair[0],
 525.768 -                             new Pair[0],
 525.769 -                             new Pair[0],
 525.770 -                             true);
 525.771 -    }
 525.772 -
 525.773 -    public void testDotClassForSameClass() throws Exception {
 525.774 -        performTest("package test; public class Test { {Class c = |Test.class|; c = |Test.class|; c = String.class; } }");
 525.775 -    }
 525.776 -
 525.777 -    public void testTryCatchVariable() throws Exception {
 525.778 -        performVariablesTest("package test; public class Test { { try { throw new java.io.IOException(); } catch (java.io.IOException ex) { } } }",
 525.779 -                             "try { $stmts$; } catch $catches$",
 525.780 -                             new Pair[] {
 525.781 -                             },
 525.782 -                             new Pair[] {
 525.783 -                                new Pair<String, int[]>("$stmts$", new int[] {42, 74}),
 525.784 -                                new Pair<String, int[]>("$catches$", new int[] {77, 111}),
 525.785 -                             },
 525.786 -                             new Pair[] {
 525.787 -                             },
 525.788 -                             false,
 525.789 -                             true);
 525.790 -    }
 525.791 -
 525.792 -    public void testMatchInterfaceNoFQN() throws Exception {
 525.793 -        performTest("package test; import java.util.*; public class Test { public void test() { |List| l1; |java.util.List| l2;} }");
 525.794 -    }
 525.795 -
 525.796 -    public void testUnresolvableNonMatchingConstraint() throws Exception {
 525.797 -        performVariablesTest("package test; public class Test { private Object a; {System.err.println(a);} }",
 525.798 -                             "System.err.println($v{does.not.Exist}",
 525.799 -                             new Pair[0],
 525.800 -                             new Pair[0],
 525.801 -                             new Pair[0],
 525.802 -                             true);
 525.803 -    }
 525.804 -
 525.805 -    public void testIndexOutOfBoundsInMultiList() throws Exception {
 525.806 -        performVariablesTest("package test;" +
 525.807 -                             "public class Test {" +
 525.808 -                             "    public void test() {" +
 525.809 -                             "        int i = 0;" +
 525.810 -                             "        int j = 0;" +
 525.811 -                             "        i++;" +
 525.812 -                             "        j++;" +
 525.813 -                             "    }" +
 525.814 -                             "}",
 525.815 -                             "{$type $i = $init; $stms$; $i++;}",
 525.816 -                             new Pair[0],
 525.817 -                             new Pair[0],
 525.818 -                             new Pair[0],
 525.819 -                             true,
 525.820 -                             false);
 525.821 -    }
 525.822 -
 525.823 -    public void testCorrectSite192812() throws Exception {
 525.824 -        performVariablesTest("package test; public class Test { private int i; public void test(Test t) { t.i = i - 10; } }",
 525.825 -                             "$t = $t - $v",
 525.826 -                             new Pair[0],
 525.827 -                             new Pair[0],
 525.828 -                             new Pair[0],
 525.829 -                             true,
 525.830 -                             true);
 525.831 -    }
 525.832 -
 525.833 -    public void testCorrectSite183367() throws Exception {
 525.834 -        performVariablesTest("package test; public class Test { public void test(java.util.List l) { l.subList(0, 0).remove(0); } }",
 525.835 -                             "$l{java.util.Collection}.remove($o{java.lang.Object})",
 525.836 -                             new Pair[0],
 525.837 -                             new Pair[0],
 525.838 -                             new Pair[0],
 525.839 -                             true,
 525.840 -                             true);
 525.841 -    }
 525.842 -
 525.843 -    public void testDisableVariablesWhenVerifyingDuplicates1() throws Exception {
 525.844 -        performVariablesTest("package test; public class Test { public void test() { int $i = 1, $j = 2; int k = $i + $i; } }",
 525.845 -                             "$i + $i",
 525.846 -                             new Pair[] {new Pair<String, int[]>("$i", new int[] {83, 85})},
 525.847 -                             new Pair[0],
 525.848 -                             new Pair[0],
 525.849 -                             false,
 525.850 -                             true);
 525.851 -    }
 525.852 -
 525.853 -    public void testDisableVariablesWhenVerifyingDuplicates2() throws Exception {
 525.854 -        performVariablesTest("package test; public class Test { public void test() { int $i = 1, $j = 2; int k = $i + $i; } }",
 525.855 -                             "$i + $i",
 525.856 -                             new Pair[] {new Pair<String, int[]>("$i", new int[] {83, 85})},
 525.857 -                             new Pair[0],
 525.858 -                             new Pair[0],
 525.859 -                             false,
 525.860 -                             false);
 525.861 -    }
 525.862 -
 525.863 -    public void testMethodMatchingMoreParams() throws Exception {
 525.864 -        performVariablesTest("package test; public class Test {public void test(String s1, String s2) { } }",
 525.865 -                             "public void test($params$) { }",
 525.866 -                             new Pair[0],
 525.867 -                             new Pair[] {new Pair<String, int[]>("$params$", new int[] {50, 59, 61, 70})},
 525.868 -                             new Pair[0],
 525.869 -                             false,
 525.870 -                             true);
 525.871 -    }
 525.872 -
 525.873 -    public void testLambdaInput1() throws Exception {
 525.874 -        performVariablesTest("package test; public class Test {public void test() { new java.io.FilenameFilter() { public boolean accept(File dir, String name) { } }; } }",
 525.875 -                             "new $type() {public $retType $name($params$) { $body$; } }",
 525.876 -                             new Pair[0],
 525.877 -                             new Pair[] {new Pair<String, int[]>("$params$", new int[] { 107, 115, 117, 128 })},
 525.878 -                             new Pair[] {new Pair<String, String>("$name", "accept")},
 525.879 -                             false,
 525.880 -                             false);
 525.881 -    }
 525.882 -
 525.883 -    public void testLambdaInput2() throws Exception {
 525.884 -        performVariablesTest("package test; public class Test {public void test() { new java.io.FilenameFilter() { public boolean accept(File dir, String name) { } }; } }",
 525.885 -                             "new $type() { $mods$ $retType $name($params$) { $body$; } }",
 525.886 -                             new Pair[0],
 525.887 -                             new Pair[] {new Pair<String, int[]>("$params$", new int[] { 107, 115, 117, 128 })},
 525.888 -                             new Pair[] {new Pair<String, String>("$name", "accept")},
 525.889 -                             false,
 525.890 -                             true);
 525.891 -    }
 525.892 -
 525.893 -    public void testSwitch1() throws Exception {
 525.894 -        performVariablesTest("package test;\n" +
 525.895 -                             "public class Test {\n" +
 525.896 -                             "     {\n" +
 525.897 -                             "         E e = null;\n" +
 525.898 -                             "         switch (e) {\n" +
 525.899 -                             "             case A: System.err.println(1); break;\n" +
 525.900 -                             "             case D: System.err.println(2); break;\n" +
 525.901 -                             "             case E: System.err.println(3); break;\n" +
 525.902 -                             "         }\n" +
 525.903 -                             "     }\n" +
 525.904 -                             "     public enum E {A, B, C, D, E, F;}\n" +
 525.905 -                             "}\n",
 525.906 -                             "switch ($0{test.Test.E}) { case $c1$ case D: $stmts$; case $c2$ }",
 525.907 -                             new Pair[] {new Pair<String, int[]>("$0", new int[] {79, 80})},
 525.908 -                             new Pair[] {
 525.909 -                                new Pair<String, int[]>("$stmts$", new int[] { 156, 178, 179, 185 }),
 525.910 -                                new Pair<String, int[]>("$c1$", new int[] { 97, 134 }),
 525.911 -                                new Pair<String, int[]>("$c2$", new int[] { 199, 236 }),
 525.912 -                             },
 525.913 -                             new Pair[0],
 525.914 -                             false,
 525.915 -                             false);
 525.916 -    }
 525.917 -
 525.918 -    public void testWildcard1() throws Exception {
 525.919 -        performTest("package test; import java.util.*; public class Test { public void test() { |List<?>| l1; |List<?>| l2;} }");
 525.920 -    }
 525.921 -
 525.922 -    public void testWildcard2() throws Exception {
 525.923 -        performTest("package test; import java.util.*; public class Test { public void test() { |List<? extends String>| l1; |List<? extends String>| l2;} }");
 525.924 -    }
 525.925 -
 525.926 -    public void testWildcard3() throws Exception {
 525.927 -        performTest("package test; import java.util.*; public class Test { public void test() { |List<? super String>| l1; |List<? super String>| l2;} }");
 525.928 -    }
 525.929 -
 525.930 -    public void testSingleVariableStrict() throws Exception {
 525.931 -        performVariablesTest("package test; public class Test { public void test() { if (true) System.err.println(1); } }",
 525.932 -                             "if ($c) $then; else $else;",
 525.933 -                             new Pair[0],
 525.934 -                             new Pair[0],
 525.935 -                             new Pair[0],
 525.936 -                             true,
 525.937 -                             true);
 525.938 -    }
 525.939 -
 525.940 -    public void testMultiVariableZeroOrOne1() throws Exception {
 525.941 -        performVariablesTest("package test; public class Test { public void test() { if (true) System.err.println(1); } }",
 525.942 -                             "if ($c) $then; else $else$;",
 525.943 -                             new Pair[] {new Pair<String, int[]>("$c", new int[] {59, 63}),
 525.944 -                                         new Pair<String, int[]>("$then", new int[] {65, 87})},
 525.945 -                             new Pair[0],
 525.946 -                             new Pair[0],
 525.947 -                             false,
 525.948 -                             true);
 525.949 -    }
 525.950 -
 525.951 -    public void testMultiVariableZeroOrOne2() throws Exception {
 525.952 -        performVariablesTest("package test; public class Test { public void test() { if (true) System.err.println(1); else System.err.println(2); } }",
 525.953 -                             "if ($c) $then; else $else$;",
 525.954 -                             new Pair[] {new Pair<String, int[]>("$c", new int[] {59, 63}),
 525.955 -                                         new Pair<String, int[]>("$then", new int[] {65, 87}),
 525.956 -                                         new Pair<String, int[]>("$else$", new int[] {93, 115})},
 525.957 -                             new Pair[0],
 525.958 -                             new Pair[0],
 525.959 -                             false,
 525.960 -                             true);
 525.961 -    }
 525.962 -
 525.963 -    public void testNonResolvableType() throws Exception {
 525.964 -        performVariablesTest("package test; public class Test { { java.io.File f = null; boolean b = f.isDirectory(); } }",
 525.965 -                             "$1{can.not.Resolve}.$m($args$)",
 525.966 -                             new Pair[0],
 525.967 -                             new Pair[0],
 525.968 -                             new Pair[0],
 525.969 -                             true,
 525.970 -                             true);
 525.971 -    }
 525.972 -
 525.973 -    public void testTryWithResources() throws Exception {
 525.974 -        performVariablesTest("package test; public class Test { { try (java.io.InputStream in = null) { System.err.println(1); } } }",
 525.975 -                             "try ($resources$) {$body$;}",
 525.976 -                             new Pair[] {
 525.977 -                             },
 525.978 -                             new Pair[] {
 525.979 -                                new Pair<String, int[]>("$resources$", new int[] {41, 70}),
 525.980 -                                new Pair<String, int[]>("$body$", new int[] {74, 96}),
 525.981 -                             },
 525.982 -                             new Pair[] {
 525.983 -                             },
 525.984 -                             false,
 525.985 -                             true);
 525.986 -    }
 525.987 -
 525.988 -    public void testIgnoreOtherKind() throws Exception {
 525.989 -        performVariablesTest("package test; public class Test { private java.util.Collection<String> x() { return java.util.Collections.emptySet(); } } }",
 525.990 -                             "$i{java.lang.Class}",
 525.991 -                             new Pair[] {
 525.992 -                             },
 525.993 -                             new Pair[] {
 525.994 -                             },
 525.995 -                             new Pair[] {
 525.996 -                             },
 525.997 -                             true,
 525.998 -                             true);
 525.999 -    }
525.1000 -
525.1001 -    public void testSearchPackageClause() throws Exception {
525.1002 -        performVariablesTest("package test.a; public class Test { }",
525.1003 -                             "test.$1",
525.1004 -                             new Pair[] {
525.1005 -                             },
525.1006 -                             new Pair[] {
525.1007 -                             },
525.1008 -                             new Pair[] {
525.1009 -                                 new Pair<String, String>("$1", "a"),
525.1010 -                             },
525.1011 -                             false,
525.1012 -                             true);
525.1013 -    }
525.1014 -
525.1015 -    public void testPackageImport() throws Exception {
525.1016 -        performVariablesTest("package test; import java.util.*; public class Test { }",
525.1017 -                             "java.$1",
525.1018 -                             new Pair[] {
525.1019 -                             },
525.1020 -                             new Pair[] {
525.1021 -                             },
525.1022 -                             new Pair[] {
525.1023 -                                 new Pair<String, String>("$1", "util"),
525.1024 -                             },
525.1025 -                             false,
525.1026 -                             true);
525.1027 -    }
525.1028 -    
525.1029 -    public void testSubclassMatching() throws Exception {
525.1030 -        performVariablesTest("package test; import java.util.*; public abstract class Test { Map.Entry e; }",
525.1031 -                             "java.util.Map.$1",
525.1032 -                             new Pair[] {
525.1033 -                             },
525.1034 -                             new Pair[] {
525.1035 -                             },
525.1036 -                             new Pair[] {
525.1037 -                                 new Pair<String, String>("$1", "Entry"),
525.1038 -                             },
525.1039 -                             false,
525.1040 -                             true);
525.1041 -    }
525.1042 -    
525.1043 -    public void testMethodTypeParameters1() throws Exception {
525.1044 -        performVariablesTest("package test; public class Test { private void t() { } }",
525.1045 -                             "$mods$ <$tp$> $ret $name($args$) { $body$; }",
525.1046 -                             new Pair[] {
525.1047 -                                new Pair<String, int[]>("$ret", new int[] {42, 46}),
525.1048 -                                new Pair<String, int[]>("$mods$", new int[] {34, 41}),
525.1049 -                             },
525.1050 -                             new Pair[] {
525.1051 -                                new Pair<String, int[]>("$tp$", new int[] {}),
525.1052 -                                new Pair<String, int[]>("$args$", new int[] {}),
525.1053 -                                new Pair<String, int[]>("$body$", new int[] {}),
525.1054 -                             },
525.1055 -                             new Pair[] {
525.1056 -                                 new Pair<String, String>("$name", "t")
525.1057 -                             },
525.1058 -                             false,
525.1059 -                             false);
525.1060 -    }
525.1061 -    
525.1062 -    public void testMethodTypeParameters2() throws Exception {
525.1063 -        performVariablesTest("package test; public class Test { private <A, B> String aa(int a, int b) { a = b; b = a;} }",
525.1064 -                             "$mods$ <$tp$> $ret $name($args$) { $body$; }",
525.1065 -                             new Pair[] {
525.1066 -                                new Pair<String, int[]>("$ret", new int[] {49, 55}),
525.1067 -                                new Pair<String, int[]>("$mods$", new int[] {34, 41}),
525.1068 -                             },
525.1069 -                             new Pair[] {
525.1070 -                                new Pair<String, int[]>("$tp$", new int[] {43, 44, 46, 47}),
525.1071 -                                new Pair<String, int[]>("$args$", new int[] {59, 64, 66, 71}),
525.1072 -                                new Pair<String, int[]>("$body$", new int[] {75, 81, 82, 88}),
525.1073 -                             },
525.1074 -                             new Pair[] {
525.1075 -                                 new Pair<String, String>("$name", "aa")
525.1076 -                             },
525.1077 -                             false,
525.1078 -                             true);
525.1079 -    }
525.1080 -    
525.1081 -    public void testMethodTypeParameters3() throws Exception {
525.1082 -        performVariablesTest("package test; public class Test { private <A> String aa(int a, int b) { a = b; b = a;} }",
525.1083 -                             "$mods$ <$tp> $ret $name($args$) { $body$; }",
525.1084 -                             new Pair[] {
525.1085 -                                new Pair<String, int[]>("$ret", new int[] {46, 52}),
525.1086 -                                new Pair<String, int[]>("$mods$", new int[] {34, 41}),
525.1087 -                                new Pair<String, int[]>("$tp", new int[] {43, 44}),
525.1088 -                             },
525.1089 -                             new Pair[] {
525.1090 -                                new Pair<String, int[]>("$args$", new int[] {56, 61, 63, 68}),
525.1091 -                                new Pair<String, int[]>("$body$", new int[] {72, 78, 79, 85}),
525.1092 -                             },
525.1093 -                             new Pair[] {
525.1094 -                                 new Pair<String, String>("$name", "aa")
525.1095 -                             },
525.1096 -                             false,
525.1097 -                             true);
525.1098 -    }
525.1099 -    
525.1100 -    public void testTypeParameters1() throws Exception {
525.1101 -        performVariablesTest("package test; public class Test { private <A extends String> void aa() { } }",
525.1102 -                             "$mods$ <$tp extends $bound&$obounds$> $ret $name($args$) { $body$; }",
525.1103 -                             new Pair[] {
525.1104 -                                new Pair<String, int[]>("$ret", new int[] {61, 65}),
525.1105 -                                new Pair<String, int[]>("$mods$", new int[] {34, 41}),
525.1106 -                                new Pair<String, int[]>("$tp", new int[] {43, 59}),
525.1107 -                                new Pair<String, int[]>("$bound", new int[] {53, 59}),
525.1108 -                             },
525.1109 -                             new Pair[] {
525.1110 -                                new Pair<String, int[]>("$obounds$", new int[] {}),
525.1111 -                             },
525.1112 -                             new Pair[] {
525.1113 -                                 new Pair<String, String>("$name", "aa"),
525.1114 -                                 new Pair<String, String>("$tp", "A")
525.1115 -                             },
525.1116 -                             false,
525.1117 -                             true);
525.1118 -    }
525.1119 -    
525.1120 -    public void testPartialModifiers1() throws Exception {
525.1121 -        performVariablesTest("package test; public class Test { @Deprecated @Override private void aa() { } }",
525.1122 -                             "$mods$ @Deprecated private $ret $name() { $body$; }",
525.1123 -                             new Pair[] {
525.1124 -                                new Pair<String, int[]>("$ret", new int[] {64, 68}),
525.1125 -                                new Pair<String, int[]>("$mods$", new int[] {34, 63}),
525.1126 -                             },
525.1127 -                             new Pair[] {
525.1128 -                             },
525.1129 -                             new Pair[] {
525.1130 -                                 new Pair<String, String>("$name", "aa"),
525.1131 -                             },
525.1132 -                             false,
525.1133 -                             true);
525.1134 -    }
525.1135 -    
525.1136 -    public void testPartialModifiers2() throws Exception {
525.1137 -        performVariablesTest("package test; public class Test { @Override private void aa() { } }",
525.1138 -                             "$mods$ @Deprecated private $ret $name() { $body$; }",
525.1139 -                             new Pair[0],
525.1140 -                             new Pair[0],
525.1141 -                             new Pair[0],
525.1142 -                             true,
525.1143 -                             true);
525.1144 -    }
525.1145 -    
525.1146 -    public void testNonStaticInnerClassesMatch() throws Exception {
525.1147 -        performVariablesTest("package test; import test.Test.Inner; public class Test { public class Inner { } } class Other { { Inner i = null; } }",
525.1148 -                             "test.Test.Inner $i = $init$;",
525.1149 -                             new Pair[] {
525.1150 -                                 new Pair<String, int[]>("$i", new int[] {99, 114}),
525.1151 -                                 new Pair<String, int[]>("$init$", new int[] {109, 113})
525.1152 -                             },
525.1153 -                             new Pair[0],
525.1154 -                             new Pair[] {
525.1155 -                                 new Pair<String, String>("$i", "i")
525.1156 -                             },
525.1157 -                             false,
525.1158 -                             true);
525.1159 -    }
525.1160 -    
525.1161 -    public void testNewClassTypeParams222066a() throws Exception {
525.1162 -        performVariablesTest("package test; public class Test { private Object aa() { return new java.util.ArrayList(1); } }",
525.1163 -                             "new java.util.ArrayList<$whatever$>($param)",
525.1164 -                             new Pair[] {
525.1165 -                                 new Pair<String, int[]>("$param", new int[] {87, 88})
525.1166 -                             },
525.1167 -                             new Pair[] {
525.1168 -                                 new Pair<String, int[]>("$whatever$", new int[0])
525.1169 -                             },
525.1170 -                             new Pair[0],
525.1171 -                             false,
525.1172 -                             false);
525.1173 -    }
525.1174 -    
525.1175 -    public void testNewClassTypeParams222066b() throws Exception {
525.1176 -        performVariablesTest("package test; import java.util.ArrayList; public class Test { private Object aa() { return new ArrayList(1); } }",
525.1177 -                             "new java.util.ArrayList<$whatever$>($param)",
525.1178 -                             new Pair[] {
525.1179 -                                 new Pair<String, int[]>("$param", new int[] {105, 106})
525.1180 -                             },
525.1181 -                             new Pair[] {
525.1182 -                                 new Pair<String, int[]>("$whatever$", new int[0])
525.1183 -                             },
525.1184 -                             new Pair[0],
525.1185 -                             false,
525.1186 -                             false);
525.1187 -    }
525.1188 -    
525.1189 -    public void testFindLambda() throws Exception {
525.1190 -        performVariablesTest("package test; import java.util.Comparator; public class Test { private void aa() { Comparator<String> c = (l, r) -> l.compareTo(r); } }",
525.1191 -                             "($args$) -> $expression",
525.1192 -                             new Pair[] {
525.1193 -                                 new Pair<String, int[]>("$expression", new int[] {116, 130})
525.1194 -                             },
525.1195 -                             new Pair[] {
525.1196 -                                 new Pair<String, int[]>("$args$", new int[] {107, 108, 110, 111})
525.1197 -                             },
525.1198 -                             new Pair[0],
525.1199 -                             false,
525.1200 -                             false);
525.1201 -    }
525.1202 -    
525.1203 -    public void testAnnotation1() throws Exception {
525.1204 -        performVariablesTest("package test; import test.Test.A; @A(i=1) public class Test { @interface A { public int i(); } }",
525.1205 -                             "@$annotation($args$)",
525.1206 -                             new Pair[] {
525.1207 -                                 new Pair<String, int[]>("$annotation", new int[] {35, 36})
525.1208 -                             },
525.1209 -                             new Pair[] {
525.1210 -                                 new Pair<String, int[]>("$args$", new int[] {37, 40})
525.1211 -                             },
525.1212 -                             new Pair[0],
525.1213 -                             false,
525.1214 -                             true);
525.1215 -    }
525.1216 -    
525.1217 -    public void testAnnotation2() throws Exception {
525.1218 -        performVariablesTest("package test; import test.Test.A; @A(i=1,b=true,l=2) public class Test { @interface A { public int i(); public boolean b(); public long l(); } }",
525.1219 -                             "@test.Test.A($prefix$, b=$value, $suffix$)",
525.1220 -                             new Pair[] {
525.1221 -                                 new Pair<String, int[]>("$value", new int[] {43, 47})
525.1222 -                             },
525.1223 -                             new Pair[] {
525.1224 -                                 new Pair<String, int[]>("$prefix$", new int[] {37, 40}),
525.1225 -                                 new Pair<String, int[]>("$suffix$", new int[] {48, 51})
525.1226 -                             },
525.1227 -                             new Pair[0],
525.1228 -                             false,
525.1229 -                             false);
525.1230 -    }
525.1231 -    
525.1232 -    protected void prepareTest(String code) throws Exception {
525.1233 -        prepareTest(code, -1);
525.1234 -    }
525.1235 -
525.1236 -    protected void prepareTest(String code, int testIndex) throws Exception {
525.1237 -        File workDirWithIndexFile = testIndex != (-1) ? new File(getWorkDir(), Integer.toString(testIndex)) : getWorkDir();
525.1238 -        FileObject workDirWithIndex = FileUtil.toFileObject(workDirWithIndexFile);
525.1239 -
525.1240 -        if (workDirWithIndex != null) {
525.1241 -            workDirWithIndex.delete();
525.1242 -        }
525.1243 -
525.1244 -        workDirWithIndex = FileUtil.createFolder(workDirWithIndexFile);
525.1245 -
525.1246 -        assertNotNull(workDirWithIndexFile);
525.1247 -
525.1248 -        FileObject sourceRoot = workDirWithIndex.createFolder("src");
525.1249 -        FileObject buildRoot  = workDirWithIndex.createFolder("build");
525.1250 -        FileObject cache = workDirWithIndex.createFolder("cache");
525.1251 -
525.1252 -        FileObject data = FileUtil.createData(sourceRoot, "test/Test.java");
525.1253 -
525.1254 -        TestUtilities.copyStringToFile(data, code);
525.1255 -
525.1256 -        data.refresh();
525.1257 -
525.1258 -        SourceUtilsTestUtil.prepareTest(sourceRoot, buildRoot, cache);
525.1259 -
525.1260 -        DataObject od = DataObject.find(data);
525.1261 -        EditorCookie ec = od.getLookup().lookup(EditorCookie.class);
525.1262 -
525.1263 -        assertNotNull(ec);
525.1264 -
525.1265 -        doc = ec.openDocument();
525.1266 -
525.1267 -        doc.putProperty(Language.class, JavaTokenId.language());
525.1268 -        doc.putProperty("mimeType", "text/x-java");
525.1269 -
525.1270 -        JavaSource js = JavaSource.forFileObject(data);
525.1271 -
525.1272 -        assertNotNull(js);
525.1273 -
525.1274 -        info = SourceUtilsTestUtil.getCompilationInfo(js, Phase.RESOLVED);
525.1275 -
525.1276 -        assertNotNull(info);
525.1277 -    }
525.1278 -
525.1279 -    private static String findRegions(String code, List<int[]> regions) {
525.1280 -        String[] split = code.split("\\|");
525.1281 -        StringBuilder filtered = new StringBuilder();
525.1282 -
525.1283 -        filtered.append(split[0]);
525.1284 -
525.1285 -        int offset = split[0].length();
525.1286 -
525.1287 -        for (int cntr = 1; cntr < split.length; cntr += 2) {
525.1288 -            int[] i = new int[] {
525.1289 -                offset,
525.1290 -                offset + split[cntr].length()
525.1291 -            };
525.1292 -
525.1293 -            regions.add(i);
525.1294 -
525.1295 -            filtered.append(split[cntr]);
525.1296 -            filtered.append(split[cntr + 1]);
525.1297 -
525.1298 -            offset += split[cntr].length();
525.1299 -            offset += split[cntr + 1].length();
525.1300 -        }
525.1301 -
525.1302 -        return filtered.toString();
525.1303 -    }
525.1304 -
525.1305 -    protected CompilationInfo info;
525.1306 -    private Document doc;
525.1307 -
525.1308 -    private void performTest(String code) throws Exception {
525.1309 -        performTest(code, true);
525.1310 -    }
525.1311 -
525.1312 -    private void performTest(String code, boolean verify) throws Exception {
525.1313 -        List<int[]> result = new LinkedList<int[]>();
525.1314 -
525.1315 -        code = findRegions(code, result);
525.1316 -
525.1317 -        int testIndex = 0;
525.1318 -
525.1319 -        for (int[] i : result) {
525.1320 -            int[] duplicates = new int[2 * (result.size() - 1)];
525.1321 -            int cntr = 0;
525.1322 -            List<int[]> l = new LinkedList<int[]>(result);
525.1323 -
525.1324 -            l.remove(i);
525.1325 -
525.1326 -            for (int[] span : l) {
525.1327 -                duplicates[cntr++] = span[0];
525.1328 -                duplicates[cntr++] = span[1];
525.1329 -            }
525.1330 -
525.1331 -            doPerformTest(code, i[0], i[1], testIndex++, verify, duplicates);
525.1332 -        }
525.1333 -    }
525.1334 -
525.1335 -    protected void performTest(String code, int start, int end, int... duplicates) throws Exception {
525.1336 -        doPerformTest(code, start, end, -1, true, duplicates);
525.1337 -    }
525.1338 -
525.1339 -    protected void doPerformTest(String code, int start, int end, int testIndex, int... duplicates) throws Exception {
525.1340 -        doPerformTest(code, start, end, testIndex, true, duplicates);
525.1341 -    }
525.1342 -
525.1343 -    protected void doPerformTest(String code, int start, int end, int testIndex, boolean verify, int... duplicates) throws Exception {
525.1344 -        prepareTest(code, testIndex);
525.1345 -
525.1346 -        TreePath path = info.getTreeUtilities().pathFor((start + end) / 2 + 1);
525.1347 -
525.1348 -        while (path != null) {
525.1349 -            Tree t = path.getLeaf();
525.1350 -            SourcePositions sp = info.getTrees().getSourcePositions();
525.1351 -
525.1352 -            if (   start == sp.getStartPosition(info.getCompilationUnit(), t)
525.1353 -                && end   == sp.getEndPosition(info.getCompilationUnit(), t)) {
525.1354 -                break;
525.1355 -            }
525.1356 -
525.1357 -            path = path.getParentPath();
525.1358 -        }
525.1359 -
525.1360 -        assertNotNull(path);
525.1361 -
525.1362 -        Collection<TreePath> result = computeDuplicates(path);
525.1363 -
525.1364 -        //        assertEquals(f.result.toString(), duplicates.length / 2, f.result.size());
525.1365 -
525.1366 -        if (verify) {
525.1367 -            int[] dupes = new int[result.size() * 2];
525.1368 -            int   index = 0;
525.1369 -
525.1370 -            for (TreePath tp : result) {
525.1371 -                dupes[index++] = (int) info.getTrees().getSourcePositions().getStartPosition(info.getCompilationUnit(), tp.getLeaf());
525.1372 -                dupes[index++] = (int) info.getTrees().getSourcePositions().getEndPosition(info.getCompilationUnit(), tp.getLeaf());
525.1373 -            }
525.1374 -
525.1375 -            assertTrue("Was: " + Arrays.toString(dupes) + " should have been: " + Arrays.toString(duplicates), Arrays.equals(duplicates, dupes));
525.1376 -        }
525.1377 -    }
525.1378 -
525.1379 -    protected void performVariablesTest(String code, String pattern, Pair<String, int[]>[] duplicatesPos, Pair<String, String>[] duplicatesNames) throws Exception {
525.1380 -        performVariablesTest(code, pattern, duplicatesPos, new Pair[0], duplicatesNames);
525.1381 -    }
525.1382 -
525.1383 -    protected void performVariablesTest(String code, String pattern, Pair<String, int[]>[] duplicatesPos, Pair<String, int[]>[] multiStatementPos, Pair<String, String>[] duplicatesNames) throws Exception {
525.1384 -        performVariablesTest(code, pattern, duplicatesPos, multiStatementPos, duplicatesNames, false);
525.1385 -    }
525.1386 -
525.1387 -    protected void performVariablesTest(String code, String pattern, Pair<String, int[]>[] duplicatesPos, Pair<String, int[]>[] multiStatementPos, Pair<String, String>[] duplicatesNames, boolean noOccurrences) throws Exception {
525.1388 -        performVariablesTest(code, pattern, duplicatesPos, multiStatementPos, duplicatesNames, noOccurrences, false);
525.1389 -    }
525.1390 -
525.1391 -    protected void performVariablesTest(String code, String pattern, Pair<String, int[]>[] duplicatesPos, Pair<String, int[]>[] multiStatementPos, Pair<String, String>[] duplicatesNames, boolean noOccurrences, boolean useBulkSearch) throws Exception {
525.1392 -        prepareTest(code, -1);
525.1393 -
525.1394 -        Map<String, TypeMirror> constraints = new HashMap<String, TypeMirror>();
525.1395 -        String patternCode = PatternCompilerUtilities.parseOutTypesFromPattern(info, pattern, constraints);
525.1396 -
525.1397 -        Pattern patternObj = PatternCompiler.compile(info, patternCode, constraints, Collections.<String>emptyList());
525.1398 -        TreePath patternPath = MatchingTestAccessor.getPattern(patternObj).iterator().next();
525.1399 -        Map<TreePath, VariableAssignments> result;
525.1400 -
525.1401 -        if (useBulkSearch) {
525.1402 -            result = new HashMap<TreePath, VariableAssignments>();
525.1403 -
525.1404 -            BulkPattern bulkPattern = BulkSearch.getDefault().create(info, new AtomicBoolean(), patternCode);
525.1405 -
525.1406 -            for (Entry<String, Collection<TreePath>> e : BulkSearch.getDefault().match(info, new AtomicBoolean(), new TreePath(info.getCompilationUnit()), bulkPattern).entrySet()) {
525.1407 -                for (TreePath tp : e.getValue()) {
525.1408 -                    VariableAssignments vars = computeVariables(info, patternPath, tp, new AtomicBoolean(), MatchingTestAccessor.getVariable2Type(patternObj));
525.1409 -
525.1410 -                    if (vars != null) {
525.1411 -                        result.put(tp, vars);
525.1412 -                    }
525.1413 -                }
525.1414 -            }
525.1415 -        } else {
525.1416 -            result = computeDuplicates(info, patternPath, new TreePath( info.getCompilationUnit()), new AtomicBoolean(), MatchingTestAccessor.getVariable2Type(patternObj));
525.1417 -        }
525.1418 -
525.1419 -        if (noOccurrences) {
525.1420 -            assertEquals(0, result.size());
525.1421 -            return ;
525.1422 -        }
525.1423 -
525.1424 -        assertSame(1, result.size());
525.1425 -
525.1426 -        Map<String, int[]> actual = new HashMap<String, int[]>();
525.1427 -
525.1428 -        for (Entry<String, TreePath> e : result.values().iterator().next().variables.entrySet()) {
525.1429 -            int[] span = new int[] {
525.1430 -                (int) info.getTrees().getSourcePositions().getStartPosition(info.getCompilationUnit(), e.getValue().getLeaf()),
525.1431 -                (int) info.getTrees().getSourcePositions().getEndPosition(info.getCompilationUnit(), e.getValue().getLeaf())
525.1432 -            };
525.1433 -
525.1434 -            actual.put(e.getKey(), span);
525.1435 -        }
525.1436 -
525.1437 -        for (Pair<String, int[]> dup : duplicatesPos) {
525.1438 -            int[] span = actual.remove(dup.getA());
525.1439 -
525.1440 -            if (span == null) {
525.1441 -                fail(dup.getA());
525.1442 -            }
525.1443 -            assertTrue(dup.getA() + ":" + Arrays.toString(span), Arrays.equals(span, dup.getB()));
525.1444 -        }
525.1445 -
525.1446 -        Map<String, int[]> actualMulti = new HashMap<String, int[]>();
525.1447 -
525.1448 -        for (Entry<String, Collection<? extends TreePath>> e : result.values().iterator().next().multiVariables.entrySet()) {
525.1449 -            int[] span = new int[2 * e.getValue().size()];
525.1450 -            int i = 0;
525.1451 -
525.1452 -            for (TreePath tp : e.getValue()) {
525.1453 -                span[i++] = (int) info.getTrees().getSourcePositions().getStartPosition(info.getCompilationUnit(), tp.getLeaf());
525.1454 -                span[i++] = (int) info.getTrees().getSourcePositions().getEndPosition(info.getCompilationUnit(), tp.getLeaf());
525.1455 -            }
525.1456 -
525.1457 -            actualMulti.put(e.getKey(), span);
525.1458 -        }
525.1459 -
525.1460 -        for (Pair<String, int[]> dup : multiStatementPos) {
525.1461 -            int[] span = actualMulti.remove(dup.getA());
525.1462 -
525.1463 -            if (span == null) {
525.1464 -                fail(dup.getA());
525.1465 -            }
525.1466 -            assertTrue(dup.getA() + ":" + Arrays.toString(span), Arrays.equals(span, dup.getB()));
525.1467 -        }
525.1468 -
525.1469 -        Map<String, String> golden = new HashMap<String, String>();
525.1470 -
525.1471 -        for ( Pair<String, String> e : duplicatesNames) {
525.1472 -            golden.put(e.getA(), e.getB());
525.1473 -        }
525.1474 -
525.1475 -        assertEquals(golden, result.values().iterator().next().variables2Names);
525.1476 -    }
525.1477 -
525.1478 -    protected VariableAssignments computeVariables(CompilationInfo info, TreePath searchingFor, TreePath scope, AtomicBoolean cancel, Map<String, TypeMirror> designedTypeHack) {
525.1479 -        Collection<VariableAssignments> values = CopyFinder.internalComputeDuplicates(info, Collections.singletonList(searchingFor), scope, null, null, new AtomicBooleanCancel(cancel), designedTypeHack, Options.ALLOW_VARIABLES_IN_PATTERN).values();
525.1480 -
525.1481 -        if (values.iterator().hasNext()) {
525.1482 -            return values.iterator().next();
525.1483 -        } else {
525.1484 -            return null;
525.1485 -        }
525.1486 -    }
525.1487 -
525.1488 -    protected Map<TreePath, VariableAssignments> computeDuplicates(CompilationInfo info, TreePath searchingFor, TreePath scope, AtomicBoolean cancel, Map<String, TypeMirror> designedTypeHack) {
525.1489 -        return CopyFinder.internalComputeDuplicates(info, Collections.singletonList(searchingFor), scope, null, null, new AtomicBooleanCancel(cancel), designedTypeHack, Options.ALLOW_VARIABLES_IN_PATTERN, Options.ALLOW_GO_DEEPER);
525.1490 -    }
525.1491 -
525.1492 -    private void performRemappingTest(String code, String remappableVariables, Options... options) throws Exception {
525.1493 -        List<int[]> regions = new LinkedList<int[]>();
525.1494 -
525.1495 -        code = findRegions(code, regions);
525.1496 -
525.1497 -        prepareTest(code, -1);
525.1498 -
525.1499 -        int[] statements = new int[2];
525.1500 -
525.1501 -        int[] currentRegion = regions.get(0);
525.1502 -        TreePathHandle tph = IntroduceMethodFix.validateSelectionForIntroduceMethod(info, currentRegion[0], currentRegion[1], statements);
525.1503 -
525.1504 -        assertNotNull(tph);
525.1505 -
525.1506 -        TreePath tp = tph.resolve(info);
525.1507 -
525.1508 -        assertNotNull(tp);
525.1509 -
525.1510 -        BlockTree bt = (BlockTree) tp.getParentPath().getLeaf();
525.1511 -        List<TreePath> searchFor = new LinkedList<TreePath>();
525.1512 -
525.1513 -        for (StatementTree t : bt.getStatements().subList(statements[0], statements[1] + 1)) {
525.1514 -            searchFor.add(new TreePath(tp, t));
525.1515 -        }
525.1516 -
525.1517 -        final Set<VariableElement> vars = new HashSet<VariableElement>();
525.1518 -
525.1519 -        for (final String name : remappableVariables.split(",")) {
525.1520 -            if (name.isEmpty()) continue;
525.1521 -            new TreePathScanner<Object, Object>() {
525.1522 -                @Override
525.1523 -                public Object visitVariable(VariableTree node, Object p) {
525.1524 -                    if (node.getName().contentEquals(name)) {
525.1525 -                        vars.add((VariableElement) info.getTrees().getElement(getCurrentPath()));
525.1526 -                    }
525.1527 -
525.1528 -                    return super.visitVariable(node, p);
525.1529 -                }
525.1530 -            }.scan(info.getCompilationUnit(), null);
525.1531 -        }
525.1532 -
525.1533 -        Set<Options> opts = EnumSet.of(Options.ALLOW_GO_DEEPER);
525.1534 -
525.1535 -        opts.addAll(Arrays.asList(options));
525.1536 -
525.1537 -        Map<TreePath, VariableAssignments> result = CopyFinder.internalComputeDuplicates(info, searchFor, new TreePath(info.getCompilationUnit()), null, vars, new AtomicBooleanCancel(), Collections.<String, TypeMirror>emptyMap(), opts.toArray(new Options[0]));
525.1538 -        Set<List<Integer>> realSpans = new HashSet<List<Integer>>();
525.1539 -
525.1540 -        for (Entry<TreePath, VariableAssignments> e : result.entrySet()) {
525.1541 -            List<? extends StatementTree> parentStatements = CopyFinder.getStatements(e.getKey());
525.1542 -            int dupeStart = parentStatements.indexOf(e.getKey().getLeaf());
525.1543 -            int startPos = (int) info.getTrees().getSourcePositions().getStartPosition(info.getCompilationUnit(), parentStatements.get(dupeStart));
525.1544 -            int endPos = (int) info.getTrees().getSourcePositions().getEndPosition(info.getCompilationUnit(), parentStatements.get(dupeStart + searchFor.size() - 1));
525.1545 -
525.1546 -            realSpans.add(Arrays.asList(startPos, endPos));
525.1547 -        }
525.1548 -
525.1549 -        Set<List<Integer>> goldenSpans = new HashSet<List<Integer>>();
525.1550 -
525.1551 -        for (int[] region : regions) {
525.1552 -            if (region == currentRegion) continue;
525.1553 -
525.1554 -            int[] stmts = new int[2];
525.1555 -            TreePathHandle gtph = IntroduceMethodFix.validateSelectionForIntroduceMethod(info, region[0], region[1], stmts);
525.1556 -
525.1557 -            assertNotNull(gtph);
525.1558 -
525.1559 -            TreePath gtp = gtph.resolve(info);
525.1560 -
525.1561 -            assertNotNull(gtp);
525.1562 -
525.1563 -            BlockTree b = (BlockTree) gtp.getParentPath().getLeaf();
525.1564 -
525.1565 -            int startPos = (int) info.getTrees().getSourcePositions().getStartPosition(info.getCompilationUnit(), b.getStatements().get(stmts[0]));
525.1566 -            int endPos = (int) info.getTrees().getSourcePositions().getEndPosition(info.getCompilationUnit(), b.getStatements().get(stmts[1]));
525.1567 -
525.1568 -            goldenSpans.add(Arrays.asList(startPos, endPos));
525.1569 -        }
525.1570 -
525.1571 -        assertEquals(goldenSpans, realSpans);
525.1572 -    }
525.1573 -
525.1574 -    protected Collection<TreePath> computeDuplicates(TreePath path) {
525.1575 -        return CopyFinder.internalComputeDuplicates(info, Collections.singletonList(path), new TreePath(info.getCompilationUnit()), null, null, new AtomicBooleanCancel(), null, Options.ALLOW_GO_DEEPER).keySet();
525.1576 -    }
525.1577 -
525.1578 -    public static final class Pair<A, B> {
525.1579 -        private final A a;
525.1580 -        private final B b;
525.1581 -
525.1582 -        public Pair(A a, B b) {
525.1583 -            this.a = a;
525.1584 -            this.b = b;
525.1585 -        }
525.1586 -
525.1587 -        public A getA() {
525.1588 -            return a;
525.1589 -        }
525.1590 -
525.1591 -        public B getB() {
525.1592 -            return b;
525.1593 -        }
525.1594 -
525.1595 -    }
525.1596 -
525.1597 -    private static final class AtomicBooleanCancel implements Cancel {
525.1598 -
525.1599 -        private final AtomicBoolean cancel;
525.1600 -
525.1601 -        public AtomicBooleanCancel() {
525.1602 -            this(new AtomicBoolean());
525.1603 -        }
525.1604 -
525.1605 -        public AtomicBooleanCancel(AtomicBoolean cancel) {
525.1606 -            this.cancel = cancel;
525.1607 -        }
525.1608 -
525.1609 -        @Override
525.1610 -        public boolean isCancelled() {
525.1611 -            return cancel.get();
525.1612 -        }
525.1613 -
525.1614 -    }
525.1615 -}
   526.1 --- a/sandbox/java.hints/spi.java.hints/test/unit/src/org/netbeans/spi/java/hints/support/FixFactoryTest.java	Mon Dec 19 11:37:36 2016 +0100
   526.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   526.3 @@ -1,79 +0,0 @@
   526.4 -/*
   526.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   526.6 - *
   526.7 - * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
   526.8 - *
   526.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  526.10 - * Other names may be trademarks of their respective owners.
  526.11 - *
  526.12 - * The contents of this file are subject to the terms of either the GNU
  526.13 - * General Public License Version 2 only ("GPL") or the Common
  526.14 - * Development and Distribution License("CDDL") (collectively, the
  526.15 - * "License"). You may not use this file except in compliance with the
  526.16 - * License. You can obtain a copy of the License at
  526.17 - * http://www.netbeans.org/cddl-gplv2.html
  526.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  526.19 - * specific language governing permissions and limitations under the
  526.20 - * License.  When distributing the software, include this License Header
  526.21 - * Notice in each file and include the License file at
  526.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  526.23 - * particular file as subject to the "Classpath" exception as provided
  526.24 - * by Oracle in the GPL Version 2 section of the License file that
  526.25 - * accompanied this code. If applicable, add the following below the
  526.26 - * License Header, with the fields enclosed by brackets [] replaced by
  526.27 - * your own identifying information:
  526.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  526.29 - *
  526.30 - * If you wish your version of this file to be governed by only the CDDL
  526.31 - * or only the GPL Version 2, indicate your decision by adding
  526.32 - * "[Contributor] elects to include this software in this distribution
  526.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  526.34 - * single choice of license, a recipient has the option to distribute
  526.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  526.36 - * to extend the choice of license to its licensees as provided above.
  526.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  526.38 - * Version 2 license, then the option applies only if the new code is
  526.39 - * made subject to such option by the copyright holder.
  526.40 - *
  526.41 - * Contributor(s):
  526.42 - *
  526.43 - * Portions Copyrighted 2013 Sun Microsystems, Inc.
  526.44 - */
  526.45 -package org.netbeans.spi.java.hints.support;
  526.46 -
  526.47 -import com.sun.source.tree.ClassTree;
  526.48 -import com.sun.source.util.TreePath;
  526.49 -import java.util.EnumSet;
  526.50 -import javax.lang.model.element.Modifier;
  526.51 -import org.netbeans.api.java.source.SourceUtilsTestUtil;
  526.52 -import org.netbeans.modules.java.hints.spiimpl.TestBase;
  526.53 -import org.openide.LifecycleManager;
  526.54 -
  526.55 -/**
  526.56 - *
  526.57 - * @author lahvac
  526.58 - */
  526.59 -public class FixFactoryTest extends TestBase {
  526.60 -    
  526.61 -    public FixFactoryTest(String name) {
  526.62 -        super(name);
  526.63 -    }
  526.64 -
  526.65 -    @Override
  526.66 -    protected void setUp() throws Exception {
  526.67 -        super.setUp();
  526.68 -        SourceUtilsTestUtil.makeScratchDir(this);
  526.69 -    }
  526.70 -    
  526.71 -    public void testInterfaceModifiers() throws Exception {
  526.72 -        prepareTest("test/Test.java", "package test; public interface I { }");
  526.73 -        
  526.74 -        ClassTree i = (ClassTree) info.getCompilationUnit().getTypeDecls().get(0);
  526.75 -        
  526.76 -        FixFactory.removeModifiersFix(info, TreePath.getPath(info.getCompilationUnit(), i.getModifiers()), EnumSet.of(Modifier.PUBLIC), "").implement();
  526.77 -        
  526.78 -        LifecycleManager.getDefault().saveAll();
  526.79 -        
  526.80 -        assertEquals("package test; interface I { }", info.getFileObject().asText());
  526.81 -    }
  526.82 -}
  526.83 \ No newline at end of file
   527.1 --- a/sandbox/nb-scripts/jackpot-to-nb	Mon Dec 19 11:37:36 2016 +0100
   527.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   527.3 @@ -1,5 +0,0 @@
   527.4 -#!/bin/bash
   527.5 -
   527.6 -. nb-jackpot-lib
   527.7 -
   527.8 -convert $JACKPOT $NETBEANS
   528.1 --- a/sandbox/nb-scripts/nb-jackpot-lib	Mon Dec 19 11:37:36 2016 +0100
   528.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   528.3 @@ -1,21 +0,0 @@
   528.4 -NETBEANS=1
   528.5 -JACKPOT=2
   528.6 -
   528.7 -function convert() {
   528.8 -    MAPPING=`dirname $0i`/nb-to-jackpot.mapping;
   528.9 -    SCRIPT=/tmp/$$.sed
  528.10 -    rm -rf $SCRIPT
  528.11 -
  528.12 -    for map in `cat $MAPPING`; do
  528.13 -        echo -n "s/" >>$SCRIPT
  528.14 -        FROM_PATH=`echo -n $map | cut -d ':' -f $1`;
  528.15 -        TO_PATH=`echo -n $map | cut -d ':' -f $2`;
  528.16 -        echo -n "$FROM_PATH" | sed -e "s/\//\\\\\//g" >>$SCRIPT
  528.17 -        echo -n "/" >>$SCRIPT
  528.18 -        echo -n "$TO_PATH" | sed -e "s/\//\\\\\//g" >>$SCRIPT
  528.19 -        echo "/g" >>$SCRIPT
  528.20 -    done
  528.21 -
  528.22 -#cat $SCRIPT
  528.23 -sed -f $SCRIPT
  528.24 -}
   529.1 --- a/sandbox/nb-scripts/nb-to-jackpot	Mon Dec 19 11:37:36 2016 +0100
   529.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   529.3 @@ -1,5 +0,0 @@
   529.4 -#!/bin/bash
   529.5 -
   529.6 -. `dirname $0`/nb-jackpot-lib
   529.7 -
   529.8 -convert $NETBEANS $JACKPOT
   530.1 --- a/sandbox/nb-scripts/nb-to-jackpot.mapping	Mon Dec 19 11:37:36 2016 +0100
   530.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   530.3 @@ -1,9 +0,0 @@
   530.4 -java.hints/src/org/netbeans/modules/java/hints/introduce/CopyFinder.java:api/src/org/netbeans/modules/jackpot30/impl/pm/CopyFinder.java
   530.5 -java.hints/test/unit/src/org/netbeans/modules/java/hints/introduce/CopyFinderTest.java:borrowedtests/src/org/netbeans/modules/java/hints/introduce/CopyFinderTest.java
   530.6 -java.hints/src/org/netbeans/modules/java/hints/jackpot/file:file/src/org/netbeans/modules/jackpot30/file
   530.7 -java.hints/src/org/netbeans/modules/java/hints/jackpot/impl:api/src/org/netbeans/modules/jackpot30/impl
   530.8 -java.hints/src/org/netbeans/modules/java/hints/jackpot/spi:api/src/org/netbeans/modules/jackpot30/spi
   530.9 -java.hints/test/unit/src/org/netbeans/modules/java/hints/jackpot/file:file/test/unit/src/org/netbeans/modules/jackpot30/file
  530.10 -java.hints/test/unit/src/org/netbeans/modules/java/hints/jackpot/impl/pm:api/test/unit/src/org/netbeans/modules/jackpot30/impl/pm
  530.11 -java.hints/test/unit/src/org/netbeans/modules/java/hints/jackpot/impl:api/test/unit/src/org/netbeans/modules/jackpot30/impl
  530.12 -java.hints/test/unit/src/org/netbeans/modules/java/hints/jackpot/spi:api/test/unit/src/org/netbeans/modules/jackpot30/spi
   531.1 --- a/sandbox/old-modules/api/build.xml	Mon Dec 19 11:37:36 2016 +0100
   531.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   531.3 @@ -1,23 +0,0 @@
   531.4 -<?xml version="1.0" encoding="UTF-8"?>
   531.5 -<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
   531.6 -<!-- for some information on what you could do (e.g. targets to override). -->
   531.7 -<!-- If you delete this file and reopen the project it will be recreated. -->
   531.8 -<project name="org.netbeans.modules.jackpot30.api" default="netbeans" basedir=".">
   531.9 -    <description>Builds, tests, and runs the project org.netbeans.modules.jackpot30.api.</description>
  531.10 -    <import file="nbproject/build-impl.xml"/>
  531.11 -    <import file="${suite.dir}/findbugs-import.xml"/>
  531.12 -
  531.13 -    <!-- Mac -->
  531.14 -    <pathconvert property="retouche.javac">
  531.15 -        <fileset dir="${nbplatform.active.dir}">
  531.16 -            <filename name="java*/modules/ext/javac*.jar"/>
  531.17 -        </fileset>
  531.18 -        <fileset dir="${java.home}/../Classes" erroronmissingdir="false">
  531.19 -            <include name="*.jar"/>
  531.20 -        </fileset>
  531.21 -    </pathconvert>
  531.22 -    <echo message="${retouche.javac}"/>
  531.23 -    <condition property="bootclasspath.mac" value="${retouche.javac}">
  531.24 -        <os family="mac"/>
  531.25 -    </condition>
  531.26 -</project>
   532.1 --- a/sandbox/old-modules/api/manifest.mf	Mon Dec 19 11:37:36 2016 +0100
   532.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   532.3 @@ -1,7 +0,0 @@
   532.4 -Manifest-Version: 1.0
   532.5 -AutoUpdate-Show-In-Client: false
   532.6 -OpenIDE-Module: org.netbeans.modules.jackpot30.api
   532.7 -OpenIDE-Module-Implementation-Version: 1
   532.8 -OpenIDE-Module-Layer: org/netbeans/modules/jackpot30/impl/resources/layer.xml
   532.9 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jackpot30/impl/resources/Bundle.properties
  532.10 -
   533.1 --- a/sandbox/old-modules/api/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   533.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   533.3 @@ -1,30 +0,0 @@
   533.4 -<?xml version="1.0" encoding="UTF-8"?>
   533.5 -<!--
   533.6 -*** GENERATED FROM project.xml - DO NOT EDIT  ***
   533.7 -***         EDIT ../build.xml INSTEAD         ***
   533.8 --->
   533.9 -<project name="org.netbeans.modules.jackpot30.api-impl" basedir="..">
  533.10 -    <property file="nbproject/private/suite-private.properties"/>
  533.11 -    <property file="nbproject/suite.properties"/>
  533.12 -    <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
  533.13 -    <property file="${suite.dir}/nbproject/private/platform-private.properties"/>
  533.14 -    <property file="${suite.dir}/nbproject/platform.properties"/>
  533.15 -    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
  533.16 -        <attribute name="name"/>
  533.17 -        <attribute name="value"/>
  533.18 -        <sequential>
  533.19 -            <property name="@{name}" value="${@{value}}"/>
  533.20 -        </sequential>
  533.21 -    </macrodef>
  533.22 -    <property file="${user.properties.file}"/>
  533.23 -    <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  533.24 -    <nbmproject2:property name="netbeans.dest.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  533.25 -    <fail message="You must define 'nbplatform.${nbplatform.active}.harness.dir'">
  533.26 -        <condition>
  533.27 -            <not>
  533.28 -                <available file="${harness.dir}" type="dir"/>
  533.29 -            </not>
  533.30 -        </condition>
  533.31 -    </fail>
  533.32 -    <import file="${harness.dir}/build.xml"/>
  533.33 -</project>
   534.1 --- a/sandbox/old-modules/api/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   534.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   534.3 @@ -1,8 +0,0 @@
   534.4 -build.xml.data.CRC32=f9c1509c
   534.5 -build.xml.script.CRC32=0abcaef9
   534.6 -build.xml.stylesheet.CRC32=79c3b980@1.28.0.7
   534.7 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   534.8 -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   534.9 -nbproject/build-impl.xml.data.CRC32=6500fcd0
  534.10 -nbproject/build-impl.xml.script.CRC32=ff50c613
  534.11 -nbproject/build-impl.xml.stylesheet.CRC32=68e521fc@2.70
   535.1 --- a/sandbox/old-modules/api/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   535.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   535.3 @@ -1,3 +0,0 @@
   535.4 -javac.source=1.5
   535.5 -javac.compilerargs=-Xlint -Xlint:-serial
   535.6 -spec.version.base=1.16.0
   536.1 --- a/sandbox/old-modules/api/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   536.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   536.3 @@ -1,437 +0,0 @@
   536.4 -<?xml version="1.0" encoding="UTF-8"?>
   536.5 -<project xmlns="http://www.netbeans.org/ns/project/1">
   536.6 -    <type>org.netbeans.modules.apisupport.project</type>
   536.7 -    <configuration>
   536.8 -        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
   536.9 -            <code-name-base>org.netbeans.modules.jackpot30.api</code-name-base>
  536.10 -            <suite-component/>
  536.11 -            <module-dependencies>
  536.12 -                <dependency>
  536.13 -                    <code-name-base>org.jdesktop.layout</code-name-base>
  536.14 -                    <build-prerequisite/>
  536.15 -                    <compile-dependency/>
  536.16 -                    <run-dependency>
  536.17 -                        <release-version>1</release-version>
  536.18 -                        <specification-version>1.7.0.103</specification-version>
  536.19 -                    </run-dependency>
  536.20 -                </dependency>
  536.21 -                <dependency>
  536.22 -                    <code-name-base>org.netbeans.api.annotations.common</code-name-base>
  536.23 -                    <build-prerequisite/>
  536.24 -                    <compile-dependency/>
  536.25 -                    <run-dependency>
  536.26 -                        <release-version>1</release-version>
  536.27 -                        <specification-version>1.0</specification-version>
  536.28 -                    </run-dependency>
  536.29 -                </dependency>
  536.30 -                <dependency>
  536.31 -                    <code-name-base>org.netbeans.api.java.classpath</code-name-base>
  536.32 -                    <build-prerequisite/>
  536.33 -                    <compile-dependency/>
  536.34 -                    <run-dependency>
  536.35 -                        <release-version>1</release-version>
  536.36 -                        <specification-version>1.19</specification-version>
  536.37 -                    </run-dependency>
  536.38 -                </dependency>
  536.39 -                <dependency>
  536.40 -                    <code-name-base>org.netbeans.api.progress</code-name-base>
  536.41 -                    <build-prerequisite/>
  536.42 -                    <compile-dependency/>
  536.43 -                    <run-dependency>
  536.44 -                        <release-version>1</release-version>
  536.45 -                        <specification-version>1.13.0.1</specification-version>
  536.46 -                    </run-dependency>
  536.47 -                </dependency>
  536.48 -                <dependency>
  536.49 -                    <code-name-base>org.netbeans.libs.javacapi</code-name-base>
  536.50 -                    <build-prerequisite/>
  536.51 -                    <compile-dependency/>
  536.52 -                    <run-dependency>
  536.53 -                        <specification-version>7.5.0.3</specification-version>
  536.54 -                    </run-dependency>
  536.55 -                </dependency>
  536.56 -                <dependency>
  536.57 -                    <code-name-base>org.netbeans.libs.javacimpl</code-name-base>
  536.58 -                    <build-prerequisite/>
  536.59 -                    <compile-dependency/>
  536.60 -                    <run-dependency>
  536.61 -                        <release-version>1</release-version>
  536.62 -                        <implementation-version/>
  536.63 -                    </run-dependency>
  536.64 -                </dependency>
  536.65 -                <dependency>
  536.66 -                    <code-name-base>org.netbeans.libs.lucene</code-name-base>
  536.67 -                    <build-prerequisite/>
  536.68 -                    <compile-dependency/>
  536.69 -                    <run-dependency>
  536.70 -                        <release-version>1-3</release-version>
  536.71 -                        <specification-version>2.13</specification-version>
  536.72 -                    </run-dependency>
  536.73 -                </dependency>
  536.74 -                <dependency>
  536.75 -                    <code-name-base>org.netbeans.modules.diff</code-name-base>
  536.76 -                    <build-prerequisite/>
  536.77 -                    <compile-dependency/>
  536.78 -                    <run-dependency>
  536.79 -                        <release-version>1</release-version>
  536.80 -                        <implementation-version/>
  536.81 -                    </run-dependency>
  536.82 -                </dependency>
  536.83 -                <dependency>
  536.84 -                    <code-name-base>org.netbeans.modules.editor</code-name-base>
  536.85 -                    <build-prerequisite/>
  536.86 -                    <compile-dependency/>
  536.87 -                    <run-dependency>
  536.88 -                        <release-version>3</release-version>
  536.89 -                        <specification-version>1.56.0.5.13.6</specification-version>
  536.90 -                    </run-dependency>
  536.91 -                </dependency>
  536.92 -                <dependency>
  536.93 -                    <code-name-base>org.netbeans.modules.editor.lib</code-name-base>
  536.94 -                    <build-prerequisite/>
  536.95 -                    <compile-dependency/>
  536.96 -                    <run-dependency>
  536.97 -                        <release-version>1-3</release-version>
  536.98 -                        <specification-version>1.38.0.9.2</specification-version>
  536.99 -                    </run-dependency>
 536.100 -                </dependency>
 536.101 -                <dependency>
 536.102 -                    <code-name-base>org.netbeans.modules.editor.lib2</code-name-base>
 536.103 -                    <build-prerequisite/>
 536.104 -                    <compile-dependency/>
 536.105 -                    <run-dependency>
 536.106 -                        <release-version>1</release-version>
 536.107 -                        <specification-version>1.13.0.2</specification-version>
 536.108 -                    </run-dependency>
 536.109 -                </dependency>
 536.110 -                <dependency>
 536.111 -                    <code-name-base>org.netbeans.modules.editor.mimelookup</code-name-base>
 536.112 -                    <build-prerequisite/>
 536.113 -                    <compile-dependency/>
 536.114 -                    <run-dependency>
 536.115 -                        <release-version>1</release-version>
 536.116 -                        <specification-version>1.12</specification-version>
 536.117 -                    </run-dependency>
 536.118 -                </dependency>
 536.119 -                <dependency>
 536.120 -                    <code-name-base>org.netbeans.modules.editor.settings</code-name-base>
 536.121 -                    <build-prerequisite/>
 536.122 -                    <compile-dependency/>
 536.123 -                    <run-dependency>
 536.124 -                        <release-version>1</release-version>
 536.125 -                        <specification-version>1.25</specification-version>
 536.126 -                    </run-dependency>
 536.127 -                </dependency>
 536.128 -                <dependency>
 536.129 -                    <code-name-base>org.netbeans.modules.jackpot30.remoting.api</code-name-base>
 536.130 -                    <build-prerequisite/>
 536.131 -                    <compile-dependency/>
 536.132 -                    <run-dependency>
 536.133 -                        <specification-version>1.0</specification-version>
 536.134 -                    </run-dependency>
 536.135 -                </dependency>
 536.136 -                <dependency>
 536.137 -                    <code-name-base>org.netbeans.modules.java.editor</code-name-base>
 536.138 -                    <build-prerequisite/>
 536.139 -                    <compile-dependency/>
 536.140 -                    <run-dependency>
 536.141 -                        <release-version>1</release-version>
 536.142 -                        <implementation-version/>
 536.143 -                    </run-dependency>
 536.144 -                </dependency>
 536.145 -                <dependency>
 536.146 -                    <code-name-base>org.netbeans.modules.java.hints</code-name-base>
 536.147 -                    <build-prerequisite/>
 536.148 -                    <compile-dependency/>
 536.149 -                    <run-dependency>
 536.150 -                        <release-version>1</release-version>
 536.151 -                        <implementation-version/>
 536.152 -                    </run-dependency>
 536.153 -                </dependency>
 536.154 -                <dependency>
 536.155 -                    <code-name-base>org.netbeans.modules.java.lexer</code-name-base>
 536.156 -                    <build-prerequisite/>
 536.157 -                    <compile-dependency/>
 536.158 -                    <run-dependency>
 536.159 -                        <release-version>1</release-version>
 536.160 -                        <specification-version>1.9</specification-version>
 536.161 -                    </run-dependency>
 536.162 -                </dependency>
 536.163 -                <dependency>
 536.164 -                    <code-name-base>org.netbeans.modules.java.platform</code-name-base>
 536.165 -                    <build-prerequisite/>
 536.166 -                    <compile-dependency/>
 536.167 -                    <run-dependency>
 536.168 -                        <release-version>1</release-version>
 536.169 -                        <specification-version>1.12</specification-version>
 536.170 -                    </run-dependency>
 536.171 -                </dependency>
 536.172 -                <dependency>
 536.173 -                    <code-name-base>org.netbeans.modules.java.preprocessorbridge</code-name-base>
 536.174 -                    <build-prerequisite/>
 536.175 -                    <compile-dependency/>
 536.176 -                    <run-dependency>
 536.177 -                        <implementation-version/>
 536.178 -                    </run-dependency>
 536.179 -                </dependency>
 536.180 -                <dependency>
 536.181 -                    <code-name-base>org.netbeans.modules.java.source</code-name-base>
 536.182 -                    <build-prerequisite/>
 536.183 -                    <compile-dependency/>
 536.184 -                    <run-dependency>
 536.185 -                        <implementation-version/>
 536.186 -                    </run-dependency>
 536.187 -                </dependency>
 536.188 -                <dependency>
 536.189 -                    <code-name-base>org.netbeans.modules.lexer</code-name-base>
 536.190 -                    <build-prerequisite/>
 536.191 -                    <compile-dependency/>
 536.192 -                    <run-dependency>
 536.193 -                        <release-version>2</release-version>
 536.194 -                        <specification-version>1.34</specification-version>
 536.195 -                    </run-dependency>
 536.196 -                </dependency>
 536.197 -                <dependency>
 536.198 -                    <code-name-base>org.netbeans.modules.options.api</code-name-base>
 536.199 -                    <build-prerequisite/>
 536.200 -                    <compile-dependency/>
 536.201 -                    <run-dependency>
 536.202 -                        <release-version>1</release-version>
 536.203 -                        <specification-version>1.20</specification-version>
 536.204 -                    </run-dependency>
 536.205 -                </dependency>
 536.206 -                <dependency>
 536.207 -                    <code-name-base>org.netbeans.modules.parsing.api</code-name-base>
 536.208 -                    <build-prerequisite/>
 536.209 -                    <compile-dependency/>
 536.210 -                    <run-dependency>
 536.211 -                        <release-version>1</release-version>
 536.212 -                        <implementation-version/>
 536.213 -                    </run-dependency>
 536.214 -                </dependency>
 536.215 -                <dependency>
 536.216 -                    <code-name-base>org.netbeans.modules.projectapi</code-name-base>
 536.217 -                    <build-prerequisite/>
 536.218 -                    <compile-dependency/>
 536.219 -                    <run-dependency>
 536.220 -                        <release-version>1</release-version>
 536.221 -                        <specification-version>1.24</specification-version>
 536.222 -                    </run-dependency>
 536.223 -                </dependency>
 536.224 -                <dependency>
 536.225 -                    <code-name-base>org.netbeans.modules.projectuiapi</code-name-base>
 536.226 -                    <build-prerequisite/>
 536.227 -                    <compile-dependency/>
 536.228 -                    <run-dependency>
 536.229 -                        <release-version>1</release-version>
 536.230 -                        <specification-version>1.35.0.6</specification-version>
 536.231 -                    </run-dependency>
 536.232 -                </dependency>
 536.233 -                <dependency>
 536.234 -                    <code-name-base>org.netbeans.modules.queries</code-name-base>
 536.235 -                    <build-prerequisite/>
 536.236 -                    <compile-dependency/>
 536.237 -                    <run-dependency>
 536.238 -                        <release-version>1</release-version>
 536.239 -                        <specification-version>1.15</specification-version>
 536.240 -                    </run-dependency>
 536.241 -                </dependency>
 536.242 -                <dependency>
 536.243 -                    <code-name-base>org.netbeans.modules.refactoring.api</code-name-base>
 536.244 -                    <build-prerequisite/>
 536.245 -                    <compile-dependency/>
 536.246 -                    <run-dependency>
 536.247 -                        <specification-version>1.6</specification-version>
 536.248 -                    </run-dependency>
 536.249 -                </dependency>
 536.250 -                <dependency>
 536.251 -                    <code-name-base>org.netbeans.modules.refactoring.java</code-name-base>
 536.252 -                    <build-prerequisite/>
 536.253 -                    <compile-dependency/>
 536.254 -                    <run-dependency>
 536.255 -                        <release-version>1</release-version>
 536.256 -                        <specification-version>1.6</specification-version>
 536.257 -                    </run-dependency>
 536.258 -                </dependency>
 536.259 -                <dependency>
 536.260 -                    <code-name-base>org.netbeans.modules.sendopts</code-name-base>
 536.261 -                    <build-prerequisite/>
 536.262 -                    <compile-dependency/>
 536.263 -                    <run-dependency>
 536.264 -                        <release-version>2</release-version>
 536.265 -                        <specification-version>2.4</specification-version>
 536.266 -                    </run-dependency>
 536.267 -                </dependency>
 536.268 -                <dependency>
 536.269 -                    <code-name-base>org.netbeans.spi.editor.hints</code-name-base>
 536.270 -                    <build-prerequisite/>
 536.271 -                    <compile-dependency/>
 536.272 -                    <run-dependency>
 536.273 -                        <release-version>0-1</release-version>
 536.274 -                        <specification-version>1.7.0.7.2</specification-version>
 536.275 -                    </run-dependency>
 536.276 -                </dependency>
 536.277 -                <dependency>
 536.278 -                    <code-name-base>org.openide.awt</code-name-base>
 536.279 -                    <build-prerequisite/>
 536.280 -                    <compile-dependency/>
 536.281 -                    <run-dependency>
 536.282 -                        <specification-version>7.7.0.1</specification-version>
 536.283 -                    </run-dependency>
 536.284 -                </dependency>
 536.285 -                <dependency>
 536.286 -                    <code-name-base>org.openide.dialogs</code-name-base>
 536.287 -                    <build-prerequisite/>
 536.288 -                    <compile-dependency/>
 536.289 -                    <run-dependency>
 536.290 -                        <specification-version>7.10</specification-version>
 536.291 -                    </run-dependency>
 536.292 -                </dependency>
 536.293 -                <dependency>
 536.294 -                    <code-name-base>org.openide.filesystems</code-name-base>
 536.295 -                    <build-prerequisite/>
 536.296 -                    <compile-dependency/>
 536.297 -                    <run-dependency>
 536.298 -                        <specification-version>7.21.0.1.1</specification-version>
 536.299 -                    </run-dependency>
 536.300 -                </dependency>
 536.301 -                <dependency>
 536.302 -                    <code-name-base>org.openide.loaders</code-name-base>
 536.303 -                    <build-prerequisite/>
 536.304 -                    <compile-dependency/>
 536.305 -                    <run-dependency>
 536.306 -                        <specification-version>7.5</specification-version>
 536.307 -                    </run-dependency>
 536.308 -                </dependency>
 536.309 -                <dependency>
 536.310 -                    <code-name-base>org.openide.modules</code-name-base>
 536.311 -                    <build-prerequisite/>
 536.312 -                    <compile-dependency/>
 536.313 -                    <run-dependency>
 536.314 -                        <specification-version>7.10</specification-version>
 536.315 -                    </run-dependency>
 536.316 -                </dependency>
 536.317 -                <dependency>
 536.318 -                    <code-name-base>org.openide.nodes</code-name-base>
 536.319 -                    <build-prerequisite/>
 536.320 -                    <compile-dependency/>
 536.321 -                    <run-dependency>
 536.322 -                        <specification-version>7.9.0.1</specification-version>
 536.323 -                    </run-dependency>
 536.324 -                </dependency>
 536.325 -                <dependency>
 536.326 -                    <code-name-base>org.openide.text</code-name-base>
 536.327 -                    <build-prerequisite/>
 536.328 -                    <compile-dependency/>
 536.329 -                    <run-dependency>
 536.330 -                        <specification-version>6.22</specification-version>
 536.331 -                    </run-dependency>
 536.332 -                </dependency>
 536.333 -                <dependency>
 536.334 -                    <code-name-base>org.openide.util</code-name-base>
 536.335 -                    <build-prerequisite/>
 536.336 -                    <compile-dependency/>
 536.337 -                    <run-dependency>
 536.338 -                        <specification-version>8.0</specification-version>
 536.339 -                    </run-dependency>
 536.340 -                </dependency>
 536.341 -                <dependency>
 536.342 -                    <code-name-base>org.openide.util.lookup</code-name-base>
 536.343 -                    <build-prerequisite/>
 536.344 -                    <compile-dependency/>
 536.345 -                    <run-dependency>
 536.346 -                        <specification-version>8.0.0.1</specification-version>
 536.347 -                    </run-dependency>
 536.348 -                </dependency>
 536.349 -                <dependency>
 536.350 -                    <code-name-base>org.openide.windows</code-name-base>
 536.351 -                    <build-prerequisite/>
 536.352 -                    <compile-dependency/>
 536.353 -                    <run-dependency>
 536.354 -                        <specification-version>6.27</specification-version>
 536.355 -                    </run-dependency>
 536.356 -                </dependency>
 536.357 -            </module-dependencies>
 536.358 -            <test-dependencies>
 536.359 -                <test-type>
 536.360 -                    <name>unit</name>
 536.361 -                    <test-dependency>
 536.362 -                        <code-name-base>org.netbeans.bootstrap</code-name-base>
 536.363 -                    </test-dependency>
 536.364 -                    <test-dependency>
 536.365 -                        <code-name-base>org.netbeans.core.startup</code-name-base>
 536.366 -                    </test-dependency>
 536.367 -                    <test-dependency>
 536.368 -                        <code-name-base>org.netbeans.insane</code-name-base>
 536.369 -                        <compile-dependency/>
 536.370 -                    </test-dependency>
 536.371 -                    <test-dependency>
 536.372 -                        <code-name-base>org.netbeans.libs.junit4</code-name-base>
 536.373 -                        <compile-dependency/>
 536.374 -                    </test-dependency>
 536.375 -                    <test-dependency>
 536.376 -                        <code-name-base>org.netbeans.modules.classfile</code-name-base>
 536.377 -                    </test-dependency>
 536.378 -                    <test-dependency>
 536.379 -                        <code-name-base>org.netbeans.modules.defaults</code-name-base>
 536.380 -                    </test-dependency>
 536.381 -                    <test-dependency>
 536.382 -                        <code-name-base>org.netbeans.modules.editor</code-name-base>
 536.383 -                    </test-dependency>
 536.384 -                    <test-dependency>
 536.385 -                        <code-name-base>org.netbeans.modules.editor.mimelookup</code-name-base>
 536.386 -                    </test-dependency>
 536.387 -                    <test-dependency>
 536.388 -                        <code-name-base>org.netbeans.modules.editor.settings</code-name-base>
 536.389 -                    </test-dependency>
 536.390 -                    <test-dependency>
 536.391 -                        <code-name-base>org.netbeans.modules.editor.settings.storage</code-name-base>
 536.392 -                    </test-dependency>
 536.393 -                    <test-dependency>
 536.394 -                        <code-name-base>org.netbeans.modules.editor.util</code-name-base>
 536.395 -                    </test-dependency>
 536.396 -                    <test-dependency>
 536.397 -                        <code-name-base>org.netbeans.modules.jackpot30.common.test</code-name-base>
 536.398 -                        <compile-dependency/>
 536.399 -                    </test-dependency>
 536.400 -                    <test-dependency>
 536.401 -                        <code-name-base>org.netbeans.modules.jackpot30.test.borrowed</code-name-base>
 536.402 -                        <recursive/>
 536.403 -                        <compile-dependency/>
 536.404 -                    </test-dependency>
 536.405 -                    <test-dependency>
 536.406 -                        <code-name-base>org.netbeans.modules.java.hints</code-name-base>
 536.407 -                        <compile-dependency/>
 536.408 -                    </test-dependency>
 536.409 -                    <test-dependency>
 536.410 -                        <code-name-base>org.netbeans.modules.java.hints.declarative</code-name-base>
 536.411 -                    </test-dependency>
 536.412 -                    <test-dependency>
 536.413 -                        <code-name-base>org.netbeans.modules.java.lexer</code-name-base>
 536.414 -                    </test-dependency>
 536.415 -                    <test-dependency>
 536.416 -                        <code-name-base>org.netbeans.modules.masterfs</code-name-base>
 536.417 -                    </test-dependency>
 536.418 -                    <test-dependency>
 536.419 -                        <code-name-base>org.netbeans.modules.nbjunit</code-name-base>
 536.420 -                        <compile-dependency/>
 536.421 -                    </test-dependency>
 536.422 -                    <test-dependency>
 536.423 -                        <code-name-base>org.netbeans.modules.progress.ui</code-name-base>
 536.424 -                    </test-dependency>
 536.425 -                    <test-dependency>
 536.426 -                        <code-name-base>org.netbeans.modules.projectui</code-name-base>
 536.427 -                    </test-dependency>
 536.428 -                    <test-dependency>
 536.429 -                        <code-name-base>org.openidex.util</code-name-base>
 536.430 -                    </test-dependency>
 536.431 -                </test-type>
 536.432 -            </test-dependencies>
 536.433 -            <public-packages>
 536.434 -                <package>org.netbeans.modules.jackpot30.spi</package>
 536.435 -                <package>org.netbeans.modules.jackpot30.spi.refactoring</package>
 536.436 -                <package>org.netbeans.modules.jackpot30.spi.support</package>
 536.437 -            </public-packages>
 536.438 -        </data>
 536.439 -    </configuration>
 536.440 -</project>
   537.1 --- a/sandbox/old-modules/api/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   537.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   537.3 @@ -1,1 +0,0 @@
   537.4 -suite.dir=${basedir}/..
   538.1 --- a/sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/examples/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   538.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   538.3 @@ -1,46 +0,0 @@
   538.4 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   538.5 -#
   538.6 -# Copyright 2010 Oracle and/or its affiliates. All rights reserved.
   538.7 -#
   538.8 -# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   538.9 -# Other names may be trademarks of their respective owners.
  538.10 -#
  538.11 -# The contents of this file are subject to the terms of either the GNU
  538.12 -# General Public License Version 2 only ("GPL") or the Common
  538.13 -# Development and Distribution License("CDDL") (collectively, the
  538.14 -# "License"). You may not use this file except in compliance with the
  538.15 -# License. You can obtain a copy of the License at
  538.16 -# http://www.netbeans.org/cddl-gplv2.html
  538.17 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  538.18 -# specific language governing permissions and limitations under the
  538.19 -# License.  When distributing the software, include this License Header
  538.20 -# Notice in each file and include the License file at
  538.21 -# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  538.22 -# particular file as subject to the "Classpath" exception as provided
  538.23 -# by Oracle in the GPL Version 2 section of the License file that
  538.24 -# accompanied this code. If applicable, add the following below the
  538.25 -# License Header, with the fields enclosed by brackets [] replaced by
  538.26 -# your own identifying information:
  538.27 -# "Portions Copyrighted [year] [name of copyright owner]"
  538.28 -#
  538.29 -# If you wish your version of this file to be governed by only the CDDL
  538.30 -# or only the GPL Version 2, indicate your decision by adding
  538.31 -# "[Contributor] elects to include this software in this distribution
  538.32 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
  538.33 -# single choice of license, a recipient has the option to distribute
  538.34 -# your version of this file under either the CDDL, the GPL Version 2 or
  538.35 -# to extend the choice of license to its licensees as provided above.
  538.36 -# However, if you add GPL Version 2 code and therefore, elected the GPL
  538.37 -# Version 2 license, then the option applies only if the new code is
  538.38 -# made subject to such option by the copyright holder.
  538.39 -#
  538.40 -# Contributor(s):
  538.41 -#
  538.42 -# Portions Copyrighted 2010 Sun Microsystems, Inc.
  538.43 -
  538.44 -double-checked-locking=Double Checked Locking
  538.45 -double-checked-locking-verify=Double Checked Locking Strict
  538.46 -double-checked-locking-fix=Double Checked Locking
  538.47 -new-string=New String Creation
  538.48 -lambda-candidate=Find candidates for Lambda expression
  538.49 -ExamplesList.pattern.contentType=text/x-javahints
   539.1 --- a/sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/examples/Example.java	Mon Dec 19 11:37:36 2016 +0100
   539.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   539.3 @@ -1,83 +0,0 @@
   539.4 -/*
   539.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   539.6 - *
   539.7 - * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
   539.8 - *
   539.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  539.10 - * Other names may be trademarks of their respective owners.
  539.11 - *
  539.12 - * The contents of this file are subject to the terms of either the GNU
  539.13 - * General Public License Version 2 only ("GPL") or the Common
  539.14 - * Development and Distribution License("CDDL") (collectively, the
  539.15 - * "License"). You may not use this file except in compliance with the
  539.16 - * License. You can obtain a copy of the License at
  539.17 - * http://www.netbeans.org/cddl-gplv2.html
  539.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  539.19 - * specific language governing permissions and limitations under the
  539.20 - * License.  When distributing the software, include this License Header
  539.21 - * Notice in each file and include the License file at
  539.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  539.23 - * particular file as subject to the "Classpath" exception as provided
  539.24 - * by Oracle in the GPL Version 2 section of the License file that
  539.25 - * accompanied this code. If applicable, add the following below the
  539.26 - * License Header, with the fields enclosed by brackets [] replaced by
  539.27 - * your own identifying information:
  539.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  539.29 - *
  539.30 - * If you wish your version of this file to be governed by only the CDDL
  539.31 - * or only the GPL Version 2, indicate your decision by adding
  539.32 - * "[Contributor] elects to include this software in this distribution
  539.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  539.34 - * single choice of license, a recipient has the option to distribute
  539.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  539.36 - * to extend the choice of license to its licensees as provided above.
  539.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  539.38 - * Version 2 license, then the option applies only if the new code is
  539.39 - * made subject to such option by the copyright holder.
  539.40 - *
  539.41 - * Contributor(s):
  539.42 - *
  539.43 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  539.44 - */
  539.45 -
  539.46 -package org.netbeans.modules.jackpot30.impl.examples;
  539.47 -
  539.48 -import java.util.Set;
  539.49 -import org.openide.util.NbBundle;
  539.50 -
  539.51 -/**
  539.52 - *
  539.53 - * @author lahvac
  539.54 - */
  539.55 -public class Example {
  539.56 -
  539.57 -    private final String key;
  539.58 -    private final String code;
  539.59 -    private final Set<Option> options;
  539.60 -
  539.61 -    Example(String key, String code, Set<Option> options) {
  539.62 -        this.key = key;
  539.63 -        this.code = code;
  539.64 -        this.options = options;
  539.65 -    }
  539.66 -
  539.67 -    String getKey() {
  539.68 -        return key;
  539.69 -    }
  539.70 -
  539.71 -    public String getDisplayName() {
  539.72 -        return NbBundle.getMessage(LoadExamples.class, key);
  539.73 -    }
  539.74 -
  539.75 -    public String getCode() {
  539.76 -        return code;
  539.77 -    }
  539.78 -
  539.79 -    public Set<Option> getOptions() {
  539.80 -        return options;
  539.81 -    }
  539.82 -    
  539.83 -    public enum Option {
  539.84 -        VERIFY, FIX;
  539.85 -    }
  539.86 -}
   540.1 --- a/sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/examples/ExamplesList.form	Mon Dec 19 11:37:36 2016 +0100
   540.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   540.3 @@ -1,95 +0,0 @@
   540.4 -<?xml version="1.0" encoding="UTF-8" ?>
   540.5 -
   540.6 -<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
   540.7 -  <AuxValues>
   540.8 -    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
   540.9 -    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
  540.10 -    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
  540.11 -    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
  540.12 -    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
  540.13 -    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
  540.14 -    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
  540.15 -    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
  540.16 -    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
  540.17 -  </AuxValues>
  540.18 -
  540.19 -  <Layout>
  540.20 -    <DimensionLayout dim="0">
  540.21 -      <Group type="103" groupAlignment="0" attributes="0">
  540.22 -          <Group type="102" alignment="1" attributes="0">
  540.23 -              <EmptySpace max="-2" attributes="0"/>
  540.24 -              <Group type="103" groupAlignment="1" attributes="0">
  540.25 -                  <Component id="jScrollPane2" alignment="0" pref="376" max="32767" attributes="0"/>
  540.26 -                  <Component id="jScrollPane1" alignment="0" pref="376" max="32767" attributes="0"/>
  540.27 -                  <Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
  540.28 -              </Group>
  540.29 -              <EmptySpace max="-2" attributes="0"/>
  540.30 -          </Group>
  540.31 -      </Group>
  540.32 -    </DimensionLayout>
  540.33 -    <DimensionLayout dim="1">
  540.34 -      <Group type="103" groupAlignment="0" attributes="0">
  540.35 -          <Group type="102" alignment="0" attributes="0">
  540.36 -              <EmptySpace max="-2" attributes="0"/>
  540.37 -              <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
  540.38 -              <EmptySpace max="-2" attributes="0"/>
  540.39 -              <Component id="jScrollPane1" pref="130" max="32767" attributes="0"/>
  540.40 -              <EmptySpace max="-2" attributes="0"/>
  540.41 -              <Component id="jScrollPane2" min="-2" pref="119" max="-2" attributes="0"/>
  540.42 -              <EmptySpace max="-2" attributes="0"/>
  540.43 -          </Group>
  540.44 -      </Group>
  540.45 -    </DimensionLayout>
  540.46 -  </Layout>
  540.47 -  <SubComponents>
  540.48 -    <Component class="javax.swing.JLabel" name="jLabel1">
  540.49 -      <Properties>
  540.50 -        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
  540.51 -          <Connection code="convertor.getHeader()" type="code"/>
  540.52 -        </Property>
  540.53 -      </Properties>
  540.54 -    </Component>
  540.55 -    <Container class="javax.swing.JScrollPane" name="jScrollPane1">
  540.56 -      <AuxValues>
  540.57 -        <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
  540.58 -      </AuxValues>
  540.59 -
  540.60 -      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
  540.61 -      <SubComponents>
  540.62 -        <Component class="javax.swing.JList" name="list">
  540.63 -          <Properties>
  540.64 -            <Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor">
  540.65 -              <StringArray count="5">
  540.66 -                <StringItem index="0" value="Item 1"/>
  540.67 -                <StringItem index="1" value="Item 2"/>
  540.68 -                <StringItem index="2" value="Item 3"/>
  540.69 -                <StringItem index="3" value="Item 4"/>
  540.70 -                <StringItem index="4" value="Item 5"/>
  540.71 -              </StringArray>
  540.72 -            </Property>
  540.73 -          </Properties>
  540.74 -          <Events>
  540.75 -            <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="listMouseClicked"/>
  540.76 -            <EventHandler event="valueChanged" listener="javax.swing.event.ListSelectionListener" parameters="javax.swing.event.ListSelectionEvent" handler="listValueChanged"/>
  540.77 -          </Events>
  540.78 -        </Component>
  540.79 -      </SubComponents>
  540.80 -    </Container>
  540.81 -    <Container class="javax.swing.JScrollPane" name="jScrollPane2">
  540.82 -      <AuxValues>
  540.83 -        <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
  540.84 -      </AuxValues>
  540.85 -
  540.86 -      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
  540.87 -      <SubComponents>
  540.88 -        <Component class="javax.swing.JEditorPane" name="pattern">
  540.89 -          <Properties>
  540.90 -            <Property name="contentType" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
  540.91 -              <ResourceString bundle="org/netbeans/modules/jackpot30/impl/examples/Bundle.properties" key="ExamplesList.pattern.contentType" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
  540.92 -            </Property>
  540.93 -          </Properties>
  540.94 -        </Component>
  540.95 -      </SubComponents>
  540.96 -    </Container>
  540.97 -  </SubComponents>
  540.98 -</Form>
   541.1 --- a/sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/examples/ExamplesList.java	Mon Dec 19 11:37:36 2016 +0100
   541.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   541.3 @@ -1,223 +0,0 @@
   541.4 -/*
   541.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   541.6 - *
   541.7 - * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
   541.8 - *
   541.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  541.10 - * Other names may be trademarks of their respective owners.
  541.11 - *
  541.12 - * The contents of this file are subject to the terms of either the GNU
  541.13 - * General Public License Version 2 only ("GPL") or the Common
  541.14 - * Development and Distribution License("CDDL") (collectively, the
  541.15 - * "License"). You may not use this file except in compliance with the
  541.16 - * License. You can obtain a copy of the License at
  541.17 - * http://www.netbeans.org/cddl-gplv2.html
  541.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  541.19 - * specific language governing permissions and limitations under the
  541.20 - * License.  When distributing the software, include this License Header
  541.21 - * Notice in each file and include the License file at
  541.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  541.23 - * particular file as subject to the "Classpath" exception as provided
  541.24 - * by Oracle in the GPL Version 2 section of the License file that
  541.25 - * accompanied this code. If applicable, add the following below the
  541.26 - * License Header, with the fields enclosed by brackets [] replaced by
  541.27 - * your own identifying information:
  541.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  541.29 - *
  541.30 - * If you wish your version of this file to be governed by only the CDDL
  541.31 - * or only the GPL Version 2, indicate your decision by adding
  541.32 - * "[Contributor] elects to include this software in this distribution
  541.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  541.34 - * single choice of license, a recipient has the option to distribute
  541.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  541.36 - * to extend the choice of license to its licensees as provided above.
  541.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  541.38 - * Version 2 license, then the option applies only if the new code is
  541.39 - * made subject to such option by the copyright holder.
  541.40 - *
  541.41 - * Contributor(s):
  541.42 - *
  541.43 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  541.44 - */
  541.45 -package org.netbeans.modules.jackpot30.impl.examples;
  541.46 -
  541.47 -import java.awt.Component;
  541.48 -import java.awt.Dialog;
  541.49 -import java.awt.Rectangle;
  541.50 -import java.util.Collections;
  541.51 -import java.util.Set;
  541.52 -import javax.swing.DefaultListCellRenderer;
  541.53 -import javax.swing.DefaultListModel;
  541.54 -import javax.swing.JList;
  541.55 -import javax.swing.text.BadLocationException;
  541.56 -import org.netbeans.modules.jackpot30.impl.examples.Example.Option;
  541.57 -import org.openide.DialogDescriptor;
  541.58 -import org.openide.DialogDisplayer;
  541.59 -import org.openide.util.Exceptions;
  541.60 -
  541.61 -/**
  541.62 - *
  541.63 - * @author lahvac
  541.64 - */
  541.65 -public class ExamplesList<T> extends javax.swing.JPanel {
  541.66 -
  541.67 -    private final DialogDescription<T> convertor;
  541.68 -    private final Class<T> dataClass;
  541.69 -
  541.70 -    public ExamplesList(Iterable<? extends T> data, DialogDescription<T> convertor, Class<T> dataClass, Set<Option> require, Set<Option> forbidden) {
  541.71 -        this.convertor = convertor;
  541.72 -        this.dataClass = dataClass;
  541.73 -        
  541.74 -        initComponents();
  541.75 -
  541.76 -        DefaultListModel listModel = new DefaultListModel();
  541.77 -
  541.78 -        for (T t : data) {
  541.79 -            Set<Option> options = convertor.getOptions(t);
  541.80 -            if (!options.containsAll(require)) continue;
  541.81 -            if (!Collections.disjoint(options, forbidden)) continue;
  541.82 -            
  541.83 -            listModel.addElement(t);
  541.84 -        }
  541.85 -
  541.86 -        list.setModel(listModel);
  541.87 -        list.setCellRenderer(new ExamplesRenderer());
  541.88 -        list.setSelectedIndex(0);
  541.89 -    }
  541.90 -
  541.91 -    /** This method is called from within the constructor to
  541.92 -     * initialize the form.
  541.93 -     * WARNING: Do NOT modify this code. The content of this method is
  541.94 -     * always regenerated by the Form Editor.
  541.95 -     */
  541.96 -    @SuppressWarnings("unchecked")
  541.97 -    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  541.98 -    private void initComponents() {
  541.99 -
 541.100 -        jLabel1 = new javax.swing.JLabel();
 541.101 -        jScrollPane1 = new javax.swing.JScrollPane();
 541.102 -        list = new javax.swing.JList();
 541.103 -        jScrollPane2 = new javax.swing.JScrollPane();
 541.104 -        pattern = new javax.swing.JEditorPane();
 541.105 -
 541.106 -        jLabel1.setText(convertor.getHeader());
 541.107 -
 541.108 -        list.setModel(new javax.swing.AbstractListModel() {
 541.109 -            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
 541.110 -            public int getSize() { return strings.length; }
 541.111 -            public Object getElementAt(int i) { return strings[i]; }
 541.112 -        });
 541.113 -        list.addMouseListener(new java.awt.event.MouseAdapter() {
 541.114 -            public void mouseClicked(java.awt.event.MouseEvent evt) {
 541.115 -                listMouseClicked(evt);
 541.116 -            }
 541.117 -        });
 541.118 -        list.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
 541.119 -            public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
 541.120 -                listValueChanged(evt);
 541.121 -            }
 541.122 -        });
 541.123 -        jScrollPane1.setViewportView(list);
 541.124 -
 541.125 -        pattern.setContentType(org.openide.util.NbBundle.getMessage(ExamplesList.class, "ExamplesList.pattern.contentType")); // NOI18N
 541.126 -        jScrollPane2.setViewportView(pattern);
 541.127 -
 541.128 -        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
 541.129 -        this.setLayout(layout);
 541.130 -        layout.setHorizontalGroup(
 541.131 -            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 541.132 -            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
 541.133 -                .addContainerGap()
 541.134 -                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
 541.135 -                    .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE)
 541.136 -                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE)
 541.137 -                    .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING))
 541.138 -                .addContainerGap())
 541.139 -        );
 541.140 -        layout.setVerticalGroup(
 541.141 -            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 541.142 -            .addGroup(layout.createSequentialGroup()
 541.143 -                .addContainerGap()
 541.144 -                .addComponent(jLabel1)
 541.145 -                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 541.146 -                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE)
 541.147 -                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 541.148 -                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)
 541.149 -                .addContainerGap())
 541.150 -        );
 541.151 -    }// </editor-fold>//GEN-END:initComponents
 541.152 -
 541.153 -    private void listMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_listMouseClicked
 541.154 -        if (evt.getClickCount() > 1) {
 541.155 -            desc.setValue(DialogDescriptor.OK_OPTION);
 541.156 -            dialog.setVisible(false);
 541.157 -        }
 541.158 -    }//GEN-LAST:event_listMouseClicked
 541.159 -
 541.160 -    private void listValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_listValueChanged
 541.161 -        T ex = dataClass.cast(list.getSelectedValue());
 541.162 -
 541.163 -        pattern.setText(convertor.getCode(ex));
 541.164 -        
 541.165 -        try {
 541.166 -            Rectangle rect = pattern.modelToView(0);
 541.167 -
 541.168 -            if (rect != null) {
 541.169 -                pattern.scrollRectToVisible(rect);
 541.170 -            }
 541.171 -        } catch (BadLocationException ex1) {
 541.172 -            Exceptions.printStackTrace(ex1);
 541.173 -        }
 541.174 -    }//GEN-LAST:event_listValueChanged
 541.175 -
 541.176 -    // Variables declaration - do not modify//GEN-BEGIN:variables
 541.177 -    private javax.swing.JLabel jLabel1;
 541.178 -    private javax.swing.JScrollPane jScrollPane1;
 541.179 -    private javax.swing.JScrollPane jScrollPane2;
 541.180 -    private javax.swing.JList list;
 541.181 -    private javax.swing.JEditorPane pattern;
 541.182 -    // End of variables declaration//GEN-END:variables
 541.183 -
 541.184 -    private DialogDescriptor desc;
 541.185 -    private Dialog           dialog;
 541.186 -
 541.187 -    public void setDialog(DialogDescriptor desc, Dialog dialog) {
 541.188 -        this.desc = desc;
 541.189 -        this.dialog = dialog;
 541.190 -    }
 541.191 -
 541.192 -    public T getSelectedExample() {
 541.193 -        return dataClass.cast(list.getSelectedValue());
 541.194 -    }
 541.195 -    
 541.196 -    private class ExamplesRenderer extends DefaultListCellRenderer {
 541.197 -        @Override
 541.198 -        public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
 541.199 -            value = convertor.getDisplayName(dataClass.cast(value));
 541.200 -            return super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
 541.201 -        }
 541.202 -    }
 541.203 -
 541.204 -    public static <T> T chooseExample(Iterable<? extends T> examplesList, DialogDescription<T> convertor, Class<T> dataClass, Set<Option> require, Set<Option> forbidden) {
 541.205 -        ExamplesList<T> examples = new ExamplesList<T>(examplesList, convertor, dataClass, require, forbidden);
 541.206 -        DialogDescriptor dd = new DialogDescriptor(examples, convertor.getCaption(), true, DialogDescriptor.OK_CANCEL_OPTION, DialogDescriptor.OK_OPTION, null);
 541.207 -        Dialog dialog = DialogDisplayer.getDefault().createDialog(dd);
 541.208 -
 541.209 -        examples.setDialog(dd, dialog);
 541.210 -        dialog.setVisible(true);
 541.211 -
 541.212 -        if (dd.getValue() == DialogDescriptor.OK_OPTION) {
 541.213 -            return examples.getSelectedExample();
 541.214 -        }
 541.215 -
 541.216 -        return null;
 541.217 -    }
 541.218 -
 541.219 -    public interface DialogDescription<T> {
 541.220 -        public String getCaption();
 541.221 -        public String getHeader();
 541.222 -        public String getDisplayName(T t);
 541.223 -        public String getCode(T t);
 541.224 -        public Set<Option> getOptions(T t);
 541.225 -    }
 541.226 -}
   542.1 --- a/sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/examples/LoadExamples.java	Mon Dec 19 11:37:36 2016 +0100
   542.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   542.3 @@ -1,135 +0,0 @@
   542.4 -/*
   542.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   542.6 - *
   542.7 - * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
   542.8 - *
   542.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  542.10 - * Other names may be trademarks of their respective owners.
  542.11 - *
  542.12 - * The contents of this file are subject to the terms of either the GNU
  542.13 - * General Public License Version 2 only ("GPL") or the Common
  542.14 - * Development and Distribution License("CDDL") (collectively, the
  542.15 - * "License"). You may not use this file except in compliance with the
  542.16 - * License. You can obtain a copy of the License at
  542.17 - * http://www.netbeans.org/cddl-gplv2.html
  542.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  542.19 - * specific language governing permissions and limitations under the
  542.20 - * License.  When distributing the software, include this License Header
  542.21 - * Notice in each file and include the License file at
  542.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  542.23 - * particular file as subject to the "Classpath" exception as provided
  542.24 - * by Oracle in the GPL Version 2 section of the License file that
  542.25 - * accompanied this code. If applicable, add the following below the
  542.26 - * License Header, with the fields enclosed by brackets [] replaced by
  542.27 - * your own identifying information:
  542.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  542.29 - *
  542.30 - * If you wish your version of this file to be governed by only the CDDL
  542.31 - * or only the GPL Version 2, indicate your decision by adding
  542.32 - * "[Contributor] elects to include this software in this distribution
  542.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  542.34 - * single choice of license, a recipient has the option to distribute
  542.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  542.36 - * to extend the choice of license to its licensees as provided above.
  542.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  542.38 - * Version 2 license, then the option applies only if the new code is
  542.39 - * made subject to such option by the copyright holder.
  542.40 - *
  542.41 - * Contributor(s):
  542.42 - *
  542.43 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  542.44 - */
  542.45 -
  542.46 -package org.netbeans.modules.jackpot30.impl.examples;
  542.47 -
  542.48 -import java.io.File;
  542.49 -import java.io.IOException;
  542.50 -import java.io.InputStream;
  542.51 -import java.util.Collections;
  542.52 -import java.util.EnumSet;
  542.53 -import java.util.LinkedList;
  542.54 -import java.util.List;
  542.55 -import java.util.Set;
  542.56 -import java.util.regex.Pattern;
  542.57 -import org.netbeans.modules.jackpot30.impl.examples.Example.Option;
  542.58 -import org.openide.filesystems.FileUtil;
  542.59 -import org.openide.modules.InstalledFileLocator;
  542.60 -import org.openide.util.Exceptions;
  542.61 -
  542.62 -/**
  542.63 - *
  542.64 - * @author lahvac
  542.65 - */
  542.66 -public class LoadExamples {
  542.67 -
  542.68 -    public static Iterable<? extends Example> loadExamples() {
  542.69 -        return loadExamples("examples.list");
  542.70 -    }
  542.71 -
  542.72 -    private static final Pattern EXAMPLE_SPLIT = Pattern.compile("^%%", Pattern.MULTILINE);
  542.73 -    
  542.74 -    static Iterable<? extends Example> loadExamples(String examplesListName) {
  542.75 -        String examplesList = loadToString(examplesListName);
  542.76 -
  542.77 -        if (examplesList == null) return Collections.emptyList();
  542.78 -
  542.79 -        List<Example> examples = new LinkedList<Example>();
  542.80 -
  542.81 -        for (String exampleName : examplesList.split("\n")) {
  542.82 -            if (exampleName.isEmpty()) continue;
  542.83 -
  542.84 -            String exampleCode = loadToString(exampleName);
  542.85 -
  542.86 -            for (String oneExample : EXAMPLE_SPLIT.split(exampleCode)) {
  542.87 -                if (oneExample.isEmpty()) continue;
  542.88 -                
  542.89 -                String[] parts = oneExample.split("\n", 2);
  542.90 -                String key = null;
  542.91 -                Set<Option> options = EnumSet.noneOf(Option.class);
  542.92 -                
  542.93 -                for (String option : parts[0].split(",")) {
  542.94 -                    if (option.startsWith("example=")) {
  542.95 -                        key = option.substring("example=".length());
  542.96 -                        continue;
  542.97 -                    }
  542.98 -
  542.99 -                    options.add(Option.valueOf(option.toUpperCase()));
 542.100 -                }
 542.101 -
 542.102 -                examples.add(new Example(key, parts[1], options));
 542.103 -            }
 542.104 -        }
 542.105 -
 542.106 -        return examples;
 542.107 -    }
 542.108 -
 542.109 -    private static String loadToString(String name) {
 542.110 -        InputStream examplesList = null;
 542.111 -
 542.112 -        try {
 542.113 -            examplesList = LoadExamples.class.getResourceAsStream(name);
 542.114 -
 542.115 -            if (examplesList == null) return null;
 542.116 -
 542.117 -            StringBuilder result = new StringBuilder();
 542.118 -            int read;
 542.119 -
 542.120 -            while ((read = examplesList.read()) != (-1)) {
 542.121 -                result.append((char) read);
 542.122 -            }
 542.123 -
 542.124 -            return result.toString();
 542.125 -        } catch (IOException ex) {
 542.126 -            Exceptions.printStackTrace(ex);
 542.127 -            return null;
 542.128 -        } finally {
 542.129 -            if (examplesList != null) {
 542.130 -                try {
 542.131 -                    examplesList.close();
 542.132 -                } catch (IOException ex) {
 542.133 -                    Exceptions.printStackTrace(ex);
 542.134 -                }
 542.135 -            }
 542.136 -        }
 542.137 -    }
 542.138 -}
   543.1 --- a/sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/examples/double-checked-locking.example	Mon Dec 19 11:37:36 2016 +0100
   543.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   543.3 @@ -1,33 +0,0 @@
   543.4 -%%example=double-checked-locking
   543.5 -if ($var == null) {
   543.6 -   $preinit$;
   543.7 -   synchronized ($lock) {
   543.8 -       if ($var == null) {
   543.9 -           $s2$;
  543.10 -       }
  543.11 -   }
  543.12 -}
  543.13 -%%example=double-checked-locking-verify,verify
  543.14 -if ($var == null) {
  543.15 -   $preinit$;
  543.16 -   synchronized ($lock) {
  543.17 -       if ($var == null) {
  543.18 -           $s2$;
  543.19 -       }
  543.20 -   }
  543.21 -} :: !hasModifier($var, Modifier.VOLATILE);;
  543.22 -%%example=double-checked-locking-fix,verify,fix
  543.23 -if ($var == null) {
  543.24 -   $preinit$;
  543.25 -   synchronized ($lock) {
  543.26 -       if ($var == null) {
  543.27 -           $s2$;
  543.28 -       }
  543.29 -   }
  543.30 -} :: !hasModifier($var, Modifier.VOLATILE)
  543.31 -=>
  543.32 -synchronized ($lock) {
  543.33 -   if ($var == null) {
  543.34 -       $s2$;
  543.35 -   }
  543.36 -};;
   544.1 --- a/sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/examples/examples.list	Mon Dec 19 11:37:36 2016 +0100
   544.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   544.3 @@ -1,3 +0,0 @@
   544.4 -double-checked-locking.example
   544.5 -new-string.example
   544.6 -lambda-candidate.example
   545.1 --- a/sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/examples/lambda-candidate.example	Mon Dec 19 11:37:36 2016 +0100
   545.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   545.3 @@ -1,6 +0,0 @@
   545.4 -%%example=lambda-candidate
   545.5 -new $type() {
   545.6 -    $mods$ $resultType $methodName($args$) {
   545.7 -        $statements$;
   545.8 -    }
   545.9 -}
   546.1 --- a/sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/examples/new-string.example	Mon Dec 19 11:37:36 2016 +0100
   546.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   546.3 @@ -1,5 +0,0 @@
   546.4 -%%example=new-string,verify
   546.5 -new String($orig) :: $orig instanceof String && !matchesAny($orig, "$o.substring($s)", "$o.substring($s, $e)");;
   546.6 -%%example=new-string,verify,fix
   546.7 -new String($orig) :: $orig instanceof String && !matchesAny($orig, "$o.substring($s)", "$o.substring($s, $e)")
   546.8 -=> $orig;;
   547.1 --- a/sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/hints/ExplicitFindDuplicates.java	Mon Dec 19 11:37:36 2016 +0100
   547.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   547.3 @@ -1,379 +0,0 @@
   547.4 -/*
   547.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   547.6 - *
   547.7 - * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
   547.8 - *
   547.9 - * The contents of this file are subject to the terms of either the GNU
  547.10 - * General Public License Version 2 only ("GPL") or the Common
  547.11 - * Development and Distribution License("CDDL") (collectively, the
  547.12 - * "License"). You may not use this file except in compliance with the
  547.13 - * License. You can obtain a copy of the License at
  547.14 - * http://www.netbeans.org/cddl-gplv2.html
  547.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  547.16 - * specific language governing permissions and limitations under the
  547.17 - * License.  When distributing the software, include this License Header
  547.18 - * Notice in each file and include the License file at
  547.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  547.20 - * particular file as subject to the "Classpath" exception as provided
  547.21 - * by Sun in the GPL Version 2 section of the License file that
  547.22 - * accompanied this code. If applicable, add the following below the
  547.23 - * License Header, with the fields enclosed by brackets [] replaced by
  547.24 - * your own identifying information:
  547.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  547.26 - *
  547.27 - * If you wish your version of this file to be governed by only the CDDL
  547.28 - * or only the GPL Version 2, indicate your decision by adding
  547.29 - * "[Contributor] elects to include this software in this distribution
  547.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  547.31 - * single choice of license, a recipient has the option to distribute
  547.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  547.33 - * to extend the choice of license to its licensees as provided above.
  547.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  547.35 - * Version 2 license, then the option applies only if the new code is
  547.36 - * made subject to such option by the copyright holder.
  547.37 - *
  547.38 - * Contributor(s):
  547.39 - *
  547.40 - * Portions Copyrighted 2009 Sun Microsystems, Inc.
  547.41 - */
  547.42 -
  547.43 -package org.netbeans.modules.jackpot30.impl.hints;
  547.44 -
  547.45 -import com.sun.source.tree.BlockTree;
  547.46 -import com.sun.source.tree.ExpressionTree;
  547.47 -import com.sun.source.tree.NewClassTree;
  547.48 -import com.sun.source.tree.StatementTree;
  547.49 -import com.sun.source.tree.Tree;
  547.50 -import com.sun.source.tree.Tree.Kind;
  547.51 -import com.sun.source.tree.VariableTree;
  547.52 -import com.sun.source.util.TreePath;
  547.53 -import java.util.Collection;
  547.54 -import java.util.Collections;
  547.55 -import java.util.EnumSet;
  547.56 -import java.util.Set;
  547.57 -import javax.lang.model.type.ErrorType;
  547.58 -import javax.lang.model.type.TypeKind;
  547.59 -import javax.lang.model.type.TypeMirror;
  547.60 -import javax.swing.SwingUtilities;
  547.61 -import org.netbeans.api.java.lexer.JavaTokenId;
  547.62 -import org.netbeans.api.java.source.CancellableTask;
  547.63 -import org.netbeans.api.java.source.CompilationController;
  547.64 -import org.netbeans.api.java.source.CompilationInfo;
  547.65 -import org.netbeans.api.java.source.JavaSource;
  547.66 -import org.netbeans.api.java.source.JavaSource.Phase;
  547.67 -import org.netbeans.api.java.source.JavaSource.Priority;
  547.68 -import org.netbeans.api.java.source.JavaSourceTaskFactory;
  547.69 -import org.netbeans.api.java.source.Task;
  547.70 -import org.netbeans.api.java.source.TreePathHandle;
  547.71 -import org.netbeans.api.java.source.support.CaretAwareJavaSourceTaskFactory;
  547.72 -import org.netbeans.api.java.source.support.SelectionAwareJavaSourceTaskFactory;
  547.73 -import org.netbeans.api.lexer.TokenSequence;
  547.74 -import org.netbeans.modules.jackpot30.impl.refactoring.FindDuplicatesRefactoringUI;
  547.75 -import org.netbeans.modules.java.hints.jackpot.impl.Utilities;
  547.76 -import org.netbeans.modules.java.hints.jackpot.impl.batch.Scopes;
  547.77 -import org.netbeans.modules.refactoring.spi.ui.UI;
  547.78 -import org.netbeans.spi.editor.hints.ChangeInfo;
  547.79 -import org.netbeans.spi.editor.hints.ErrorDescription;
  547.80 -import org.netbeans.spi.editor.hints.ErrorDescriptionFactory;
  547.81 -import org.netbeans.spi.editor.hints.Fix;
  547.82 -import org.netbeans.spi.editor.hints.HintsController;
  547.83 -import org.netbeans.spi.editor.hints.Severity;
  547.84 -import org.openide.filesystems.FileObject;
  547.85 -import org.openide.util.lookup.ServiceProvider;
  547.86 -
  547.87 -/**
  547.88 - *
  547.89 - * @author lahvac
  547.90 - */
  547.91 -public class ExplicitFindDuplicates implements CancellableTask<CompilationInfo> {
  547.92 -
  547.93 -    public void run(CompilationInfo info) throws Exception {
  547.94 -        Collection<? extends ErrorDescription> eds = computeErrorDescription(info);
  547.95 -
  547.96 -        if (eds == null) {
  547.97 -            eds = Collections.emptyList();
  547.98 -        }
  547.99 -
 547.100 -        HintsController.setErrors(info.getFileObject(), ExplicitFindDuplicates.class.getName(), eds);
 547.101 -    }
 547.102 -
 547.103 -    private Collection<? extends ErrorDescription> computeErrorDescription(CompilationInfo info) throws Exception {
 547.104 -        int[] span = SelectionAwareJavaSourceTaskFactory.getLastSelection(info.getFileObject());
 547.105 -
 547.106 -        if (span == null) {
 547.107 -            return null;
 547.108 -        }
 547.109 -
 547.110 -        TreePath selection = selectionForExpressionHack(info, span[0], span[1]);
 547.111 -
 547.112 -        if (selection == null) {
 547.113 -            if (selectionForStatementsHack(info, span[0], span[1], new int[2]) == null) {
 547.114 -                return null;
 547.115 -            }
 547.116 -        }
 547.117 -
 547.118 -        Fix f = new FixImpl(info.getFileObject(), span[0], span[1]);
 547.119 -        int caret = CaretAwareJavaSourceTaskFactory.getLastPosition(info.getFileObject());
 547.120 -        ErrorDescription ed = ErrorDescriptionFactory.createErrorDescription(Severity.HINT, "Look for Duplicates", Collections.singletonList(f), info.getFileObject(), caret, caret);
 547.121 -
 547.122 -        return Collections.singletonList(ed);
 547.123 -    }
 547.124 -
 547.125 -    public void cancel() {
 547.126 -        //XXX
 547.127 -    }
 547.128 -
 547.129 -    static Tree resolveAndGeneralizePattern(CompilationInfo info, int start, int end) {
 547.130 -        TreePath selection = selectionForExpressionHack(info, start, end);
 547.131 -
 547.132 -        if (selection == null) {
 547.133 -            int[] statementSpan = new int[2];
 547.134 -            TreePathHandle statementSelection = selectionForStatementsHack(info, start, end, statementSpan);
 547.135 -
 547.136 -            if (statementSelection == null) {
 547.137 -                return null;
 547.138 -            }
 547.139 -
 547.140 -            selection = statementSelection.resolve(info);
 547.141 -
 547.142 -            if (selection == null) {
 547.143 -                return null; //XXX
 547.144 -            }
 547.145 -
 547.146 -            return Utilities.generalizePattern(info, selection, statementSpan[0], statementSpan[1]);
 547.147 -        } else {
 547.148 -            return Utilities.generalizePattern(info, selection);
 547.149 -        }
 547.150 -    }
 547.151 -
 547.152 -    private static final class FixImpl implements Fix {
 547.153 -
 547.154 -        private final FileObject file;
 547.155 -        private final int start;
 547.156 -        private final int end;
 547.157 -
 547.158 -        public FixImpl(FileObject file, int start, int end) {
 547.159 -            this.file = file;
 547.160 -            this.start = start;
 547.161 -            this.end = end;
 547.162 -        }
 547.163 -
 547.164 -        public String getText() {
 547.165 -            return "Look for Duplicates in Opened Projects";
 547.166 -        }
 547.167 -
 547.168 -        public ChangeInfo implement() throws Exception {
 547.169 -            JavaSource.forFileObject(file).runUserActionTask(new Task<CompilationController>() {
 547.170 -                public void run(CompilationController cc) throws Exception {
 547.171 -                    cc.toPhase(Phase.RESOLVED);
 547.172 -
 547.173 -                    Tree generalized = resolveAndGeneralizePattern(cc, start, end);
 547.174 -
 547.175 -                    if (generalized == null) {
 547.176 -                        return ;
 547.177 -                    }
 547.178 -
 547.179 -                    final String pattern = generalized.toString(); //XXX
 547.180 -
 547.181 -                    SwingUtilities.invokeLater(new Runnable() {
 547.182 -                        public void run() {
 547.183 -                            UI.openRefactoringUI(new FindDuplicatesRefactoringUI(pattern, Scopes.allOpenedProjectsScope()));
 547.184 -                        }
 547.185 -                    });
 547.186 -                }
 547.187 -            }, true);
 547.188 -            
 547.189 -            return null;
 547.190 -        }
 547.191 -
 547.192 -    }
 547.193 -
 547.194 -    private static final Set<TypeKind> NOT_ACCEPTED_TYPES = EnumSet.of(TypeKind.NONE, TypeKind.OTHER);
 547.195 -    
 547.196 -    static TreePath selectionForExpressionHack(CompilationInfo info, int start, int end) {
 547.197 -        return validateSelection(info, start, end, NOT_ACCEPTED_TYPES);
 547.198 -    }
 547.199 -
 547.200 -    static TreePathHandle selectionForStatementsHack(CompilationInfo info, int start, int end, int[] outSpan)  {
 547.201 -        return validateSelectionForIntroduceMethod(info, start, end, outSpan);
 547.202 -    }
 547.203 -
 547.204 -    private static final Set<JavaTokenId> WHITESPACES = EnumSet.of(JavaTokenId.WHITESPACE, JavaTokenId.BLOCK_COMMENT, JavaTokenId.LINE_COMMENT, JavaTokenId.JAVADOC_COMMENT);
 547.205 -    static int[] ignoreWhitespaces(CompilationInfo ci, int start, int end) {
 547.206 -        TokenSequence<JavaTokenId> ts = ci.getTokenHierarchy().tokenSequence(JavaTokenId.language());
 547.207 -
 547.208 -        if (ts == null) {
 547.209 -            return new int[] {start, end};
 547.210 -        }
 547.211 -
 547.212 -        ts.move(start);
 547.213 -
 547.214 -        if (ts.moveNext()) {
 547.215 -            boolean wasMoveNext = true;
 547.216 -
 547.217 -            while (WHITESPACES.contains(ts.token().id()) && (wasMoveNext = ts.moveNext()))
 547.218 -                ;
 547.219 -
 547.220 -            if (wasMoveNext && ts.offset() > start)
 547.221 -                start = ts.offset();
 547.222 -        }
 547.223 -
 547.224 -        ts.move(end);
 547.225 -
 547.226 -        while (ts.movePrevious() && WHITESPACES.contains(ts.token().id()) && ts.offset() < end)
 547.227 -            end = ts.offset();
 547.228 -
 547.229 -        return new int[] {start, end};
 547.230 -    }
 547.231 -    
 547.232 -    private static boolean isInsideClass(TreePath tp) {
 547.233 -        while (tp != null) {
 547.234 -            if (tp.getLeaf().getKind() == Kind.CLASS)
 547.235 -                return true;
 547.236 -
 547.237 -            tp = tp.getParentPath();
 547.238 -        }
 547.239 -
 547.240 -        return false;
 547.241 -    }
 547.242 -    
 547.243 -    private static TreePath validateSelection(CompilationInfo ci, int start, int end, Set<TypeKind> ignoredTypes) {
 547.244 -        TreePath tp = ci.getTreeUtilities().pathFor((start + end) / 2 + 1);
 547.245 -
 547.246 -        for ( ; tp != null; tp = tp.getParentPath()) {
 547.247 -            Tree leaf = tp.getLeaf();
 547.248 -
 547.249 -            if (!ExpressionTree.class.isAssignableFrom(leaf.getKind().asInterface()))
 547.250 -               continue;
 547.251 -
 547.252 -            long treeStart = ci.getTrees().getSourcePositions().getStartPosition(ci.getCompilationUnit(), leaf);
 547.253 -            long treeEnd   = ci.getTrees().getSourcePositions().getEndPosition(ci.getCompilationUnit(), leaf);
 547.254 -
 547.255 -            if (treeStart != start || treeEnd != end) {
 547.256 -                continue;
 547.257 -            }
 547.258 -
 547.259 -            TypeMirror type = ci.getTrees().getTypeMirror(tp);
 547.260 -
 547.261 -            if (type != null && type.getKind() == TypeKind.ERROR) {
 547.262 -                type = ci.getTrees().getOriginalType((ErrorType) type);
 547.263 -            }
 547.264 -
 547.265 -            if (type == null || ignoredTypes.contains(type.getKind()))
 547.266 -                continue;
 547.267 -
 547.268 -            if(tp.getLeaf().getKind() == Kind.ASSIGNMENT)
 547.269 -                continue;
 547.270 -
 547.271 -            if (tp.getLeaf().getKind() == Kind.ANNOTATION)
 547.272 -                continue;
 547.273 -
 547.274 -            if (!isInsideClass(tp))
 547.275 -                return null;
 547.276 -
 547.277 -            TreePath candidate = tp;
 547.278 -
 547.279 -            tp = tp.getParentPath();
 547.280 -
 547.281 -            while (tp != null) {
 547.282 -                switch (tp.getLeaf().getKind()) {
 547.283 -                    case VARIABLE:
 547.284 -                        VariableTree vt = (VariableTree) tp.getLeaf();
 547.285 -                        if (vt.getInitializer() == leaf) {
 547.286 -                            return candidate;
 547.287 -                        } else {
 547.288 -                            return null;
 547.289 -                        }
 547.290 -                    case NEW_CLASS:
 547.291 -                        NewClassTree nct = (NewClassTree) tp.getLeaf();
 547.292 -
 547.293 -                        if (nct.getIdentifier().equals(candidate.getLeaf())) { //avoid disabling hint ie inside of anonymous class higher in treepath
 547.294 -                            for (Tree p : nct.getArguments()) {
 547.295 -                                if (p == leaf) {
 547.296 -                                    return candidate;
 547.297 -                                }
 547.298 -                            }
 547.299 -
 547.300 -                            return null;
 547.301 -                        }
 547.302 -                }
 547.303 -
 547.304 -                leaf = tp.getLeaf();
 547.305 -                tp = tp.getParentPath();
 547.306 -            }
 547.307 -
 547.308 -            return candidate;
 547.309 -        }
 547.310 -
 547.311 -        return null;
 547.312 -    }
 547.313 -
 547.314 -    private static TreePathHandle validateSelectionForIntroduceMethod(CompilationInfo ci, int start, int end, int[] statementsSpan) {
 547.315 -        int[] span = ignoreWhitespaces(ci, Math.min(start, end), Math.max(start, end));
 547.316 -
 547.317 -        start = span[0];
 547.318 -        end   = span[1];
 547.319 -
 547.320 -        if (start >= end)
 547.321 -            return null;
 547.322 -
 547.323 -        TreePath tpStart = ci.getTreeUtilities().pathFor(start);
 547.324 -        TreePath tpEnd = ci.getTreeUtilities().pathFor(end);
 547.325 -
 547.326 -        if (tpStart.getLeaf() != tpEnd.getLeaf() || tpStart.getLeaf().getKind() != Kind.BLOCK) {
 547.327 -            //??? not in the same block:
 547.328 -            return null;
 547.329 -        }
 547.330 -
 547.331 -        int from = -1;
 547.332 -        int to   = -1;
 547.333 -
 547.334 -        BlockTree block = (BlockTree) tpStart.getLeaf();
 547.335 -        int index = 0;
 547.336 -
 547.337 -        for (StatementTree s : block.getStatements()) {
 547.338 -            long sStart = ci.getTrees().getSourcePositions().getStartPosition(ci.getCompilationUnit(), s);
 547.339 -
 547.340 -            if (sStart == start) {
 547.341 -                from = index;
 547.342 -            }
 547.343 -
 547.344 -            if (end < sStart && to == (-1)) {
 547.345 -                to = index - 1;
 547.346 -            }
 547.347 -
 547.348 -            index++;
 547.349 -        }
 547.350 -
 547.351 -        if (from == (-1)) {
 547.352 -            return null;
 547.353 -        }
 547.354 -
 547.355 -        if (to == (-1))
 547.356 -            to = block.getStatements().size() - 1;
 547.357 -
 547.358 -        if (to < from) {
 547.359 -            return null;
 547.360 -        }
 547.361 -
 547.362 -        statementsSpan[0] = from;
 547.363 -        statementsSpan[1] = to;
 547.364 -
 547.365 -        return TreePathHandle.create(tpStart, ci);
 547.366 -    }
 547.367 -
 547.368 -    @ServiceProvider(service=JavaSourceTaskFactory.class)
 547.369 -    public static final class FactoryImpl extends SelectionAwareJavaSourceTaskFactory {
 547.370 -
 547.371 -        public FactoryImpl() {
 547.372 -            super(Phase.RESOLVED, Priority.LOW);
 547.373 -        }
 547.374 -
 547.375 -        @Override
 547.376 -        protected CancellableTask<CompilationInfo> createTask(FileObject file) {
 547.377 -            return new ExplicitFindDuplicates();
 547.378 -        }
 547.379 -        
 547.380 -    }
 547.381 -
 547.382 -}
   548.1 --- a/sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/resources/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   548.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   548.3 @@ -1,40 +0,0 @@
   548.4 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   548.5 -#
   548.6 -# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
   548.7 -#
   548.8 -# The contents of this file are subject to the terms of either the GNU
   548.9 -# General Public License Version 2 only ("GPL") or the Common
  548.10 -# Development and Distribution License("CDDL") (collectively, the
  548.11 -# "License"). You may not use this file except in compliance with the
  548.12 -# License. You can obtain a copy of the License at
  548.13 -# http://www.netbeans.org/cddl-gplv2.html
  548.14 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  548.15 -# specific language governing permissions and limitations under the
  548.16 -# License.  When distributing the software, include this License Header
  548.17 -# Notice in each file and include the License file at
  548.18 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  548.19 -# particular file as subject to the "Classpath" exception as provided
  548.20 -# by Sun in the GPL Version 2 section of the License file that
  548.21 -# accompanied this code. If applicable, add the following below the
  548.22 -# License Header, with the fields enclosed by brackets [] replaced by
  548.23 -# your own identifying information:
  548.24 -# "Portions Copyrighted [year] [name of copyright owner]"
  548.25 -#
  548.26 -# If you wish your version of this file to be governed by only the CDDL
  548.27 -# or only the GPL Version 2, indicate your decision by adding
  548.28 -# "[Contributor] elects to include this software in this distribution
  548.29 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
  548.30 -# single choice of license, a recipient has the option to distribute
  548.31 -# your version of this file under either the CDDL, the GPL Version 2 or
  548.32 -# to extend the choice of license to its licensees as provided above.
  548.33 -# However, if you add GPL Version 2 code and therefore, elected the GPL
  548.34 -# Version 2 license, then the option applies only if the new code is
  548.35 -# made subject to such option by the copyright holder.
  548.36 -#
  548.37 -# Contributor(s):
  548.38 -#
  548.39 -# Portions Copyrighted 2009 Sun Microsystems, Inc.
  548.40 -
  548.41 -Actions/Refactoring/org-netbeans-modules-jackpot30-impl-refactoring-ApplyPatternAction.instance=Apply Pattern
  548.42 -Actions/Refactoring/org-netbeans-modules-jackpot30-impl-refactoring-FindOccurrencesAction.instance=Find Pattern Occurrences
  548.43 -OpenIDE-Module-Name=Jackpot 3.0 API
   549.1 Binary file sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/resources/examples_icon.png has changed
   550.1 --- a/sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/resources/layer.xml	Mon Dec 19 11:37:36 2016 +0100
   550.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   550.3 @@ -1,68 +0,0 @@
   550.4 -<?xml version="1.0" encoding="UTF-8"?>
   550.5 -<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
   550.6 -<filesystem>
   550.7 -    <folder name="Actions">
   550.8 -        <folder name="Refactoring">
   550.9 -            <file name="org-netbeans-modules-jackpot30-impl-duplicates-GlobalFindDuplicates.instance">
  550.10 -                <attr name="delegate" newvalue="org.netbeans.modules.jackpot30.impl.duplicates.GlobalFindDuplicates"/>
  550.11 -                <attr name="displayName" bundlevalue="org.netbeans.modules.jackpot30.impl.duplicates.Bundle#CTL_GlobalFindDuplicates"/>
  550.12 -                <attr name="instanceCreate" methodvalue="org.openide.awt.Actions.alwaysEnabled"/>
  550.13 -                <attr name="noIconInMenu" boolvalue="false"/>
  550.14 -            </file>
  550.15 -            <file name="org-netbeans-modules-jackpot30-impl-refactoring-ApplyPatternAction.instance">
  550.16 -                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.jackpot30.impl.resources.Bundle"/>
  550.17 -                <attr name="delegate" newvalue="org.netbeans.modules.jackpot30.impl.refactoring.ApplyPatternAction"/>
  550.18 -                <attr name="displayName" bundlevalue="org.netbeans.modules.jackpot30.impl.refactoring.Bundle#CTL_ApplyPatternAction"/>
  550.19 -                <attr name="instanceCreate" methodvalue="org.openide.awt.Actions.alwaysEnabled"/>
  550.20 -                <attr name="noIconInMenu" boolvalue="false"/>
  550.21 -            </file>
  550.22 -            <file name="org-netbeans-modules-jackpot30-impl-refactoring-FindOccurrencesAction.instance">
  550.23 -                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.jackpot30.impl.resources.Bundle"/>
  550.24 -                <attr name="delegate" newvalue="org.netbeans.modules.jackpot30.impl.refactoring.FindOccurrencesAction"/>
  550.25 -                <attr name="displayName" bundlevalue="org.netbeans.modules.jackpot30.impl.refactoring.Bundle#CTL_FindOccurrencesAction"/>
  550.26 -                <attr name="instanceCreate" methodvalue="org.openide.awt.Actions.alwaysEnabled"/>
  550.27 -                <attr name="noIconInMenu" boolvalue="false"/>
  550.28 -            </file>
  550.29 -            <file name="org-netbeans-modules-jackpot30-impl-refactoring-upgrade-UpgradeAction.instance">
  550.30 -                <attr name="delegate" newvalue="org.netbeans.modules.jackpot30.impl.refactoring.upgrade.UpgradeAction"/>
  550.31 -                <attr name="displayName" bundlevalue="org.netbeans.modules.jackpot30.impl.refactoring.upgrade.Bundle#CTL_UpgradeAction"/>
  550.32 -                <attr name="instanceCreate" methodvalue="org.openide.awt.Actions.alwaysEnabled"/>
  550.33 -                <attr name="noIconInMenu" boolvalue="false"/>
  550.34 -            </file>
  550.35 -        </folder>
  550.36 -    </folder>
  550.37 -
  550.38 -    <!--XXX:-->
  550.39 -    <folder name="Menu">
  550.40 -        <folder name="Edit">
  550.41 -            <file name="org-netbeans-modules-jackpot30-impl-refactoring-FindOccurrencesAction.shadow">
  550.42 -                <attr name="originalFile" stringvalue="Actions/Refactoring/org-netbeans-modules-jackpot30-impl-refactoring-FindOccurrencesAction.instance"/>
  550.43 -                <attr name="position" intvalue="2250"/>
  550.44 -            </file>
  550.45 -        </folder>
  550.46 -        <folder name="Refactoring">
  550.47 -            <file name="org-netbeans-modules-jackpot30-impl-duplicates-GlobalFindDuplicates.shadow">
  550.48 -                <attr name="originalFile" stringvalue="Actions/Refactoring/org-netbeans-modules-jackpot30-impl-duplicates-GlobalFindDuplicates.instance"/>
  550.49 -                <attr name="position" intvalue="2300"/>
  550.50 -            </file>
  550.51 -            <file name="org-netbeans-modules-jackpot30-impl-refactoring-ApplyPatternAction.shadow">
  550.52 -                <attr name="originalFile" stringvalue="Actions/Refactoring/org-netbeans-modules-jackpot30-impl-refactoring-ApplyPatternAction.instance"/>
  550.53 -                <attr name="position" intvalue="2200"/>
  550.54 -            </file>
  550.55 -            <file name="org-netbeans-modules-jackpot30-impl-refactoring-upgrade-UpgradeAction.shadow">
  550.56 -                <attr name="originalFile" stringvalue="Actions/Refactoring/org-netbeans-modules-jackpot30-impl-refactoring-upgrade-UpgradeAction.instance"/>
  550.57 -                <attr name="position" intvalue="2187"/>
  550.58 -            </file>
  550.59 -        </folder>
  550.60 -    </folder>
  550.61 -
  550.62 -    <folder name="Editors">
  550.63 -        <folder name="text">
  550.64 -            <folder name="x-java">
  550.65 -                <file name="org-netbeans-modules-jackpot30-impl-hints-HintsInvoker$FactoryImpl.instance"/>
  550.66 -                <file name="org-netbeans-modules-jackpot30-impl-indexing-CustomIndexerImpl$CustomIndexerFactoryImpl.instance"/>
  550.67 -                <file name="org-netbeans-modules-jackpot30-impl-duplicates-indexing-DuplicatesCustomIndexerImpl$FactoryImpl.instance"/>
  550.68 -            </folder>
  550.69 -        </folder>
  550.70 -    </folder>
  550.71 -</filesystem>
   551.1 Binary file sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/impl/resources/recent_icon.png has changed
   552.1 --- a/sandbox/old-modules/api/src/org/netbeans/modules/jackpot30/spi/Hacks.java	Mon Dec 19 11:37:36 2016 +0100
   552.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   552.3 @@ -1,89 +0,0 @@
   552.4 -/*
   552.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   552.6 - *
   552.7 - * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
   552.8 - *
   552.9 - * The contents of this file are subject to the terms of either the GNU
  552.10 - * General Public License Version 2 only ("GPL") or the Common
  552.11 - * Development and Distribution License("CDDL") (collectively, the
  552.12 - * "License"). You may not use this file except in compliance with the
  552.13 - * License. You can obtain a copy of the License at
  552.14 - * http://www.netbeans.org/cddl-gplv2.html
  552.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  552.16 - * specific language governing permissions and limitations under the
  552.17 - * License.  When distributing the software, include this License Header
  552.18 - * Notice in each file and include the License file at
  552.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  552.20 - * particular file as subject to the "Classpath" exception as provided
  552.21 - * by Sun in the GPL Version 2 section of the License file that
  552.22 - * accompanied this code. If applicable, add the following below the
  552.23 - * License Header, with the fields enclosed by brackets [] replaced by
  552.24 - * your own identifying information:
  552.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  552.26 - *
  552.27 - * If you wish your version of this file to be governed by only the CDDL
  552.28 - * or only the GPL Version 2, indicate your decision by adding
  552.29 - * "[Contributor] elects to include this software in this distribution
  552.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  552.31 - * single choice of license, a recipient has the option to distribute
  552.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  552.33 - * to extend the choice of license to its licensees as provided above.
  552.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  552.35 - * Version 2 license, then the option applies only if the new code is
  552.36 - * made subject to such option by the copyright holder.
  552.37 - *
  552.38 - * Contributor(s):
  552.39 - *
  552.40 - * Portions Copyrighted 2009 Sun Microsystems, Inc.
  552.41 - */
  552.42 -
  552.43 -package org.netbeans.modules.jackpot30.spi;
  552.44 -
  552.45 -import com.sun.source.util.TreePath;
  552.46 -import java.util.ArrayList;
  552.47 -import java.util.Collections;
  552.48 -import java.util.LinkedList;
  552.49 -import java.util.List;
  552.50 -import java.util.Set;
  552.51 -import java.util.concurrent.atomic.AtomicBoolean;
  552.52 -import java.util.prefs.Preferences;
  552.53 -import org.netbeans.api.java.source.WorkingCopy;
  552.54 -import org.netbeans.api.project.Project;
  552.55 -import org.netbeans.modules.java.hints.jackpot.impl.MessageImpl;
  552.56 -import org.netbeans.modules.java.hints.jackpot.impl.batch.BatchUtilities;
  552.57 -import org.netbeans.modules.java.hints.jackpot.impl.hints.HintsInvoker;
  552.58 -import org.netbeans.modules.java.hints.jackpot.spi.HintDescription;
  552.59 -import org.netbeans.modules.java.hints.jackpot.spi.HintMetadata;
  552.60 -import org.netbeans.spi.editor.hints.ErrorDescription;
  552.61 -import org.openide.util.Exceptions;
  552.62 -
  552.63 -/**
  552.64 - *
  552.65 - * @author lahvac
  552.66 - */
  552.67 -public class Hacks {
  552.68 -
  552.69 -    public static interface HintPreferencesProvider {
  552.70 -        public Preferences findPreferences(HintMetadata hm);
  552.71 -    }
  552.72 -
  552.73 -    public static void findHintsAndApplyFixes(WorkingCopy copy, Iterable<? extends HintDescription> hints, TreePath on, AtomicBoolean cancel) {
  552.74 -        HintsInvoker inv = new HintsInvoker(copy, cancel);
  552.75 -        List<ErrorDescription> errs = new ArrayList<ErrorDescription>(inv.computeHints(copy, hints));
  552.76 -        List<MessageImpl> problems = new LinkedList<MessageImpl>();
  552.77 -
  552.78 -        try {
  552.79 -            if (BatchUtilities.applyFixes(copy, Collections.<Project, Set<String>>emptyMap(), errs, problems)) {
  552.80 -                throw new IllegalStateException();
  552.81 -            }
  552.82 -        } catch (IllegalStateException ex) {
  552.83 -            Exceptions.printStackTrace(ex);
  552.84 -        } catch (Exception ex) {
  552.85 -            Exceptions.printStackTrace(ex);
  552.86 -        }
  552.87 -
  552.88 -        if (!problems.isEmpty()) {
  552.89 -            throw new IllegalStateException(problems.get(0).text);
  552.90 -        }
  552.91 -    }
  552.92 -}
   553.1 --- a/sandbox/old-modules/api/test/unit/src/org/netbeans/modules/jackpot30/impl/TestBase.java	Mon Dec 19 11:37:36 2016 +0100
   553.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   553.3 @@ -1,120 +0,0 @@
   553.4 -/*
   553.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   553.6 - *
   553.7 - * Copyright 2008-2009 Sun Microsystems, Inc. All rights reserved.
   553.8 - *
   553.9 - * The contents of this file are subject to the terms of either the GNU
  553.10 - * General Public License Version 2 only ("GPL") or the Common
  553.11 - * Development and Distribution License("CDDL") (collectively, the
  553.12 - * "License"). You may not use this file except in compliance with the
  553.13 - * License. You can obtain a copy of the License at
  553.14 - * http://www.netbeans.org/cddl-gplv2.html
  553.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  553.16 - * specific language governing permissions and limitations under the
  553.17 - * License.  When distributing the software, include this License Header
  553.18 - * Notice in each file and include the License file at
  553.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  553.20 - * particular file as subject to the "Classpath" exception as provided
  553.21 - * by Sun in the GPL Version 2 section of the License file that
  553.22 - * accompanied this code. If applicable, add the following below the
  553.23 - * License Header, with the fields enclosed by brackets [] replaced by
  553.24 - * your own identifying information:
  553.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  553.26 - *
  553.27 - * If you wish your version of this file to be governed by only the CDDL
  553.28 - * or only the GPL Version 2, indicate your decision by adding
  553.29 - * "[Contributor] elects to include this software in this distribution
  553.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  553.31 - * single choice of license, a recipient has the option to distribute
  553.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  553.33 - * to extend the choice of license to its licensees as provided above.
  553.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  553.35 - * Version 2 license, then the option applies only if the new code is
  553.36 - * made subject to such option by the copyright holder.
  553.37 - *
  553.38 - * Contributor(s):
  553.39 - *
  553.40 - * Portions Copyrighted 2008-2009 Sun Microsystems, Inc.
  553.41 - */
  553.42 -
  553.43 -package org.netbeans.modules.jackpot30.impl;
  553.44 -
  553.45 -import java.io.File;
  553.46 -import javax.swing.text.Document;
  553.47 -import org.netbeans.api.java.lexer.JavaTokenId;
  553.48 -import org.netbeans.api.java.source.CompilationInfo;
  553.49 -import org.netbeans.api.java.source.JavaSource;
  553.50 -import org.netbeans.api.java.source.JavaSource.Phase;
  553.51 -import org.netbeans.api.java.source.SourceUtilsTestUtil;
  553.52 -import org.netbeans.api.java.source.TestUtilities;
  553.53 -import org.netbeans.api.lexer.Language;
  553.54 -import org.netbeans.junit.NbTestCase;
  553.55 -import org.netbeans.modules.java.source.TreeLoader;
  553.56 -import org.openide.cookies.EditorCookie;
  553.57 -import org.openide.filesystems.FileObject;
  553.58 -import org.openide.filesystems.FileUtil;
  553.59 -import org.openide.loaders.DataObject;
  553.60 -
  553.61 -/**
  553.62 - *
  553.63 - * @author Jan Lahoda
  553.64 - */
  553.65 -public class TestBase extends NbTestCase {
  553.66 -
  553.67 -    public TestBase(String name) {
  553.68 -        super(name);
  553.69 -    }
  553.70 -
  553.71 -    @Override
  553.72 -    protected void setUp() throws Exception {
  553.73 -        super.setUp();
  553.74 -        SourceUtilsTestUtil.prepareTest(new String[0], new Object[0]);
  553.75 -        TreeLoader.DISABLE_CONFINEMENT_TEST = true;
  553.76 -    }
  553.77 -
  553.78 -    protected void prepareTest(String fileName, String code) throws Exception {
  553.79 -        clearWorkDir();
  553.80 -
  553.81 -        FileUtil.refreshFor(File.listRoots());
  553.82 -
  553.83 -        FileObject workFO = FileUtil.toFileObject(getWorkDir());
  553.84 -
  553.85 -        assertNotNull(workFO);
  553.86 -
  553.87 -        workFO.refresh();
  553.88 -
  553.89 -        sourceRoot = workFO.createFolder("src");
  553.90 -        FileObject buildRoot  = workFO.createFolder("build");
  553.91 -        FileObject cache = workFO.createFolder("cache");
  553.92 -
  553.93 -        FileObject data = FileUtil.createData(sourceRoot, fileName);
  553.94 -        File dataFile = FileUtil.toFile(data);
  553.95 -
  553.96 -        assertNotNull(dataFile);
  553.97 -
  553.98 -        TestUtilities.copyStringToFile(dataFile, code);
  553.99 -
 553.100 -        SourceUtilsTestUtil.prepareTest(sourceRoot, buildRoot, cache);
 553.101 -
 553.102 -        DataObject od = DataObject.find(data);
 553.103 -        EditorCookie ec = od.getLookup().lookup(EditorCookie.class);
 553.104 -
 553.105 -        assertNotNull(ec);
 553.106 -
 553.107 -        doc = ec.openDocument();
 553.108 -        doc.putProperty(Language.class, JavaTokenId.language());
 553.109 -
 553.110 -        JavaSource js = JavaSource.forFileObject(data);
 553.111 -
 553.112 -        assertNotNull(js);
 553.113 -
 553.114 -        info = SourceUtilsTestUtil.getCompilationInfo(js, Phase.RESOLVED);
 553.115 -
 553.116 -        assertNotNull(info);
 553.117 -    }
 553.118 -
 553.119 -    protected FileObject sourceRoot;
 553.120 -    protected CompilationInfo info;
 553.121 -    protected Document doc;
 553.122 -
 553.123 -}
   554.1 --- a/sandbox/old-modules/api/test/unit/src/org/netbeans/modules/jackpot30/impl/examples/LoadExamplesTest.java	Mon Dec 19 11:37:36 2016 +0100
   554.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   554.3 @@ -1,71 +0,0 @@
   554.4 -/*
   554.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   554.6 - *
   554.7 - * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
   554.8 - *
   554.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  554.10 - * Other names may be trademarks of their respective owners.
  554.11 - *
  554.12 - * The contents of this file are subject to the terms of either the GNU
  554.13 - * General Public License Version 2 only ("GPL") or the Common
  554.14 - * Development and Distribution License("CDDL") (collectively, the
  554.15 - * "License"). You may not use this file except in compliance with the
  554.16 - * License. You can obtain a copy of the License at
  554.17 - * http://www.netbeans.org/cddl-gplv2.html
  554.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  554.19 - * specific language governing permissions and limitations under the
  554.20 - * License.  When distributing the software, include this License Header
  554.21 - * Notice in each file and include the License file at
  554.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  554.23 - * particular file as subject to the "Classpath" exception as provided
  554.24 - * by Oracle in the GPL Version 2 section of the License file that
  554.25 - * accompanied this code. If applicable, add the following below the
  554.26 - * License Header, with the fields enclosed by brackets [] replaced by
  554.27 - * your own identifying information:
  554.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  554.29 - *
  554.30 - * If you wish your version of this file to be governed by only the CDDL
  554.31 - * or only the GPL Version 2, indicate your decision by adding
  554.32 - * "[Contributor] elects to include this software in this distribution
  554.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  554.34 - * single choice of license, a recipient has the option to distribute
  554.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  554.36 - * to extend the choice of license to its licensees as provided above.
  554.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  554.38 - * Version 2 license, then the option applies only if the new code is
  554.39 - * made subject to such option by the copyright holder.
  554.40 - *
  554.41 - * Contributor(s):
  554.42 - *
  554.43 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  554.44 - */
  554.45 -
  554.46 -package org.netbeans.modules.jackpot30.impl.examples;
  554.47 -
  554.48 -import java.util.Arrays;
  554.49 -import java.util.LinkedList;
  554.50 -import java.util.List;
  554.51 -import org.netbeans.junit.NbTestCase;
  554.52 -import static org.junit.Assert.*;
  554.53 -
  554.54 -/**
  554.55 - *
  554.56 - * @author lahvac
  554.57 - */
  554.58 -public class LoadExamplesTest extends NbTestCase {
  554.59 -
  554.60 -    public LoadExamplesTest(String name) {
  554.61 -        super(name);
  554.62 -    }
  554.63 -
  554.64 -    public void testLoadExamples() {
  554.65 -        List<String> actual = new LinkedList<String>();
  554.66 -
  554.67 -        for (Example e : LoadExamples.loadExamples("test-examples.list")) {
  554.68 -            actual.add("" + e.getKey() + ":" + e.getOptions() + ":" + e.getCode());
  554.69 -        }
  554.70 -
  554.71 -        assertEquals(Arrays.asList("key1:[]:EX1\n", "key2:[VERIFY, FIX]:EX2\n", "key3:[FIX]:EX3\n"), actual);
  554.72 -    }
  554.73 -
  554.74 -}
  554.75 \ No newline at end of file
   555.1 --- a/sandbox/old-modules/api/test/unit/src/org/netbeans/modules/jackpot30/impl/examples/test-example1.example	Mon Dec 19 11:37:36 2016 +0100
   555.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   555.3 @@ -1,6 +0,0 @@
   555.4 -%%example=key1
   555.5 -EX1
   555.6 -%%example=key2,verify,fix
   555.7 -EX2
   555.8 -%%example=key3,fix
   555.9 -EX3
   556.1 --- a/sandbox/old-modules/api/test/unit/src/org/netbeans/modules/jackpot30/impl/examples/test-examples.list	Mon Dec 19 11:37:36 2016 +0100
   556.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   556.3 @@ -1,1 +0,0 @@
   556.4 -test-example1.example
   557.1 --- a/sandbox/old-modules/api/test/unit/src/org/netbeans/modules/jackpot30/impl/hints/ExplicitFindDuplicatesTest.java	Mon Dec 19 11:37:36 2016 +0100
   557.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   557.3 @@ -1,138 +0,0 @@
   557.4 -/*
   557.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   557.6 - *
   557.7 - * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
   557.8 - *
   557.9 - * The contents of this file are subject to the terms of either the GNU
  557.10 - * General Public License Version 2 only ("GPL") or the Common
  557.11 - * Development and Distribution License("CDDL") (collectively, the
  557.12 - * "License"). You may not use this file except in compliance with the
  557.13 - * License. You can obtain a copy of the License at
  557.14 - * http://www.netbeans.org/cddl-gplv2.html
  557.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  557.16 - * specific language governing permissions and limitations under the
  557.17 - * License.  When distributing the software, include this License Header
  557.18 - * Notice in each file and include the License file at
  557.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  557.20 - * particular file as subject to the "Classpath" exception as provided
  557.21 - * by Sun in the GPL Version 2 section of the License file that
  557.22 - * accompanied this code. If applicable, add the following below the
  557.23 - * License Header, with the fields enclosed by brackets [] replaced by
  557.24 - * your own identifying information:
  557.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  557.26 - *
  557.27 - * If you wish your version of this file to be governed by only the CDDL
  557.28 - * or only the GPL Version 2, indicate your decision by adding
  557.29 - * "[Contributor] elects to include this software in this distribution
  557.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  557.31 - * single choice of license, a recipient has the option to distribute
  557.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  557.33 - * to extend the choice of license to its licensees as provided above.
  557.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  557.35 - * Version 2 license, then the option applies only if the new code is
  557.36 - * made subject to such option by the copyright holder.
  557.37 - *
  557.38 - * Contributor(s):
  557.39 - *
  557.40 - * Portions Copyrighted 2009 Sun Microsystems, Inc.
  557.41 - */
  557.42 -
  557.43 -package org.netbeans.modules.jackpot30.impl.hints;
  557.44 -
  557.45 -import com.sun.source.tree.Tree;
  557.46 -import com.sun.tools.javac.tree.JCTree;
  557.47 -import java.util.regex.Pattern;
  557.48 -import org.netbeans.modules.jackpot30.impl.TestBase;
  557.49 -import org.netbeans.modules.java.source.pretty.VeryPretty;
  557.50 -import org.netbeans.modules.java.source.save.DiffContext;
  557.51 -
  557.52 -/**
  557.53 - *
  557.54 - * @author lahvac
  557.55 - */
  557.56 -public class ExplicitFindDuplicatesTest extends TestBase {
  557.57 -
  557.58 -    public ExplicitFindDuplicatesTest(String name) {
  557.59 -        super(name);
  557.60 -    }
  557.61 -
  557.62 -    public void testLocalVariablesGeneralization() throws Exception {
  557.63 -        performGeneralizationTest("package test;\n" +
  557.64 -                    "public class Test {\n" +
  557.65 -                    "    private void test() {\n" +
  557.66 -                    "        |int i = 0;\n" +
  557.67 -                    "        i++;\n" +
  557.68 -                    "        int j = i;|\n" +
  557.69 -                    "    }\n" +
  557.70 -                    "}\n" +
  557.71 -                    "",
  557.72 -                    "{\n" +
  557.73 -                    "    $s0$;\n" +
  557.74 -                    "    int $0 = 0;\n" +
  557.75 -                    "    $0++;\n" +
  557.76 -                    "    int $1 = $0;\n" +
  557.77 -                    "    $s1$;\n" +
  557.78 -                    "}");
  557.79 -    }
  557.80 -    
  557.81 -    public void testSingleStatementPattern() throws Exception {
  557.82 -        performGeneralizationTest("package test;\n" +
  557.83 -                    "public class Test {\n" +
  557.84 -                    "    private void test() {\n" +
  557.85 -                    "        int i = 0;\n" +
  557.86 -                    "        |i++;|\n" +
  557.87 -                    "        int j = i;\n" +
  557.88 -                    "    }\n" +
  557.89 -                    "}\n" +
  557.90 -                    "",
  557.91 -                    "$0++;");
  557.92 -    }
  557.93 -
  557.94 -    public void testExpressionPattern() throws Exception {
  557.95 -        performGeneralizationTest("package test;\n" +
  557.96 -                    "public class Test {\n" +
  557.97 -                    "    private void test() {\n" +
  557.98 -                    "        int i = 0;\n" +
  557.99 -                    "        i++;\n" +
 557.100 -                    "        int j = |i|;\n" +
 557.101 -                    "    }\n" +
 557.102 -                    "}\n" +
 557.103 -                    "",
 557.104 -                    "$0");
 557.105 -    }
 557.106 -
 557.107 -    public void testVoidMethod() throws Exception {
 557.108 -        performGeneralizationTest("package test;\n" +
 557.109 -                    "public class Test {\n" +
 557.110 -                    "    private void test() {\n" +
 557.111 -                    "        |System.err.println()|;\n" +
 557.112 -                    "    }\n" +
 557.113 -                    "}\n" +
 557.114 -                    "",
 557.115 -                    "System.err.println()");
 557.116 -    }
 557.117 -
 557.118 -    private void performGeneralizationTest(String code, String generalized) throws Exception {
 557.119 -        String[] split = code.split(Pattern.quote("|"));
 557.120 -
 557.121 -        assertEquals(3, split.length);
 557.122 -
 557.123 -        int start = split[0].length();
 557.124 -        int end   = split[1].length() + start;
 557.125 -        
 557.126 -        code = split[0] + split[1] + split[2];
 557.127 -
 557.128 -        prepareTest("test/Test.java", code);
 557.129 -
 557.130 -        Tree generalizedTree = ExplicitFindDuplicates.resolveAndGeneralizePattern(info, start, end);
 557.131 -        VeryPretty vp = new VeryPretty(new DiffContext(info));
 557.132 -
 557.133 -        vp.print((JCTree) generalizedTree);
 557.134 -        
 557.135 -        String repr = vp.toString();
 557.136 -        
 557.137 -        assertEquals(generalized.replaceAll("[ \n\t]+", " "),
 557.138 -                     repr.replaceAll("[ \n\t]+", " "));
 557.139 -    }
 557.140 -
 557.141 -}
 557.142 \ No newline at end of file
   558.1 --- a/sandbox/old-modules/api/test/unit/src/org/netbeans/modules/jackpot30/impl/pm/BulkSearchPerformance.java	Mon Dec 19 11:37:36 2016 +0100
   558.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   558.3 @@ -1,226 +0,0 @@
   558.4 -/*
   558.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   558.6 - *
   558.7 - * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
   558.8 - *
   558.9 - * The contents of this file are subject to the terms of either the GNU
  558.10 - * General Public License Version 2 only ("GPL") or the Common
  558.11 - * Development and Distribution License("CDDL") (collectively, the
  558.12 - * "License"). You may not use this file except in compliance with the
  558.13 - * License. You can obtain a copy of the License at
  558.14 - * http://www.netbeans.org/cddl-gplv2.html
  558.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  558.16 - * specific language governing permissions and limitations under the
  558.17 - * License.  When distributing the software, include this License Header
  558.18 - * Notice in each file and include the License file at
  558.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  558.20 - * particular file as subject to the "Classpath" exception as provided
  558.21 - * by Sun in the GPL Version 2 section of the License file that
  558.22 - * accompanied this code. If applicable, add the following below the
  558.23 - * License Header, with the fields enclosed by brackets [] replaced by
  558.24 - * your own identifying information:
  558.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  558.26 - *
  558.27 - * If you wish your version of this file to be governed by only the CDDL
  558.28 - * or only the GPL Version 2, indicate your decision by adding
  558.29 - * "[Contributor] elects to include this software in this distribution
  558.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  558.31 - * single choice of license, a recipient has the option to distribute
  558.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  558.33 - * to extend the choice of license to its licensees as provided above.
  558.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  558.35 - * Version 2 license, then the option applies only if the new code is
  558.36 - * made subject to such option by the copyright holder.
  558.37 - *
  558.38 - * Contributor(s):
  558.39 - *
  558.40 - * Portions Copyrighted 2009 Sun Microsystems, Inc.
  558.41 - */
  558.42 -
  558.43 -package org.netbeans.modules.jackpot30.impl.pm;
  558.44 -
  558.45 -import com.sun.source.util.TreePath;
  558.46 -import java.io.ByteArrayInputStream;
  558.47 -import java.io.ByteArrayOutputStream;
  558.48 -import java.io.File;
  558.49 -import java.io.IOException;
  558.50 -import java.util.LinkedList;
  558.51 -import java.util.List;
  558.52 -import org.netbeans.api.java.source.ClasspathInfo;
  558.53 -import org.netbeans.api.java.source.CompilationController;
  558.54 -import org.netbeans.api.java.source.JavaSource;
  558.55 -import org.netbeans.api.java.source.JavaSource.Phase;
  558.56 -import org.netbeans.api.java.source.Task;
  558.57 -import org.netbeans.junit.NbTestCase;
  558.58 -import org.netbeans.modules.java.hints.jackpot.impl.Utilities;
  558.59 -import org.netbeans.modules.java.hints.jackpot.impl.pm.BulkSearch;
  558.60 -import org.netbeans.modules.java.hints.jackpot.impl.pm.BulkSearch.BulkPattern;
  558.61 -import org.netbeans.modules.java.hints.jackpot.impl.pm.BulkSearch.EncodingContext;
  558.62 -import org.netbeans.modules.java.hints.jackpot.impl.pm.CopyFinderBasedBulkSearch;
  558.63 -import org.netbeans.modules.java.hints.jackpot.impl.pm.NFABasedBulkSearch;
  558.64 -import org.openide.filesystems.FileObject;
  558.65 -import org.openide.filesystems.FileUtil;
  558.66 -
  558.67 -/**
  558.68 - *
  558.69 - * @author lahvac
  558.70 - */
  558.71 -public class BulkSearchPerformance extends NbTestCase {
  558.72 -
  558.73 -    public BulkSearchPerformance(String name) {
  558.74 -        super(name);
  558.75 -    }
  558.76 -
  558.77 -    public void testPerformance() throws Exception {
  558.78 -        File root = new File("/media/karta/space/src/nb-main/uml");
  558.79 -        List<FileObject> files = new LinkedList<FileObject>();
  558.80 -
  558.81 -        gatherFiles(FileUtil.toFileObject(root), files);
  558.82 -
  558.83 -        String[] patterns = new String[] {"$1.isDirectory()", "new ImageIcon()"};
  558.84 -
  558.85 -        for (int c = 0; c < 5; c++) {
  558.86 -            performPerformanceTest(files, new NFABasedBulkSearch(), patterns);
  558.87 -            performPerformanceTest(files, new CopyFinderBasedBulkSearch(), patterns);
  558.88 -        }
  558.89 -
  558.90 -        performPerformanceTest(files, new NFABasedBulkSearch(), patterns);
  558.91 -        long nfa1 = performPerformanceTest(files, new NFABasedBulkSearch(), patterns);
  558.92 -        performPerformanceTest(files, new CopyFinderBasedBulkSearch(), patterns);
  558.93 -        long cf1 = performPerformanceTest(files, new CopyFinderBasedBulkSearch(), patterns);
  558.94 -
  558.95 -        performPerformanceTest(files, new NFABasedBulkSearch(), patterns);
  558.96 -        long nfa2 = performPerformanceTest(files, new NFABasedBulkSearch(), patterns);
  558.97 -        performPerformanceTest(files, new CopyFinderBasedBulkSearch(), patterns);
  558.98 -        long cf2 = performPerformanceTest(files, new CopyFinderBasedBulkSearch(), patterns);
  558.99 -
 558.100 -        System.err.println("nfa1=" + nfa1);
 558.101 -        System.err.println("cf1=" + cf1);
 558.102 -        System.err.println("nfa2=" + nfa2);
 558.103 -        System.err.println("cf2=" + cf2);
 558.104 -
 558.105 -        System.err.println("perf (cf1/nfa1): " + ((1000 * cf1 / nfa1) /10.0) + "%");
 558.106 -        System.err.println("perf (cf2/nfa2): " + ((1000 * cf2 / nfa2) /10.0) + "%");
 558.107 -    }
 558.108 -
 558.109 -    public void testIndexingPerformance() throws Exception {
 558.110 -        File root = new File("/media/karta/space/src/nb-main/uml");
 558.111 -//        File root = new File("/media/karta/space/src/nb-main/contrib/javahints");
 558.112 -        List<FileObject> files = new LinkedList<FileObject>();
 558.113 -
 558.114 -        gatherFiles(FileUtil.toFileObject(root), files);
 558.115 -
 558.116 -        String[] patterns = new String[] {"$1.isDirectory()", "new ImageIcon()"};
 558.117 -
 558.118 -        for (int c = 0; c < 5; c++) {
 558.119 -            performIndexingPerformanceTest(files, new NFABasedBulkSearch(), patterns);
 558.120 -//            performIndexingPerformanceTest(files, new CopyFinderBasedBulkSearch(), patterns);
 558.121 -        }
 558.122 -
 558.123 -        performIndexingPerformanceTest(files, new NFABasedBulkSearch(), patterns);
 558.124 -        long[] nfa1 = performIndexingPerformanceTest(files, new NFABasedBulkSearch(), patterns);
 558.125 -//        performIndexingPerformanceTest(files, new CopyFinderBasedBulkSearch(), patterns);
 558.126 -//        long cf1 = performIndexingPerformanceTest(files, new CopyFinderBasedBulkSearch(), patterns);
 558.127 -
 558.128 -        performIndexingPerformanceTest(files, new NFABasedBulkSearch(), patterns);
 558.129 -        long[] nfa2 = performIndexingPerformanceTest(files, new NFABasedBulkSearch(), patterns);
 558.130 -//        performIndexingPerformanceTest(files, new CopyFinderBasedBulkSearch(), patterns);
 558.131 -//        long cf2 = performIndexingPerformanceTest(files, new CopyFinderBasedBulkSearch(), patterns);
 558.132 -
 558.133 -        System.err.println("i.nfa1=" + nfa1[0]);
 558.134 -        System.err.println("m.nfa1=" + nfa1[1]);
 558.135 -//        System.err.println("cf1=" + cf1);
 558.136 -        System.err.println("i.nfa2=" + nfa2[0]);
 558.137 -        System.err.println("m.nfa2=" + nfa2[1]);
 558.138 -//        System.err.println("cf2=" + cf2);
 558.139 -
 558.140 -//        System.err.println("perf i.(nfa1/regexp1): " + ((1000 * nfa1[0] / regexp1[0]) /10.0) + "%");
 558.141 -//        System.err.println("perf m.(nfa1/regexp1): " + ((1000 * nfa1[1] / regexp1[1]) /10.0) + "%");
 558.142 -//        System.err.println("perf i.(nfa2/regexp2): " + ((1000 * nfa2[0] / regexp2[0]) /10.0) + "%");
 558.143 -//        System.err.println("perf m.(nfa2/regexp2): " + ((1000 * nfa2[1] / regexp2[1]) /10.0) + "%");
 558.144 -//        System.err.println("perf (cf1/regexp1): " + ((1000 * cf1 / regexp1) /10.0) + "%");
 558.145 -//        System.err.println("perf (cf2/regexp2): " + ((1000 * cf2 / regexp2) /10.0) + "%");
 558.146 -    }
 558.147 -    
 558.148 -    private long performPerformanceTest(List<FileObject> files, final BulkSearch search, final String... pattern) throws IOException {
 558.149 -        ClasspathInfo cpInfo = Utilities.createUniversalCPInfo();
 558.150 -
 558.151 -        final BulkPattern[] bulkPattern = new BulkPattern[1];
 558.152 -        JavaSource.create(cpInfo).runUserActionTask(new Task<CompilationController>() {
 558.153 -
 558.154 -            public void run(CompilationController parameter) throws Exception {
 558.155 -                bulkPattern[0] = search.create(parameter, pattern);
 558.156 -            }
 558.157 -        }, true);
 558.158 -
 558.159 -        long start = System.currentTimeMillis();
 558.160 -        JavaSource.create(cpInfo, files).runUserActionTask(new Task<CompilationController>() {
 558.161 -
 558.162 -            public void run(CompilationController parameter) throws Exception {
 558.163 -                if (parameter.toPhase(Phase.PARSED).compareTo(Phase.PARSED) < 0)
 558.164 -                    return;
 558.165 -
 558.166 -                search.match(parameter, new TreePath(parameter.getCompilationUnit()), bulkPattern[0]);
 558.167 -            }
 558.168 -        }, true);
 558.169 -        long end = System.currentTimeMillis();
 558.170 -
 558.171 -        return end - start;
 558.172 -    }
 558.173 -
 558.174 -    private long[] performIndexingPerformanceTest(List<FileObject> files, final BulkSearch search, final String... pattern) throws IOException {
 558.175 -        final List<byte[]> index = new LinkedList<byte[]>();
 558.176 -        long[] result = new long[2];
 558.177 -        ClasspathInfo cpInfo = Utilities.createUniversalCPInfo();
 558.178 -
 558.179 -        final BulkPattern[] bulkPattern = new BulkPattern[1];
 558.180 -        JavaSource.create(cpInfo).runUserActionTask(new Task<CompilationController>() {
 558.181 -
 558.182 -            public void run(CompilationController parameter) throws Exception {
 558.183 -                bulkPattern[0] = search.create(parameter, pattern);
 558.184 -            }
 558.185 -        }, true);
 558.186 -
 558.187 -        long start = System.currentTimeMillis();
 558.188 -        JavaSource.create(cpInfo, files).runUserActionTask(new Task<CompilationController>() {
 558.189 -
 558.190 -            public void run(CompilationController parameter) throws Exception {
 558.191 -                if (parameter.toPhase(Phase.PARSED).compareTo(Phase.PARSED) < 0)
 558.192 -                    return;
 558.193 -
 558.194 -                ByteArrayOutputStream out = new ByteArrayOutputStream();
 558.195 -                EncodingContext ec = new EncodingContext(out, false);
 558.196 -                search.encode(parameter.getCompilationUnit(), ec);
 558.197 -
 558.198 -                index.add(out.toByteArray());
 558.199 -            }
 558.200 -        }, true);
 558.201 -        long end = System.currentTimeMillis();
 558.202 -
 558.203 -        result[0] = end - start;
 558.204 -
 558.205 -        start = System.currentTimeMillis();
 558.206 -
 558.207 -        for (byte[] data : index) {
 558.208 -            search.matches(new ByteArrayInputStream(data), bulkPattern[0]);
 558.209 -        }
 558.210 -
 558.211 -        end = System.currentTimeMillis();
 558.212 -
 558.213 -        result[1] = end - start;
 558.214 -
 558.215 -        return result;
 558.216 -    }
 558.217 -    
 558.218 -    private static void gatherFiles(FileObject root, List<FileObject> files) {
 558.219 -        if ("java".equals(root.getExt())) {
 558.220 -            files.add(root);
 558.221 -        }
 558.222 -        
 558.223 -        if (root.isFolder()) {
 558.224 -            for (FileObject c : root.getChildren()) {
 558.225 -                gatherFiles(c, files);
 558.226 -            }
 558.227 -        }
 558.228 -    }
 558.229 -}
   559.1 --- a/sandbox/old-modules/api/test/unit/src/org/netbeans/modules/jackpot30/impl/pm/IndexBulkTest.java	Mon Dec 19 11:37:36 2016 +0100
   559.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   559.3 @@ -1,182 +0,0 @@
   559.4 -/*
   559.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   559.6 - *
   559.7 - * Copyright 2009-2010 Oracle and/or its affiliates. All rights reserved.
   559.8 - *
   559.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  559.10 - * Other names may be trademarks of their respective owners.
  559.11 - *
  559.12 - * The contents of this file are subject to the terms of either the GNU
  559.13 - * General Public License Version 2 only ("GPL") or the Common
  559.14 - * Development and Distribution License("CDDL") (collectively, the
  559.15 - * "License"). You may not use this file except in compliance with the
  559.16 - * License. You can obtain a copy of the License at
  559.17 - * http://www.netbeans.org/cddl-gplv2.html
  559.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  559.19 - * specific language governing permissions and limitations under the
  559.20 - * License.  When distributing the software, include this License Header
  559.21 - * Notice in each file and include the License file at
  559.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  559.23 - * particular file as subject to the "Classpath" exception as provided
  559.24 - * by Oracle in the GPL Version 2 section of the License file that
  559.25 - * accompanied this code. If applicable, add the following below the
  559.26 - * License Header, with the fields enclosed by brackets [] replaced by
  559.27 - * your own identifying information:
  559.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  559.29 - *
  559.30 - * If you wish your version of this file to be governed by only the CDDL
  559.31 - * or only the GPL Version 2, indicate your decision by adding
  559.32 - * "[Contributor] elects to include this software in this distribution
  559.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  559.34 - * single choice of license, a recipient has the option to distribute
  559.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  559.36 - * to extend the choice of license to its licensees as provided above.
  559.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  559.38 - * Version 2 license, then the option applies only if the new code is
  559.39 - * made subject to such option by the copyright holder.
  559.40 - *
  559.41 - * Contributor(s):
  559.42 - *
  559.43 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  559.44 - */
  559.45 -
  559.46 -package org.netbeans.modules.jackpot30.impl.pm;
  559.47 -
  559.48 -import com.sun.source.tree.Tree;
  559.49 -import com.sun.source.util.TreePath;
  559.50 -import java.io.IOException;
  559.51 -import java.io.InputStream;
  559.52 -import java.io.Reader;
  559.53 -import java.util.Collection;
  559.54 -import java.util.Collections;
  559.55 -import java.util.Map;
  559.56 -import org.apache.lucene.analysis.Analyzer;
  559.57 -import org.apache.lucene.analysis.TokenStream;
  559.58 -import org.apache.lucene.index.IndexReader;
  559.59 -import org.apache.lucene.index.IndexWriter.MaxFieldLength;
  559.60 -import org.apache.lucene.store.Directory;
  559.61 -import org.apache.lucene.store.RAMDirectory;
  559.62 -import org.netbeans.api.java.source.CompilationInfo;
  559.63 -import org.netbeans.modules.jackpot30.impl.indexing.AbstractLuceneIndex;
  559.64 -import org.netbeans.modules.jackpot30.impl.indexing.Index.IndexWriter;
  559.65 -import org.netbeans.modules.jackpot30.impl.indexing.IndexInfo;
  559.66 -import org.netbeans.modules.java.hints.jackpot.impl.pm.BulkSearch;
  559.67 -import org.netbeans.modules.java.hints.jackpot.impl.pm.BulkSearch.BulkPattern;
  559.68 -import org.netbeans.modules.java.hints.jackpot.impl.pm.BulkSearch.EncodingContext;
  559.69 -import org.netbeans.modules.java.hints.jackpot.impl.pm.BulkSearchTestPerformer;
  559.70 -import org.netbeans.modules.java.hints.jackpot.impl.pm.NFABasedBulkSearch;
  559.71 -import org.netbeans.modules.java.hints.jackpot.spi.HintDescription.AdditionalQueryConstraints;
  559.72 -
  559.73 -/**
  559.74 - *
  559.75 - * @author lahvac
  559.76 - */
  559.77 -public class IndexBulkTest extends BulkSearchTestPerformer {
  559.78 -
  559.79 -    public IndexBulkTest(String name) {
  559.80 -        super(name);
  559.81 -    }
  559.82 -
  559.83 -//    public static TestSuite suite() {
  559.84 -//        NbTestSuite r = new NbTestSuite();
  559.85 -//
  559.86 -//        r.addTest(new NFABasedBulkSearchTest("testField1"));
  559.87 -//        r.addTest(new NFABasedBulkSearchTest("testField2"));
  559.88 -//
  559.89 -//        return r;
  559.90 -//    }
  559.91 -
  559.92 -    @Override
  559.93 -    protected BulkSearch createSearch() {
  559.94 -        return new BulkSearchImpl(false);
  559.95 -    }
  559.96 -
  559.97 -    private static class BulkSearchImpl extends BulkSearch {
  559.98 -
  559.99 -        public BulkSearchImpl(boolean requiresLightweightVerification) {
 559.100 -            super(requiresLightweightVerification);
 559.101 -        }
 559.102 -
 559.103 -        @Override
 559.104 -        public Map<String, Collection<TreePath>> match(CompilationInfo info, TreePath toSearch, BulkPattern pattern, Map<String, Long> timeLog) {
 559.105 -            try {
 559.106 -                IndexImpl ii = new IndexImpl();
 559.107 -                IndexWriter writer = ii.openForWriting();
 559.108 -
 559.109 -                writer.record(toSearch.getCompilationUnit().getSourceFile().toUri().toURL(), toSearch.getCompilationUnit(), null);
 559.110 -                writer.close();
 559.111 -
 559.112 -                if (!ii.findCandidates(pattern).isEmpty()) {
 559.113 -                    return new NFABasedBulkSearch().match(info, toSearch, pattern, timeLog);
 559.114 -                } else {
 559.115 -                    assertTrue(new NFABasedBulkSearch().match(info, toSearch, pattern, timeLog).isEmpty());
 559.116 -                    return Collections.emptyMap();
 559.117 -                }
 559.118 -            } catch (IOException ex) {
 559.119 -                throw new IllegalStateException(ex);
 559.120 -            }
 559.121 -        }
 559.122 -
 559.123 -        @Override
 559.124 -        public boolean matches(InputStream encoded, BulkPattern pattern) {
 559.125 -            return new NFABasedBulkSearch().matches(encoded, pattern);
 559.126 -        }
 559.127 -
 559.128 -        @Override
 559.129 -        public boolean matches(CompilationInfo info, TreePath toSearch, BulkPattern pattern) {
 559.130 -            return new NFABasedBulkSearch().matches(info, toSearch, pattern);
 559.131 -        }
 559.132 -
 559.133 -        @Override
 559.134 -        public void encode(Tree tree, EncodingContext ctx) {
 559.135 -            new NFABasedBulkSearch().encode(tree, ctx);
 559.136 -        }
 559.137 -
 559.138 -        @Override
 559.139 -        public BulkPattern create(Collection<? extends String> code, Collection<? extends Tree> patterns, Collection<? extends AdditionalQueryConstraints> additionalConstraints) {
 559.140 -            return new NFABasedBulkSearch().create(code, patterns, additionalConstraints);
 559.141 -        }
 559.142 -
 559.143 -        @Override
 559.144 -        public Map<String, Integer> matchesWithFrequencies(InputStream encoded, BulkPattern pattern) {
 559.145 -            return new NFABasedBulkSearch().matchesWithFrequencies(encoded, pattern);
 559.146 -        }
 559.147 -    }
 559.148 -
 559.149 -    private static final class IndexImpl extends AbstractLuceneIndex {
 559.150 -
 559.151 -        private final Directory dir = new RAMDirectory();
 559.152 -
 559.153 -        public IndexImpl() {
 559.154 -            super(0, false, true);
 559.155 -        }
 559.156 -
 559.157 -        @Override
 559.158 -        protected IndexReader createReader() throws IOException {
 559.159 -            return IndexReader.open(dir, true);
 559.160 -        }
 559.161 -
 559.162 -        @Override
 559.163 -        protected org.apache.lucene.index.IndexWriter createWriter() throws IOException {
 559.164 -            return new org.apache.lucene.index.IndexWriter(dir, new NoAnalyzer(), MaxFieldLength.UNLIMITED);
 559.165 -        }
 559.166 -
 559.167 -        @Override
 559.168 -        public IndexInfo getIndexInfo() {
 559.169 -            return IndexInfo.empty();
 559.170 -        }
 559.171 -
 559.172 -        @Override
 559.173 -        protected void storeIndexInfo(IndexInfo info) throws IOException {}
 559.174 -    }
 559.175 -
 559.176 -    private static final class NoAnalyzer extends Analyzer {
 559.177 -
 559.178 -        @Override
 559.179 -        public TokenStream tokenStream(String string, Reader reader) {
 559.180 -            throw new UnsupportedOperationException("Should not be called");
 559.181 -        }
 559.182 -
 559.183 -    }
 559.184 -
 559.185 -}
   560.1 --- a/sandbox/old-modules/api/test/unit/src/org/netbeans/modules/jackpot30/spi/refactoring/JackpotBasedRefactoringTestBase.java	Mon Dec 19 11:37:36 2016 +0100
   560.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   560.3 @@ -1,198 +0,0 @@
   560.4 -/*
   560.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   560.6 - *
   560.7 - * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
   560.8 - *
   560.9 - * The contents of this file are subject to the terms of either the GNU
  560.10 - * General Public License Version 2 only ("GPL") or the Common
  560.11 - * Development and Distribution License("CDDL") (collectively, the
  560.12 - * "License"). You may not use this file except in compliance with the
  560.13 - * License. You can obtain a copy of the License at
  560.14 - * http://www.netbeans.org/cddl-gplv2.html
  560.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  560.16 - * specific language governing permissions and limitations under the
  560.17 - * License.  When distributing the software, include this License Header
  560.18 - * Notice in each file and include the License file at
  560.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  560.20 - * particular file as subject to the "Classpath" exception as provided
  560.21 - * by Sun in the GPL Version 2 section of the License file that
  560.22 - * accompanied this code. If applicable, add the following below the
  560.23 - * License Header, with the fields enclosed by brackets [] replaced by
  560.24 - * your own identifying information:
  560.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  560.26 - *
  560.27 - * If you wish your version of this file to be governed by only the CDDL
  560.28 - * or only the GPL Version 2, indicate your decision by adding
  560.29 - * "[Contributor] elects to include this software in this distribution
  560.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  560.31 - * single choice of license, a recipient has the option to distribute
  560.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  560.33 - * to extend the choice of license to its licensees as provided above.
  560.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  560.35 - * Version 2 license, then the option applies only if the new code is
  560.36 - * made subject to such option by the copyright holder.
  560.37 - *
  560.38 - * Contributor(s):
  560.39 - *
  560.40 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  560.41 - */
  560.42 -
  560.43 -package org.netbeans.modules.jackpot30.spi.refactoring;
  560.44 -
  560.45 -import java.io.IOException;
  560.46 -import java.util.Collections;
  560.47 -import org.netbeans.api.editor.mimelookup.MimePath;
  560.48 -import org.netbeans.api.java.classpath.ClassPath;
  560.49 -import org.netbeans.api.java.classpath.GlobalPathRegistry;
  560.50 -import org.netbeans.api.java.source.SourceUtils;
  560.51 -import org.netbeans.api.java.source.SourceUtilsTestUtil;
  560.52 -import org.netbeans.api.java.source.TestUtilities;
  560.53 -import org.netbeans.api.project.Project;
  560.54 -import org.netbeans.api.project.ProjectManager;
  560.55 -import org.netbeans.core.startup.Main;
  560.56 -import org.netbeans.junit.NbTestCase;
  560.57 -import org.netbeans.modules.java.JavaDataLoader;
  560.58 -import org.netbeans.modules.java.source.indexing.JavaCustomIndexer;
  560.59 -import org.netbeans.modules.parsing.impl.indexing.CacheFolder;
  560.60 -import org.netbeans.modules.parsing.impl.indexing.MimeTypes;
  560.61 -import org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater;
  560.62 -import org.netbeans.modules.parsing.impl.indexing.Util;
  560.63 -import org.netbeans.spi.editor.mimelookup.MimeDataProvider;
  560.64 -import org.netbeans.spi.java.classpath.ClassPathProvider;
  560.65 -import org.netbeans.spi.java.classpath.support.ClassPathSupport;
  560.66 -import org.netbeans.spi.project.ProjectFactory;
  560.67 -import org.netbeans.spi.project.ProjectState;
  560.68 -import org.openide.filesystems.FileObject;
  560.69 -import org.openide.filesystems.FileUtil;
  560.70 -import org.openide.util.Lookup;
  560.71 -import org.openide.util.lookup.Lookups;
  560.72 -import org.openide.util.lookup.ServiceProvider;
  560.73 -
  560.74 -/**
  560.75 - *
  560.76 - * @author lahvac
  560.77 - */
  560.78 -public class JackpotBasedRefactoringTestBase extends NbTestCase {
  560.79 -
  560.80 -    public JackpotBasedRefactoringTestBase(String name) {
  560.81 -        super(name);
  560.82 -    }
  560.83 -
  560.84 -    protected static void writeFilesAndWaitForScan(FileObject sourceRoot, File... files) throws Exception {
  560.85 -        for (FileObject c : sourceRoot.getChildren()) {
  560.86 -            c.delete();
  560.87 -        }
  560.88 -
  560.89 -        for (File f : files) {
  560.90 -            FileObject fo = FileUtil.createData(sourceRoot, f.filename);
  560.91 -            TestUtilities.copyStringToFile(fo, f.content);
  560.92 -        }
  560.93 -
  560.94 -        SourceUtils.waitScanFinished();
  560.95 -    }
  560.96 -
  560.97 -    protected static void assertContent(FileObject sourceRoot, File... files) throws Exception {
  560.98 -        for (File f : files) {
  560.99 -            FileObject fo = sourceRoot.getFileObject(f.filename);
 560.100 -
 560.101 -            assertNotNull(f.filename, fo);
 560.102 -
 560.103 -            assertEquals(f.content.replaceAll("[ \t\n]+", " "), TestUtilities.copyFileToString(FileUtil.toFile(fo)).replaceAll("[ \t\n]+", " "));
 560.104 -        }
 560.105 -    }
 560.106 -
 560.107 -    protected static final class File {
 560.108 -        public final String filename;
 560.109 -        public final String content;
 560.110 -
 560.111 -        public File(String filename, String content) {
 560.112 -            this.filename = filename;
 560.113 -            this.content = content;
 560.114 -        }
 560.115 -    }
 560.116 -
 560.117 -    protected FileObject src;
 560.118 -    protected Project prj;
 560.119 -
 560.120 -    @Override
 560.121 -    protected void setUp() throws Exception {
 560.122 -        SourceUtilsTestUtil.prepareTest(new String[] {"org/netbeans/modules/java/editor/resources/layer.xml"}, new Object[] {
 560.123 -            new ClassPathProvider() {
 560.124 -                public ClassPath findClassPath(FileObject file, String type) {
 560.125 -                    if (src != null && (file == src || FileUtil.isParentOf(src, file))) {
 560.126 -                        if (ClassPath.BOOT.equals(type)) {
 560.127 -                            return ClassPathSupport.createClassPath(System.getProperty("sun.boot.class.path"));
 560.128 -                        }
 560.129 -                        if (ClassPath.COMPILE.equals(type)) {
 560.130 -                            return ClassPathSupport.createClassPath(new FileObject[0]);
 560.131 -                        }
 560.132 -                        if (ClassPath.SOURCE.equals(type)) {
 560.133 -                            return ClassPathSupport.createClassPath(src);
 560.134 -                        }
 560.135 -                    }
 560.136 -
 560.137 -                    return null;
 560.138 -                }
 560.139 -            },
 560.140 -            new ProjectFactory() {
 560.141 -            public boolean isProject(FileObject projectDirectory) {
 560.142 -                return src == projectDirectory;
 560.143 -            }
 560.144 -            public Project loadProject(final FileObject projectDirectory, ProjectState state) throws IOException {
 560.145 -                if (!isProject(projectDirectory)) return null;
 560.146 -                return new Project() {
 560.147 -                    public FileObject getProjectDirectory() {
 560.148 -                        return projectDirectory;
 560.149 -                    }
 560.150 -                    public Lookup getLookup() {
 560.151 -                        return Lookup.EMPTY;
 560.152 -                    }
 560.153 -                };
 560.154 -            }
 560.155 -            public void saveProject(Project project) throws IOException, ClassCastException {}
 560.156 -        },
 560.157 -        JavaDataLoader.getLoader(JavaDataLoader.class),
 560.158 -        });
 560.159 -        Main.initializeURLFactory();
 560.160 -        org.netbeans.api.project.ui.OpenProjects.getDefault().getOpenProjects();
 560.161 -        prepareTest();
 560.162 -        org.netbeans.api.project.ui.OpenProjects.getDefault().open(new Project[] {prj = ProjectManager.getDefault().findProject(src)}, false);
 560.163 -        MimeTypes.setAllMimeTypes(Collections.singleton("text/x-java"));
 560.164 -        GlobalPathRegistry.getDefault().register(ClassPath.SOURCE, new ClassPath[] {ClassPathSupport.createClassPath(src)});
 560.165 -        RepositoryUpdater.getDefault().start(true);
 560.166 -        super.setUp();
 560.167 -    }
 560.168 -
 560.169 -    @Override
 560.170 -    protected void tearDown() throws Exception {
 560.171 -        super.tearDown();
 560.172 -        org.netbeans.api.project.ui.OpenProjects.getDefault().open(new Project[] {prj}, false);
 560.173 -        prj = null;
 560.174 -    }
 560.175 -
 560.176 -    private void prepareTest() throws Exception {
 560.177 -        FileObject workdir = SourceUtilsTestUtil.makeScratchDir(this);
 560.178 -
 560.179 -        src = FileUtil.createFolder(workdir, "src");
 560.180 -
 560.181 -        FileObject cache = FileUtil.createFolder(workdir, "cache");
 560.182 -
 560.183 -        CacheFolder.setCacheFolder(cache);
 560.184 -    }
 560.185 -
 560.186 -    @ServiceProvider(service=MimeDataProvider.class)
 560.187 -    public static final class MimeDataProviderImpl implements MimeDataProvider {
 560.188 -
 560.189 -        private static final Lookup L = Lookups.singleton(new JavaCustomIndexer.Factory());
 560.190 -
 560.191 -        public Lookup getLookup(MimePath mimePath) {
 560.192 -            if ("text/x-java".equals(mimePath.getPath())) {
 560.193 -                return L;
 560.194 -            }
 560.195 -
 560.196 -            return null;
 560.197 -        }
 560.198 -
 560.199 -    }
 560.200 -
 560.201 -}
   561.1 --- a/sandbox/old-modules/bridges/refactoring/build.xml	Mon Dec 19 11:37:36 2016 +0100
   561.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   561.3 @@ -1,9 +0,0 @@
   561.4 -<?xml version="1.0" encoding="UTF-8"?>
   561.5 -<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
   561.6 -<!-- for some information on what you could do (e.g. targets to override). -->
   561.7 -<!-- If you delete this file and reopen the project it will be recreated. -->
   561.8 -<project name="org.netbeans.modules.jackpot30.refactoring" default="netbeans" basedir=".">
   561.9 -    <description>Builds, tests, and runs the project org.netbeans.modules.jackpot30.refactoring.</description>
  561.10 -    <import file="nbproject/build-impl.xml"/>
  561.11 -    <import file="${suite.dir}/findbugs-import.xml"/>
  561.12 -</project>
   562.1 --- a/sandbox/old-modules/bridges/refactoring/manifest.mf	Mon Dec 19 11:37:36 2016 +0100
   562.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   562.3 @@ -1,6 +0,0 @@
   562.4 -Manifest-Version: 1.0
   562.5 -OpenIDE-Module: org.netbeans.modules.jackpot30.refactoring
   562.6 -OpenIDE-Module-Implementation-Version: 1
   562.7 -OpenIDE-Module-Layer: org/netbeans/modules/jackpot30/refactoring/layer.xml
   562.8 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jackpot30/refactoring/Bundle.properties
   562.9 -
   563.1 --- a/sandbox/old-modules/bridges/refactoring/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   563.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   563.3 @@ -1,30 +0,0 @@
   563.4 -<?xml version="1.0" encoding="UTF-8"?>
   563.5 -<!--
   563.6 -*** GENERATED FROM project.xml - DO NOT EDIT  ***
   563.7 -***         EDIT ../build.xml INSTEAD         ***
   563.8 --->
   563.9 -<project name="org.netbeans.modules.jackpot30.refactoring-impl" basedir="..">
  563.10 -    <property file="nbproject/private/suite-private.properties"/>
  563.11 -    <property file="nbproject/suite.properties"/>
  563.12 -    <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
  563.13 -    <property file="${suite.dir}/nbproject/private/platform-private.properties"/>
  563.14 -    <property file="${suite.dir}/nbproject/platform.properties"/>
  563.15 -    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
  563.16 -        <attribute name="name"/>
  563.17 -        <attribute name="value"/>
  563.18 -        <sequential>
  563.19 -            <property name="@{name}" value="${@{value}}"/>
  563.20 -        </sequential>
  563.21 -    </macrodef>
  563.22 -    <property file="${user.properties.file}"/>
  563.23 -    <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  563.24 -    <nbmproject2:property name="netbeans.dest.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  563.25 -    <fail message="You must define 'nbplatform.${nbplatform.active}.harness.dir'">
  563.26 -        <condition>
  563.27 -            <not>
  563.28 -                <available file="${harness.dir}" type="dir"/>
  563.29 -            </not>
  563.30 -        </condition>
  563.31 -    </fail>
  563.32 -    <import file="${harness.dir}/build.xml"/>
  563.33 -</project>
   564.1 --- a/sandbox/old-modules/bridges/refactoring/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   564.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   564.3 @@ -1,8 +0,0 @@
   564.4 -build.xml.data.CRC32=46e4f14a
   564.5 -build.xml.script.CRC32=4a0f84c4
   564.6 -build.xml.stylesheet.CRC32=79c3b980@1.39
   564.7 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   564.8 -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   564.9 -nbproject/build-impl.xml.data.CRC32=2e452477
  564.10 -nbproject/build-impl.xml.script.CRC32=9d1345ba
  564.11 -nbproject/build-impl.xml.stylesheet.CRC32=68e521fc@2.70
   565.1 --- a/sandbox/old-modules/bridges/refactoring/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   565.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   565.3 @@ -1,4 +0,0 @@
   565.4 -is.eager=true
   565.5 -javac.source=1.6
   565.6 -javac.compilerargs=-Xlint -Xlint:-serial
   565.7 -spec.version.base=1.16.0
   566.1 --- a/sandbox/old-modules/bridges/refactoring/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   566.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   566.3 @@ -1,199 +0,0 @@
   566.4 -<?xml version="1.0" encoding="UTF-8"?>
   566.5 -<project xmlns="http://www.netbeans.org/ns/project/1">
   566.6 -    <type>org.netbeans.modules.apisupport.project</type>
   566.7 -    <configuration>
   566.8 -        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
   566.9 -            <code-name-base>org.netbeans.modules.jackpot30.refactoring</code-name-base>
  566.10 -            <suite-component/>
  566.11 -            <module-dependencies>
  566.12 -                <dependency>
  566.13 -                    <code-name-base>org.netbeans.api.annotations.common</code-name-base>
  566.14 -                    <build-prerequisite/>
  566.15 -                    <compile-dependency/>
  566.16 -                    <run-dependency>
  566.17 -                        <release-version>1</release-version>
  566.18 -                        <specification-version>1.4</specification-version>
  566.19 -                    </run-dependency>
  566.20 -                </dependency>
  566.21 -                <dependency>
  566.22 -                    <code-name-base>org.netbeans.api.java.classpath</code-name-base>
  566.23 -                    <build-prerequisite/>
  566.24 -                    <compile-dependency/>
  566.25 -                    <run-dependency>
  566.26 -                        <release-version>1</release-version>
  566.27 -                        <specification-version>1.24</specification-version>
  566.28 -                    </run-dependency>
  566.29 -                </dependency>
  566.30 -                <dependency>
  566.31 -                    <code-name-base>org.netbeans.libs.javacapi</code-name-base>
  566.32 -                    <build-prerequisite/>
  566.33 -                    <compile-dependency/>
  566.34 -                    <run-dependency>
  566.35 -                        <specification-version>0.12.0.1</specification-version>
  566.36 -                    </run-dependency>
  566.37 -                </dependency>
  566.38 -                <dependency>
  566.39 -                    <code-name-base>org.netbeans.modules.jackpot30.api</code-name-base>
  566.40 -                    <build-prerequisite/>
  566.41 -                    <compile-dependency/>
  566.42 -                    <run-dependency>
  566.43 -                        <specification-version>1.12</specification-version>
  566.44 -                    </run-dependency>
  566.45 -                </dependency>
  566.46 -                <dependency>
  566.47 -                    <code-name-base>org.netbeans.modules.java.hints</code-name-base>
  566.48 -                    <build-prerequisite/>
  566.49 -                    <compile-dependency/>
  566.50 -                    <run-dependency>
  566.51 -                        <release-version>1</release-version>
  566.52 -                        <implementation-version/>
  566.53 -                    </run-dependency>
  566.54 -                </dependency>
  566.55 -                <dependency>
  566.56 -                    <code-name-base>org.netbeans.modules.java.source</code-name-base>
  566.57 -                    <build-prerequisite/>
  566.58 -                    <compile-dependency/>
  566.59 -                    <run-dependency>
  566.60 -                        <specification-version>0.57.0.9.8.4</specification-version>
  566.61 -                    </run-dependency>
  566.62 -                </dependency>
  566.63 -                <dependency>
  566.64 -                    <code-name-base>org.netbeans.modules.java.sourceui</code-name-base>
  566.65 -                    <build-prerequisite/>
  566.66 -                    <compile-dependency/>
  566.67 -                    <run-dependency>
  566.68 -                        <release-version>1</release-version>
  566.69 -                        <specification-version>1.26.0.1.19</specification-version>
  566.70 -                    </run-dependency>
  566.71 -                </dependency>
  566.72 -                <dependency>
  566.73 -                    <code-name-base>org.netbeans.modules.queries</code-name-base>
  566.74 -                    <build-prerequisite/>
  566.75 -                    <compile-dependency/>
  566.76 -                    <run-dependency>
  566.77 -                        <release-version>1</release-version>
  566.78 -                        <specification-version>1.18</specification-version>
  566.79 -                    </run-dependency>
  566.80 -                </dependency>
  566.81 -                <dependency>
  566.82 -                    <code-name-base>org.netbeans.modules.refactoring.api</code-name-base>
  566.83 -                    <build-prerequisite/>
  566.84 -                    <compile-dependency/>
  566.85 -                    <run-dependency>
  566.86 -                        <specification-version>1.10</specification-version>
  566.87 -                    </run-dependency>
  566.88 -                </dependency>
  566.89 -                <dependency>
  566.90 -                    <code-name-base>org.netbeans.modules.refactoring.java</code-name-base>
  566.91 -                    <build-prerequisite/>
  566.92 -                    <compile-dependency/>
  566.93 -                    <run-dependency>
  566.94 -                        <release-version>1</release-version>
  566.95 -                        <implementation-version/>
  566.96 -                    </run-dependency>
  566.97 -                </dependency>
  566.98 -                <dependency>
  566.99 -                    <code-name-base>org.openide.awt</code-name-base>
 566.100 -                    <build-prerequisite/>
 566.101 -                    <compile-dependency/>
 566.102 -                    <run-dependency>
 566.103 -                        <specification-version>7.23</specification-version>
 566.104 -                    </run-dependency>
 566.105 -                </dependency>
 566.106 -                <dependency>
 566.107 -                    <code-name-base>org.openide.filesystems</code-name-base>
 566.108 -                    <build-prerequisite/>
 566.109 -                    <compile-dependency/>
 566.110 -                    <run-dependency>
 566.111 -                        <specification-version>7.36</specification-version>
 566.112 -                    </run-dependency>
 566.113 -                </dependency>
 566.114 -                <dependency>
 566.115 -                    <code-name-base>org.openide.loaders</code-name-base>
 566.116 -                    <build-prerequisite/>
 566.117 -                    <compile-dependency/>
 566.118 -                    <run-dependency>
 566.119 -                        <specification-version>7.16</specification-version>
 566.120 -                    </run-dependency>
 566.121 -                </dependency>
 566.122 -                <dependency>
 566.123 -                    <code-name-base>org.openide.nodes</code-name-base>
 566.124 -                    <build-prerequisite/>
 566.125 -                    <compile-dependency/>
 566.126 -                    <run-dependency>
 566.127 -                        <specification-version>7.16</specification-version>
 566.128 -                    </run-dependency>
 566.129 -                </dependency>
 566.130 -                <dependency>
 566.131 -                    <code-name-base>org.openide.text</code-name-base>
 566.132 -                    <build-prerequisite/>
 566.133 -                    <compile-dependency/>
 566.134 -                    <run-dependency>
 566.135 -                        <specification-version>6.29</specification-version>
 566.136 -                    </run-dependency>
 566.137 -                </dependency>
 566.138 -                <dependency>
 566.139 -                    <code-name-base>org.openide.util</code-name-base>
 566.140 -                    <build-prerequisite/>
 566.141 -                    <compile-dependency/>
 566.142 -                    <run-dependency>
 566.143 -                        <specification-version>8.2</specification-version>
 566.144 -                    </run-dependency>
 566.145 -                </dependency>
 566.146 -                <dependency>
 566.147 -                    <code-name-base>org.openide.util.lookup</code-name-base>
 566.148 -                    <build-prerequisite/>
 566.149 -                    <compile-dependency/>
 566.150 -                    <run-dependency>
 566.151 -                        <specification-version>8.2</specification-version>
 566.152 -                    </run-dependency>
 566.153 -                </dependency>
 566.154 -                <dependency>
 566.155 -                    <code-name-base>org.openide.windows</code-name-base>
 566.156 -                    <build-prerequisite/>
 566.157 -                    <compile-dependency/>
 566.158 -                    <run-dependency>
 566.159 -                        <specification-version>6.33</specification-version>
 566.160 -                    </run-dependency>
 566.161 -                </dependency>
 566.162 -            </module-dependencies>
 566.163 -            <test-dependencies>
 566.164 -                <test-type>
 566.165 -                    <name>unit</name>
 566.166 -                    <test-dependency>
 566.167 -                        <code-name-base>org.netbeans.libs.junit4</code-name-base>
 566.168 -                        <compile-dependency/>
 566.169 -                    </test-dependency>
 566.170 -                    <test-dependency>
 566.171 -                        <code-name-base>org.netbeans.modules.jackpot30.api</code-name-base>
 566.172 -                        <recursive/>
 566.173 -                        <compile-dependency/>
 566.174 -                        <test/>
 566.175 -                    </test-dependency>
 566.176 -                    <test-dependency>
 566.177 -                        <code-name-base>org.netbeans.modules.jackpot30.test.borrowed</code-name-base>
 566.178 -                        <compile-dependency/>
 566.179 -                    </test-dependency>
 566.180 -                    <test-dependency>
 566.181 -                        <code-name-base>org.netbeans.modules.java.hints.declarative</code-name-base>
 566.182 -                        <compile-dependency/>
 566.183 -                    </test-dependency>
 566.184 -                    <test-dependency>
 566.185 -                        <code-name-base>org.netbeans.modules.junit</code-name-base>
 566.186 -                        <compile-dependency/>
 566.187 -                    </test-dependency>
 566.188 -                    <test-dependency>
 566.189 -                        <code-name-base>org.netbeans.modules.nbjunit</code-name-base>
 566.190 -                        <recursive/>
 566.191 -                        <compile-dependency/>
 566.192 -                    </test-dependency>
 566.193 -                    <test-dependency>
 566.194 -                        <code-name-base>org.netbeans.modules.projectui</code-name-base>
 566.195 -                        <compile-dependency/>
 566.196 -                    </test-dependency>
 566.197 -                </test-type>
 566.198 -            </test-dependencies>
 566.199 -            <public-packages/>
 566.200 -        </data>
 566.201 -    </configuration>
 566.202 -</project>
   567.1 --- a/sandbox/old-modules/bridges/refactoring/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   567.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   567.3 @@ -1,1 +0,0 @@
   567.4 -suite.dir=${basedir}/../..
   568.1 --- a/sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   568.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   568.3 @@ -1,4 +0,0 @@
   568.4 -OpenIDE-Module-Name=Jackpot 3.0 Refactoring Bridge
   568.5 -GenerateScriptPanel.generate.text=Generate Jackpot script for automatic upgrade
   568.6 -GenerateScriptPanel.makePrivate.text=Make existing element private
   568.7 -GenerateScriptPanel.deprecate.text=Deprecate existing element
   569.1 --- a/sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/ExtraData.java	Mon Dec 19 11:37:36 2016 +0100
   569.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   569.3 @@ -1,58 +0,0 @@
   569.4 -/*
   569.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   569.6 - *
   569.7 - * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
   569.8 - *
   569.9 - * The contents of this file are subject to the terms of either the GNU
  569.10 - * General Public License Version 2 only ("GPL") or the Common
  569.11 - * Development and Distribution License("CDDL") (collectively, the
  569.12 - * "License"). You may not use this file except in compliance with the
  569.13 - * License. You can obtain a copy of the License at
  569.14 - * http://www.netbeans.org/cddl-gplv2.html
  569.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  569.16 - * specific language governing permissions and limitations under the
  569.17 - * License.  When distributing the software, include this License Header
  569.18 - * Notice in each file and include the License file at
  569.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  569.20 - * particular file as subject to the "Classpath" exception as provided
  569.21 - * by Sun in the GPL Version 2 section of the License file that
  569.22 - * accompanied this code. If applicable, add the following below the
  569.23 - * License Header, with the fields enclosed by brackets [] replaced by
  569.24 - * your own identifying information:
  569.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  569.26 - *
  569.27 - * If you wish your version of this file to be governed by only the CDDL
  569.28 - * or only the GPL Version 2, indicate your decision by adding
  569.29 - * "[Contributor] elects to include this software in this distribution
  569.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  569.31 - * single choice of license, a recipient has the option to distribute
  569.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  569.33 - * to extend the choice of license to its licensees as provided above.
  569.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  569.35 - * Version 2 license, then the option applies only if the new code is
  569.36 - * made subject to such option by the copyright holder.
  569.37 - *
  569.38 - * Contributor(s):
  569.39 - *
  569.40 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  569.41 - */
  569.42 -
  569.43 -package org.netbeans.modules.jackpot30.refactoring;
  569.44 -
  569.45 -/**
  569.46 - *
  569.47 - * @author lahvac
  569.48 - */
  569.49 -public final class ExtraData {
  569.50 -
  569.51 -    public final boolean generateUpgradeScript;
  569.52 -    public final boolean makeOriginalPrivate;
  569.53 -    public final boolean makeOriginalDeprecated;
  569.54 -
  569.55 -    public ExtraData(boolean generateUpgradeScript, boolean makeOriginalPrivate, boolean makeOriginalDeprecated) {
  569.56 -        this.generateUpgradeScript = generateUpgradeScript;
  569.57 -        this.makeOriginalPrivate = makeOriginalPrivate;
  569.58 -        this.makeOriginalDeprecated = makeOriginalDeprecated;
  569.59 -    }
  569.60 -
  569.61 -}
   570.1 --- a/sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/GenerateScriptPanel.form	Mon Dec 19 11:37:36 2016 +0100
   570.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   570.3 @@ -1,77 +0,0 @@
   570.4 -<?xml version="1.0" encoding="UTF-8" ?>
   570.5 -
   570.6 -<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
   570.7 -  <AuxValues>
   570.8 -    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
   570.9 -    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
  570.10 -    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
  570.11 -    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
  570.12 -    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
  570.13 -    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
  570.14 -    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
  570.15 -    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
  570.16 -    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
  570.17 -  </AuxValues>
  570.18 -
  570.19 -  <Layout>
  570.20 -    <DimensionLayout dim="0">
  570.21 -      <Group type="103" groupAlignment="0" attributes="0">
  570.22 -          <Group type="102" attributes="0">
  570.23 -              <Group type="103" groupAlignment="0" attributes="0">
  570.24 -                  <Group type="102" alignment="0" attributes="0">
  570.25 -                      <EmptySpace min="-2" pref="29" max="-2" attributes="0"/>
  570.26 -                      <Group type="103" groupAlignment="0" attributes="0">
  570.27 -                          <Component id="deprecate" alignment="0" min="-2" max="-2" attributes="0"/>
  570.28 -                          <Component id="makePrivate" alignment="0" min="-2" max="-2" attributes="0"/>
  570.29 -                      </Group>
  570.30 -                  </Group>
  570.31 -                  <Group type="102" alignment="0" attributes="0">
  570.32 -                      <EmptySpace max="-2" attributes="0"/>
  570.33 -                      <Component id="generate" min="-2" max="-2" attributes="0"/>
  570.34 -                  </Group>
  570.35 -              </Group>
  570.36 -              <EmptySpace pref="79" max="32767" attributes="0"/>
  570.37 -          </Group>
  570.38 -      </Group>
  570.39 -    </DimensionLayout>
  570.40 -    <DimensionLayout dim="1">
  570.41 -      <Group type="103" groupAlignment="0" attributes="0">
  570.42 -          <Group type="102" alignment="0" attributes="0">
  570.43 -              <EmptySpace max="-2" attributes="0"/>
  570.44 -              <Component id="generate" min="-2" max="-2" attributes="0"/>
  570.45 -              <EmptySpace max="-2" attributes="0"/>
  570.46 -              <Component id="makePrivate" min="-2" max="-2" attributes="0"/>
  570.47 -              <EmptySpace max="-2" attributes="0"/>
  570.48 -              <Component id="deprecate" min="-2" max="-2" attributes="0"/>
  570.49 -              <EmptySpace pref="223" max="32767" attributes="0"/>
  570.50 -          </Group>
  570.51 -      </Group>
  570.52 -    </DimensionLayout>
  570.53 -  </Layout>
  570.54 -  <SubComponents>
  570.55 -    <Component class="javax.swing.JCheckBox" name="generate">
  570.56 -      <Properties>
  570.57 -        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
  570.58 -          <ResourceString bundle="org/netbeans/modules/jackpot30/refactoring/Bundle.properties" key="GenerateScriptPanel.generate.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
  570.59 -        </Property>
  570.60 -      </Properties>
  570.61 -      <Events>
  570.62 -        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="generateActionPerformed"/>
  570.63 -      </Events>
  570.64 -    </Component>
  570.65 -    <Component class="javax.swing.JCheckBox" name="makePrivate">
  570.66 -      <Properties>
  570.67 -        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
  570.68 -          <ResourceString bundle="org/netbeans/modules/jackpot30/refactoring/Bundle.properties" key="GenerateScriptPanel.makePrivate.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
  570.69 -        </Property>
  570.70 -      </Properties>
  570.71 -    </Component>
  570.72 -    <Component class="javax.swing.JCheckBox" name="deprecate">
  570.73 -      <Properties>
  570.74 -        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
  570.75 -          <ResourceString bundle="org/netbeans/modules/jackpot30/refactoring/Bundle.properties" key="GenerateScriptPanel.deprecate.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
  570.76 -        </Property>
  570.77 -      </Properties>
  570.78 -    </Component>
  570.79 -  </SubComponents>
  570.80 -</Form>
   571.1 --- a/sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/GenerateScriptPanel.java	Mon Dec 19 11:37:36 2016 +0100
   571.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   571.3 @@ -1,174 +0,0 @@
   571.4 -/*
   571.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   571.6 - *
   571.7 - * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
   571.8 - *
   571.9 - * The contents of this file are subject to the terms of either the GNU
  571.10 - * General Public License Version 2 only ("GPL") or the Common
  571.11 - * Development and Distribution License("CDDL") (collectively, the
  571.12 - * "License"). You may not use this file except in compliance with the
  571.13 - * License. You can obtain a copy of the License at
  571.14 - * http://www.netbeans.org/cddl-gplv2.html
  571.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  571.16 - * specific language governing permissions and limitations under the
  571.17 - * License.  When distributing the software, include this License Header
  571.18 - * Notice in each file and include the License file at
  571.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  571.20 - * particular file as subject to the "Classpath" exception as provided
  571.21 - * by Sun in the GPL Version 2 section of the License file that
  571.22 - * accompanied this code. If applicable, add the following below the
  571.23 - * License Header, with the fields enclosed by brackets [] replaced by
  571.24 - * your own identifying information:
  571.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  571.26 - *
  571.27 - * If you wish your version of this file to be governed by only the CDDL
  571.28 - * or only the GPL Version 2, indicate your decision by adding
  571.29 - * "[Contributor] elects to include this software in this distribution
  571.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  571.31 - * single choice of license, a recipient has the option to distribute
  571.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  571.33 - * to extend the choice of license to its licensees as provided above.
  571.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  571.35 - * Version 2 license, then the option applies only if the new code is
  571.36 - * made subject to such option by the copyright holder.
  571.37 - *
  571.38 - * Contributor(s):
  571.39 - *
  571.40 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  571.41 - */
  571.42 -package org.netbeans.modules.jackpot30.refactoring;
  571.43 -
  571.44 -import java.util.prefs.Preferences;
  571.45 -import org.openide.util.NbPreferences;
  571.46 -
  571.47 -/**
  571.48 - *
  571.49 - * @author lahvac
  571.50 - */
  571.51 -public class GenerateScriptPanel extends javax.swing.JPanel {
  571.52 -
  571.53 -    private final boolean supported;
  571.54 -
  571.55 -    public GenerateScriptPanel(boolean supported) {
  571.56 -        this.supported = supported;
  571.57 -        initComponents();
  571.58 -        loadDefaults();
  571.59 -    }
  571.60 -
  571.61 -    /** This method is called from within the constructor to
  571.62 -     * initialize the form.
  571.63 -     * WARNING: Do NOT modify this code. The content of this method is
  571.64 -     * always regenerated by the Form Editor.
  571.65 -     */
  571.66 -    @SuppressWarnings("unchecked")
  571.67 -    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  571.68 -    private void initComponents() {
  571.69 -
  571.70 -        generate = new javax.swing.JCheckBox();
  571.71 -        makePrivate = new javax.swing.JCheckBox();
  571.72 -        deprecate = new javax.swing.JCheckBox();
  571.73 -
  571.74 -        generate.setText(org.openide.util.NbBundle.getMessage(GenerateScriptPanel.class, "GenerateScriptPanel.generate.text")); // NOI18N
  571.75 -        generate.addActionListener(new java.awt.event.ActionListener() {
  571.76 -            public void actionPerformed(java.awt.event.ActionEvent evt) {
  571.77 -                generateActionPerformed(evt);
  571.78 -            }
  571.79 -        });
  571.80 -
  571.81 -        makePrivate.setText(org.openide.util.NbBundle.getMessage(GenerateScriptPanel.class, "GenerateScriptPanel.makePrivate.text")); // NOI18N
  571.82 -
  571.83 -        deprecate.setText(org.openide.util.NbBundle.getMessage(GenerateScriptPanel.class, "GenerateScriptPanel.deprecate.text")); // NOI18N
  571.84 -
  571.85 -        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
  571.86 -        this.setLayout(layout);
  571.87 -        layout.setHorizontalGroup(
  571.88 -            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  571.89 -            .addGroup(layout.createSequentialGroup()
  571.90 -                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  571.91 -                    .addGroup(layout.createSequentialGroup()
  571.92 -                        .addGap(29, 29, 29)
  571.93 -                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  571.94 -                            .addComponent(deprecate)
  571.95 -                            .addComponent(makePrivate)))
  571.96 -                    .addGroup(layout.createSequentialGroup()
  571.97 -                        .addContainerGap()
  571.98 -                        .addComponent(generate)))
  571.99 -                .addContainerGap(79, Short.MAX_VALUE))
 571.100 -        );
 571.101 -        layout.setVerticalGroup(
 571.102 -            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 571.103 -            .addGroup(layout.createSequentialGroup()
 571.104 -                .addContainerGap()
 571.105 -                .addComponent(generate)
 571.106 -                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 571.107 -                .addComponent(makePrivate)
 571.108 -                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 571.109 -                .addComponent(deprecate)
 571.110 -                .addContainerGap(223, Short.MAX_VALUE))
 571.111 -        );
 571.112 -    }// </editor-fold>//GEN-END:initComponents
 571.113 -
 571.114 -    private void generateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateActionPerformed
 571.115 -        updateState();
 571.116 -    }//GEN-LAST:event_generateActionPerformed
 571.117 -
 571.118 -    private static final String KEY_DO_GENERATE_SCRIPT = "generate-script";
 571.119 -    private static final boolean DEF_DO_GENERATE_SCRIPT = true;
 571.120 -    private static final String KEY_MAKE_PRIVATE = "make-private";
 571.121 -    private static final boolean DEF_MAKE_PRIVATE = true;
 571.122 -    private static final String KEY_DEPRECATE = "deprecate";
 571.123 -    private static final boolean DEF_DEPRECATE = false;
 571.124 -    
 571.125 -    private Preferences getPreferencesStorage() {
 571.126 -        return NbPreferences.forModule(GenerateScriptPanel.class).node(GenerateScriptPanel.class.getSimpleName());
 571.127 -    }
 571.128 -
 571.129 -    private void loadDefaults() {
 571.130 -        if (supported) {
 571.131 -            Preferences p = getPreferencesStorage();
 571.132 -            generate.setSelected(p.getBoolean(KEY_DO_GENERATE_SCRIPT, DEF_DO_GENERATE_SCRIPT));
 571.133 -            makePrivate.setSelected(p.getBoolean(KEY_MAKE_PRIVATE, DEF_MAKE_PRIVATE));
 571.134 -            deprecate.setSelected(p.getBoolean(KEY_DEPRECATE, DEF_DEPRECATE));
 571.135 -        } else {
 571.136 -            generate.setSelected(false);
 571.137 -            makePrivate.setSelected(false);
 571.138 -            deprecate.setSelected(false);
 571.139 -        }
 571.140 -        
 571.141 -        updateState();
 571.142 -    }
 571.143 -
 571.144 -    public void saveDefaults() {
 571.145 -        Preferences p = getPreferencesStorage();
 571.146 -        boolean doGenerate = generate.isSelected();
 571.147 -
 571.148 -        p.putBoolean(KEY_DO_GENERATE_SCRIPT, doGenerate);
 571.149 -
 571.150 -        if (doGenerate) {
 571.151 -            p.putBoolean(KEY_MAKE_PRIVATE, makePrivate.isSelected());
 571.152 -            p.putBoolean(KEY_DEPRECATE, deprecate.isSelected());
 571.153 -        }
 571.154 -    }
 571.155 -
 571.156 -    private void updateState() {
 571.157 -        if (supported) {
 571.158 -            generate.setEnabled(true);
 571.159 -            makePrivate.setEnabled(generate.isSelected());
 571.160 -            deprecate.setEnabled(generate.isSelected());
 571.161 -        } else {
 571.162 -            generate.setEnabled(false);
 571.163 -            makePrivate.setEnabled(false);
 571.164 -            deprecate.setEnabled(false);
 571.165 -        }
 571.166 -    }
 571.167 -
 571.168 -    // Variables declaration - do not modify//GEN-BEGIN:variables
 571.169 -    private javax.swing.JCheckBox deprecate;
 571.170 -    private javax.swing.JCheckBox generate;
 571.171 -    private javax.swing.JCheckBox makePrivate;
 571.172 -    // End of variables declaration//GEN-END:variables
 571.173 -
 571.174 -    public ExtraData getData() {
 571.175 -        return new ExtraData(generate.isSelected(), makePrivate.isSelected(), deprecate.isSelected());
 571.176 -    }
 571.177 -}
   572.1 --- a/sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/RefactoringActionsProviderExt.java	Mon Dec 19 11:37:36 2016 +0100
   572.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   572.3 @@ -1,238 +0,0 @@
   572.4 -/*
   572.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   572.6 - *
   572.7 - * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
   572.8 - *
   572.9 - * The contents of this file are subject to the terms of either the GNU
  572.10 - * General Public License Version 2 only ("GPL") or the Common
  572.11 - * Development and Distribution License("CDDL") (collectively, the
  572.12 - * "License"). You may not use this file except in compliance with the
  572.13 - * License. You can obtain a copy of the License at
  572.14 - * http://www.netbeans.org/cddl-gplv2.html
  572.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  572.16 - * specific language governing permissions and limitations under the
  572.17 - * License.  When distributing the software, include this License Header
  572.18 - * Notice in each file and include the License file at
  572.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  572.20 - * particular file as subject to the "Classpath" exception as provided
  572.21 - * by Sun in the GPL Version 2 section of the License file that
  572.22 - * accompanied this code. If applicable, add the following below the
  572.23 - * License Header, with the fields enclosed by brackets [] replaced by
  572.24 - * your own identifying information:
  572.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  572.26 - *
  572.27 - * If you wish your version of this file to be governed by only the CDDL
  572.28 - * or only the GPL Version 2, indicate your decision by adding
  572.29 - * "[Contributor] elects to include this software in this distribution
  572.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  572.31 - * single choice of license, a recipient has the option to distribute
  572.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  572.33 - * to extend the choice of license to its licensees as provided above.
  572.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  572.35 - * Version 2 license, then the option applies only if the new code is
  572.36 - * made subject to such option by the copyright holder.
  572.37 - *
  572.38 - * Contributor(s):
  572.39 - *
  572.40 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  572.41 - */
  572.42 -package org.netbeans.modules.jackpot30.refactoring;
  572.43 -
  572.44 -import java.util.Collection;
  572.45 -import java.util.HashSet;
  572.46 -import java.util.logging.Logger;
  572.47 -import javax.lang.model.element.Element;
  572.48 -import javax.lang.model.element.ElementKind;
  572.49 -import javax.lang.model.element.ExecutableElement;
  572.50 -import javax.lang.model.element.VariableElement;
  572.51 -import javax.lang.model.type.TypeKind;
  572.52 -import org.netbeans.api.java.source.CompilationInfo;
  572.53 -import org.netbeans.api.java.source.TreePathHandle;
  572.54 -import org.netbeans.api.java.source.ui.ScanDialog;
  572.55 -import org.netbeans.modules.jackpot30.refactoring.invertboolean.InvertBooleanRefactoringUI;
  572.56 -import org.netbeans.modules.jackpot30.refactoring.noconstructor.ReplaceConstructorRefactoringUI;
  572.57 -import org.netbeans.modules.refactoring.api.RenameRefactoring;
  572.58 -import org.netbeans.modules.refactoring.java.RefactoringUtils;
  572.59 -import org.netbeans.modules.refactoring.java.ui.RefactoringActionsProvider;
  572.60 -import org.netbeans.modules.refactoring.spi.ui.ActionsImplementationProvider;
  572.61 -import org.netbeans.modules.refactoring.spi.ui.RefactoringUI;
  572.62 -import org.openide.cookies.EditorCookie;
  572.63 -import org.openide.filesystems.FileObject;
  572.64 -import org.openide.loaders.DataObject;
  572.65 -import org.openide.nodes.Node;
  572.66 -import org.openide.text.CloneableEditorSupport;
  572.67 -import org.openide.util.Lookup;
  572.68 -import org.openide.util.lookup.ServiceProvider;
  572.69 -import org.openide.windows.TopComponent;
  572.70 -
  572.71 -
  572.72 -/**
  572.73 - *
  572.74 - * @author lahvac
  572.75 - */
  572.76 -@ServiceProvider(service=ActionsImplementationProvider.class, supersedes="org.netbeans.modules.refactoring.java.ui.RefactoringActionsProvider")
  572.77 -public class RefactoringActionsProviderExt extends RefactoringActionsProvider {
  572.78 -
  572.79 -    private static RefactoringUI doReplaceConstructorImpl(TreePathHandle selectedElement, CompilationInfo info) {
  572.80 -        Element selected = selectedElement.resolveElement(info);
  572.81 -        if (selected==null) {
  572.82 -//            logger().log(Level.INFO, "doRename: " + selectedElement, new NullPointerException("selected")); // NOI18N
  572.83 -            return null;
  572.84 -        }
  572.85 -        if (selected.getKind() == ElementKind.CONSTRUCTOR) {
  572.86 -            return new ReplaceConstructorRefactoringUI(selectedElement);
  572.87 -        }
  572.88 -
  572.89 -        return null;
  572.90 -    }
  572.91 -
  572.92 -    public static void doReplaceConstructor(final Lookup lookup) {
  572.93 -        Runnable task;
  572.94 -        EditorCookie ec = lookup.lookup(EditorCookie.class);
  572.95 -        if (isFromEditor(ec)) {
  572.96 -            task = new TextComponentTask(ec) {
  572.97 -                @Override
  572.98 -                protected RefactoringUI createRefactoringUI(TreePathHandle selectedElement,int startOffset,int endOffset, final CompilationInfo info) {
  572.99 -                    return doReplaceConstructorImpl(selectedElement, info);
 572.100 -                }
 572.101 -            };
 572.102 -        } else {
 572.103 -            task = new TreePathHandleTask(new HashSet<Node>(lookup.lookupAll(Node.class)), true) {
 572.104 -
 572.105 -                RefactoringUI ui;
 572.106 -
 572.107 -                @Override
 572.108 -                protected void treePathHandleResolved(TreePathHandle handle, CompilationInfo javac) {
 572.109 -                    ui = doReplaceConstructorImpl(handle, javac);
 572.110 -                }
 572.111 -
 572.112 -                @Override
 572.113 -                protected RefactoringUI createRefactoringUI(Collection<TreePathHandle> handles) {
 572.114 -                    return ui;
 572.115 -                }
 572.116 -
 572.117 -            };
 572.118 -        }
 572.119 -        
 572.120 -        ScanDialog.runWhenScanFinished(task, "Remove Constructor");//getActionName(RefactoringActionsFactory.renameAction()));
 572.121 -    }
 572.122 -
 572.123 -    private static RefactoringUI doInvertBooleanImpl(TreePathHandle selectedElement, CompilationInfo info) {
 572.124 -        Element selected = selectedElement.resolveElement(info);
 572.125 -        if (selected==null) {
 572.126 -//            logger().log(Level.INFO, "doRename: " + selectedElement, new NullPointerException("selected")); // NOI18N
 572.127 -            return null;
 572.128 -        }
 572.129 -        if (selected.getKind().isField() && ((VariableElement) selected).asType().getKind() == TypeKind.BOOLEAN) {
 572.130 -            return new InvertBooleanRefactoringUI(selectedElement, ((VariableElement) selected).getSimpleName().toString());
 572.131 -        }
 572.132 -        if (selected.getKind() == ElementKind.METHOD && ((ExecutableElement) selected).getReturnType().getKind() == TypeKind.BOOLEAN) {
 572.133 -            return new InvertBooleanRefactoringUI(selectedElement, ((ExecutableElement) selected).getSimpleName().toString());
 572.134 -        }
 572.135 -
 572.136 -        return null;
 572.137 -    }
 572.138 -
 572.139 -    public static void doInvertBoolean(final Lookup lookup) {
 572.140 -        Runnable task;
 572.141 -        EditorCookie ec = lookup.lookup(EditorCookie.class);
 572.142 -        if (isFromEditor(ec)) {
 572.143 -            task = new TextComponentTask(ec) {
 572.144 -                @Override
 572.145 -                protected RefactoringUI createRefactoringUI(TreePathHandle selectedElement,int startOffset,int endOffset, final CompilationInfo info) {
 572.146 -                    return doInvertBooleanImpl(selectedElement, info);
 572.147 -                }
 572.148 -            };
 572.149 -        } else {
 572.150 -            task = new TreePathHandleTask(new HashSet<Node>(lookup.lookupAll(Node.class)), true) {
 572.151 -
 572.152 -                RefactoringUI ui;
 572.153 -
 572.154 -                @Override
 572.155 -                protected void treePathHandleResolved(TreePathHandle handle, CompilationInfo javac) {
 572.156 -                    ui = doInvertBooleanImpl(handle, javac);
 572.157 -                }
 572.158 -
 572.159 -                @Override
 572.160 -                protected RefactoringUI createRefactoringUI(Collection<TreePathHandle> handles) {
 572.161 -                    return ui;
 572.162 -                }
 572.163 -
 572.164 -            };
 572.165 -        }
 572.166 -
 572.167 -        ScanDialog.runWhenScanFinished(task, "Remove Constructor");//getActionName(RefactoringActionsFactory.renameAction()));
 572.168 -    }
 572.169 -
 572.170 -//    static String getActionName(Action action) {
 572.171 -//        String arg = (String) action.getValue(Action.NAME);
 572.172 -//        arg = arg.replace("&", ""); // NOI18N
 572.173 -//        return arg.replace("...", ""); // NOI18N
 572.174 -//    }
 572.175 -
 572.176 -
 572.177 -    public static boolean canReplaceConstructor(Lookup lookup) {
 572.178 -        return canRefactor(lookup);
 572.179 -    }
 572.180 -
 572.181 -    public static boolean canInvertBoolean(Lookup lookup) {
 572.182 -        return canRefactor(lookup);
 572.183 -    }
 572.184 -
 572.185 -    private static boolean canRefactor(Lookup lookup) {
 572.186 -        Collection<? extends Node> nodes = new HashSet<Node>(lookup.lookupAll(Node.class));
 572.187 -        if(nodes.size() != 1)
 572.188 -            return false;
 572.189 -        Node node = nodes.iterator().next();
 572.190 -        TreePathHandle tph = node.getLookup().lookup(TreePathHandle.class);
 572.191 -        if (tph != null) {
 572.192 -            return RefactoringUtils.isRefactorable(tph.getFileObject());
 572.193 -        }
 572.194 -        DataObject dObj = node.getCookie(DataObject.class);
 572.195 -        if(null == dObj)
 572.196 -            return false;
 572.197 -        FileObject fileObj = dObj.getPrimaryFile();
 572.198 -        if(null == fileObj || !RefactoringUtils.isRefactorable(fileObj))
 572.199 -            return false;
 572.200 -
 572.201 -        EditorCookie ec = lookup.lookup(EditorCookie.class);
 572.202 -        if (isFromEditor(ec)) {
 572.203 -            return true;
 572.204 -        }
 572.205 -        return false;
 572.206 -    }
 572.207 -
 572.208 -    @Override
 572.209 -    protected RefactoringUI wrap(RefactoringUI orig) {
 572.210 -        if (orig.getRefactoring() instanceof RenameRefactoring) {
 572.211 -            return new RenameRefactoringWrapper(orig, ((RenameRefactoring) orig.getRefactoring()));
 572.212 -        }
 572.213 -        
 572.214 -        return super.wrap(orig);
 572.215 -    }
 572.216 -
 572.217 -
 572.218 -    //XXX: copied from RefactoringActionsProvider:\
 572.219 -    static boolean isFromEditor(EditorCookie ec) {
 572.220 -        if (ec != null && ec.getOpenedPanes() != null) {
 572.221 -            TopComponent activetc = TopComponent.getRegistry().getActivated();
 572.222 -            if (activetc instanceof CloneableEditorSupport.Pane) {
 572.223 -                return true;
 572.224 -            }
 572.225 -        }
 572.226 -        return false;
 572.227 -    }
 572.228 -
 572.229 -    static boolean nodeHandle(Lookup lookup) {
 572.230 -        Node n = lookup.lookup(Node.class);
 572.231 -        if (n!=null) {
 572.232 -            if (n.getLookup().lookup(TreePathHandle.class)!=null)
 572.233 -                return true;
 572.234 -        }
 572.235 -        return false;
 572.236 -    }
 572.237 -
 572.238 -    private static Logger logger() {
 572.239 -        return Logger.getLogger(RefactoringActionsProvider.class.getName());
 572.240 -    }
 572.241 -}
   573.1 --- a/sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/RefactoringElementImpl.java	Mon Dec 19 11:37:36 2016 +0100
   573.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   573.3 @@ -1,227 +0,0 @@
   573.4 -/*
   573.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   573.6 - *
   573.7 - * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
   573.8 - *
   573.9 - * The contents of this file are subject to the terms of either the GNU
  573.10 - * General Public License Version 2 only ("GPL") or the Common
  573.11 - * Development and Distribution License("CDDL") (collectively, the
  573.12 - * "License"). You may not use this file except in compliance with the
  573.13 - * License. You can obtain a copy of the License at
  573.14 - * http://www.netbeans.org/cddl-gplv2.html
  573.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  573.16 - * specific language governing permissions and limitations under the
  573.17 - * License.  When distributing the software, include this License Header
  573.18 - * Notice in each file and include the License file at
  573.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  573.20 - * particular file as subject to the "Classpath" exception as provided
  573.21 - * by Sun in the GPL Version 2 section of the License file that
  573.22 - * accompanied this code. If applicable, add the following below the
  573.23 - * License Header, with the fields enclosed by brackets [] replaced by
  573.24 - * your own identifying information:
  573.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  573.26 - *
  573.27 - * If you wish your version of this file to be governed by only the CDDL
  573.28 - * or only the GPL Version 2, indicate your decision by adding
  573.29 - * "[Contributor] elects to include this software in this distribution
  573.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  573.31 - * single choice of license, a recipient has the option to distribute
  573.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  573.33 - * to extend the choice of license to its licensees as provided above.
  573.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  573.35 - * Version 2 license, then the option applies only if the new code is
  573.36 - * made subject to such option by the copyright holder.
  573.37 - *
  573.38 - * Contributor(s):
  573.39 - *
  573.40 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  573.41 - */
  573.42 -
  573.43 -package org.netbeans.modules.jackpot30.refactoring;
  573.44 -
  573.45 -import java.io.File;
  573.46 -import java.io.FileInputStream;
  573.47 -import java.io.IOException;
  573.48 -import java.io.InputStreamReader;
  573.49 -import java.io.OutputStreamWriter;
  573.50 -import java.io.Reader;
  573.51 -import java.io.Writer;
  573.52 -import java.nio.charset.Charset;
  573.53 -import org.netbeans.api.queries.FileEncodingQuery;
  573.54 -import org.netbeans.modules.refactoring.spi.BackupFacility;
  573.55 -import org.netbeans.modules.refactoring.spi.BackupFacility.Handle;
  573.56 -import org.netbeans.modules.refactoring.spi.SimpleRefactoringElementImplementation;
  573.57 -import org.openide.filesystems.FileObject;
  573.58 -import org.openide.filesystems.FileUtil;
  573.59 -import org.openide.text.PositionBounds;
  573.60 -import org.openide.util.Exceptions;
  573.61 -import org.openide.util.Lookup;
  573.62 -
  573.63 -/**
  573.64 - *
  573.65 - * @author lahvac
  573.66 - */
  573.67 -public class RefactoringElementImpl extends SimpleRefactoringElementImplementation {
  573.68 -
  573.69 -    private final File target;
  573.70 -    private final String rule;
  573.71 -
  573.72 -    public RefactoringElementImpl(File target, String rule) {
  573.73 -        this.target = target;
  573.74 -        this.rule = rule;
  573.75 -    }
  573.76 -
  573.77 -    @Override
  573.78 -    public String getText() {
  573.79 -        return "Jackpot 3.0 rule";
  573.80 -    }
  573.81 -
  573.82 -    @Override
  573.83 -    public String getDisplayText() {
  573.84 -        return "Jackpot 3.0 rule";
  573.85 -    }
  573.86 -
  573.87 -    private Handle backup;
  573.88 -
  573.89 -    @Override
  573.90 -    public void performChange() {
  573.91 -        try {
  573.92 -            FileObject fo = FileUtil.toFileObject(target);
  573.93 -            Charset encoding = FileEncodingQuery.getEncoding(getParentFile());
  573.94 -            String current;
  573.95 -
  573.96 -            if (fo != null) {
  573.97 -                backup = BackupFacility.getDefault().backup(fo);
  573.98 -                current = read(target, encoding).toString();
  573.99 -            } else {
 573.100 -                if (!target.exists()) {
 573.101 -                    backup = new Handle() {
 573.102 -                        @Override
 573.103 -                        public void restore() throws IOException {
 573.104 -                            FileObject fo = FileUtil.toFileObject(target);
 573.105 -
 573.106 -                            fo.delete();
 573.107 -                        }
 573.108 -                    };
 573.109 -                    current = "";
 573.110 -                } else {
 573.111 -                    //XXX: log
 573.112 -                    current = read(target, encoding).toString();
 573.113 -                }
 573.114 -            }
 573.115 -
 573.116 -            current += rule;
 573.117 -            current += "\n";
 573.118 -
 573.119 -            write(target, encoding, current);
 573.120 -        } catch (IOException ex) {
 573.121 -            Exceptions.printStackTrace(ex);
 573.122 -        }
 573.123 -    }
 573.124 -
 573.125 -    @Override
 573.126 -    public void undoChange() {
 573.127 -        if (backup != null) {
 573.128 -            try {
 573.129 -                backup.restore();
 573.130 -            } catch (IOException ex) {
 573.131 -                Exceptions.printStackTrace(ex);
 573.132 -            }
 573.133 -        }
 573.134 -        backup = null;
 573.135 -    }
 573.136 -
 573.137 -    @Override
 573.138 -    protected String getNewFileContent() {
 573.139 -        try {
 573.140 -            Charset encoding = FileEncodingQuery.getEncoding(getParentFile());
 573.141 -            String current;
 573.142 -
 573.143 -            if (!target.exists()) {
 573.144 -                current = "";
 573.145 -            } else {
 573.146 -                //XXX: log
 573.147 -                current = read(target, encoding).toString();
 573.148 -            }
 573.149 -
 573.150 -            current += rule;
 573.151 -            current += "\n";
 573.152 -
 573.153 -            return current;
 573.154 -        } catch (IOException ex) {
 573.155 -            Exceptions.printStackTrace(ex);
 573.156 -            return null;
 573.157 -        }
 573.158 -    }
 573.159 -
 573.160 -    @Override
 573.161 -    public Lookup getLookup() {
 573.162 -        return Lookup.EMPTY;
 573.163 -    }
 573.164 -
 573.165 -    @Override
 573.166 -    public FileObject getParentFile() {
 573.167 -        File f = target;
 573.168 -
 573.169 -        while (true) {
 573.170 -            FileObject fo = FileUtil.toFileObject(f);
 573.171 -
 573.172 -            if (fo != null) {
 573.173 -                return fo;
 573.174 -            }
 573.175 -
 573.176 -            f = f.getParentFile();
 573.177 -        }
 573.178 -    }
 573.179 -
 573.180 -    @Override
 573.181 -    public PositionBounds getPosition() {
 573.182 -        //XXX:
 573.183 -        return null;
 573.184 -    }
 573.185 -
 573.186 -    private CharSequence read(File f, Charset encoding) throws IOException {
 573.187 -        Reader in = null;
 573.188 -        StringBuilder result = new StringBuilder();
 573.189 -
 573.190 -        try {
 573.191 -            in = new InputStreamReader(new FileInputStream(f), encoding);
 573.192 -
 573.193 -            int r;
 573.194 -
 573.195 -            while ((r = in.read()) != (-1)) {
 573.196 -                result.append((char) r);
 573.197 -            }
 573.198 -        } finally {
 573.199 -            if (in != null) {
 573.200 -                try {
 573.201 -                    in.close();
 573.202 -                } catch (IOException ex) {
 573.203 -                    Exceptions.printStackTrace(ex);
 573.204 -                }
 573.205 -            }
 573.206 -        }
 573.207 -
 573.208 -        return result;
 573.209 -    }
 573.210 -
 573.211 -    private void write(File f, Charset encoding, CharSequence text) throws IOException {
 573.212 -        Writer out = null;
 573.213 -
 573.214 -        try {
 573.215 -            FileObject fo = FileUtil.createData(f);
 573.216 -            out = new OutputStreamWriter(fo.getOutputStream(), encoding);
 573.217 -
 573.218 -            out.write(text.toString());
 573.219 -        } finally {
 573.220 -            if (out != null) {
 573.221 -                try {
 573.222 -                    out.close();
 573.223 -                } catch (IOException ex) {
 573.224 -                    Exceptions.printStackTrace(ex);
 573.225 -                }
 573.226 -            }
 573.227 -        }
 573.228 -    }
 573.229 -
 573.230 -}
   574.1 --- a/sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/RefactoringPluginFactoryImpl.java	Mon Dec 19 11:37:36 2016 +0100
   574.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   574.3 @@ -1,75 +0,0 @@
   574.4 -/*
   574.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   574.6 - *
   574.7 - * Copyright 2008-2010 Sun Microsystems, Inc. All rights reserved.
   574.8 - *
   574.9 - * The contents of this file are subject to the terms of either the GNU
  574.10 - * General Public License Version 2 only ("GPL") or the Common
  574.11 - * Development and Distribution License("CDDL") (collectively, the
  574.12 - * "License"). You may not use this file except in compliance with the
  574.13 - * License. You can obtain a copy of the License at
  574.14 - * http://www.netbeans.org/cddl-gplv2.html
  574.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  574.16 - * specific language governing permissions and limitations under the
  574.17 - * License.  When distributing the software, include this License Header
  574.18 - * Notice in each file and include the License file at
  574.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  574.20 - * particular file as subject to the "Classpath" exception as provided
  574.21 - * by Sun in the GPL Version 2 section of the License file that
  574.22 - * accompanied this code. If applicable, add the following below the
  574.23 - * License Header, with the fields enclosed by brackets [] replaced by
  574.24 - * your own identifying information:
  574.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  574.26 - *
  574.27 - * If you wish your version of this file to be governed by only the CDDL
  574.28 - * or only the GPL Version 2, indicate your decision by adding
  574.29 - * "[Contributor] elects to include this software in this distribution
  574.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  574.31 - * single choice of license, a recipient has the option to distribute
  574.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  574.33 - * to extend the choice of license to its licensees as provided above.
  574.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  574.35 - * Version 2 license, then the option applies only if the new code is
  574.36 - * made subject to such option by the copyright holder.
  574.37 - *
  574.38 - * Contributor(s):
  574.39 - *
  574.40 - * Portions Copyrighted 2008-2010 Sun Microsystems, Inc.
  574.41 - */
  574.42 -
  574.43 -package org.netbeans.modules.jackpot30.refactoring;
  574.44 -
  574.45 -import org.netbeans.modules.jackpot30.refactoring.invertboolean.InvertBooleanRefactoring;
  574.46 -import org.netbeans.modules.jackpot30.refactoring.invertboolean.InvertBooleanRefactoringPluginImpl;
  574.47 -import org.netbeans.modules.jackpot30.refactoring.noconstructor.ReplaceConstructorRefactoring;
  574.48 -import org.netbeans.modules.jackpot30.refactoring.noconstructor.ReplaceConstructorRefactoringPluginImpl;
  574.49 -import org.netbeans.modules.refactoring.api.AbstractRefactoring;
  574.50 -import org.netbeans.modules.refactoring.api.RenameRefactoring;
  574.51 -import org.netbeans.modules.refactoring.spi.RefactoringPlugin;
  574.52 -import org.netbeans.modules.refactoring.spi.RefactoringPluginFactory;
  574.53 -import org.openide.util.lookup.ServiceProvider;
  574.54 -
  574.55 -/**
  574.56 - *
  574.57 - * @author Jan Lahoda
  574.58 - */
  574.59 -@ServiceProvider(service=RefactoringPluginFactory.class)
  574.60 -public class RefactoringPluginFactoryImpl implements RefactoringPluginFactory {
  574.61 -
  574.62 -    public RefactoringPlugin createInstance(AbstractRefactoring refactoring) {
  574.63 -        if (refactoring instanceof RenameRefactoring) {
  574.64 -            return new RenameRefactoringPluginImpl((RenameRefactoring) refactoring);
  574.65 -        }
  574.66 -
  574.67 -        if (refactoring instanceof ReplaceConstructorRefactoring) {
  574.68 -            return new ReplaceConstructorRefactoringPluginImpl((ReplaceConstructorRefactoring) refactoring);
  574.69 -        }
  574.70 -
  574.71 -        if (refactoring instanceof InvertBooleanRefactoring) {
  574.72 -            return new InvertBooleanRefactoringPluginImpl((InvertBooleanRefactoring) refactoring);
  574.73 -        }
  574.74 -
  574.75 -        return null;
  574.76 -    }
  574.77 -
  574.78 -}
   575.1 --- a/sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/RenameRefactoringPluginImpl.java	Mon Dec 19 11:37:36 2016 +0100
   575.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   575.3 @@ -1,209 +0,0 @@
   575.4 -/*
   575.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   575.6 - *
   575.7 - * Copyright 2008-2010 Sun Microsystems, Inc. All rights reserved.
   575.8 - *
   575.9 - * The contents of this file are subject to the terms of either the GNU
  575.10 - * General Public License Version 2 only ("GPL") or the Common
  575.11 - * Development and Distribution License("CDDL") (collectively, the
  575.12 - * "License"). You may not use this file except in compliance with the
  575.13 - * License. You can obtain a copy of the License at
  575.14 - * http://www.netbeans.org/cddl-gplv2.html
  575.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  575.16 - * specific language governing permissions and limitations under the
  575.17 - * License.  When distributing the software, include this License Header
  575.18 - * Notice in each file and include the License file at
  575.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  575.20 - * particular file as subject to the "Classpath" exception as provided
  575.21 - * by Sun in the GPL Version 2 section of the License file that
  575.22 - * accompanied this code. If applicable, add the following below the
  575.23 - * License Header, with the fields enclosed by brackets [] replaced by
  575.24 - * your own identifying information:
  575.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  575.26 - *
  575.27 - * If you wish your version of this file to be governed by only the CDDL
  575.28 - * or only the GPL Version 2, indicate your decision by adding
  575.29 - * "[Contributor] elects to include this software in this distribution
  575.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  575.31 - * single choice of license, a recipient has the option to distribute
  575.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  575.33 - * to extend the choice of license to its licensees as provided above.
  575.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  575.35 - * Version 2 license, then the option applies only if the new code is
  575.36 - * made subject to such option by the copyright holder.
  575.37 - *
  575.38 - * Contributor(s):
  575.39 - *
  575.40 - * Portions Copyrighted 2008-2010 Sun Microsystems, Inc.
  575.41 - */
  575.42 -
  575.43 -package org.netbeans.modules.jackpot30.refactoring;
  575.44 -
  575.45 -import com.sun.source.tree.BlockTree;
  575.46 -import com.sun.source.tree.ClassTree;
  575.47 -import com.sun.source.tree.ExpressionTree;
  575.48 -import com.sun.source.tree.MethodInvocationTree;
  575.49 -import com.sun.source.tree.MethodTree;
  575.50 -import com.sun.source.tree.ModifiersTree;
  575.51 -import com.sun.source.tree.StatementTree;
  575.52 -import com.sun.source.tree.VariableTree;
  575.53 -import com.sun.source.util.TreePath;
  575.54 -import java.io.File;
  575.55 -import java.util.Collections;
  575.56 -import java.util.EnumSet;
  575.57 -import java.util.LinkedList;
  575.58 -import java.util.List;
  575.59 -import java.util.Set;
  575.60 -import javax.lang.model.element.Element;
  575.61 -import javax.lang.model.element.ElementKind;
  575.62 -import javax.lang.model.element.ExecutableElement;
  575.63 -import javax.lang.model.element.Modifier;
  575.64 -import javax.lang.model.element.TypeElement;
  575.65 -import javax.lang.model.type.TypeKind;
  575.66 -import org.netbeans.api.java.source.CancellableTask;
  575.67 -import org.netbeans.api.java.source.ClasspathInfo.PathKind;
  575.68 -import org.netbeans.api.java.source.JavaSource;
  575.69 -import org.netbeans.api.java.source.TreeMaker;
  575.70 -import org.netbeans.api.java.source.TreePathHandle;
  575.71 -import org.netbeans.api.java.source.WorkingCopy;
  575.72 -import org.netbeans.modules.refactoring.api.Problem;
  575.73 -import org.netbeans.modules.refactoring.api.RenameRefactoring;
  575.74 -import org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin;
  575.75 -import org.netbeans.modules.refactoring.spi.RefactoringElementsBag;
  575.76 -import org.openide.filesystems.FileObject;
  575.77 -import org.openide.filesystems.FileUtil;
  575.78 -import org.openide.util.Lookup;
  575.79 -
  575.80 -/**
  575.81 - *
  575.82 - * @author Jan Lahoda
  575.83 - */
  575.84 -public class RenameRefactoringPluginImpl extends JavaRefactoringPlugin {
  575.85 -
  575.86 -    private final RenameRefactoring rr;
  575.87 -
  575.88 -    public RenameRefactoringPluginImpl(RenameRefactoring rr) {
  575.89 -        this.rr = rr;
  575.90 -    }
  575.91 -
  575.92 -    @Override
  575.93 -    public Problem preCheck() {
  575.94 -        return null;
  575.95 -    }
  575.96 -
  575.97 -    @Override
  575.98 -    public Problem checkParameters() {
  575.99 -        return null;
 575.100 -    }
 575.101 -
 575.102 -    @Override
 575.103 -    public Problem fastCheckParameters() {
 575.104 -        return null;
 575.105 -    }
 575.106 -
 575.107 -    @Override
 575.108 -    public void cancelRequest() {
 575.109 -    }
 575.110 -
 575.111 -    public Problem prepare(final RefactoringElementsBag refactoringElements) {
 575.112 -        final ExtraData data = rr.getContext().lookup(ExtraData.class);
 575.113 -
 575.114 -        if (data == null || !data.generateUpgradeScript) {
 575.115 -            return null;
 575.116 -        }
 575.117 -        
 575.118 -        Lookup source = rr.getRefactoringSource();
 575.119 -        final TreePathHandle toRename = source.lookup(TreePathHandle.class);
 575.120 -
 575.121 -        if (toRename == null) {
 575.122 -            return null;
 575.123 -        }
 575.124 -        
 575.125 -        JavaSource js = JavaSource.forFileObject(toRename.getFileObject());
 575.126 -
 575.127 -        if (js != null) {
 575.128 -            CancellableTask<WorkingCopy> work = new CancellableTask<WorkingCopy>() {
 575.129 -                public void run(WorkingCopy parameter) throws Exception {
 575.130 -                    parameter.toPhase(JavaSource.Phase.ELEMENTS_RESOLVED);
 575.131 -                    TreePath tp = toRename.resolve(parameter);
 575.132 -
 575.133 -                    if (tp == null) {
 575.134 -                        return ;
 575.135 -                    }
 575.136 -
 575.137 -                    Element e = parameter.getTrees().getElement(tp);
 575.138 -
 575.139 -                    if (e == null || e.getKind() != ElementKind.METHOD) {
 575.140 -                        return ;
 575.141 -                    }
 575.142 -
 575.143 -                    MethodTree m = (MethodTree) tp.getLeaf();
 575.144 -                    ClassTree ct = (ClassTree) tp.getParentPath().getLeaf();
 575.145 -
 575.146 -                    TreeMaker make = parameter.getTreeMaker();
 575.147 -
 575.148 -                    List<ExpressionTree> args = new LinkedList<ExpressionTree>();
 575.149 -
 575.150 -                    for (VariableTree vt : m.getParameters()) {
 575.151 -                        args.add(make.Identifier(vt.getName()));
 575.152 -                    }
 575.153 -
 575.154 -                    MethodInvocationTree mit = make.MethodInvocation(Collections.<ExpressionTree>emptyList(), make.Identifier(rr.getNewName()), args);
 575.155 -
 575.156 -                    StatementTree invoke;
 575.157 -
 575.158 -                    if (((ExecutableElement) e).getReturnType().getKind() == TypeKind.VOID) {
 575.159 -                        invoke = make.ExpressionStatement(mit);
 575.160 -                    } else {
 575.161 -                        invoke = make.Return(mit);
 575.162 -                    }
 575.163 -                    
 575.164 -                    BlockTree body = make.Block(Collections.<StatementTree>singletonList(invoke), false);
 575.165 -//                    ModifiersTree mods = make.addModifiersAnnotation(m.getModifiers(), constructTransformation(parameter, make, rr.getNewName(), (ExecutableElement) e));
 575.166 -                    ModifiersTree mods = m.getModifiers();
 575.167 -
 575.168 -                    if (data.makeOriginalDeprecated) {
 575.169 -                        mods = make.addModifiersAnnotation(mods, make.Annotation(make.QualIdent(parameter.getElements().getTypeElement("java.lang.Deprecated")), Collections.<ExpressionTree>emptyList()));
 575.170 -                    }
 575.171 -
 575.172 -                    if (data.makeOriginalPrivate) {
 575.173 -                        Set<Modifier> modSet = EnumSet.noneOf(Modifier.class);
 575.174 -
 575.175 -                        modSet.addAll(mods.getFlags());
 575.176 -                        modSet.removeAll(EnumSet.of(Modifier.PUBLIC, Modifier.PROTECTED));
 575.177 -                        modSet.add(Modifier.PRIVATE);
 575.178 -
 575.179 -                        mods = make.Modifiers(modSet, mods.getAnnotations());
 575.180 -                    }
 575.181 -
 575.182 -                    MethodTree nue = make.Method(mods, m.getName(), m.getReturnType(), m.getTypeParameters(), m.getParameters(), m.getThrows(), body, null);
 575.183 -
 575.184 -                    ClassTree nueClass = make.insertClassMember(ct, ct.getMembers().indexOf(m), nue);
 575.185 -
 575.186 -                    parameter.rewrite(ct, nueClass);
 575.187 -
 575.188 -                    FileObject root = parameter.getClasspathInfo().getClassPath(PathKind.SOURCE).findOwnerRoot(parameter.getFileObject());
 575.189 -
 575.190 -                    if (root != null) {
 575.191 -                        File f = FileUtil.toFile(root);
 575.192 -                        String rule = ScriptGenerator.constructRenameRule(parameter, rr.getNewName(), e);
 575.193 -                        File ruleFile = new File(f, "META-INF/upgrade/" + ((TypeElement) e.getEnclosingElement()).getQualifiedName().toString() + ".hint");
 575.194 -                        
 575.195 -                        refactoringElements.add(rr, new RefactoringElementImpl( ruleFile, rule));
 575.196 -                    }
 575.197 -                }
 575.198 -                public void cancel() {}
 575.199 -            };
 575.200 -
 575.201 -            createAndAddElements(Collections.singleton(toRename.getFileObject()), work, refactoringElements, rr);
 575.202 -        }
 575.203 -
 575.204 -        return null;
 575.205 -    }
 575.206 -
 575.207 -    @Override
 575.208 -    protected JavaSource getJavaSource(Phase p) {
 575.209 -        return null;
 575.210 -    }
 575.211 -
 575.212 -}
   576.1 --- a/sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/RenameRefactoringWrapper.java	Mon Dec 19 11:37:36 2016 +0100
   576.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   576.3 @@ -1,162 +0,0 @@
   576.4 -/*
   576.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   576.6 - *
   576.7 - * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
   576.8 - *
   576.9 - * The contents of this file are subject to the terms of either the GNU
  576.10 - * General Public License Version 2 only ("GPL") or the Common
  576.11 - * Development and Distribution License("CDDL") (collectively, the
  576.12 - * "License"). You may not use this file except in compliance with the
  576.13 - * License. You can obtain a copy of the License at
  576.14 - * http://www.netbeans.org/cddl-gplv2.html
  576.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  576.16 - * specific language governing permissions and limitations under the
  576.17 - * License.  When distributing the software, include this License Header
  576.18 - * Notice in each file and include the License file at
  576.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  576.20 - * particular file as subject to the "Classpath" exception as provided
  576.21 - * by Sun in the GPL Version 2 section of the License file that
  576.22 - * accompanied this code. If applicable, add the following below the
  576.23 - * License Header, with the fields enclosed by brackets [] replaced by
  576.24 - * your own identifying information:
  576.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  576.26 - *
  576.27 - * If you wish your version of this file to be governed by only the CDDL
  576.28 - * or only the GPL Version 2, indicate your decision by adding
  576.29 - * "[Contributor] elects to include this software in this distribution
  576.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  576.31 - * single choice of license, a recipient has the option to distribute
  576.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  576.33 - * to extend the choice of license to its licensees as provided above.
  576.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  576.35 - * Version 2 license, then the option applies only if the new code is
  576.36 - * made subject to such option by the copyright holder.
  576.37 - *
  576.38 - * Contributor(s):
  576.39 - *
  576.40 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  576.41 - */
  576.42 -
  576.43 -package org.netbeans.modules.jackpot30.refactoring;
  576.44 -
  576.45 -import com.sun.source.tree.Tree.Kind;
  576.46 -import java.awt.BorderLayout;
  576.47 -import java.awt.Component;
  576.48 -import javax.swing.JComponent;
  576.49 -import javax.swing.JPanel;
  576.50 -import javax.swing.border.EmptyBorder;
  576.51 -import javax.swing.event.ChangeListener;
  576.52 -import org.netbeans.api.java.source.TreePathHandle;
  576.53 -import org.netbeans.modules.refactoring.api.AbstractRefactoring;
  576.54 -import org.netbeans.modules.refactoring.api.Problem;
  576.55 -import org.netbeans.modules.refactoring.api.RenameRefactoring;
  576.56 -import org.netbeans.modules.refactoring.spi.ui.CustomRefactoringPanel;
  576.57 -import org.netbeans.modules.refactoring.spi.ui.RefactoringUI;
  576.58 -import org.openide.util.HelpCtx;
  576.59 -import org.openide.util.Lookup;
  576.60 -
  576.61 -/**
  576.62 - *
  576.63 - * @author lahvac
  576.64 - */
  576.65 -public class RenameRefactoringWrapper implements RefactoringUI {
  576.66 -
  576.67 -    private final RefactoringUI delegate;
  576.68 -    private final RenameRefactoring refactoring;
  576.69 -
  576.70 -    public RenameRefactoringWrapper(RefactoringUI delegate, RenameRefactoring refactoring) {
  576.71 -        this.delegate = delegate;
  576.72 -        this.refactoring = refactoring;
  576.73 -    }
  576.74 -
  576.75 -    @Override
  576.76 -    public String getName() {
  576.77 -        return delegate.getName();
  576.78 -    }
  576.79 -
  576.80 -    @Override
  576.81 -    public String getDescription() {
  576.82 -        return delegate.getDescription();
  576.83 -    }
  576.84 -
  576.85 -    @Override
  576.86 -    public boolean isQuery() {
  576.87 -        return delegate.isQuery();
  576.88 -    }
  576.89 -
  576.90 -    private GenerateScriptPanel gsp;
  576.91 -    private CustomRefactoringPanel crp;
  576.92 -
  576.93 -    @Override
  576.94 -    public CustomRefactoringPanel getPanel(ChangeListener parent) {
  576.95 -        if (crp == null) {
  576.96 -            Lookup source = refactoring.getRefactoringSource();
  576.97 -            TreePathHandle toRename = source.lookup(TreePathHandle.class);
  576.98 -
  576.99 -            gsp = new GenerateScriptPanel(toRename != null && toRename.getKind() == Kind.METHOD);
 576.100 -            crp = new CustomRefactoringPanelImpl(gsp, delegate.getPanel(parent));
 576.101 -        }
 576.102 -
 576.103 -        return crp;
 576.104 -    }
 576.105 -
 576.106 -    @Override
 576.107 -    public Problem setParameters() {
 576.108 -        gsp.saveDefaults();
 576.109 -        refactoring.getContext().add(gsp.getData());
 576.110 -        return delegate.setParameters();
 576.111 -    }
 576.112 -
 576.113 -    @Override
 576.114 -    public Problem checkParameters() {
 576.115 -        return delegate.checkParameters();
 576.116 -    }
 576.117 -
 576.118 -    @Override
 576.119 -    public boolean hasParameters() {
 576.120 -        return true;
 576.121 -    }
 576.122 -
 576.123 -    @Override
 576.124 -    public AbstractRefactoring getRefactoring() {
 576.125 -        return refactoring;
 576.126 -    }
 576.127 -
 576.128 -    @Override
 576.129 -    public HelpCtx getHelpCtx() {
 576.130 -        return delegate.getHelpCtx();
 576.131 -    }
 576.132 -
 576.133 -    private static final class CustomRefactoringPanelImpl implements CustomRefactoringPanel {
 576.134 -        private final CustomRefactoringPanel delegate;
 576.135 -        private final JComponent component;
 576.136 -        public CustomRefactoringPanelImpl(final GenerateScriptPanel panel, CustomRefactoringPanel delegate) {
 576.137 -            this.delegate = delegate;
 576.138 -            final Component delegateComponent = delegate.getComponent();
 576.139 -            this.component = new JPanel(new BorderLayout()) {
 576.140 -                {
 576.141 -                    add(delegateComponent, BorderLayout.CENTER);
 576.142 -                    panel.setBorder(new EmptyBorder(0, 5, 0, 0));
 576.143 -                    add(panel, BorderLayout.SOUTH);
 576.144 -                    delegateComponent.requestFocus();
 576.145 -                }
 576.146 -                @Override
 576.147 -                public void requestFocus() {
 576.148 -                    delegateComponent.requestFocus();
 576.149 -                }
 576.150 -            };
 576.151 -        }
 576.152 -
 576.153 -        @Override
 576.154 -        public void initialize() {
 576.155 -            delegate.initialize();
 576.156 -        }
 576.157 -
 576.158 -        @Override
 576.159 -        public Component getComponent() {
 576.160 -            return component;
 576.161 -        }
 576.162 -        
 576.163 -    }
 576.164 -
 576.165 -}
   577.1 --- a/sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/ScriptGenerator.java	Mon Dec 19 11:37:36 2016 +0100
   577.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   577.3 @@ -1,113 +0,0 @@
   577.4 -/*
   577.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   577.6 - *
   577.7 - * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
   577.8 - *
   577.9 - * The contents of this file are subject to the terms of either the GNU
  577.10 - * General Public License Version 2 only ("GPL") or the Common
  577.11 - * Development and Distribution License("CDDL") (collectively, the
  577.12 - * "License"). You may not use this file except in compliance with the
  577.13 - * License. You can obtain a copy of the License at
  577.14 - * http://www.netbeans.org/cddl-gplv2.html
  577.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  577.16 - * specific language governing permissions and limitations under the
  577.17 - * License.  When distributing the software, include this License Header
  577.18 - * Notice in each file and include the License file at
  577.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  577.20 - * particular file as subject to the "Classpath" exception as provided
  577.21 - * by Sun in the GPL Version 2 section of the License file that
  577.22 - * accompanied this code. If applicable, add the following below the
  577.23 - * License Header, with the fields enclosed by brackets [] replaced by
  577.24 - * your own identifying information:
  577.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  577.26 - *
  577.27 - * If you wish your version of this file to be governed by only the CDDL
  577.28 - * or only the GPL Version 2, indicate your decision by adding
  577.29 - * "[Contributor] elects to include this software in this distribution
  577.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  577.31 - * single choice of license, a recipient has the option to distribute
  577.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  577.33 - * to extend the choice of license to its licensees as provided above.
  577.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  577.35 - * Version 2 license, then the option applies only if the new code is
  577.36 - * made subject to such option by the copyright holder.
  577.37 - *
  577.38 - * Contributor(s):
  577.39 - *
  577.40 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  577.41 - */
  577.42 -
  577.43 -package org.netbeans.modules.jackpot30.refactoring;
  577.44 -
  577.45 -import javax.lang.model.element.Element;
  577.46 -import javax.lang.model.element.ExecutableElement;
  577.47 -import javax.lang.model.element.Modifier;
  577.48 -import javax.lang.model.element.TypeElement;
  577.49 -import javax.lang.model.element.VariableElement;
  577.50 -import org.netbeans.api.annotations.common.NonNull;
  577.51 -import org.netbeans.api.java.source.WorkingCopy;
  577.52 -
  577.53 -/**
  577.54 - *
  577.55 - * @author lahvac
  577.56 - */
  577.57 -public class ScriptGenerator {
  577.58 -
  577.59 -    public static @NonNull String constructRenameRule(@NonNull WorkingCopy wc, @NonNull String newName, @NonNull Element original) {
  577.60 -        switch (original.getKind()) {
  577.61 -            case METHOD: return constructRenameRule(wc, newName, (ExecutableElement) original);
  577.62 -            default: throw new UnsupportedOperationException();
  577.63 -        }
  577.64 -    }
  577.65 -
  577.66 -    private static String constructRenameRule(WorkingCopy wc, String newName, ExecutableElement method) {
  577.67 -        //XXX: type parameters?
  577.68 -        StringBuilder pattern = new StringBuilder();
  577.69 -        StringBuilder constraints = new StringBuilder();
  577.70 -        StringBuilder target = new StringBuilder();
  577.71 -
  577.72 -        TypeElement clazz = (TypeElement) method.getEnclosingElement();
  577.73 -
  577.74 -        if (method.getModifiers().contains(Modifier.STATIC)) {
  577.75 -            pattern.append(clazz.getQualifiedName().toString()).append(".");
  577.76 -            target.append(clazz.getQualifiedName().toString()).append(".");
  577.77 -        } else {
  577.78 -            pattern.append("$0.");
  577.79 -            constraints.append(" :: $0 instanceof " + clazz.getQualifiedName().toString());
  577.80 -            target.append("$0.");
  577.81 -        }
  577.82 -
  577.83 -        pattern.append(method.getSimpleName().toString());
  577.84 -        target.append(newName);
  577.85 -        pattern.append("(");
  577.86 -        target.append("(");
  577.87 -
  577.88 -        int count = 1;
  577.89 -
  577.90 -        for (VariableElement p : method.getParameters()) {
  577.91 -            if (count++ > 1) {
  577.92 -                pattern.append(", ");
  577.93 -                target.append(", ");
  577.94 -            }
  577.95 -
  577.96 -            String name = "$" + p.getSimpleName().toString();
  577.97 -
  577.98 -            pattern.append(name);
  577.99 -            target.append(name);
 577.100 -
 577.101 -            if (constraints.length() == 0) {
 577.102 -                constraints.append(" :: ");
 577.103 -            } else {
 577.104 -                constraints.append(" && ");
 577.105 -            }
 577.106 -            
 577.107 -            constraints.append(name).append(" instanceof ").append(p.asType());
 577.108 -        }
 577.109 -
 577.110 -        pattern.append(")");
 577.111 -        target.append(")");
 577.112 -
 577.113 -        return "   " + pattern + constraints + "\n=> " + target + "\n;;";
 577.114 -    }
 577.115 -
 577.116 -}
   578.1 --- a/sandbox/old-modules/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/layer.xml	Mon Dec 19 11:37:36 2016 +0100
   578.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   578.3 @@ -1,34 +0,0 @@
   578.4 -<?xml version="1.0" encoding="UTF-8"?>
   578.5 -<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
   578.6 -<filesystem>
   578.7 -    <folder name="Actions">
   578.8 -        <folder name="Refactoring">
   578.9 -            <file name="org-netbeans-modules-jackpot30-refactoring-noconstructor-ReplaceConstructorAction.instance">
  578.10 -                <attr name="instanceCreate" methodvalue="org.netbeans.modules.jackpot30.refactoring.noconstructor.ReplaceConstructorAction.create"/>
  578.11 -            </file>
  578.12 -            <file name="org-netbeans-modules-jackpot30-refactoring-invertboolean-InvertBooleanAction.instance">
  578.13 -                <attr name="instanceCreate" methodvalue="org.netbeans.modules.jackpot30.refactoring.invertboolean.InvertBooleanAction.create"/>
  578.14 -            </file>
  578.15 -        </folder>
  578.16 -    </folder>
  578.17 -    <folder name="Menu">
  578.18 -        <folder name="Refactoring">
  578.19 -            <file name="org-netbeans-modules-jackpot30-refactoring-noconstructor-ReplaceConstructorAction-separatorAfter.instance">
  578.20 -                <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
  578.21 -                <attr name="position" intvalue="2175"/>
  578.22 -            </file>
  578.23 -            <file name="org-netbeans-modules-jackpot30-refactoring-noconstructor-ReplaceConstructorAction-separatorBefore.instance">
  578.24 -                <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
  578.25 -                <attr name="position" intvalue="2125"/>
  578.26 -            </file>
  578.27 -            <file name="org-netbeans-modules-jackpot30-refactoring-noconstructor-ReplaceConstructorAction.shadow">
  578.28 -                <attr name="originalFile" stringvalue="Actions/Refactoring/org-netbeans-modules-jackpot30-refactoring-noconstructor-ReplaceConstructorAction.instance"/>
  578.29 -                <attr name="position" intvalue="2150"/>
  578.30 -            </file>
  578.31 -            <file name="org-netbeans-modules-jackpot30-refactoring-invertboolean-InvertBooleanAction.shadow">
  578.32 -                <attr name="originalFile" stringvalue="Actions/Refactoring/org-netbeans-modules-jackpot30-refactoring-invertboolean-InvertBooleanAction.instance"/>
  578.33 -                <attr name="position" intvalue="2152"/>
  578.34 -            </file>
  578.35 -        </folder>
  578.36 -    </folder>
  578.37 -</filesystem>
   579.1 --- a/sandbox/old-modules/bridges/refactoring/test/unit/src/org/netbeans/modules/jackpot30/refactoring/RefactoringTestBase.java	Mon Dec 19 11:37:36 2016 +0100
   579.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   579.3 @@ -1,251 +0,0 @@
   579.4 -/*
   579.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   579.6 - *
   579.7 - * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
   579.8 - *
   579.9 - * The contents of this file are subject to the terms of either the GNU
  579.10 - * General Public License Version 2 only ("GPL") or the Common
  579.11 - * Development and Distribution License("CDDL") (collectively, the
  579.12 - * "License"). You may not use this file except in compliance with the
  579.13 - * License. You can obtain a copy of the License at
  579.14 - * http://www.netbeans.org/cddl-gplv2.html
  579.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  579.16 - * specific language governing permissions and limitations under the
  579.17 - * License.  When distributing the software, include this License Header
  579.18 - * Notice in each file and include the License file at
  579.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  579.20 - * particular file as subject to the "Classpath" exception as provided
  579.21 - * by Sun in the GPL Version 2 section of the License file that
  579.22 - * accompanied this code. If applicable, add the following below the
  579.23 - * License Header, with the fields enclosed by brackets [] replaced by
  579.24 - * your own identifying information:
  579.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  579.26 - *
  579.27 - * If you wish your version of this file to be governed by only the CDDL
  579.28 - * or only the GPL Version 2, indicate your decision by adding
  579.29 - * "[Contributor] elects to include this software in this distribution
  579.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  579.31 - * single choice of license, a recipient has the option to distribute
  579.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  579.33 - * to extend the choice of license to its licensees as provided above.
  579.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  579.35 - * Version 2 license, then the option applies only if the new code is
  579.36 - * made subject to such option by the copyright holder.
  579.37 - *
  579.38 - * Contributor(s):
  579.39 - *
  579.40 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  579.41 - */
  579.42 -package org.netbeans.modules.jackpot30.refactoring;
  579.43 -
  579.44 -import java.io.IOException;
  579.45 -import java.util.Arrays;
  579.46 -import java.util.Collections;
  579.47 -import java.util.HashMap;
  579.48 -import java.util.HashSet;
  579.49 -import java.util.LinkedList;
  579.50 -import java.util.List;
  579.51 -import java.util.Map;
  579.52 -import java.util.Set;
  579.53 -import org.netbeans.api.editor.mimelookup.MimePath;
  579.54 -import org.netbeans.api.java.classpath.ClassPath;
  579.55 -import org.netbeans.api.java.classpath.GlobalPathRegistry;
  579.56 -import org.netbeans.api.java.source.SourceUtils;
  579.57 -import org.netbeans.api.java.source.SourceUtilsTestUtil;
  579.58 -import org.netbeans.api.java.source.TestUtilities;
  579.59 -import org.netbeans.api.project.Project;
  579.60 -import org.netbeans.api.project.ProjectManager;
  579.61 -import org.netbeans.core.startup.Main;
  579.62 -import org.netbeans.junit.NbTestCase;
  579.63 -import org.netbeans.modules.java.source.indexing.JavaCustomIndexer;
  579.64 -import org.netbeans.modules.parsing.impl.indexing.CacheFolder;
  579.65 -import org.netbeans.modules.parsing.impl.indexing.MimeTypes;
  579.66 -import org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater;
  579.67 -import org.netbeans.modules.refactoring.api.AbstractRefactoring;
  579.68 -import org.netbeans.modules.refactoring.api.RefactoringSession;
  579.69 -import org.netbeans.spi.editor.mimelookup.MimeDataProvider;
  579.70 -import org.netbeans.spi.java.classpath.ClassPathProvider;
  579.71 -import org.netbeans.spi.java.classpath.support.ClassPathSupport;
  579.72 -import org.netbeans.spi.project.ProjectFactory;
  579.73 -import org.netbeans.spi.project.ProjectState;
  579.74 -import org.openide.filesystems.FileObject;
  579.75 -import org.openide.filesystems.FileUtil;
  579.76 -import org.openide.util.Lookup;
  579.77 -import org.openide.util.lookup.Lookups;
  579.78 -import org.openide.util.lookup.ServiceProvider;
  579.79 -
  579.80 -public class RefactoringTestBase extends NbTestCase {
  579.81 -
  579.82 -    public RefactoringTestBase(String name) {
  579.83 -        super(name);
  579.84 -    }
  579.85 -
  579.86 -    protected static void writeFilesAndWaitForScan(FileObject sourceRoot, File... files) throws Exception {
  579.87 -        for (FileObject c : sourceRoot.getChildren()) {
  579.88 -            c.delete();
  579.89 -        }
  579.90 -
  579.91 -        for (File f : files) {
  579.92 -            FileObject fo = FileUtil.createData(sourceRoot, f.filename);
  579.93 -            TestUtilities.copyStringToFile(fo, f.content);
  579.94 -        }
  579.95 -
  579.96 -        SourceUtils.waitScanFinished();
  579.97 -    }
  579.98 -
  579.99 -    protected static final class File {
 579.100 -        public final String filename;
 579.101 -        public final String content;
 579.102 -
 579.103 -        public File(String filename, String content) {
 579.104 -            this.filename = filename;
 579.105 -            this.content = content;
 579.106 -        }
 579.107 -    }
 579.108 -
 579.109 -    protected FileObject src;
 579.110 -    protected Project prj;
 579.111 -
 579.112 -    @Override
 579.113 -    protected void setUp() throws Exception {
 579.114 -        SourceUtilsTestUtil.prepareTest(new String[0], new Object[] {
 579.115 -            new ClassPathProvider() {
 579.116 -                public ClassPath findClassPath(FileObject file, String type) {
 579.117 -                    if (src != null && (file == src || FileUtil.isParentOf(src, file))) {
 579.118 -                        if (ClassPath.BOOT.equals(type)) {
 579.119 -                            return ClassPathSupport.createClassPath(System.getProperty("sun.boot.class.path"));
 579.120 -                        }
 579.121 -                        if (ClassPath.COMPILE.equals(type)) {
 579.122 -                            return ClassPathSupport.createClassPath(new FileObject[0]);
 579.123 -                        }
 579.124 -                        if (ClassPath.SOURCE.equals(type)) {
 579.125 -                            return ClassPathSupport.createClassPath(src);
 579.126 -                        }
 579.127 -                    }
 579.128 -
 579.129 -                    return null;
 579.130 -                }
 579.131 -            },
 579.132 -            new ProjectFactory() {
 579.133 -                public boolean isProject(FileObject projectDirectory) {
 579.134 -                    return src == projectDirectory;
 579.135 -                }
 579.136 -                public Project loadProject(final FileObject projectDirectory, ProjectState state) throws IOException {
 579.137 -                    if (!isProject(projectDirectory)) return null;
 579.138 -                    return new Project() {
 579.139 -                        public FileObject getProjectDirectory() {
 579.140 -                            return projectDirectory;
 579.141 -                        }
 579.142 -                        public Lookup getLookup() {
 579.143 -                            return Lookup.EMPTY;
 579.144 -                        }
 579.145 -                    };
 579.146 -                }
 579.147 -                public void saveProject(Project project) throws IOException, ClassCastException {}
 579.148 -            }
 579.149 -        });
 579.150 -        Main.initializeURLFactory();
 579.151 -        org.netbeans.api.project.ui.OpenProjects.getDefault().getOpenProjects();
 579.152 -        prepareTest();
 579.153 -        org.netbeans.api.project.ui.OpenProjects.getDefault().open(new Project[] {prj = ProjectManager.getDefault().findProject(src)}, false);
 579.154 -        MimeTypes.setAllMimeTypes(Collections.singleton("text/x-java"));
 579.155 -        GlobalPathRegistry.getDefault().register(ClassPath.SOURCE, new ClassPath[] {ClassPathSupport.createClassPath(src)});
 579.156 -        RepositoryUpdater.getDefault().start(true);
 579.157 -        super.setUp();
 579.158 -    }
 579.159 -
 579.160 -    @Override
 579.161 -    protected void tearDown() throws Exception {
 579.162 -        super.tearDown();
 579.163 -        org.netbeans.api.project.ui.OpenProjects.getDefault().open(new Project[] {prj}, false);
 579.164 -        prj = null;
 579.165 -    }
 579.166 -
 579.167 -    private void prepareTest() throws Exception {
 579.168 -        FileObject workdir = SourceUtilsTestUtil.makeScratchDir(this);
 579.169 -
 579.170 -        src = FileUtil.createFolder(workdir, "src");
 579.171 -
 579.172 -        FileObject cache = FileUtil.createFolder(workdir, "cache");
 579.173 -
 579.174 -        CacheFolder.setCacheFolder(cache);
 579.175 -    }
 579.176 -
 579.177 -    protected void performRefactoring(AbstractRefactoring r, File... verify) throws IOException {
 579.178 -        Map<FileObject, String> originalContent = new HashMap<FileObject, String>();
 579.179 -
 579.180 -        for (FileObject file : recursive(src)) {
 579.181 -            originalContent.put(file, readFile(file));
 579.182 -        }
 579.183 -        
 579.184 -        RefactoringSession rs = RefactoringSession.create("Session");
 579.185 -        
 579.186 -        r.prepare(rs);
 579.187 -
 579.188 -        assertNull(rs.doRefactoring(true));
 579.189 -
 579.190 -//        IndexingManager.getDefault().refreshIndex(src.getURL(), null);
 579.191 -//        SourceUtils.waitScanFinished();
 579.192 -//        assertEquals(false, TaskCache.getDefault().isInError(src, true));
 579.193 -
 579.194 -        for (File v : verify) {
 579.195 -            FileObject file = src.getFileObject(v.filename);
 579.196 -
 579.197 -            assertNotNull(v.filename, file);
 579.198 -
 579.199 -            String content = readFile(file);
 579.200 -
 579.201 -            assertEquals(v.content.replaceAll("[ \n\t]+", " "), content.replaceAll("[ \n\t]+", " "));
 579.202 -        }
 579.203 -
 579.204 -        rs.undoRefactoring(true);
 579.205 -
 579.206 -        for (FileObject file : recursive(src)) {
 579.207 -            String content = originalContent.remove(file);
 579.208 -
 579.209 -            assertNotNull(FileUtil.getFileDisplayName(file), content);
 579.210 -            assertEquals(content, readFile(file));
 579.211 -        }
 579.212 -
 579.213 -        assertTrue(originalContent.toString(), originalContent.isEmpty());
 579.214 -    }
 579.215 -
 579.216 -    private String readFile(FileObject file) throws IOException {
 579.217 -        return TestUtilities.copyFileToString(FileUtil.toFile(file));
 579.218 -    }
 579.219 -
 579.220 -    private static Iterable<? extends FileObject> recursive(FileObject r) {
 579.221 -        Set<FileObject> result = new HashSet<FileObject>();
 579.222 -        List<FileObject> queue = new LinkedList<FileObject>();
 579.223 -
 579.224 -        queue.add(r);
 579.225 -
 579.226 -        while (!queue.isEmpty()) {
 579.227 -            FileObject c = queue.remove(0);
 579.228 -
 579.229 -            if (c.isData()) {
 579.230 -                result.add(c);
 579.231 -            } else {
 579.232 -                queue.addAll(Arrays.asList(c.getChildren()));
 579.233 -            }
 579.234 -        }
 579.235 -
 579.236 -        return result;
 579.237 -    }
 579.238 -    
 579.239 -    @ServiceProvider(service=MimeDataProvider.class)
 579.240 -    public static final class MimeDataProviderImpl implements MimeDataProvider {
 579.241 -
 579.242 -        private static final Lookup L = Lookups.singleton(new JavaCustomIndexer.Factory());
 579.243 -
 579.244 -        public Lookup getLookup(MimePath mimePath) {
 579.245 -            if ("text/x-java".equals(mimePath.getPath())) {
 579.246 -                return L;
 579.247 -            }
 579.248 -
 579.249 -            return null;
 579.250 -        }
 579.251 -
 579.252 -    }
 579.253 -
 579.254 -}
   580.1 --- a/sandbox/old-modules/bridges/refactoring/test/unit/src/org/netbeans/modules/jackpot30/refactoring/RenameRefactoringPluginImplTest.java	Mon Dec 19 11:37:36 2016 +0100
   580.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   580.3 @@ -1,111 +0,0 @@
   580.4 -/*
   580.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   580.6 - *
   580.7 - * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
   580.8 - *
   580.9 - * The contents of this file are subject to the terms of either the GNU
  580.10 - * General Public License Version 2 only ("GPL") or the Common
  580.11 - * Development and Distribution License("CDDL") (collectively, the
  580.12 - * "License"). You may not use this file except in compliance with the
  580.13 - * License. You can obtain a copy of the License at
  580.14 - * http://www.netbeans.org/cddl-gplv2.html
  580.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  580.16 - * specific language governing permissions and limitations under the
  580.17 - * License.  When distributing the software, include this License Header
  580.18 - * Notice in each file and include the License file at
  580.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  580.20 - * particular file as subject to the "Classpath" exception as provided
  580.21 - * by Sun in the GPL Version 2 section of the License file that
  580.22 - * accompanied this code. If applicable, add the following below the
  580.23 - * License Header, with the fields enclosed by brackets [] replaced by
  580.24 - * your own identifying information:
  580.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  580.26 - *
  580.27 - * If you wish your version of this file to be governed by only the CDDL
  580.28 - * or only the GPL Version 2, indicate your decision by adding
  580.29 - * "[Contributor] elects to include this software in this distribution
  580.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  580.31 - * single choice of license, a recipient has the option to distribute
  580.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  580.33 - * to extend the choice of license to its licensees as provided above.
  580.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  580.35 - * Version 2 license, then the option applies only if the new code is
  580.36 - * made subject to such option by the copyright holder.
  580.37 - *
  580.38 - * Contributor(s):
  580.39 - *
  580.40 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  580.41 - */
  580.42 -package org.netbeans.modules.jackpot30.refactoring;
  580.43 -
  580.44 -import com.sun.source.tree.ClassTree;
  580.45 -import com.sun.source.tree.CompilationUnitTree;
  580.46 -import com.sun.source.tree.MethodTree;
  580.47 -import com.sun.source.util.TreePath;
  580.48 -import org.netbeans.api.java.source.CompilationController;
  580.49 -import org.netbeans.api.java.source.JavaSource;
  580.50 -import org.netbeans.api.java.source.Task;
  580.51 -import org.netbeans.api.java.source.TreePathHandle;
  580.52 -import org.netbeans.modules.refactoring.api.RenameRefactoring;
  580.53 -import org.openide.util.lookup.Lookups;
  580.54 -
  580.55 -public class RenameRefactoringPluginImplTest extends RefactoringTestBase {
  580.56 -
  580.57 -    public RenameRefactoringPluginImplTest(String name) {
  580.58 -        super(name);
  580.59 -    }
  580.60 -
  580.61 -    public void testSimple1() throws Exception {
  580.62 -        writeFilesAndWaitForScan(src,
  580.63 -                                 new File("t/A.java", "package t; public class A {\n public void test() {\n}\n }"));
  580.64 -        final RenameRefactoring[] r = new RenameRefactoring[1];
  580.65 -
  580.66 -        JavaSource.forFileObject(src.getFileObject("t/A.java")).runUserActionTask(new Task<CompilationController>() {
  580.67 -
  580.68 -            public void run(CompilationController parameter) throws Exception {
  580.69 -                parameter.toPhase(JavaSource.Phase.RESOLVED);
  580.70 -                CompilationUnitTree cut = parameter.getCompilationUnit();
  580.71 -
  580.72 -                MethodTree var = (MethodTree) ((ClassTree) cut.getTypeDecls().get(0)).getMembers().get(1);
  580.73 -
  580.74 -                TreePath tp = TreePath.getPath(cut, var);
  580.75 -                r[0] = new RenameRefactoring(Lookups.singleton(TreePathHandle.create(tp, parameter)));
  580.76 -            }
  580.77 -        }, true);
  580.78 -
  580.79 -        r[0].setNewName("foo");
  580.80 -        r[0].getContext().add(new ExtraData(true, true, true));
  580.81 -
  580.82 -        performRefactoring(r[0],
  580.83 -                           new File("t/A.java", "package t; public class A { @Deprecated private void test() { foo(); } public void foo() { } }"),
  580.84 -                           new File("META-INF/upgrade/t.A.hint", " $0.test() :: $0 instanceof t.A => $0.foo() ;; "));
  580.85 -    }
  580.86 -
  580.87 -    public void testSimple2() throws Exception {
  580.88 -        writeFilesAndWaitForScan(src,
  580.89 -                                 new File("t/A.java", "package t; public class A {\n public void test() {\n}\n }"),
  580.90 -                                 new File("META-INF/upgrade/t.A.hint", "$0.isDirectory();; "));
  580.91 -        final RenameRefactoring[] r = new RenameRefactoring[1];
  580.92 -
  580.93 -        JavaSource.forFileObject(src.getFileObject("t/A.java")).runUserActionTask(new Task<CompilationController>() {
  580.94 -
  580.95 -            public void run(CompilationController parameter) throws Exception {
  580.96 -                parameter.toPhase(JavaSource.Phase.RESOLVED);
  580.97 -                CompilationUnitTree cut = parameter.getCompilationUnit();
  580.98 -
  580.99 -                MethodTree var = (MethodTree) ((ClassTree) cut.getTypeDecls().get(0)).getMembers().get(1);
 580.100 -
 580.101 -                TreePath tp = TreePath.getPath(cut, var);
 580.102 -                r[0] = new RenameRefactoring(Lookups.singleton(TreePathHandle.create(tp, parameter)));
 580.103 -            }
 580.104 -        }, true);
 580.105 -
 580.106 -        r[0].setNewName("foo");
 580.107 -        r[0].getContext().add(new ExtraData(true, /*XXX: false will fail badly here!!*/true, false));
 580.108 -
 580.109 -        performRefactoring(r[0],
 580.110 -                           new File("t/A.java", "package t; public class A { private void test() { foo(); } public void foo() { } }"),
 580.111 -                           new File("META-INF/upgrade/t.A.hint", "$0.isDirectory();; $0.test() :: $0 instanceof t.A => $0.foo() ;; "));
 580.112 -    }
 580.113 -
 580.114 -}
   581.1 --- a/sandbox/old-modules/bridges/refactoring/test/unit/src/org/netbeans/modules/jackpot30/refactoring/ScriptGeneratorTest.java	Mon Dec 19 11:37:36 2016 +0100
   581.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   581.3 @@ -1,135 +0,0 @@
   581.4 -/*
   581.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   581.6 - *
   581.7 - * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
   581.8 - *
   581.9 - * The contents of this file are subject to the terms of either the GNU
  581.10 - * General Public License Version 2 only ("GPL") or the Common
  581.11 - * Development and Distribution License("CDDL") (collectively, the
  581.12 - * "License"). You may not use this file except in compliance with the
  581.13 - * License. You can obtain a copy of the License at
  581.14 - * http://www.netbeans.org/cddl-gplv2.html
  581.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  581.16 - * specific language governing permissions and limitations under the
  581.17 - * License.  When distributing the software, include this License Header
  581.18 - * Notice in each file and include the License file at
  581.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  581.20 - * particular file as subject to the "Classpath" exception as provided
  581.21 - * by Sun in the GPL Version 2 section of the License file that
  581.22 - * accompanied this code. If applicable, add the following below the
  581.23 - * License Header, with the fields enclosed by brackets [] replaced by
  581.24 - * your own identifying information:
  581.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  581.26 - *
  581.27 - * If you wish your version of this file to be governed by only the CDDL
  581.28 - * or only the GPL Version 2, indicate your decision by adding
  581.29 - * "[Contributor] elects to include this software in this distribution
  581.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  581.31 - * single choice of license, a recipient has the option to distribute
  581.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  581.33 - * to extend the choice of license to its licensees as provided above.
  581.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  581.35 - * Version 2 license, then the option applies only if the new code is
  581.36 - * made subject to such option by the copyright holder.
  581.37 - *
  581.38 - * Contributor(s):
  581.39 - *
  581.40 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  581.41 - */
  581.42 -
  581.43 -package org.netbeans.modules.jackpot30.refactoring;
  581.44 -
  581.45 -import com.sun.source.util.TreePath;
  581.46 -import java.util.regex.Pattern;
  581.47 -import javax.lang.model.element.Element;
  581.48 -import org.netbeans.api.java.source.SourceUtilsTestUtil;
  581.49 -import org.netbeans.modules.jackpot30.impl.TestBase;
  581.50 -
  581.51 -/**
  581.52 - *
  581.53 - * @author lahvac
  581.54 - */
  581.55 -public class ScriptGeneratorTest extends TestBase {
  581.56 -    
  581.57 -    public ScriptGeneratorTest(String testName) {
  581.58 -        super(testName);
  581.59 -    }
  581.60 -
  581.61 -    @Override
  581.62 -    protected void setUp() throws Exception {
  581.63 -        SourceUtilsTestUtil.prepareTest(new String[0], new Object[0]);
  581.64 -        super.setUp();
  581.65 -    }
  581.66 -
  581.67 -    public void testInstanceMethod() throws Exception {
  581.68 -        performTest("package test;\n" +
  581.69 -                    "public class Test {\n" +
  581.70 -                    "    public void te|st() {}" +
  581.71 -                    "}\n",
  581.72 -                    "foo",
  581.73 -                    "   $0.test() :: $0 instanceof test.Test\n" +
  581.74 -                    "=> $0.foo()\n" +
  581.75 -                    ";;");
  581.76 -    }
  581.77 -
  581.78 -    public void testInstanceMethodParam() throws Exception {
  581.79 -        performTest("package test;\n" +
  581.80 -                    "public class Test {\n" +
  581.81 -                    "    public void te|st(int i) {}" +
  581.82 -                    "}\n",
  581.83 -                    "foo",
  581.84 -                    "   $0.test($i) :: $0 instanceof test.Test && $i instanceof int\n" +
  581.85 -                    "=> $0.foo($i)\n" +
  581.86 -                    ";;");
  581.87 -    }
  581.88 -
  581.89 -    public void testStaticMethod() throws Exception {
  581.90 -        performTest("package test;\n" +
  581.91 -                    "public class Test {\n" +
  581.92 -                    "    public static void te|st() {}" +
  581.93 -                    "}\n",
  581.94 -                    "foo",
  581.95 -                    "   test.Test.test()\n" +
  581.96 -                    "=> test.Test.foo()\n" +
  581.97 -                    ";;");
  581.98 -    }
  581.99 -
 581.100 -    public void testStaticMethodParam() throws Exception {
 581.101 -        performTest("package test;\n" +
 581.102 -                    "public class Test {\n" +
 581.103 -                    "    public static void te|st(int i) {}" +
 581.104 -                    "}\n",
 581.105 -                    "foo",
 581.106 -                    "   test.Test.test($i) :: $i instanceof int\n" +
 581.107 -                    "=> test.Test.foo($i)\n" +
 581.108 -                    ";;");
 581.109 -    }
 581.110 -
 581.111 -    public void testMultipleParameters183659() throws Exception {
 581.112 -        performTest("package test;\n" +
 581.113 -                    "public class Test {\n" +
 581.114 -                    "    public void te|st(int i, int j) {}" +
 581.115 -                    "}\n",
 581.116 -                    "foo",
 581.117 -                    "   $0.test($i, $j) :: $0 instanceof test.Test && $i instanceof int && $j instanceof int\n" +
 581.118 -                    "=> $0.foo($i, $j)\n" +
 581.119 -                    ";;");
 581.120 -    }
 581.121 -
 581.122 -    private void performTest(String code, String newName, String script) throws Exception {
 581.123 -        assertEquals(2, code.split(Pattern.quote("|")).length);
 581.124 -
 581.125 -        int pos = code.indexOf('|');
 581.126 -
 581.127 -        code = code.substring(0, pos) + code.substring(pos + 1);
 581.128 -
 581.129 -        prepareTest("test/Test.java", code);
 581.130 -
 581.131 -        TreePath path = info.getTreeUtilities().pathFor(pos);
 581.132 -        Element el = info.getTrees().getElement(path);
 581.133 -
 581.134 -        assertNotNull(el);
 581.135 -
 581.136 -        assertEquals(script, ScriptGenerator.constructRenameRule(null, newName, el));
 581.137 -    }
 581.138 -}
   582.1 --- a/sandbox/old-modules/help/build.xml	Mon Dec 19 11:37:36 2016 +0100
   582.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   582.3 @@ -1,48 +0,0 @@
   582.4 -<?xml version="1.0" encoding="UTF-8"?>
   582.5 -<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
   582.6 -<!-- for some information on what you could do (e.g. targets to override). -->
   582.7 -<!-- If you delete this file and reopen the project it will be recreated. -->
   582.8 -<project name="org.netbeans.modules.jackpot30.help" default="netbeans" basedir=".">
   582.9 -    <description>Builds, tests, and runs the project org.netbeans.modules.jackpot30.help.</description>
  582.10 -    <import file="nbproject/build-impl.xml"/>
  582.11 -    <import file="${suite.dir}/findbugs-import.xml"/>
  582.12 -
  582.13 -    <target name="help-init">
  582.14 -        <property environment="ENV." />
  582.15 -        <condition property="hasLaTeX2HTML">
  582.16 -            <available file="latex2html" filepath="${ENV.PATH}" />
  582.17 -        </condition>
  582.18 -    </target>
  582.19 -
  582.20 -    <target name="compile-help" depends="help-init" if="hasLaTeX2HTML">
  582.21 -        <mkdir dir="${basedir}/build/help/org/netbeans/modules/jackpot30/help/docs" />
  582.22 -
  582.23 -        <copy file="jackpot30-helpset.xml" todir="${basedir}/build/help/org/netbeans/modules/jackpot30/help/docs" />
  582.24 -        
  582.25 -        <exec executable="latex2html">
  582.26 -            <arg value="-antialias" />
  582.27 -            <arg value="-antialias_text" />
  582.28 -            <arg value="-dir" />
  582.29 -            <arg value="build/help/org/netbeans/modules/jackpot30/help/docs" />
  582.30 -            <arg value="jackpot30-help.tex" />
  582.31 -        </exec>
  582.32 -
  582.33 -        <java classname="org.netbeans.modules.jackpot30.help.CreateMap"
  582.34 -              classpath="build/classes">
  582.35 -            <arg value="${basedir}/build/help/org/netbeans/modules/jackpot30/help/docs" />
  582.36 -        </java>
  582.37 -
  582.38 -        <mkdir dir="${suite.dir}/build/cluster/modules/docs" />
  582.39 -
  582.40 -        <jar destfile="${suite.dir}/build/cluster/modules/docs/org-netbeans-modules-jackpot30-help.jar" basedir="${basedir}/build/help">
  582.41 -
  582.42 -        </jar>
  582.43 -    </target>
  582.44 -
  582.45 -    <target name="compile" depends="projectized-common.compile,compile-help" />
  582.46 -
  582.47 -    <target name="test" />
  582.48 -    <target name="test-coverage" />
  582.49 -    <target name="coverage-report" />
  582.50 -
  582.51 -</project>
   583.1 --- a/sandbox/old-modules/help/jackpot30-help.tex	Mon Dec 19 11:37:36 2016 +0100
   583.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   583.3 @@ -1,119 +0,0 @@
   583.4 -\documentclass{article}
   583.5 -\usepackage{verbdef}
   583.6 -\usepackage{hyperref}
   583.7 -
   583.8 -\verbdef\simplevariable=$[0-9A-Za-z_]+=
   583.9 -\verbdef\statementvariable=$[0-9A-Za-z_]+;=
  583.10 -\verbdef\multipletreevariable=$[0-9A-Za-z_]+$=
  583.11 -\verbdef\multiplestatementvariable=$[0-9A-Za-z_]+$;=
  583.12 -\verbdef\wholepattern=$_=
  583.13 -\verbdef\reserved=$$[0-9A-Za-z_]+=
  583.14 -
  583.15 -\begin{document}
  583.16 -
  583.17 -\section{Rules Language}
  583.18 -
  583.19 -\subsection{Basic Structure}
  583.20 -
  583.21 -The rules file consists of any number of transformation rules.
  583.22 -The rule is defined as follows:
  583.23 -\begin{verbatim}
  583.24 -    <pattern>
  583.25 -=> <fix-pattern>
  583.26 -=> <fix-pattern>
  583.27 -;;
  583.28 -\end{verbatim}
  583.29 -
  583.30 -Each occurrence of \verb=<pattern>= in the source code can be rewritten to one
  583.31 -of the \verb=<fix-pattern>=s. For example, the following transformation rule:
  583.32 -\begin{verbatim}
  583.33 -   $1 == null
  583.34 -=> null == $1
  583.35 -;;
  583.36 -\end{verbatim}
  583.37 -
  583.38 -will rewrite the following code:
  583.39 -\begin{verbatim}
  583.40 -if (a == null) {
  583.41 -   System.err.println("a is null");
  583.42 -}
  583.43 -\end{verbatim}
  583.44 -to:
  583.45 -\begin{verbatim}
  583.46 -if (null == a) {
  583.47 -    System.err.println("a is null");
  583.48 -}
  583.49 -\end{verbatim}
  583.50 -
  583.51 -Note: \verb=$1$= is a variable, explained \hyperref{below}{in Section~}{variables}{}.
  583.52 -
  583.53 -Note: batch refactoring will typically use only the first applicable fix patterns
  583.54 -of each applicable rule.
  583.55 -
  583.56 -\subsection{Patterns}
  583.57 -
  583.58 -The pattern is a Java expression, statement or several statements.
  583.59 -All references to classes in the pattern need to be resolvable, i.e. either fully
  583.60 -qualified names need to be used, or the custom import section must be used
  583.61 -(see \hyperref{Custom Imports}{Section~}{custom-import}{}).
  583.62 -
  583.63 -TODO: equivalence - static elements are checked only against themselves, blocks with
  583.64 -one statement considered equivalent to single statement.
  583.65 -
  583.66 -Note: variable declaration is a Java statement.
  583.67 -
  583.68 -\subsection{Variables}
  583.69 -
  583.70 -Variables start with the dollar sign (\verb=$=). In the pattern, first occurrences
  583.71 -of a variable is bound to the actual sub-tree that appears in the code. Second and
  583.72 -following occurrences of the variable the actual sub-tree is verified against the subtree
  583.73 -bound to the variable. The pattern occurs in the text only if the actual sub-tree
  583.74 -matches the sub-tree bound to the variable. In the fix pattern, all occurrences of
  583.75 -the variables are replaced with the tree(s) bound to the respective variables.
  583.76 -
  583.77 -The forms of the variables are:
  583.78 -\begin{description}
  583.79 -\item[\simplevariable]{any expression}
  583.80 -\item[\statementvariable]{any statement}
  583.81 -\item[\multipletreevariable]{any number of sub-trees (except statements - see next definition)}
  583.82 -\item[\multiplestatementvariable]{any number of statements}
  583.83 -\item[\wholepattern]{for patterns undefined, for fixes and conditions automatically bound to the current matched region}
  583.84 -\item[\reserved]{reserved -- do not use}
  583.85 -\end{description}
  583.86 -
  583.87 -\subsection{Conditions}
  583.88 -
  583.89 -Both the search and fix patterns may specify additional conditions. These conditions
  583.90 -are specified after \verb=::=. Currently, the conditions have the following
  583.91 -limitations:
  583.92 -
  583.93 -\begin{verbatim}
  583.94 -   $1.isDirectory() :: $1 instanceof java.io.File
  583.95 -=> !$1.isFile()
  583.96 -;;
  583.97 -\end{verbatim}
  583.98 -
  583.99 -will rewrite the following code:
 583.100 -\begin{verbatim}
 583.101 -java.io.File testFile = new java.io.File("/tmp");
 583.102 -if (testFile.isDirectory()) {
 583.103 -    System.err.println("/tmp is a directory");
 583.104 -}
 583.105 -\end{verbatim}
 583.106 -to:
 583.107 -\begin{verbatim}
 583.108 -java.io.File testFile = new java.io.File("/tmp");
 583.109 -if (!testFile.isFile()) {
 583.110 -    System.err.println("/tmp is a directory");
 583.111 -}
 583.112 -\end{verbatim}
 583.113 -
 583.114 -\subsection{Display Names and Localization}
 583.115 -
 583.116 -\subsection{Custom Conditions}
 583.117 -
 583.118 -\subsection{Custom Import}
 583.119 -
 583.120 -\subsection{Options}
 583.121 -
 583.122 -\end{document}
   584.1 --- a/sandbox/old-modules/help/jackpot30-helpset.xml	Mon Dec 19 11:37:36 2016 +0100
   584.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   584.3 @@ -1,31 +0,0 @@
   584.4 -<?xml version="1.0" encoding="UTF-8"?>
   584.5 -<!--
   584.6 -To change this template, choose Tools | Templates
   584.7 -and open the template in the editor.
   584.8 --->
   584.9 -<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
  584.10 -<helpset version="2.0">
  584.11 -    <title>Jackpot 3.0 Help</title>
  584.12 -    <maps>
  584.13 -        <homeID>jackpot30.about</homeID>
  584.14 -        <mapref location="jackpot30-map.xml"/>
  584.15 -    </maps>
  584.16 -    <view mergetype="javax.help.AppendMerge">
  584.17 -        <name>TOC</name>
  584.18 -        <label>Table of Contents</label>
  584.19 -        <type>javax.help.TOCView</type>
  584.20 -        <data>jackpot30-toc.xml</data>
  584.21 -    </view>
  584.22 -<!--    <view mergetype="javax.help.AppendMerge">
  584.23 -        <name>Index</name>
  584.24 -        <label>Index</label>
  584.25 -        <type>javax.help.IndexView</type>
  584.26 -        <data>dsaf-idx.xml</data>
  584.27 -    </view>-->
  584.28 -<!--    <view>
  584.29 -        <name>Search</name>
  584.30 -        <label>Search</label>
  584.31 -        <type>javax.help.SearchView</type>
  584.32 -        <data engine="com.sun.java.help.search.DefaultSearchEngine">JavaHelpSearch</data>
  584.33 -    </view>-->
  584.34 -</helpset>
   585.1 --- a/sandbox/old-modules/help/manifest.mf	Mon Dec 19 11:37:36 2016 +0100
   585.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   585.3 @@ -1,7 +0,0 @@
   585.4 -Manifest-Version: 1.0
   585.5 -OpenIDE-Module: org.netbeans.modules.jackpot30.help
   585.6 -OpenIDE-Module-Layer: org/netbeans/modules/jackpot30/help/layer.xml
   585.7 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jackpot30/help/Bundle.properties
   585.8 -OpenIDE-Module-Specification-Version: 1.16
   585.9 -OpenIDE-Module-Requires: org.netbeans.api.javahelp.Help
  585.10 -Class-Path: docs/org-netbeans-modules-jackpot30-help.jar
   586.1 --- a/sandbox/old-modules/help/nbproject-help.tex/build-settings.properties	Mon Dec 19 11:37:36 2016 +0100
   586.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   586.3 @@ -1,3 +0,0 @@
   586.4 -build-configuration-name=latexdvips
   586.5 -
   586.6 -mainfile=../jackpot30-help.tex
   587.1 --- a/sandbox/old-modules/help/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   587.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   587.3 @@ -1,30 +0,0 @@
   587.4 -<?xml version="1.0" encoding="UTF-8"?>
   587.5 -<!--
   587.6 -*** GENERATED FROM project.xml - DO NOT EDIT  ***
   587.7 -***         EDIT ../build.xml INSTEAD         ***
   587.8 --->
   587.9 -<project name="org.netbeans.modules.jackpot30.help-impl" basedir="..">
  587.10 -    <property file="nbproject/private/suite-private.properties"/>
  587.11 -    <property file="nbproject/suite.properties"/>
  587.12 -    <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
  587.13 -    <property file="${suite.dir}/nbproject/private/platform-private.properties"/>
  587.14 -    <property file="${suite.dir}/nbproject/platform.properties"/>
  587.15 -    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
  587.16 -        <attribute name="name"/>
  587.17 -        <attribute name="value"/>
  587.18 -        <sequential>
  587.19 -            <property name="@{name}" value="${@{value}}"/>
  587.20 -        </sequential>
  587.21 -    </macrodef>
  587.22 -    <property file="${user.properties.file}"/>
  587.23 -    <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  587.24 -    <nbmproject2:property name="netbeans.dest.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  587.25 -    <fail message="You must define 'nbplatform.${nbplatform.active}.harness.dir'">
  587.26 -        <condition>
  587.27 -            <not>
  587.28 -                <available file="${harness.dir}" type="dir"/>
  587.29 -            </not>
  587.30 -        </condition>
  587.31 -    </fail>
  587.32 -    <import file="${harness.dir}/build.xml"/>
  587.33 -</project>
   588.1 --- a/sandbox/old-modules/help/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   588.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   588.3 @@ -1,8 +0,0 @@
   588.4 -build.xml.data.CRC32=ffaf56d3
   588.5 -build.xml.script.CRC32=12cad5e6
   588.6 -build.xml.stylesheet.CRC32=79c3b980@1.29.0.7
   588.7 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   588.8 -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   588.9 -nbproject/build-impl.xml.data.CRC32=ffaf56d3
  588.10 -nbproject/build-impl.xml.script.CRC32=4673e324
  588.11 -nbproject/build-impl.xml.stylesheet.CRC32=68e521fc@2.70
   589.1 --- a/sandbox/old-modules/help/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   589.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   589.3 @@ -1,2 +0,0 @@
   589.4 -javac.source=1.5
   589.5 -javac.compilerargs=-Xlint -Xlint:-serial
   590.1 --- a/sandbox/old-modules/help/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   590.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   590.3 @@ -1,12 +0,0 @@
   590.4 -<?xml version="1.0" encoding="UTF-8"?>
   590.5 -<project xmlns="http://www.netbeans.org/ns/project/1">
   590.6 -    <type>org.netbeans.modules.apisupport.project</type>
   590.7 -    <configuration>
   590.8 -        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
   590.9 -            <code-name-base>org.netbeans.modules.jackpot30.help</code-name-base>
  590.10 -            <suite-component/>
  590.11 -            <module-dependencies/>
  590.12 -            <public-packages/>
  590.13 -        </data>
  590.14 -    </configuration>
  590.15 -</project>
   591.1 --- a/sandbox/old-modules/help/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   591.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   591.3 @@ -1,1 +0,0 @@
   591.4 -suite.dir=${basedir}/..
   592.1 --- a/sandbox/old-modules/help/src/org/netbeans/modules/jackpot30/help/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   592.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   592.3 @@ -1,38 +0,0 @@
   592.4 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   592.5 -#
   592.6 -# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
   592.7 -#
   592.8 -# The contents of this file are subject to the terms of either the GNU
   592.9 -# General Public License Version 2 only ("GPL") or the Common
  592.10 -# Development and Distribution License("CDDL") (collectively, the
  592.11 -# "License"). You may not use this file except in compliance with the
  592.12 -# License. You can obtain a copy of the License at
  592.13 -# http://www.netbeans.org/cddl-gplv2.html
  592.14 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  592.15 -# specific language governing permissions and limitations under the
  592.16 -# License.  When distributing the software, include this License Header
  592.17 -# Notice in each file and include the License file at
  592.18 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  592.19 -# particular file as subject to the "Classpath" exception as provided
  592.20 -# by Sun in the GPL Version 2 section of the License file that
  592.21 -# accompanied this code. If applicable, add the following below the
  592.22 -# License Header, with the fields enclosed by brackets [] replaced by
  592.23 -# your own identifying information:
  592.24 -# "Portions Copyrighted [year] [name of copyright owner]"
  592.25 -#
  592.26 -# If you wish your version of this file to be governed by only the CDDL
  592.27 -# or only the GPL Version 2, indicate your decision by adding
  592.28 -# "[Contributor] elects to include this software in this distribution
  592.29 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
  592.30 -# single choice of license, a recipient has the option to distribute
  592.31 -# your version of this file under either the CDDL, the GPL Version 2 or
  592.32 -# to extend the choice of license to its licensees as provided above.
  592.33 -# However, if you add GPL Version 2 code and therefore, elected the GPL
  592.34 -# Version 2 license, then the option applies only if the new code is
  592.35 -# made subject to such option by the copyright holder.
  592.36 -#
  592.37 -# Contributor(s):
  592.38 -#
  592.39 -# Portions Copyrighted 2009 Sun Microsystems, Inc.
  592.40 -
  592.41 -OpenIDE-Module-Name=Jackpot 3.0 Help
   593.1 --- a/sandbox/old-modules/help/src/org/netbeans/modules/jackpot30/help/CreateMap.java	Mon Dec 19 11:37:36 2016 +0100
   593.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   593.3 @@ -1,196 +0,0 @@
   593.4 -/*
   593.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   593.6 - *
   593.7 - * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
   593.8 - *
   593.9 - * The contents of this file are subject to the terms of either the GNU
  593.10 - * General Public License Version 2 only ("GPL") or the Common
  593.11 - * Development and Distribution License("CDDL") (collectively, the
  593.12 - * "License"). You may not use this file except in compliance with the
  593.13 - * License. You can obtain a copy of the License at
  593.14 - * http://www.netbeans.org/cddl-gplv2.html
  593.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  593.16 - * specific language governing permissions and limitations under the
  593.17 - * License.  When distributing the software, include this License Header
  593.18 - * Notice in each file and include the License file at
  593.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  593.20 - * particular file as subject to the "Classpath" exception as provided
  593.21 - * by Sun in the GPL Version 2 section of the License file that
  593.22 - * accompanied this code. If applicable, add the following below the
  593.23 - * License Header, with the fields enclosed by brackets [] replaced by
  593.24 - * your own identifying information:
  593.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  593.26 - *
  593.27 - * Contributor(s):
  593.28 - *
  593.29 - * The Original Software is the LaTeX module.
  593.30 - * The Initial Developer of the Original Software is Jan Lahoda.
  593.31 - * Portions created by Jan Lahoda_ are Copyright (C) 2002-2009.
  593.32 - * All Rights Reserved.
  593.33 - *
  593.34 - * If you wish your version of this file to be governed by only the CDDL
  593.35 - * or only the GPL Version 2, indicate your decision by adding
  593.36 - * "[Contributor] elects to include this software in this distribution
  593.37 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  593.38 - * single choice of license, a recipient has the option to distribute
  593.39 - * your version of this file under either the CDDL, the GPL Version 2 or
  593.40 - * to extend the choice of license to its licensees as provided above.
  593.41 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  593.42 - * Version 2 license, then the option applies only if the new code is
  593.43 - * made subject to such option by the copyright holder.
  593.44 - *
  593.45 - * Contributor(s): Jan Lahoda.
  593.46 - */
  593.47 -package org.netbeans.modules.jackpot30.help;
  593.48 -
  593.49 -import java.io.BufferedReader;
  593.50 -import java.io.File;
  593.51 -import java.io.FileReader;
  593.52 -import java.io.FileWriter;
  593.53 -import java.io.IOException;
  593.54 -import java.io.PrintWriter;
  593.55 -import java.util.HashMap;
  593.56 -import java.util.Map;
  593.57 -
  593.58 -/**
  593.59 - *
  593.60 - * @author Jan Lahoda
  593.61 - */
  593.62 -public class CreateMap {
  593.63 -
  593.64 -    public CreateMap() {}
  593.65 -
  593.66 -    /**
  593.67 -     * @param args the command line arguments
  593.68 -     */
  593.69 -    public static void main(String[] args) throws IOException {
  593.70 -        if (args.length != 1) {
  593.71 -	    System.err.println("Incorrect number of arguments, one argument containing the location of the base dir is required.");
  593.72 -	    return ;
  593.73 -	}
  593.74 -	
  593.75 -        File baseDir = new File(args[0]);
  593.76 -	
  593.77 -	if (!baseDir.exists()) {
  593.78 -	   System.err.println(baseDir.getAbsolutePath() + " does not exist.");
  593.79 -	   return ;
  593.80 -	}
  593.81 -        
  593.82 -	if (!baseDir.isDirectory()) {
  593.83 -	   System.err.println(baseDir.getAbsolutePath() + " is not a directory.");
  593.84 -	   return ;
  593.85 -	}
  593.86 -	
  593.87 -        File in  = new File(baseDir, "labels.pl");
  593.88 -        File out = new File(baseDir, "jackpot30-map.xml");
  593.89 -        
  593.90 -        Map<String, String> map = createMapFile(in, out);
  593.91 -        
  593.92 -        File outTOC = new File(baseDir, "jackpot30-toc.xml");
  593.93 -        File inTOC  = new File(baseDir, "jackpot30-help.html");
  593.94 -        
  593.95 -        createTOC(inTOC, outTOC, map);
  593.96 -    }
  593.97 -    
  593.98 -    private static Map<String, String> createMapFile(File in, File out) throws IOException {
  593.99 -        BufferedReader      input  = new BufferedReader(new FileReader(in));
 593.100 -        PrintWriter         output = new PrintWriter(new FileWriter(out));
 593.101 -        Map<String, String> map    = new HashMap<String, String>();
 593.102 -
 593.103 -        output.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
 593.104 -        output.println();
 593.105 -        output.println("<!DOCTYPE map");
 593.106 -        output.println("  PUBLIC \"-//Sun Microsystems Inc.//DTD JavaHelp Map Version 1.0//EN\"");
 593.107 -        output.println("         \"file:///home/lahvac/netbeans/netbeans/bin/nbuser/sampledir/javahelp/map_1_0.dtd\">");
 593.108 -        output.println("<!--This is the original DTD: \"http://java.sun.com/products/javahelp/map_1_0.dtd\"-->");
 593.109 -        output.println();
 593.110 -        output.println("<map version=\"1.0\">");
 593.111 -        
 593.112 -        output.println("<mapID target=\"jackpot30.default\" url=\"jackpot30-help.html\" />");
 593.113 -
 593.114 -        String line = null;
 593.115 -        String actualKey = null;
 593.116 -        
 593.117 -        while ((line = input.readLine()) != null) {
 593.118 -            if (line.startsWith("$key")) {
 593.119 -                actualKey = line.split("/")[1];
 593.120 -                actualKey = "jackpot30." + actualKey.replace(':', '.');
 593.121 -            }
 593.122 -            
 593.123 -            if (line.startsWith("$external_labels")) {
 593.124 -                String url = line.split("\\|")[1];
 593.125 -                
 593.126 -                output.print("<mapID target=\"");
 593.127 -                output.print(actualKey);
 593.128 -                output.print("\" url=\"");
 593.129 -                output.print(url);
 593.130 -                output.println("\"/>");
 593.131 -                
 593.132 -                map.put(url, actualKey);
 593.133 -                
 593.134 -                actualKey = null;
 593.135 -            }
 593.136 -        }
 593.137 -
 593.138 -        output.println("</map>");
 593.139 -        output.close();
 593.140 -        input.close();
 593.141 -        
 593.142 -        return map;
 593.143 -    }
 593.144 -
 593.145 -    private static void createTOC(File in, File out, Map<String, String> map) throws IOException {
 593.146 -        BufferedReader input  = new BufferedReader(new FileReader(in));
 593.147 -        PrintWriter    output = new PrintWriter(new FileWriter(out));
 593.148 -        
 593.149 -        String line  = null;
 593.150 -        boolean noStop = false;
 593.151 -        
 593.152 -        output.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
 593.153 -        output.println();
 593.154 -        output.println("<!DOCTYPE toc");
 593.155 -        output.println("  PUBLIC \"-//Sun Microsystems Inc.//DTD JavaHelp TOC Version 1.0//EN\"");
 593.156 -        output.println("         \"file:///home/lahvac/netbeans/netbeans/bin/nbuser/sampledir/javahelp/toc_1_0.dtd\">");
 593.157 -        output.println("<!--This is the original DTD: \"http://java.sun.com/products/javahelp/toc_1_0.dtd\"-->");
 593.158 -        output.println();
 593.159 -        output.println("<toc version=\"1.0\">");
 593.160 -
 593.161 -        while ((line = input.readLine()) != null && line.indexOf("<!--Table of Child-Links-->") == (-1))
 593.162 -            ;
 593.163 -        
 593.164 -        output.println("<tocitem text=\"Jackpot 3.0 Support Help\" target=\"jackpot30.default\">");
 593.165 -        while ((line = input.readLine()) != null && line.indexOf("<!--End of Table of Child-Links-->") == (-1)) {
 593.166 -            if (line.startsWith("<UL ")) {
 593.167 -                noStop = true;
 593.168 -                continue;
 593.169 -            }
 593.170 -            
 593.171 -            if (line.indexOf("HREF=\"") != (-1)) {
 593.172 -                if (noStop) {
 593.173 -                    noStop = false;
 593.174 -                } else {
 593.175 -                    output.println("</tocitem>");
 593.176 -                }
 593.177 -                
 593.178 -                String file = line.split("\"")[1];
 593.179 -                String name = line.split(">")[1].split("<")[0];
 593.180 -                
 593.181 -                output.println("<tocitem text=\"" + name + "\" target=\"" + (map.get(file) != null ? map.get(file) : "test") + "\">");
 593.182 -                
 593.183 -                continue;
 593.184 -            }
 593.185 -            
 593.186 -            if (line.startsWith("</UL>") && !noStop) {
 593.187 -                output.println("</tocitem>");
 593.188 -                continue;
 593.189 -            }
 593.190 -        }
 593.191 -        
 593.192 -        output.println("</tocitem>");
 593.193 -        
 593.194 -        output.println("</toc>");
 593.195 -        
 593.196 -        output.close();
 593.197 -        input.close();
 593.198 -    }
 593.199 -}
   594.1 --- a/sandbox/old-modules/help/src/org/netbeans/modules/jackpot30/help/jackpot30-helpset.xml	Mon Dec 19 11:37:36 2016 +0100
   594.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   594.3 @@ -1,3 +0,0 @@
   594.4 -<?xml version="1.0" encoding="UTF-8"?>
   594.5 -<!DOCTYPE helpsetref PUBLIC "-//NetBeans//DTD JavaHelp Help Set Reference 1.0//EN" "http://www.netbeans.org/dtds/helpsetref-1_0.dtd">
   594.6 -<helpsetref url="nbdocs:/org/netbeans/modules/jackpot30/help/docs/jackpot30-helpset.xml" />
   595.1 --- a/sandbox/old-modules/help/src/org/netbeans/modules/jackpot30/help/layer.xml	Mon Dec 19 11:37:36 2016 +0100
   595.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   595.3 @@ -1,11 +0,0 @@
   595.4 -<?xml version="1.0" encoding="UTF-8"?>
   595.5 -<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
   595.6 -<filesystem>
   595.7 -    <folder name="Services">
   595.8 -        <folder name="JavaHelp">
   595.9 -            <file name="jackpot30-helpset.xml" url="jackpot30-helpset.xml">
  595.10 -                <attr name="position" intvalue="3456"/>
  595.11 -            </file>
  595.12 -        </folder>
  595.13 -    </folder>
  595.14 -</filesystem>
   596.1 --- a/sandbox/old-modules/hintsimpl/build.xml	Mon Dec 19 11:37:36 2016 +0100
   596.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   596.3 @@ -1,11 +0,0 @@
   596.4 -<?xml version="1.0" encoding="UTF-8"?>
   596.5 -<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
   596.6 -<!-- for some information on what you could do (e.g. targets to override). -->
   596.7 -<!-- If you delete this file and reopen the project it will be recreated. -->
   596.8 -<project name="org.netbeans.modules.jackpot30.hintsimpl" default="netbeans" basedir=".">
   596.9 -    <description>Builds, tests, and runs the project org.netbeans.modules.jackpot30.hintsimpl.</description>
  596.10 -    <import file="nbproject/build-impl.xml"/>
  596.11 -    <import file="${suite.dir}/findbugs-import.xml"/>
  596.12 -    <target name="test-coverage" />
  596.13 -    <target name="coverage-report" />
  596.14 -</project>
   597.1 --- a/sandbox/old-modules/hintsimpl/manifest.mf	Mon Dec 19 11:37:36 2016 +0100
   597.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   597.3 @@ -1,7 +0,0 @@
   597.4 -Manifest-Version: 1.0
   597.5 -AutoUpdate-Show-In-Client: false
   597.6 -OpenIDE-Module: org.netbeans.modules.jackpot30.hintsimpl
   597.7 -OpenIDE-Module-Implementation-Version: 1
   597.8 -OpenIDE-Module-Layer: org/netbeans/modules/jackpot30/hintsimpl/layer.xml
   597.9 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jackpot30/hintsimpl/Bundle.properties
  597.10 -
   598.1 --- a/sandbox/old-modules/hintsimpl/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   598.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   598.3 @@ -1,30 +0,0 @@
   598.4 -<?xml version="1.0" encoding="UTF-8"?>
   598.5 -<!--
   598.6 -*** GENERATED FROM project.xml - DO NOT EDIT  ***
   598.7 -***         EDIT ../build.xml INSTEAD         ***
   598.8 --->
   598.9 -<project name="org.netbeans.modules.jackpot30.hintsimpl-impl" basedir="..">
  598.10 -    <property file="nbproject/private/suite-private.properties"/>
  598.11 -    <property file="nbproject/suite.properties"/>
  598.12 -    <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
  598.13 -    <property file="${suite.dir}/nbproject/private/platform-private.properties"/>
  598.14 -    <property file="${suite.dir}/nbproject/platform.properties"/>
  598.15 -    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
  598.16 -        <attribute name="name"/>
  598.17 -        <attribute name="value"/>
  598.18 -        <sequential>
  598.19 -            <property name="@{name}" value="${@{value}}"/>
  598.20 -        </sequential>
  598.21 -    </macrodef>
  598.22 -    <property file="${user.properties.file}"/>
  598.23 -    <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  598.24 -    <nbmproject2:property name="netbeans.dest.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  598.25 -    <fail message="You must define 'nbplatform.${nbplatform.active}.harness.dir'">
  598.26 -        <condition>
  598.27 -            <not>
  598.28 -                <available file="${harness.dir}" type="dir"/>
  598.29 -            </not>
  598.30 -        </condition>
  598.31 -    </fail>
  598.32 -    <import file="${harness.dir}/build.xml"/>
  598.33 -</project>
   599.1 --- a/sandbox/old-modules/hintsimpl/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   599.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   599.3 @@ -1,8 +0,0 @@
   599.4 -build.xml.data.CRC32=772824b9
   599.5 -build.xml.script.CRC32=ef577a91
   599.6 -build.xml.stylesheet.CRC32=79c3b980@1.28.0.7
   599.7 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   599.8 -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   599.9 -nbproject/build-impl.xml.data.CRC32=2dfd5d11
  599.10 -nbproject/build-impl.xml.script.CRC32=af5d3c32
  599.11 -nbproject/build-impl.xml.stylesheet.CRC32=68e521fc@2.70
   600.1 --- a/sandbox/old-modules/hintsimpl/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   600.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   600.3 @@ -1,4 +0,0 @@
   600.4 -javac.source=1.5
   600.5 -javac.compilerargs=-Xlint -Xlint:-serial
   600.6 -project.license=cddl-netbeans-sun
   600.7 -spec.version.base=1.16.0
   601.1 --- a/sandbox/old-modules/hintsimpl/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   601.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   601.3 @@ -1,276 +0,0 @@
   601.4 -<?xml version="1.0" encoding="UTF-8"?>
   601.5 -<project xmlns="http://www.netbeans.org/ns/project/1">
   601.6 -    <type>org.netbeans.modules.apisupport.project</type>
   601.7 -    <configuration>
   601.8 -        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
   601.9 -            <code-name-base>org.netbeans.modules.jackpot30.hintsimpl</code-name-base>
  601.10 -            <suite-component/>
  601.11 -            <module-dependencies>
  601.12 -                <dependency>
  601.13 -                    <code-name-base>org.jdesktop.layout</code-name-base>
  601.14 -                    <build-prerequisite/>
  601.15 -                    <compile-dependency/>
  601.16 -                    <run-dependency>
  601.17 -                        <release-version>1</release-version>
  601.18 -                        <specification-version>1.7.0.103</specification-version>
  601.19 -                    </run-dependency>
  601.20 -                </dependency>
  601.21 -                <dependency>
  601.22 -                    <code-name-base>org.netbeans.api.java.classpath</code-name-base>
  601.23 -                    <build-prerequisite/>
  601.24 -                    <compile-dependency/>
  601.25 -                    <run-dependency>
  601.26 -                        <release-version>1</release-version>
  601.27 -                        <specification-version>1.19</specification-version>
  601.28 -                    </run-dependency>
  601.29 -                </dependency>
  601.30 -                <dependency>
  601.31 -                    <code-name-base>org.netbeans.api.progress</code-name-base>
  601.32 -                    <build-prerequisite/>
  601.33 -                    <compile-dependency/>
  601.34 -                    <run-dependency>
  601.35 -                        <release-version>1</release-version>
  601.36 -                        <specification-version>1.13.0.1</specification-version>
  601.37 -                    </run-dependency>
  601.38 -                </dependency>
  601.39 -                <dependency>
  601.40 -                    <code-name-base>org.netbeans.libs.javacapi</code-name-base>
  601.41 -                    <build-prerequisite/>
  601.42 -                    <compile-dependency/>
  601.43 -                    <run-dependency>
  601.44 -                        <specification-version>0.8.0.1</specification-version>
  601.45 -                    </run-dependency>
  601.46 -                </dependency>
  601.47 -                <dependency>
  601.48 -                    <code-name-base>org.netbeans.modules.editor</code-name-base>
  601.49 -                    <build-prerequisite/>
  601.50 -                    <compile-dependency/>
  601.51 -                    <run-dependency>
  601.52 -                        <release-version>3</release-version>
  601.53 -                        <specification-version>1.42.0.3.9.2</specification-version>
  601.54 -                    </run-dependency>
  601.55 -                </dependency>
  601.56 -                <dependency>
  601.57 -                    <code-name-base>org.netbeans.modules.editor.guards</code-name-base>
  601.58 -                    <build-prerequisite/>
  601.59 -                    <compile-dependency/>
  601.60 -                    <run-dependency>
  601.61 -                        <release-version>1</release-version>
  601.62 -                        <specification-version>1.3</specification-version>
  601.63 -                    </run-dependency>
  601.64 -                </dependency>
  601.65 -                <dependency>
  601.66 -                    <code-name-base>org.netbeans.modules.editor.lib</code-name-base>
  601.67 -                    <build-prerequisite/>
  601.68 -                    <compile-dependency/>
  601.69 -                    <run-dependency>
  601.70 -                        <release-version>1-3</release-version>
  601.71 -                        <specification-version>1.38.0.9.2</specification-version>
  601.72 -                    </run-dependency>
  601.73 -                </dependency>
  601.74 -                <dependency>
  601.75 -                    <code-name-base>org.netbeans.modules.jackpot30.api</code-name-base>
  601.76 -                    <build-prerequisite/>
  601.77 -                    <compile-dependency/>
  601.78 -                    <run-dependency>
  601.79 -                        <specification-version>1.0</specification-version>
  601.80 -                    </run-dependency>
  601.81 -                </dependency>
  601.82 -                <dependency>
  601.83 -                    <code-name-base>org.netbeans.modules.java.editor</code-name-base>
  601.84 -                    <run-dependency>
  601.85 -                        <release-version>1</release-version>
  601.86 -                        <specification-version>2.22</specification-version>
  601.87 -                    </run-dependency>
  601.88 -                </dependency>
  601.89 -                <dependency>
  601.90 -                    <code-name-base>org.netbeans.modules.java.hints</code-name-base>
  601.91 -                    <build-prerequisite/>
  601.92 -                    <compile-dependency/>
  601.93 -                    <run-dependency>
  601.94 -                        <release-version>1</release-version>
  601.95 -                        <implementation-version/>
  601.96 -                    </run-dependency>
  601.97 -                </dependency>
  601.98 -                <dependency>
  601.99 -                    <code-name-base>org.netbeans.modules.java.lexer</code-name-base>
 601.100 -                    <build-prerequisite/>
 601.101 -                    <compile-dependency/>
 601.102 -                    <run-dependency>
 601.103 -                        <release-version>1</release-version>
 601.104 -                        <specification-version>1.5</specification-version>
 601.105 -                    </run-dependency>
 601.106 -                </dependency>
 601.107 -                <dependency>
 601.108 -                    <code-name-base>org.netbeans.modules.java.source</code-name-base>
 601.109 -                    <build-prerequisite/>
 601.110 -                    <compile-dependency/>
 601.111 -                    <run-dependency>
 601.112 -                        <specification-version>0.53</specification-version>
 601.113 -                    </run-dependency>
 601.114 -                </dependency>
 601.115 -                <dependency>
 601.116 -                    <code-name-base>org.netbeans.modules.lexer</code-name-base>
 601.117 -                    <build-prerequisite/>
 601.118 -                    <compile-dependency/>
 601.119 -                    <run-dependency>
 601.120 -                        <release-version>2</release-version>
 601.121 -                        <specification-version>1.30.0.1</specification-version>
 601.122 -                    </run-dependency>
 601.123 -                </dependency>
 601.124 -                <dependency>
 601.125 -                    <code-name-base>org.netbeans.modules.options.api</code-name-base>
 601.126 -                    <build-prerequisite/>
 601.127 -                    <compile-dependency/>
 601.128 -                    <run-dependency>
 601.129 -                        <release-version>1</release-version>
 601.130 -                        <specification-version>1.12</specification-version>
 601.131 -                    </run-dependency>
 601.132 -                </dependency>
 601.133 -                <dependency>
 601.134 -                    <code-name-base>org.netbeans.modules.parsing.api</code-name-base>
 601.135 -                    <build-prerequisite/>
 601.136 -                    <compile-dependency/>
 601.137 -                    <run-dependency>
 601.138 -                        <release-version>1</release-version>
 601.139 -                        <specification-version>1.12.1</specification-version>
 601.140 -                    </run-dependency>
 601.141 -                </dependency>
 601.142 -                <dependency>
 601.143 -                    <code-name-base>org.netbeans.modules.projectapi</code-name-base>
 601.144 -                    <build-prerequisite/>
 601.145 -                    <compile-dependency/>
 601.146 -                    <run-dependency>
 601.147 -                        <release-version>1</release-version>
 601.148 -                        <specification-version>1.24</specification-version>
 601.149 -                    </run-dependency>
 601.150 -                </dependency>
 601.151 -                <dependency>
 601.152 -                    <code-name-base>org.netbeans.modules.projectuiapi</code-name-base>
 601.153 -                    <build-prerequisite/>
 601.154 -                    <compile-dependency/>
 601.155 -                    <run-dependency>
 601.156 -                        <release-version>1</release-version>
 601.157 -                        <specification-version>1.34.0.6</specification-version>
 601.158 -                    </run-dependency>
 601.159 -                </dependency>
 601.160 -                <dependency>
 601.161 -                    <code-name-base>org.netbeans.modules.sendopts</code-name-base>
 601.162 -                    <build-prerequisite/>
 601.163 -                    <compile-dependency/>
 601.164 -                    <run-dependency>
 601.165 -                        <release-version>2</release-version>
 601.166 -                        <specification-version>2.4</specification-version>
 601.167 -                    </run-dependency>
 601.168 -                </dependency>
 601.169 -                <dependency>
 601.170 -                    <code-name-base>org.netbeans.spi.editor.hints</code-name-base>
 601.171 -                    <build-prerequisite/>
 601.172 -                    <compile-dependency/>
 601.173 -                    <run-dependency>
 601.174 -                        <release-version>0-1</release-version>
 601.175 -                        <specification-version>1.7.0.7.2</specification-version>
 601.176 -                    </run-dependency>
 601.177 -                </dependency>
 601.178 -                <dependency>
 601.179 -                    <code-name-base>org.netbeans.spi.tasklist</code-name-base>
 601.180 -                    <build-prerequisite/>
 601.181 -                    <compile-dependency/>
 601.182 -                    <run-dependency>
 601.183 -                        <release-version>1</release-version>
 601.184 -                        <specification-version>1.4.0.1</specification-version>
 601.185 -                    </run-dependency>
 601.186 -                </dependency>
 601.187 -                <dependency>
 601.188 -                    <code-name-base>org.openide.awt</code-name-base>
 601.189 -                    <build-prerequisite/>
 601.190 -                    <compile-dependency/>
 601.191 -                    <run-dependency>
 601.192 -                        <specification-version>7.7.0.1</specification-version>
 601.193 -                    </run-dependency>
 601.194 -                </dependency>
 601.195 -                <dependency>
 601.196 -                    <code-name-base>org.openide.dialogs</code-name-base>
 601.197 -                    <build-prerequisite/>
 601.198 -                    <compile-dependency/>
 601.199 -                    <run-dependency>
 601.200 -                        <specification-version>7.10</specification-version>
 601.201 -                    </run-dependency>
 601.202 -                </dependency>
 601.203 -                <dependency>
 601.204 -                    <code-name-base>org.openide.filesystems</code-name-base>
 601.205 -                    <build-prerequisite/>
 601.206 -                    <compile-dependency/>
 601.207 -                    <run-dependency>
 601.208 -                        <specification-version>7.21.0.1.1</specification-version>
 601.209 -                    </run-dependency>
 601.210 -                </dependency>
 601.211 -                <dependency>
 601.212 -                    <code-name-base>org.openide.loaders</code-name-base>
 601.213 -                    <build-prerequisite/>
 601.214 -                    <compile-dependency/>
 601.215 -                    <run-dependency>
 601.216 -                        <specification-version>7.5</specification-version>
 601.217 -                    </run-dependency>
 601.218 -                </dependency>
 601.219 -                <dependency>
 601.220 -                    <code-name-base>org.openide.nodes</code-name-base>
 601.221 -                    <build-prerequisite/>
 601.222 -                    <compile-dependency/>
 601.223 -                    <run-dependency>
 601.224 -                        <specification-version>7.9.0.1</specification-version>
 601.225 -                    </run-dependency>
 601.226 -                </dependency>
 601.227 -                <dependency>
 601.228 -                    <code-name-base>org.openide.text</code-name-base>
 601.229 -                    <build-prerequisite/>
 601.230 -                    <compile-dependency/>
 601.231 -                    <run-dependency>
 601.232 -                        <specification-version>6.22</specification-version>
 601.233 -                    </run-dependency>
 601.234 -                </dependency>
 601.235 -                <dependency>
 601.236 -                    <code-name-base>org.openide.util</code-name-base>
 601.237 -                    <build-prerequisite/>
 601.238 -                    <compile-dependency/>
 601.239 -                    <run-dependency>
 601.240 -                        <specification-version>7.22.0.1</specification-version>
 601.241 -                    </run-dependency>
 601.242 -                </dependency>
 601.243 -                <dependency>
 601.244 -                    <code-name-base>org.openide.windows</code-name-base>
 601.245 -                    <build-prerequisite/>
 601.246 -                    <compile-dependency/>
 601.247 -                    <run-dependency>
 601.248 -                        <specification-version>6.26</specification-version>
 601.249 -                    </run-dependency>
 601.250 -                </dependency>
 601.251 -            </module-dependencies>
 601.252 -            <test-dependencies>
 601.253 -                <test-type>
 601.254 -                    <name>unit</name>
 601.255 -                    <test-dependency>
 601.256 -                        <code-name-base>org.netbeans.libs.junit4</code-name-base>
 601.257 -                        <compile-dependency/>
 601.258 -                    </test-dependency>
 601.259 -                    <test-dependency>
 601.260 -                        <code-name-base>org.netbeans.modules.jackpot30.test.borrowed</code-name-base>
 601.261 -                        <recursive/>
 601.262 -                        <compile-dependency/>
 601.263 -                    </test-dependency>
 601.264 -                    <test-dependency>
 601.265 -                        <code-name-base>org.netbeans.modules.java.hints.declarative.test</code-name-base>
 601.266 -                        <recursive/>
 601.267 -                        <compile-dependency/>
 601.268 -                    </test-dependency>
 601.269 -                    <test-dependency>
 601.270 -                        <code-name-base>org.netbeans.modules.nbjunit</code-name-base>
 601.271 -                        <recursive/>
 601.272 -                        <compile-dependency/>
 601.273 -                    </test-dependency>
 601.274 -                </test-type>
 601.275 -            </test-dependencies>
 601.276 -            <public-packages/>
 601.277 -        </data>
 601.278 -    </configuration>
 601.279 -</project>
   602.1 --- a/sandbox/old-modules/hintsimpl/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   602.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   602.3 @@ -1,1 +0,0 @@
   602.4 -suite.dir=${basedir}/..
   603.1 --- a/sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   603.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   603.3 @@ -1,38 +0,0 @@
   603.4 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   603.5 -#
   603.6 -# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
   603.7 -#
   603.8 -# The contents of this file are subject to the terms of either the GNU
   603.9 -# General Public License Version 2 only ("GPL") or the Common
  603.10 -# Development and Distribution License("CDDL") (collectively, the
  603.11 -# "License"). You may not use this file except in compliance with the
  603.12 -# License. You can obtain a copy of the License at
  603.13 -# http://www.netbeans.org/cddl-gplv2.html
  603.14 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  603.15 -# specific language governing permissions and limitations under the
  603.16 -# License.  When distributing the software, include this License Header
  603.17 -# Notice in each file and include the License file at
  603.18 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  603.19 -# particular file as subject to the "Classpath" exception as provided
  603.20 -# by Sun in the GPL Version 2 section of the License file that
  603.21 -# accompanied this code. If applicable, add the following below the
  603.22 -# License Header, with the fields enclosed by brackets [] replaced by
  603.23 -# your own identifying information:
  603.24 -# "Portions Copyrighted [year] [name of copyright owner]"
  603.25 -#
  603.26 -# If you wish your version of this file to be governed by only the CDDL
  603.27 -# or only the GPL Version 2, indicate your decision by adding
  603.28 -# "[Contributor] elects to include this software in this distribution
  603.29 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
  603.30 -# single choice of license, a recipient has the option to distribute
  603.31 -# your version of this file under either the CDDL, the GPL Version 2 or
  603.32 -# to extend the choice of license to its licensees as provided above.
  603.33 -# However, if you add GPL Version 2 code and therefore, elected the GPL
  603.34 -# Version 2 license, then the option applies only if the new code is
  603.35 -# made subject to such option by the copyright holder.
  603.36 -#
  603.37 -# Contributor(s):
  603.38 -#
  603.39 -# Portions Copyrighted 2009 Sun Microsystems, Inc.
  603.40 -
  603.41 -OpenIDE-Module-Name=Hints Impl
   604.1 --- a/sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/abstract-document.hint	Mon Dec 19 11:37:36 2016 +0100
   604.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   604.3 @@ -1,37 +0,0 @@
   604.4 -{ $1$;
   604.5 -$0.readLock();
   604.6 -$stmts$;
   604.7 -$0.readUnlock();
   604.8 -$2$;
   604.9 -}
  604.10 -:: $0 instanceof javax.swing.text.AbstractDocument
  604.11 -=>
  604.12 -{ $1$;
  604.13 -$0.readLock();
  604.14 -try {
  604.15 -    $stmts$;
  604.16 -} finally {
  604.17 -    $0.readUnlock();
  604.18 -}
  604.19 -$2$;
  604.20 -}
  604.21 -;;
  604.22 -
  604.23 -{ $1$;
  604.24 -$0.writeLock();
  604.25 -$stmts$;
  604.26 -$0.writeUnlock();
  604.27 -$2$;
  604.28 -}
  604.29 -:: $0 instanceof javax.swing.text.AbstractDocument
  604.30 -=>
  604.31 -{ $1$;
  604.32 -$0.writeLock();
  604.33 -try {
  604.34 -    $stmts$;
  604.35 -} finally {
  604.36 -    $0.writeUnlock();
  604.37 -}
  604.38 -$2$;
  604.39 -}
  604.40 -;;
   605.1 --- a/sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/assert2if.hint	Mon Dec 19 11:37:36 2016 +0100
   605.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   605.3 @@ -1,4 +0,0 @@
   605.4 -'Use of assert':
   605.5 -assert $1 : $2; :: $1 instanceof boolean && $2 instanceof java.lang.Object
   605.6 -   => if (!$1) throw new IllegalStateException($2);
   605.7 -   ;;
   606.1 --- a/sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/double-checked-locking.hint	Mon Dec 19 11:37:36 2016 +0100
   606.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   606.3 @@ -1,14 +0,0 @@
   606.4 -'Double checked locking':
   606.5 -if ($var == null) {
   606.6 -   synchronized ($lock) {
   606.7 -       if ($var == null) {
   606.8 -           $s2$;
   606.9 -       }
  606.10 -   }
  606.11 -} :: !hasModifier($var, Modifier.VOLATILE)
  606.12 -=>
  606.13 -synchronized ($lock) {
  606.14 -   if ($var == null) {
  606.15 -       $s2$;
  606.16 -   }
  606.17 -};;
   607.1 --- a/sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/jackpot/AddConditionals.hint	Mon Dec 19 11:37:36 2016 +0100
   607.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   607.3 @@ -1,7 +0,0 @@
   607.4 -if ($a) return $b; else return $c; => return $a ? $b : $c; ;;
   607.5 -if ($a) $ret = $b; else $ret = $c; => $ret = $a ? $b : $c; ;;
   607.6 -if ($a) $b=$c; else if ($a2) $b = $d; => $b = $a ? $c : $a2 ? $d : $b; ;;
   607.7 -$a ? ($T)$b : ($T)$c => ($T)($a ? $b : $c) ;;
   607.8 -//the following hint causes BulkSearch to be extremelly slow:
   607.9 -//{ $p$; $T $v; if($a) $v = $b; else $v = $c; $q$; } => { $p$; $T $v = $a ? $b : $c; $q$; }  ;;
  607.10 -
   608.1 --- a/sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/jackpot/EnhancedFor.hint	Mon Dec 19 11:37:36 2016 +0100
   608.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   608.3 @@ -1,43 +0,0 @@
   608.4 -'Convert to Enhanced For':
   608.5 -for(int $i = 0; $i < $array.length; $i++) {
   608.6 -    $T $var = ($T) $array[$i];
   608.7 -    $stmts$;
   608.8 -} :: !referencedIn($i, $stmts$) && sourceVersionGE(SourceVersion.RELEASE_5)
   608.9 -=>
  608.10 -for($T $var : $array) {
  608.11 -    $stmts$;
  608.12 -}
  608.13 -;;
  608.14 -
  608.15 -'Convert to Enhanced For':
  608.16 -for(int $i = 0; $i < $array.length; $i++) {
  608.17 -    $T $var = $array[$i];
  608.18 -    $stmts$;
  608.19 -} :: !referencedIn($i, $stmts$) && sourceVersionGE(SourceVersion.RELEASE_5)
  608.20 -=> 
  608.21 -for($T $var : $array) {
  608.22 -    $stmts$;
  608.23 -}
  608.24 -;;
  608.25 -
  608.26 -'Convert to Enhanced For':
  608.27 -for($I $i = $iterable.iterator(); $i.hasNext();) {
  608.28 -    $T $var = ($T)$i.next();
  608.29 -    $stmts$;
  608.30 -} :: $iterable instanceof java.lang.Iterable && !referencedIn($i, $stmts$) && sourceVersionGE(SourceVersion.RELEASE_5)
  608.31 -=>
  608.32 -for($T $var : $iterable) {
  608.33 -    $stmts$;
  608.34 -}
  608.35 -;;
  608.36 -
  608.37 -'Convert to Enhanced For':
  608.38 -for($I $i = $iterable.iterator(); $i.hasNext();) {
  608.39 -    $T $var = $i.next();
  608.40 -    $stmts$;
  608.41 -} :: $iterable instanceof java.lang.Iterable && !referencedIn($i, $stmts$) && sourceVersionGE(SourceVersion.RELEASE_5)
  608.42 -=>
  608.43 -for($T $var : $iterable) {
  608.44 -    $stmts$;
  608.45 -}
  608.46 -;;
   609.1 --- a/sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/jdk7/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   609.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   609.3 @@ -1,7 +0,0 @@
   609.4 -DN_org.netbeans.modules.jackpot30.hintsimpl.jdk7.ConvertToDiamondBulkHint=Convert to diamond bulk hint
   609.5 -DESC_org.netbeans.modules.jackpot30.hintsimpl.jdk7.ConvertToDiamondBulkHint=Convert to diamond bulk hint
   609.6 -DN_jdk7_upgrade=To JDK7
   609.7 -DN_java.util.Objects=Convert to use java.util.Objects.{equals,hashCode}
   609.8 -DESC_java.util.Objects=Convert to use java.util.Objects.{equals,hashCode}
   609.9 -DN_org.netbeans.modules.jackpot30.hintsimpl.jdk7.SafeConvertToSwitchString=Convert to switch over Strings ignoring the eq operator
  609.10 -DESC_org.netbeans.modules.jackpot30.hintsimpl.jdk7.SafeConvertToSwitchString=Convert to switch over Strings, ignoring the == operator
   610.1 --- a/sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/jdk7/SafeConvertToSwitchString.java	Mon Dec 19 11:37:36 2016 +0100
   610.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   610.3 @@ -1,80 +0,0 @@
   610.4 -/*
   610.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   610.6 - *
   610.7 - * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
   610.8 - *
   610.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  610.10 - * Other names may be trademarks of their respective owners.
  610.11 - *
  610.12 - * The contents of this file are subject to the terms of either the GNU
  610.13 - * General Public License Version 2 only ("GPL") or the Common
  610.14 - * Development and Distribution License("CDDL") (collectively, the
  610.15 - * "License"). You may not use this file except in compliance with the
  610.16 - * License. You can obtain a copy of the License at
  610.17 - * http://www.netbeans.org/cddl-gplv2.html
  610.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  610.19 - * specific language governing permissions and limitations under the
  610.20 - * License.  When distributing the software, include this License Header
  610.21 - * Notice in each file and include the License file at
  610.22 - * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
  610.23 - * particular file as subject to the "Classpath" exception as provided
  610.24 - * by Oracle in the GPL Version 2 section of the License file that
  610.25 - * accompanied this code. If applicable, add the following below the
  610.26 - * License Header, with the fields enclosed by brackets [] replaced by
  610.27 - * your own identifying information:
  610.28 - * "Portions Copyrighted [year] [name of copyright owner]"
  610.29 - *
  610.30 - * If you wish your version of this file to be governed by only the CDDL
  610.31 - * or only the GPL Version 2, indicate your decision by adding
  610.32 - * "[Contributor] elects to include this software in this distribution
  610.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  610.34 - * single choice of license, a recipient has the option to distribute
  610.35 - * your version of this file under either the CDDL, the GPL Version 2 or
  610.36 - * to extend the choice of license to its licensees as provided above.
  610.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  610.38 - * Version 2 license, then the option applies only if the new code is
  610.39 - * made subject to such option by the copyright holder.
  610.40 - *
  610.41 - * Contributor(s):
  610.42 - *
  610.43 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  610.44 - */
  610.45 -
  610.46 -package org.netbeans.modules.jackpot30.hintsimpl.jdk7;
  610.47 -
  610.48 -import java.util.List;
  610.49 -import java.util.prefs.Preferences;
  610.50 -import org.netbeans.modules.java.hints.jackpot.code.spi.Hint;
  610.51 -import org.netbeans.modules.java.hints.jackpot.code.spi.TriggerPattern;
  610.52 -import org.netbeans.modules.java.hints.jackpot.impl.RulesManager;
  610.53 -import org.netbeans.modules.java.hints.jackpot.spi.HintContext;
  610.54 -import org.netbeans.modules.java.hints.jackpot.spi.HintMetadata.Options;
  610.55 -import org.netbeans.modules.java.hints.jdk.ConvertToStringSwitch;
  610.56 -import org.netbeans.modules.java.hints.options.HintsSettings;
  610.57 -import org.netbeans.spi.editor.hints.ErrorDescription;
  610.58 -
  610.59 -/**
  610.60 - *
  610.61 - * @author lahvac
  610.62 - */
  610.63 -@Hint(category="rules15",enabled=false, options=Options.NON_GUI)
  610.64 -public class SafeConvertToSwitchString {
  610.65 -
  610.66 -    static final String KEY_ALSO_EQ = "also-equals";
  610.67 -    static final boolean DEF_ALSO_EQ = true;
  610.68 -
  610.69 -    @TriggerPattern(value="if ($cond) $body; else $else;")
  610.70 -    public static List<ErrorDescription> hint(HintContext ctx) {
  610.71 -        Preferences prefs = RulesManager.getPreferences("org.netbeans.modules.java.hints.jdk.ConvertToStringSwitch", HintsSettings.getCurrentProfileId());
  610.72 -        boolean old = prefs.getBoolean(KEY_ALSO_EQ, DEF_ALSO_EQ);
  610.73 -
  610.74 -        prefs.putBoolean(KEY_ALSO_EQ, false);
  610.75 -
  610.76 -        try {
  610.77 -            return ConvertToStringSwitch.hint(ctx);
  610.78 -        } finally {
  610.79 -            prefs.putBoolean(KEY_ALSO_EQ, old);
  610.80 -        }
  610.81 -    }
  610.82 -
  610.83 -}
   611.1 --- a/sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/jdk7/java.util.Objects.hint	Mon Dec 19 11:37:36 2016 +0100
   611.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   611.3 @@ -1,99 +0,0 @@
   611.4 -<!hint="java.util.Objects">
   611.5 -//java.util.Objects.equals:
   611.6 -($1 == null) ? ($2 != null) : !$1.equals($2) :: $1 instanceof java.lang.Object && $2 instanceof java.lang.Object
   611.7 -=>java.util.Objects.equals($1, $2)
   611.8 -;;
   611.9 -
  611.10 -(null == $1) ? ($2 != null) : !$1.equals($2) :: $1 instanceof java.lang.Object && $2 instanceof java.lang.Object
  611.11 -=>java.util.Objects.equals($1, $2)
  611.12 -;;
  611.13 -
  611.14 -($1 == null) ? (null != $2) : !$1.equals($2) :: $1 instanceof java.lang.Object && $2 instanceof java.lang.Object
  611.15 -=>java.util.Objects.equals($1, $2)
  611.16 -;;
  611.17 -
  611.18 -(null == $1) ? (null != $2) : !$1.equals($2) :: $1 instanceof java.lang.Object && $2 instanceof java.lang.Object
  611.19 -=>java.util.Objects.equals($1, $2)
  611.20 -;;
  611.21 -
  611.22 -$1 != $2 && ($1 == null || !$1.equals($2)) :: $1 instanceof java.lang.Object && $2 instanceof java.lang.Object
  611.23 -=>java.util.Objects.equals($1, $2)
  611.24 -;;
  611.25 -
  611.26 -$1 != $2 && (null == $1 || !$1.equals($2)) :: $1 instanceof java.lang.Object && $2 instanceof java.lang.Object
  611.27 -=>java.util.Objects.equals($1, $2)
  611.28 -;;
  611.29 -
  611.30 -($1 == null) ? ($2 == null) : $1.equals($2) :: $1 instanceof java.lang.Object && $2 instanceof java.lang.Object
  611.31 -=>java.util.Objects.equals($1, $2)
  611.32 -;;
  611.33 -
  611.34 -(null == $1) ? ($2 == null) : $1.equals($2) :: $1 instanceof java.lang.Object && $2 instanceof java.lang.Object
  611.35 -=>java.util.Objects.equals($1, $2)
  611.36 -;;
  611.37 -
  611.38 -($1 == null) ? (null == $2) : $1.equals($2) :: $1 instanceof java.lang.Object && $2 instanceof java.lang.Object
  611.39 -=>java.util.Objects.equals($1, $2)
  611.40 -;;
  611.41 -
  611.42 -(null == $1) ? (null == $2) : $1.equals($2) :: $1 instanceof java.lang.Object && $2 instanceof java.lang.Object
  611.43 -=>java.util.Objects.equals($1, $2)
  611.44 -;;
  611.45 -
  611.46 -($1 != null) ? $1.equals($2) : ($2 == null) :: $1 instanceof java.lang.Object && $2 instanceof java.lang.Object
  611.47 -=>java.util.Objects.equals($1, $2)
  611.48 -;;
  611.49 -
  611.50 -(null != $1) ? $1.equals($2) : ($2 == null) :: $1 instanceof java.lang.Object && $2 instanceof java.lang.Object
  611.51 -=>java.util.Objects.equals($1, $2)
  611.52 -;;
  611.53 -
  611.54 -($1 != null) ? $1.equals($2) : (null == $2) :: $1 instanceof java.lang.Object && $2 instanceof java.lang.Object
  611.55 -=>java.util.Objects.equals($1, $2)
  611.56 -;;
  611.57 -
  611.58 -(null != $1) ? $1.equals($2) : (null == $2) :: $1 instanceof java.lang.Object && $2 instanceof java.lang.Object
  611.59 -=>java.util.Objects.equals($1, $2)
  611.60 -;;
  611.61 -
  611.62 -$1 == $2 && ($1 == null || $1.equals($2)) :: $1 instanceof java.lang.Object && $2 instanceof java.lang.Object
  611.63 -=>java.util.Objects.equals($1, $2)
  611.64 -;;
  611.65 -
  611.66 -$1 == $2 && (null == $1 || $1.equals($2)) :: $1 instanceof java.lang.Object && $2 instanceof java.lang.Object
  611.67 -=>java.util.Objects.equals($1, $2)
  611.68 -;;
  611.69 -
  611.70 -//java.util.Objects.hashCode:
  611.71 -$1 != null ? $1.hashCode() : 0 :: $1 instanceof java.lang.Object
  611.72 -=>java.util.Objects.hashCode($1)
  611.73 -;;
  611.74 -
  611.75 -null != $1 ? $1.hashCode() : 0 :: $1 instanceof java.lang.Object
  611.76 -=>java.util.Objects.hashCode($1)
  611.77 -;;
  611.78 -
  611.79 -$1 == null ? 0 : $1.hashCode() :: $1 instanceof java.lang.Object
  611.80 -=>java.util.Objects.hashCode($1)
  611.81 -;;
  611.82 -
  611.83 -null == $1 ? 0 : $1.hashCode() :: $1 instanceof java.lang.Object
  611.84 -=>java.util.Objects.hashCode($1)
  611.85 -;;
  611.86 -
  611.87 -//java.util.Objects.toString:
  611.88 -$1 != null ? $1.toString() : $def :: $1 instanceof java.lang.Object
  611.89 -=>java.util.Objects.toString($1, $def)
  611.90 -;;
  611.91 -
  611.92 -null != $1 ? $1.toString() : $def :: $1 instanceof java.lang.Object
  611.93 -=>java.util.Objects.toString($1, $def)
  611.94 -;;
  611.95 -
  611.96 -$1 == null ? $def : $1.hashCode() :: $1 instanceof java.lang.Object
  611.97 -=>java.util.Objects.hashCode($1, $def)
  611.98 -;;
  611.99 -
 611.100 -null == $1 ? $def : $1.hashCode() :: $1 instanceof java.lang.Object
 611.101 -=>java.util.Objects.hashCode($1, $def)
 611.102 -;;
   612.1 --- a/sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/jdk7/jdk7.upgrade	Mon Dec 19 11:37:36 2016 +0100
   612.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   612.3 @@ -1,12 +0,0 @@
   612.4 -{
   612.5 -    "upgradeName" : "jdk7_upgrade",
   612.6 -    "bundle" : "org/netbeans/modules/jackpot30/hintsimpl/jdk7/Bundle",
   612.7 -    "hints" : [
   612.8 -        "org.netbeans.modules.jackpot30.hintsimpl.jdk7.ConvertToDiamondBulkHint",
   612.9 -        "org.netbeans.modules.java.hints.jdk.ConvertToStringSwitch",
  612.10 -        "org.netbeans.modules.java.hints.jdk.ConvertToARM",
  612.11 -        "org.netbeans.modules.java.hints.jdk.JoinCatches",
  612.12 -        "org.netbeans.modules.java.hints.jdk.UseSpecificCatch",
  612.13 -        "java.util.Objects"
  612.14 -    ]
  612.15 -}
   613.1 --- a/sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/layer.xml	Mon Dec 19 11:37:36 2016 +0100
   613.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   613.3 @@ -1,63 +0,0 @@
   613.4 -<?xml version="1.0" encoding="UTF-8"?>
   613.5 -<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.0//EN" "http://www.netbeans.org/dtds/filesystem-1_0.dtd">
   613.6 -<!--
   613.7 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   613.8 -
   613.9 -Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
  613.10 -
  613.11 -
  613.12 -The contents of this file are subject to the terms of either the GNU
  613.13 -General Public License Version 2 only ("GPL") or the Common
  613.14 -Development and Distribution License("CDDL") (collectively, the
  613.15 -"License"). You may not use this file except in compliance with the
  613.16 -License. You can obtain a copy of the License at
  613.17 -http://www.netbeans.org/cddl-gplv2.html
  613.18 -or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  613.19 -specific language governing permissions and limitations under the
  613.20 -License.  When distributing the software, include this License Header
  613.21 -Notice in each file and include the License file at
  613.22 -nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  613.23 -particular file as subject to the "Classpath" exception as provided
  613.24 -by Sun in the GPL Version 2 section of the License file that
  613.25 -accompanied this code. If applicable, add the following below the
  613.26 -License Header, with the fields enclosed by brackets [] replaced by
  613.27 -your own identifying information:
  613.28 -"Portions Copyrighted [year] [name of copyright owner]"
  613.29 -
  613.30 -Contributor(s):
  613.31 -
  613.32 -The Original Software is NetBeans. The Initial Developer of the Original
  613.33 -Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
  613.34 -Microsystems, Inc. All Rights Reserved.
  613.35 -
  613.36 -If you wish your version of this file to be governed by only the CDDL
  613.37 -or only the GPL Version 2, indicate your decision by adding
  613.38 -"[Contributor] elects to include this software in this distribution
  613.39 -under the [CDDL or GPL Version 2] license." If you do not indicate a
  613.40 -single choice of license, a recipient has the option to distribute
  613.41 -your version of this file under either the CDDL, the GPL Version 2 or
  613.42 -to extend the choice of license to its licensees as provided above.
  613.43 -However, if you add GPL Version 2 code and therefore, elected the GPL
  613.44 -Version 2 license, then the option applies only if the new code is
  613.45 -made subject to such option by the copyright holder.
  613.46 --->
  613.47 -<filesystem>
  613.48 -
  613.49 -    <folder name="org-netbeans-modules-java-hints">
  613.50 -        <folder name="declarative">
  613.51 -            <file name="Bundle.properties" url="jdk7/Bundle.properties" /> <!--XXX-->
  613.52 -            <file name="assert2if.hint" url="assert2if.hint" />
  613.53 -            <file name="variable-decl-assignment.hint" url="variable-decl-assignment.hint" />
  613.54 -            <file name="double-checked-locking.hint" url="double-checked-locking.hint" />
  613.55 -            <file name="sync-on-non-final.hint" url="sync-on-non-final.hint" />
  613.56 -            <file name="abstract-document.hint" url="abstract-document.hint" />
  613.57 -            <file name="AddConditionals.hint" url="jackpot/AddConditionals.hint" />
  613.58 -            <file name="EnhancedFor.hint" url="jackpot/EnhancedFor.hint" />
  613.59 -            <file name="java.util.Objects.hint" url="jdk7/java.util.Objects.hint" />
  613.60 -        </folder>
  613.61 -        <folder name="upgrades">
  613.62 -            <file name="jdk7.upgrade" url="jdk7/jdk7.upgrade" />
  613.63 -        </folder>
  613.64 -    </folder>
  613.65 -
  613.66 -</filesystem>
   614.1 --- a/sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/sync-on-non-final.hint	Mon Dec 19 11:37:36 2016 +0100
   614.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   614.3 @@ -1,5 +0,0 @@
   614.4 -'Synchronizing on non-final field':
   614.5 -synchronized($var) {
   614.6 -    $stmts$;
   614.7 -} :: !hasModifier($var, Modifier.FINAL) && elementKindMatches($var, ElementKind.FIELD)
   614.8 -;;
   615.1 --- a/sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/variable-decl-assignment.hint	Mon Dec 19 11:37:36 2016 +0100
   615.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   615.3 @@ -1,4 +0,0 @@
   615.4 -'Separated variable declaration and assignment':
   615.5 -{ $1 $2; $2 = $3; }
   615.6 -   => { $1 $2 = $3; }
   615.7 -   ;;
   616.1 --- a/sandbox/old-modules/hintsimpl/src/org/netbeans/modules/jackpot30/hintsimpl/wrong-string-comparison.hint	Mon Dec 19 11:37:36 2016 +0100
   616.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   616.3 @@ -1,31 +0,0 @@
   616.4 -'Wrong string comparison':
   616.5 -$left == $right ::    $left instanceof java.lang.String
   616.6 -                   && $right instanceof java.lang.String
   616.7 -                   && !isNullLiteral($left)
   616.8 -                   && !isNullLiteral($right)
   616.9 -=>$left == null ? $right == null : $left.equals($right)
  616.10 -=>$left.equals($right)
  616.11 -;;
  616.12 -
  616.13 -'Wrong string comparison':
  616.14 -$left != $right ::    $left instanceof java.lang.String
  616.15 -                   && $right instanceof java.lang.String
  616.16 -                   && !isNullLiteral($left)
  616.17 -                   && !isNullLiteral($right)
  616.18 -                   && !acceptGenerated($left, $right)
  616.19 -=>!($left == null ? $right == null : $left.equals($right))
  616.20 -=>!$left.equals($right)
  616.21 -;;
  616.22 -
  616.23 -<?
  616.24 -private boolean acceptGenerated(Variable left, Variable right) {
  616.25 -    Variable parent = left;
  616.26 -
  616.27 -    while ((parent = context.parent(parent)) != null) {
  616.28 -        if (matcher.matches(parent, "$left != $right && ($left == null || $left.equals($right))"))
  616.29 -            return true;
  616.30 -    }
  616.31 -
  616.32 -    return false;
  616.33 -}
  616.34 -?>
   617.1 --- a/sandbox/old-modules/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/HintsTest.java	Mon Dec 19 11:37:36 2016 +0100
   617.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   617.3 @@ -1,55 +0,0 @@
   617.4 -/*
   617.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   617.6 - *
   617.7 - * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
   617.8 - *
   617.9 - * The contents of this file are subject to the terms of either the GNU
  617.10 - * General Public License Version 2 only ("GPL") or the Common
  617.11 - * Development and Distribution License("CDDL") (collectively, the
  617.12 - * "License"). You may not use this file except in compliance with the
  617.13 - * License. You can obtain a copy of the License at
  617.14 - * http://www.netbeans.org/cddl-gplv2.html
  617.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  617.16 - * specific language governing permissions and limitations under the
  617.17 - * License.  When distributing the software, include this License Header
  617.18 - * Notice in each file and include the License file at
  617.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  617.20 - * particular file as subject to the "Classpath" exception as provided
  617.21 - * by Sun in the GPL Version 2 section of the License file that
  617.22 - * accompanied this code. If applicable, add the following below the
  617.23 - * License Header, with the fields enclosed by brackets [] replaced by
  617.24 - * your own identifying information:
  617.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  617.26 - *
  617.27 - * If you wish your version of this file to be governed by only the CDDL
  617.28 - * or only the GPL Version 2, indicate your decision by adding
  617.29 - * "[Contributor] elects to include this software in this distribution
  617.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  617.31 - * single choice of license, a recipient has the option to distribute
  617.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  617.33 - * to extend the choice of license to its licensees as provided above.
  617.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  617.35 - * Version 2 license, then the option applies only if the new code is
  617.36 - * made subject to such option by the copyright holder.
  617.37 - *
  617.38 - * Contributor(s):
  617.39 - *
  617.40 - * Portions Copyrighted 2009 Sun Microsystems, Inc.
  617.41 - */
  617.42 -
  617.43 -package org.netbeans.modules.jackpot30.hintsimpl;
  617.44 -
  617.45 -import junit.framework.TestSuite;
  617.46 -import org.netbeans.modules.java.hints.declarative.test.api.DeclarativeHintsTestBase;
  617.47 -
  617.48 -/**
  617.49 - *
  617.50 - * @author lahvac
  617.51 - */
  617.52 -public class HintsTest extends DeclarativeHintsTestBase {
  617.53 -
  617.54 -    public static TestSuite suite() {
  617.55 -        return suite(HintsTest.class);
  617.56 -    }
  617.57 -
  617.58 -}
   618.1 --- a/sandbox/old-modules/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/abstract-document.test	Mon Dec 19 11:37:36 2016 +0100
   618.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   618.3 @@ -1,46 +0,0 @@
   618.4 -%%TestCase simple-readlock
   618.5 -package test;
   618.6 -import javax.swing.text.AbstractDocument;
   618.7 -public class Test {
   618.8 -    private void test(AbstractDocument d) {
   618.9 -        d.readLock();
  618.10 -        System.err.println(d.getText(0, d.getLength()));
  618.11 -        d.readUnlock();
  618.12 -    }
  618.13 -}
  618.14 -%%=>
  618.15 -package test;
  618.16 -import javax.swing.text.AbstractDocument;
  618.17 -public class Test {
  618.18 -    private void test(AbstractDocument d) {
  618.19 -        d.readLock();
  618.20 -        try {
  618.21 -            System.err.println(d.getText(0, d.getLength()));
  618.22 -        } finally {
  618.23 -            d.readUnlock();
  618.24 -        }
  618.25 -    }
  618.26 -}
  618.27 -%%TestCase simple-writelock
  618.28 -package test;
  618.29 -import javax.swing.text.AbstractDocument;
  618.30 -public class Test {
  618.31 -    private void test(AbstractDocument d) {
  618.32 -        d.writeLock();
  618.33 -        System.err.println(d.getText(0, d.getLength()));
  618.34 -        d.writeUnlock();
  618.35 -    }
  618.36 -}
  618.37 -%%=>
  618.38 -package test;
  618.39 -import javax.swing.text.AbstractDocument;
  618.40 -public class Test {
  618.41 -    private void test(AbstractDocument d) {
  618.42 -        d.writeLock();
  618.43 -        try {
  618.44 -            System.err.println(d.getText(0, d.getLength()));
  618.45 -        } finally {
  618.46 -            d.writeUnlock();
  618.47 -        }
  618.48 -    }
  618.49 -}
   619.1 --- a/sandbox/old-modules/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/double-checked-locking.test	Mon Dec 19 11:37:36 2016 +0100
   619.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   619.3 @@ -1,46 +0,0 @@
   619.4 -%%TestCase simple
   619.5 -package test;
   619.6 -public class Test {
   619.7 -    private static Object TEST;
   619.8 -    public static Object get() {
   619.9 -        if (TEST == null) {
  619.10 -            synchronized (Test.class) {
  619.11 -                if (TEST == null) {
  619.12 -                    TEST = new Object();
  619.13 -                }
  619.14 -            }
  619.15 -        }
  619.16 -
  619.17 -        return TEST;
  619.18 -    }
  619.19 -}
  619.20 -%%=>
  619.21 -package test;
  619.22 -public class Test {
  619.23 -    private static Object TEST;
  619.24 -    public static Object get() {
  619.25 -        synchronized (Test.class) {
  619.26 -            if (TEST == null) {
  619.27 -                TEST = new Object();
  619.28 -            }
  619.29 -        }
  619.30 -
  619.31 -        return TEST;
  619.32 -    }
  619.33 -}
  619.34 -%%TestCase volatile
  619.35 -package test;
  619.36 -public class Test {
  619.37 -    private static volatile Object TEST;
  619.38 -    public static Object get() {
  619.39 -        if (TEST == null) {
  619.40 -            synchronized (Test.class) {
  619.41 -                if (TEST == null) {
  619.42 -                    TEST = new Object();
  619.43 -                }
  619.44 -            }
  619.45 -        }
  619.46 -
  619.47 -        return TEST;
  619.48 -    }
  619.49 -}
   620.1 --- a/sandbox/old-modules/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/jackpot/AddConditionals.test	Mon Dec 19 11:37:36 2016 +0100
   620.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   620.3 @@ -1,87 +0,0 @@
   620.4 -%%TestCase simple-return
   620.5 -package test;
   620.6 -public class Test {
   620.7 -    public int test(boolean b) {
   620.8 -        if (b)
   620.9 -            return 1;
  620.10 -        else
  620.11 -            return 2;
  620.12 -    }
  620.13 -}
  620.14 -%%=>
  620.15 -package test;
  620.16 -public class Test {
  620.17 -    public int test(boolean b) {
  620.18 -        return b ? 1 : 2;
  620.19 -    }
  620.20 -}
  620.21 -%%TestCase blocks-return
  620.22 -package test;
  620.23 -public class Test {
  620.24 -    public int test(boolean b) {
  620.25 -        if (b) {
  620.26 -            return 1;
  620.27 -        } else {
  620.28 -            return 2;
  620.29 -        }
  620.30 -    }
  620.31 -}
  620.32 -%%=>
  620.33 -package test;
  620.34 -public class Test {
  620.35 -    public int test(boolean b) {
  620.36 -        return b ? 1 : 2;
  620.37 -    }
  620.38 -}
  620.39 -%%TestCase simple-assignment
  620.40 -package test;
  620.41 -public class Test {
  620.42 -    public void test(boolean b) {
  620.43 -        int q = 3;
  620.44 -        if (b)
  620.45 -            q = 1;
  620.46 -        else
  620.47 -            q = 2;
  620.48 -    }
  620.49 -}
  620.50 -%%=>
  620.51 -package test;
  620.52 -public class Test {
  620.53 -    public void test(boolean b) {
  620.54 -        int q = 3;
  620.55 -        q = b ? 1 : 2;
  620.56 -    }
  620.57 -}
  620.58 -%%TestCase simplify-conditional-with-casts
  620.59 -package test;
  620.60 -public class Test {
  620.61 -    public void test(boolean b, Object o1, Object o2) {
  620.62 -        String s = b ? (String) o1 : (String) o2;
  620.63 -    }
  620.64 -}
  620.65 -%%=>
  620.66 -package test;
  620.67 -public class Test {
  620.68 -    public void test(boolean b, Object o1, Object o2) {
  620.69 -        String s = (String) (b ? o1 : o2);
  620.70 -    }
  620.71 -}
  620.72 -%%TestCase simplify-with-declaration
  620.73 -package test;
  620.74 -public class Test {
  620.75 -    public void test(boolean b) {
  620.76 -        int q;
  620.77 -        if (b)
  620.78 -            q = 1;
  620.79 -        else
  620.80 -            q = 2;
  620.81 -    }
  620.82 -}
  620.83 -%%=>
  620.84 -package test;
  620.85 -public class Test {
  620.86 -    public void test(boolean b) {
  620.87 -        int q;
  620.88 -        q = b ? 1 : 2;
  620.89 -    }
  620.90 -}
   621.1 --- a/sandbox/old-modules/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/jackpot/EnhancedFor.test	Mon Dec 19 11:37:36 2016 +0100
   621.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   621.3 @@ -1,64 +0,0 @@
   621.4 -%%TestCase simple-array
   621.5 -package test;
   621.6 -public class Test {
   621.7 -    private void test() {
   621.8 -        String[] a = new String[2];
   621.9 -
  621.10 -        for (int c = 0; c < a.length; c++) {
  621.11 -            String s = a[c];
  621.12 -            System.err.println(s);
  621.13 -        }
  621.14 -    }
  621.15 -}
  621.16 -%%=>
  621.17 -package test;
  621.18 -public class Test {
  621.19 -    private void test() {
  621.20 -        String[] a = new String[2];
  621.21 -        for (String s : a) {
  621.22 -            System.err.println(s);
  621.23 -        }
  621.24 -    }
  621.25 -}
  621.26 -%%TestCase simple-iterable
  621.27 -package test;
  621.28 -import java.util.Iterator;
  621.29 -public class Test {
  621.30 -    private void test(Iterable iterable) {
  621.31 -        for (Iterator it = iterable.iterator(); it.hasNext();) {
  621.32 -            String s = (String) it.next();
  621.33 -            System.err.println(s);
  621.34 -        }
  621.35 -    }
  621.36 -}
  621.37 -%%=>
  621.38 -package test;
  621.39 -import java.util.Iterator;
  621.40 -public class Test {
  621.41 -    private void test(Iterable iterable) {
  621.42 -        for (String s : iterable) {
  621.43 -            System.err.println(s);
  621.44 -        }
  621.45 -    }
  621.46 -}
  621.47 -%%TestCase generified-iterable
  621.48 -package test;
  621.49 -import java.util.Iterator;
  621.50 -public class Test {
  621.51 -    private void test(Iterable<? extends String> iterable) {
  621.52 -        for (Iterator<? extends String> it = iterable.iterator(); it.hasNext();) {
  621.53 -            String s = it.next();
  621.54 -            System.err.println(s);
  621.55 -        }
  621.56 -    }
  621.57 -}
  621.58 -%%=>
  621.59 -package test;
  621.60 -import java.util.Iterator;
  621.61 -public class Test {
  621.62 -    private void test(Iterable<? extends String> iterable) {
  621.63 -        for (String s : iterable) {
  621.64 -            System.err.println(s);
  621.65 -        }
  621.66 -    }
  621.67 -}
   622.1 --- a/sandbox/old-modules/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/jdk7/java.util.Objects.test	Mon Dec 19 11:37:36 2016 +0100
   622.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   622.3 @@ -1,68 +0,0 @@
   622.4 -%%TestCase positive-equals-1 DISABLED
   622.5 -package test;
   622.6 -public class Test {
   622.7 -    private boolean test(Object o1, Object o2) {
   622.8 -        return (o1 == null) ? (o2 != null) : !o1.equals(o2);
   622.9 -    }
  622.10 -}
  622.11 -%%=>
  622.12 -package test;
  622.13 -
  622.14 -import java.util.Objects;
  622.15 -
  622.16 -public class Test {
  622.17 -    private boolean test(Object o1, Object o2) {
  622.18 -        return Objects.equals(o1, o2);
  622.19 -    }
  622.20 -}
  622.21 -%%TestCase positive-equals-2 DISABLED
  622.22 -package test;
  622.23 -public class Test {
  622.24 -    private boolean test(Object o1, Object o2) {
  622.25 -        return o1 != o2 && (o1 == null || !o1.equals(o2));
  622.26 -    }
  622.27 -}
  622.28 -%%=>
  622.29 -package test;
  622.30 -
  622.31 -import java.util.Objects;
  622.32 -
  622.33 -public class Test {
  622.34 -    private boolean test(Object o1, Object o2) {
  622.35 -        return Objects.equals(o1, o2);
  622.36 -    }
  622.37 -}
  622.38 -%%TestCase positive-hashcode-1 DISABLED
  622.39 -package test;
  622.40 -public class Test {
  622.41 -    private boolean test(Object o1) {
  622.42 -        return (o1 != null ? o1.hashCode() : 0);
  622.43 -    }
  622.44 -}
  622.45 -%%=>
  622.46 -package test;
  622.47 -
  622.48 -import java.util.Objects;
  622.49 -
  622.50 -public class Test {
  622.51 -    private boolean test(Object o1) {
  622.52 -        return Objects.hashCode(o1);
  622.53 -    }
  622.54 -}
  622.55 -%%TestCase positive-hashcode-2 DISABLED
  622.56 -package test;
  622.57 -public class Test {
  622.58 -    private boolean test(Object o1) {
  622.59 -        return o1 != null ? o1.hashCode() : 0;
  622.60 -    }
  622.61 -}
  622.62 -%%=>
  622.63 -package test;
  622.64 -
  622.65 -import java.util.Objects;
  622.66 -
  622.67 -public class Test {
  622.68 -    private boolean test(Object o1) {
  622.69 -        return Objects.hashCode(o1);
  622.70 -    }
  622.71 -}
   623.1 --- a/sandbox/old-modules/hintsimpl/test/unit/src/org/netbeans/modules/jackpot30/hintsimpl/wrong-string-comparison.test	Mon Dec 19 11:37:36 2016 +0100
   623.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   623.3 @@ -1,56 +0,0 @@
   623.4 -%%TestCase simple
   623.5 -package test;
   623.6 -public class Test {
   623.7 -    public static boolean get(String s1, String s2) {
   623.8 -        return s1 == s2;
   623.9 -    }
  623.10 -}
  623.11 -%%=>
  623.12 -package test;
  623.13 -public class Test {
  623.14 -    public static boolean get(String s1, String s2) {
  623.15 -        return s1 == null ? s2 == null : s1.equals(s2);
  623.16 -    }
  623.17 -}
  623.18 -%%=>
  623.19 -package test;
  623.20 -public class Test {
  623.21 -    public static boolean get(String s1, String s2) {
  623.22 -        return s1.equals(s2);
  623.23 -    }
  623.24 -}
  623.25 -%%TestCase neg
  623.26 -package test;
  623.27 -public class Test {
  623.28 -    public static boolean get(String s1, String s2) {
  623.29 -        return s1 != s2;
  623.30 -    }
  623.31 -}
  623.32 -%%=>
  623.33 -package test;
  623.34 -public class Test {
  623.35 -    public static boolean get(String s1, String s2) {
  623.36 -        return !(s1 == null ? s2 == null : s1.equals(s2));
  623.37 -    }
  623.38 -}
  623.39 -%%=>
  623.40 -package test;
  623.41 -public class Test {
  623.42 -    public static boolean get(String s1, String s2) {
  623.43 -        return !s1.equals(s2);
  623.44 -    }
  623.45 -}
  623.46 -%%TestCase neg-accept
  623.47 -package test;
  623.48 -public class Test {
  623.49 -    public static boolean get(String s1, String s2) {
  623.50 -        return s1 != s2 && (s1 == null || s1.equals(s2));
  623.51 -    }
  623.52 -}
  623.53 -%%TestCase null
  623.54 -package test;
  623.55 -public class Test {
  623.56 -    public static boolean get(String s1, String s2) {
  623.57 -        return s1 == null;
  623.58 -    }
  623.59 -}
   624.1 --- a/sandbox/old-modules/kit/build.xml	Mon Dec 19 11:37:36 2016 +0100
   624.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   624.3 @@ -1,13 +0,0 @@
   624.4 -<?xml version="1.0" encoding="UTF-8"?>
   624.5 -<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
   624.6 -<!-- for some information on what you could do (e.g. targets to override). -->
   624.7 -<!-- If you delete this file and reopen the project it will be recreated. -->
   624.8 -<project name="org.netbeans.modules.jackpot30.kit" default="netbeans" basedir=".">
   624.9 -    <description>Builds, tests, and runs the project org.netbeans.modules.jackpot30.kit.</description>
  624.10 -    <import file="nbproject/build-impl.xml"/>
  624.11 -    
  624.12 -    <target name="test" />
  624.13 -    <target name="test-coverage" />
  624.14 -    <target name="coverage-report" />
  624.15 -    <target name="findbugs" />
  624.16 -</project>
   625.1 --- a/sandbox/old-modules/kit/manifest.mf	Mon Dec 19 11:37:36 2016 +0100
   625.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   625.3 @@ -1,5 +0,0 @@
   625.4 -Manifest-Version: 1.0
   625.5 -OpenIDE-Module: org.netbeans.modules.jackpot30.kit
   625.6 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jackpot30/kit/Bundle.properties
   625.7 -OpenIDE-Module-Specification-Version: 1.16
   625.8 -
   626.1 --- a/sandbox/old-modules/kit/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   626.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   626.3 @@ -1,30 +0,0 @@
   626.4 -<?xml version="1.0" encoding="UTF-8"?>
   626.5 -<!--
   626.6 -*** GENERATED FROM project.xml - DO NOT EDIT  ***
   626.7 -***         EDIT ../build.xml INSTEAD         ***
   626.8 --->
   626.9 -<project name="org.netbeans.modules.jackpot30.kit-impl" basedir="..">
  626.10 -    <property file="nbproject/private/suite-private.properties"/>
  626.11 -    <property file="nbproject/suite.properties"/>
  626.12 -    <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
  626.13 -    <property file="${suite.dir}/nbproject/private/platform-private.properties"/>
  626.14 -    <property file="${suite.dir}/nbproject/platform.properties"/>
  626.15 -    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
  626.16 -        <attribute name="name"/>
  626.17 -        <attribute name="value"/>
  626.18 -        <sequential>
  626.19 -            <property name="@{name}" value="${@{value}}"/>
  626.20 -        </sequential>
  626.21 -    </macrodef>
  626.22 -    <property file="${user.properties.file}"/>
  626.23 -    <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  626.24 -    <nbmproject2:property name="netbeans.dest.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  626.25 -    <fail message="You must define 'nbplatform.${nbplatform.active}.harness.dir'">
  626.26 -        <condition>
  626.27 -            <not>
  626.28 -                <available file="${harness.dir}" type="dir"/>
  626.29 -            </not>
  626.30 -        </condition>
  626.31 -    </fail>
  626.32 -    <import file="${harness.dir}/build.xml"/>
  626.33 -</project>
   627.1 --- a/sandbox/old-modules/kit/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   627.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   627.3 @@ -1,8 +0,0 @@
   627.4 -build.xml.data.CRC32=719584a7
   627.5 -build.xml.script.CRC32=6c4da9a3
   627.6 -build.xml.stylesheet.CRC32=79c3b980@1.28.0.7
   627.7 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   627.8 -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   627.9 -nbproject/build-impl.xml.data.CRC32=ff5fa2e9
  627.10 -nbproject/build-impl.xml.script.CRC32=e68b5d3e
  627.11 -nbproject/build-impl.xml.stylesheet.CRC32=68e521fc@2.70
   628.1 --- a/sandbox/old-modules/kit/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   628.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   628.3 @@ -1,2 +0,0 @@
   628.4 -javac.source=1.5
   628.5 -javac.compilerargs=-Xlint -Xlint:-serial
   629.1 --- a/sandbox/old-modules/kit/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   629.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   629.3 @@ -1,33 +0,0 @@
   629.4 -<?xml version="1.0" encoding="UTF-8"?>
   629.5 -<project xmlns="http://www.netbeans.org/ns/project/1">
   629.6 -    <type>org.netbeans.modules.apisupport.project</type>
   629.7 -    <configuration>
   629.8 -        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
   629.9 -            <code-name-base>org.netbeans.modules.jackpot30.kit</code-name-base>
  629.10 -            <suite-component/>
  629.11 -            <module-dependencies>
  629.12 -                <dependency>
  629.13 -                    <code-name-base>org.netbeans.modules.jackpot30.api</code-name-base>
  629.14 -                    <build-prerequisite/>
  629.15 -                    <compile-dependency/>
  629.16 -                    <run-dependency>
  629.17 -                        <specification-version>1.16</specification-version>
  629.18 -                    </run-dependency>
  629.19 -                </dependency>
  629.20 -                <dependency>
  629.21 -                    <code-name-base>org.netbeans.modules.jackpot30.hintsimpl</code-name-base>
  629.22 -                    <run-dependency>
  629.23 -                        <specification-version>1.16</specification-version>
  629.24 -                    </run-dependency>
  629.25 -                </dependency>
  629.26 -                <dependency>
  629.27 -                    <code-name-base>org.netbeans.modules.jackpot30.transformers</code-name-base>
  629.28 -                    <run-dependency>
  629.29 -                        <specification-version>1.16</specification-version>
  629.30 -                    </run-dependency>
  629.31 -                </dependency>
  629.32 -            </module-dependencies>
  629.33 -            <public-packages/>
  629.34 -        </data>
  629.35 -    </configuration>
  629.36 -</project>
   630.1 --- a/sandbox/old-modules/kit/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   630.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   630.3 @@ -1,1 +0,0 @@
   630.4 -suite.dir=${basedir}/..
   631.1 --- a/sandbox/old-modules/kit/src/org/netbeans/modules/jackpot30/kit/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   631.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   631.3 @@ -1,38 +0,0 @@
   631.4 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   631.5 -#
   631.6 -# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
   631.7 -#
   631.8 -# The contents of this file are subject to the terms of either the GNU
   631.9 -# General Public License Version 2 only ("GPL") or the Common
  631.10 -# Development and Distribution License("CDDL") (collectively, the
  631.11 -# "License"). You may not use this file except in compliance with the
  631.12 -# License. You can obtain a copy of the License at
  631.13 -# http://www.netbeans.org/cddl-gplv2.html
  631.14 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  631.15 -# specific language governing permissions and limitations under the
  631.16 -# License.  When distributing the software, include this License Header
  631.17 -# Notice in each file and include the License file at
  631.18 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  631.19 -# particular file as subject to the "Classpath" exception as provided
  631.20 -# by Sun in the GPL Version 2 section of the License file that
  631.21 -# accompanied this code. If applicable, add the following below the
  631.22 -# License Header, with the fields enclosed by brackets [] replaced by
  631.23 -# your own identifying information:
  631.24 -# "Portions Copyrighted [year] [name of copyright owner]"
  631.25 -#
  631.26 -# If you wish your version of this file to be governed by only the CDDL
  631.27 -# or only the GPL Version 2, indicate your decision by adding
  631.28 -# "[Contributor] elects to include this software in this distribution
  631.29 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
  631.30 -# single choice of license, a recipient has the option to distribute
  631.31 -# your version of this file under either the CDDL, the GPL Version 2 or
  631.32 -# to extend the choice of license to its licensees as provided above.
  631.33 -# However, if you add GPL Version 2 code and therefore, elected the GPL
  631.34 -# Version 2 license, then the option applies only if the new code is
  631.35 -# made subject to such option by the copyright holder.
  631.36 -#
  631.37 -# Contributor(s):
  631.38 -#
  631.39 -# Portions Copyrighted 2009 Sun Microsystems, Inc.
  631.40 -
  631.41 -OpenIDE-Module-Name=Jackpot 3.0
   632.1 --- a/sandbox/old-modules/overlays/netbeans	Mon Dec 19 11:37:36 2016 +0100
   632.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   632.3 @@ -1,307 +0,0 @@
   632.4 -diff --git a/openide.filesystems/src/META-INF/upgrade/org.openide.filesystems.FileObject.hint b/openide.filesystems/src/META-INF/upgrade/org.openide.filesystems.FileObject.hint
   632.5 -new file mode 100644
   632.6 ---- /dev/null
   632.7 -+++ b/openide.filesystems/src/META-INF/upgrade/org.openide.filesystems.FileObject.hint
   632.8 -@@ -0,0 +1,23 @@
   632.9 -+'FileObject.getPackageNameExt(char, char) is deprecated':
  632.10 -+   $0.getPackageNameExt('/', '.') :: $0 instanceof org.openide.FileObject
  632.11 -+=> $0.getPath()
  632.12 -+;;
  632.13 -+'FileObject.getPackageNameExt(char, char) is deprecated':
  632.14 -+   $0.getPackageNameExt($1, '.') :: $0 instanceof org.openide.FileObject && $1 instanceof char
  632.15 -+=> $0.getPath().replace('/', $1)
  632.16 -+;;
  632.17 -+
  632.18 -+'FileObject.isReadOnly() is deprecated':
  632.19 -+    $0.isReadOnly() :: $0 instanceof org.openide.FileObject
  632.20 -+=> !$0.canWrite()
  632.21 -+;;
  632.22 -+
  632.23 -+'Repository.getDefaultFileSystem()':
  632.24 -+   org.openide.filesystems.Repository.getDefault.getDefaultFileSystem()
  632.25 -+=> org.openide.filesystems.FileUtil.getConfigRoot()
  632.26 -+;;
  632.27 -+
  632.28 -+'Repository.getDefaultFileSystem()':
  632.29 -+   org.openide.filesystems.Repository.getDefault.getDefaultFileSystem().findResource($path) :: $path instanceof java.lang.String
  632.30 -+=> org.openide.filesystems.FileUtil.getConfigFile($path)
  632.31 -+;;
  632.32 -diff --git a/openide.loaders/src/META-INF/upgrade/org.openide.loaders.DataObject.hint b/openide.loaders/src/META-INF/upgrade/org.openide.loaders.DataObject.hint
  632.33 -new file mode 100644
  632.34 ---- /dev/null
  632.35 -+++ b/openide.loaders/src/META-INF/upgrade/org.openide.loaders.DataObject.hint
  632.36 -@@ -0,0 +1,3 @@
  632.37 -+'DataObject.getCookie is obsolette':
  632.38 -+$this.getCookie($1) :: $this instanceof org.openide.loaders.DataObject && $1 instanceof java.lang.Class
  632.39 -+   => $this.getLookup().lookup($1) ;;
  632.40 -diff --git a/openide.nodes/src/META-INF/upgrade/org.openide.nodes.Node.hint b/openide.nodes/src/META-INF/upgrade/org.openide.nodes.Node.hint
  632.41 -new file mode 100644
  632.42 ---- /dev/null
  632.43 -+++ b/openide.nodes/src/META-INF/upgrade/org.openide.nodes.Node.hint
  632.44 -@@ -0,0 +1,3 @@
  632.45 -+'Node.getCookie is obsolette':
  632.46 -+$this.getCookie($1) :: $this instanceof org.openide.loaders.DataObject && $1 instanceof java.lang.Class
  632.47 -+   => $this.getLookup().lookup($1) ;;
  632.48 -diff --git a/openide.text/src/META-INF/upgrade/org.openide.text.Line.hint b/openide.text/src/META-INF/upgrade/org.openide.text.Line.hint
  632.49 -new file mode 100644
  632.50 ---- /dev/null
  632.51 -+++ b/openide.text/src/META-INF/upgrade/org.openide.text.Line.hint
  632.52 -@@ -0,0 +1,12 @@
  632.53 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_TRY_SHOW, $1) :: $1 instanceof int && $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.NONE, org.openide.text.Line.ShowVisibilityType.NONE, $1) ;;
  632.54 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_SHOW, $1) :: $1 instanceof int && $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.OPEN, org.openide.text.Line.ShowVisibilityType.NONE, $1) ;;
  632.55 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_GOTO, $1) :: $1 instanceof int && $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.OPEN, org.openide.text.Line.ShowVisibilityType.FOCUS, $1) ;;
  632.56 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_TOFRONT, $1) :: $1 instanceof int && $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.OPEN, org.openide.text.Line.ShowVisibilityType.FRONT, $1) ;;
  632.57 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_REUSE, $1) :: $1 instanceof int && $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.REUSE, org.openide.text.Line.ShowVisibilityType.FOCUS, $1) ;;
  632.58 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_REUSE_NEW, $1) :: $1 instanceof int && $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.REUSE_NEW, org.openide.text.Line.ShowVisibilityType.FOCUS, $1) ;;
  632.59 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_TRY_SHOW) :: $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.NONE, org.openide.text.Line.ShowVisibilityType.NONE) ;;
  632.60 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_SHOW) :: $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.OPEN, org.openide.text.Line.ShowVisibilityType.NONE) ;;
  632.61 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_GOTO) :: $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.OPEN, org.openide.text.Line.ShowVisibilityType.FOCUS) ;;
  632.62 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_TOFRONT) :: $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.OPEN, org.openide.text.Line.ShowVisibilityType.FRONT) ;;
  632.63 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_REUSE) :: $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.REUSE, org.openide.text.Line.ShowVisibilityType.FOCUS) ;;
  632.64 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_REUSE_NEW) :: $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.REUSE_NEW, org.openide.text.Line.ShowVisibilityType.FOCUS) ;;
  632.65 -diff --git a/openide.util/src/META-INF/upgrade/org.openide.ErrorManager.hint b/openide.util/src/META-INF/upgrade/org.openide.ErrorManager.hint
  632.66 -new file mode 100644
  632.67 ---- /dev/null
  632.68 -+++ b/openide.util/src/META-INF/upgrade/org.openide.ErrorManager.hint
  632.69 -@@ -0,0 +1,104 @@
  632.70 -+'ErrorManager.notify is deprecated':
  632.71 -+$this.notify(org.openide.ErrorManager.UNKNOWN, $1) :: $1 instanceof java.lang.Throwable && $this instanceof org.openide.ErrorManager
  632.72 -+   =>org.openide.util.Exceptions.printStackTrace($1)
  632.73 -+   ;;
  632.74 -+
  632.75 -+'ErrorManager.notify is deprecated':
  632.76 -+org.openide.ErrorManager.getDefault().notify(org.openide.ErrorManager.EXCEPTION, $1) :: $1 instanceof java.lang.Throwable && $this instanceof org.openide.ErrorManager
  632.77 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.WARNING, null, $1)
  632.78 -+   ;;
  632.79 -+
  632.80 -+'ErrorManager.notify is deprecated':
  632.81 -+org.openide.ErrorManager.getDefault().notify(org.openide.ErrorManager.EXCEPTION, $1) :: $1 instanceof java.lang.Throwable && $this instanceof org.openide.ErrorManager
  632.82 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.WARNING, null, $1)
  632.83 -+   ;;
  632.84 -+
  632.85 -+'ErrorManager.notify is deprecated':
  632.86 -+org.openide.ErrorManager.getDefault().notify(org.openide.ErrorManager.INFORMATIONAL, $1) :: $1 instanceof java.lang.Throwable && $this instanceof org.openide.ErrorManager
  632.87 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.INFO, null, $1)
  632.88 -+   ;;
  632.89 -+
  632.90 -+'ErrorManager.notify is deprecated':
  632.91 -+org.openide.ErrorManager.getDefault().notify(org.openide.ErrorManager.USER, $1) :: $1 instanceof java.lang.Throwable && $this instanceof org.openide.ErrorManager
  632.92 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.WARNING, null, $1)
  632.93 -+   ;;
  632.94 -+
  632.95 -+'ErrorManager.notify is deprecated':
  632.96 -+org.openide.ErrorManager.getDefault().notify(org.openide.ErrorManager.WARNING, $1) :: $1 instanceof java.lang.Throwable && $this instanceof org.openide.ErrorManager
  632.97 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.WARNING, null, $1)
  632.98 -+   ;;
  632.99 -+
 632.100 -+'ErrorManager.notify is deprecated':
 632.101 -+$this.notify($1) :: $1 instanceof java.lang.Throwable && $this instanceof org.openide.ErrorManager
 632.102 -+   =>org.openide.util.Exceptions.printStackTrace($1)
 632.103 -+   ;;
 632.104 -+
 632.105 -+'ErrorManager.log is deprecated':
 632.106 -+org.openide.ErrorManager.getDefault().log(org.openide.ErrorManager.UNKNOWN, $1) :: $1 instanceof java.lang.String && $this instanceof org.openide.ErrorManager
 632.107 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.INFO, $1)
 632.108 -+   ;;
 632.109 -+
 632.110 -+'ErrorManager.log is deprecated':
 632.111 -+org.openide.ErrorManager.getDefault().log(org.openide.ErrorManager.ERROR, $1) :: $1 instanceof java.lang.String && $this instanceof org.openide.ErrorManager
 632.112 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.SEVERE, $1)
 632.113 -+   ;;
 632.114 -+
 632.115 -+'ErrorManager.log is deprecated':
 632.116 -+org.openide.ErrorManager.getDefault().log(org.openide.ErrorManager.EXCEPTION, $1) :: $1 instanceof java.lang.String && $this instanceof org.openide.ErrorManager
 632.117 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.SEVERE, $1)
 632.118 -+   ;;
 632.119 -+
 632.120 -+'ErrorManager.log is deprecated':
 632.121 -+org.openide.ErrorManager.getDefault().log(org.openide.ErrorManager.INFORMATIONAL, $1) :: $1 instanceof java.lang.String && $this instanceof org.openide.ErrorManager
 632.122 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.FINE, $1)
 632.123 -+   ;;
 632.124 -+
 632.125 -+'ErrorManager.log is deprecated':
 632.126 -+org.openide.ErrorManager.getDefault().log(org.openide.ErrorManager.USER, $1) :: $1 instanceof java.lang.String && $this instanceof org.openide.ErrorManager
 632.127 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.WARNING, $1)
 632.128 -+   ;;
 632.129 -+
 632.130 -+'ErrorManager.log is deprecated':
 632.131 -+org.openide.ErrorManager.getDefault().log(org.openide.ErrorManager.WARNING, $1) :: $1 instanceof java.lang.String && $this instanceof org.openide.ErrorManager
 632.132 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.WARNING, $1)
 632.133 -+   ;;
 632.134 -+
 632.135 -+'ErrorManager.log is deprecated':
 632.136 -+org.openide.ErrorManager.getDefault().log($1) :: $1 instanceof java.lang.String && $this instanceof org.openide.ErrorManager
 632.137 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.FINE, $1)
 632.138 -+   ;;
 632.139 -+
 632.140 -+'ErrorManager.isLoggable is deprecated':
 632.141 -+org.openide.ErrorManager.getDefault().isLoggable(org.openide.ErrorManager.UNKNOWN) :: $this instanceof org.openide.ErrorManager
 632.142 -+   =>java.util.logging.Logger.getLogger("global").isLoggable(java.util.logging.Level.INFO)
 632.143 -+   ;;
 632.144 -+
 632.145 -+'ErrorManager.isLoggable is deprecated':
 632.146 -+org.openide.ErrorManager.getDefault().isLoggable(org.openide.ErrorManager.ERROR) :: $this instanceof org.openide.ErrorManager
 632.147 -+   =>java.util.logging.Logger.getLogger("global").isLoggable(java.util.logging.Level.SEVERE)
 632.148 -+   ;;
 632.149 -+
 632.150 -+'ErrorManager.isLoggable is deprecated':
 632.151 -+org.openide.ErrorManager.getDefault().isLoggable(org.openide.ErrorManager.EXCEPTION) :: $this instanceof org.openide.ErrorManager
 632.152 -+   =>java.util.logging.Logger.getLogger("global").isLoggable(java.util.logging.Level.SEVERE)
 632.153 -+   ;;
 632.154 -+
 632.155 -+'ErrorManager.isLoggable is deprecated':
 632.156 -+org.openide.ErrorManager.getDefault().isLoggable(org.openide.ErrorManager.INFORMATIONAL) :: $this instanceof org.openide.ErrorManager
 632.157 -+   =>java.util.logging.Logger.getLogger("global").isLoggable(java.util.logging.Level.FINE)
 632.158 -+   ;;
 632.159 -+
 632.160 -+'ErrorManager.isLoggable is deprecated':
 632.161 -+org.openide.ErrorManager.getDefault().isLoggable(org.openide.ErrorManager.USER) :: $this instanceof org.openide.ErrorManager
 632.162 -+   =>java.util.logging.Logger.getLogger("global").isLoggable(java.util.logging.Level.WARNING)
 632.163 -+   ;;
 632.164 -+
 632.165 -+'ErrorManager.isLoggable is deprecated':
 632.166 -+org.openide.ErrorManager.getDefault().isLoggable(org.openide.ErrorManager.WARNING) :: $this instanceof org.openide.ErrorManager
 632.167 -+   =>java.util.logging.Logger.getLogger("global").isLoggable(java.util.logging.Level.WARNING)
 632.168 -+   ;;
 632.169 -+
 632.170 -+'ErrorManager.annotate is deprecated':
 632.171 -+$this.annotate($1, $2) :: $1 instanceof java.lang.Throwable && $2 instanceof java.lang.String  && $this instanceof org.openide.ErrorManager
 632.172 -+   =>org.openide.util.Exceptions.attachLocalizedMessage($1, $2)
 632.173 -+   ;;
 632.174 -diff --git a/openide.util/src/META-INF/upgrade/org.openide.util.Lookup.hint b/openide.util/src/META-INF/upgrade/org.openide.util.Lookup.hint
 632.175 -new file mode 100644
 632.176 ---- /dev/null
 632.177 -+++ b/openide.util/src/META-INF/upgrade/org.openide.util.Lookup.hint
 632.178 -@@ -0,0 +1,17 @@
 632.179 -+'Lookup.lookupAll can be used instead':
 632.180 -+$0.lookup(new org.openide.util.Lookup.Template($1)).allInstances() :: $0 instanceof org.openide.util.Lookup && $1 instanceof java.lang.Class
 632.181 -+=>
 632.182 -+$0.lookupAll($1)
 632.183 -+;;
 632.184 -+
 632.185 -+'Lookup.lookupResult can be used instead':
 632.186 -+$0.lookup(new org.openide.util.Lookup.Template($1)) :: $0 instanceof org.openide.util.Lookup && $1 instanceof java.lang.Class && !parentMatches("$_.allInstances()")
 632.187 -+=>
 632.188 -+$0.lookupResult($1)
 632.189 -+;;
 632.190 -+
 632.191 -+'Lookup.Template() is deprecated':
 632.192 -+new org.openide.util.Lookup.Template()
 632.193 -+=>
 632.194 -+new org.openide.util.Lookup.Template(java.lang.Object.class)
 632.195 -+;;
 632.196 -diff --git a/openide.util/src/META-INF/upgrade/org.openide.util.Utilities.hint b/openide.util/src/META-INF/upgrade/org.openide.util.Utilities.hint
 632.197 -new file mode 100644
 632.198 ---- /dev/null
 632.199 -+++ b/openide.util/src/META-INF/upgrade/org.openide.util.Utilities.hint
 632.200 -@@ -0,0 +1,19 @@
 632.201 -+'Utilities.mergeImages is deprecated':
 632.202 -+   org.openide.util.Utilities.mergeImages($1, $2, $3, $4) :: $1 instanceof java.awt.Image && $2 instanceof java.awt.Image && $3 instanceof int && $4 instanceof int
 632.203 -+=> org.openide.util.ImageUtilities.mergeImages($1, $2, $3, $4)
 632.204 -+;;
 632.205 -+
 632.206 -+'Utilities.loadImage is deprecated':
 632.207 -+   org.openide.util.Utilities.loadImage($1) :: $1 instanceof String
 632.208 -+=> org.openide.util.ImageUtilities.loadImage($1)
 632.209 -+;;
 632.210 -+
 632.211 -+'Utilities.icon2Image is deprecated':
 632.212 -+   org.openide.util.Utilities.icon2Image($1) :: $1 instanceof javax.swing.Icon
 632.213 -+=> org.openide.util.ImageUtilities.icon2Image($1)
 632.214 -+;;
 632.215 -+
 632.216 -+'Utilities.image2Icon can be used instead of new ImageIcon':
 632.217 -+   new javax.swing.ImageIcon($1) :: $1 instanceof java.awt.Image
 632.218 -+=> org.openide.util.ImageUtilities.image2Icon($1)
 632.219 -+;;
 632.220 -diff --git a/openide.util/test/unit/src/META-INF/upgrade/org.openide.util.Utilities.test b/openide.util/test/unit/src/META-INF/upgrade/org.openide.util.Utilities.test
 632.221 -new file mode 100644
 632.222 ---- /dev/null
 632.223 -+++ b/openide.util/test/unit/src/META-INF/upgrade/org.openide.util.Utilities.test
 632.224 -@@ -0,0 +1,86 @@
 632.225 -+%%TestCase mergeImages1
 632.226 -+package test;
 632.227 -+import java.awt.Image;
 632.228 -+import org.openide.util.Utilities;
 632.229 -+public class Test {
 632.230 -+    private void test() {
 632.231 -+        Image i1 = null, i2 = null;
 632.232 -+        Utilities.mergeImages(i1, i2, -9, 34);
 632.233 -+    }
 632.234 -+}
 632.235 -+%%=>
 632.236 -+package test;
 632.237 -+import java.awt.Image;
 632.238 -+import org.openide.util.ImageUtilities;
 632.239 -+import org.openide.util.Utilities;
 632.240 -+public class Test {
 632.241 -+    private void test() {
 632.242 -+        Image i1 = null, i2 = null;
 632.243 -+        ImageUtilities.mergeImages(i1, i2, -9, 34);
 632.244 -+    }
 632.245 -+}
 632.246 -+%%TestCase loadImage1
 632.247 -+package test;
 632.248 -+import java.awt.Image;
 632.249 -+import org.openide.util.Utilities;
 632.250 -+public class Test {
 632.251 -+    private void test() {
 632.252 -+        Utilities.loadImage("foobar");
 632.253 -+    }
 632.254 -+}
 632.255 -+%%=>
 632.256 -+package test;
 632.257 -+import java.awt.Image;
 632.258 -+import org.openide.util.ImageUtilities;
 632.259 -+import org.openide.util.Utilities;
 632.260 -+public class Test {
 632.261 -+    private void test() {
 632.262 -+        ImageUtilities.loadImage("foobar");
 632.263 -+    }
 632.264 -+}
 632.265 -+%%TestCase icon2Image1
 632.266 -+package test;
 632.267 -+import javax.swing.Icon;
 632.268 -+import org.openide.util.Utilities;
 632.269 -+public class Test {
 632.270 -+    private void test() {
 632.271 -+        Icon i = null;
 632.272 -+        Utilities.icon2Image(i);
 632.273 -+    }
 632.274 -+}
 632.275 -+%%=>
 632.276 -+package test;
 632.277 -+import javax.swing.Icon;
 632.278 -+import org.openide.util.ImageUtilities;
 632.279 -+import org.openide.util.Utilities;
 632.280 -+public class Test {
 632.281 -+    private void test() {
 632.282 -+        Icon i = null;
 632.283 -+        ImageUtilities.icon2Image(i);
 632.284 -+    }
 632.285 -+}
 632.286 -+%%TestCase image2Icon1
 632.287 -+package test;
 632.288 -+import java.awt.Image;
 632.289 -+import javax.swing.Icon;
 632.290 -+import javax.swing.ImageIcon;
 632.291 -+import org.openide.util.Utilities;
 632.292 -+public class Test {
 632.293 -+    private void test() {
 632.294 -+        Image img = null;
 632.295 -+        Icon i = new ImageIcon(img);
 632.296 -+    }
 632.297 -+}
 632.298 -+%%=>
 632.299 -+package test;
 632.300 -+import java.awt.Image;
 632.301 -+import javax.swing.Icon;
 632.302 -+import javax.swing.ImageIcon;
 632.303 -+import org.openide.util.ImageUtilities;
 632.304 -+import org.openide.util.Utilities;
 632.305 -+public class Test {
 632.306 -+    private void test() {
 632.307 -+        Image img = null;
 632.308 -+        Icon i = ImageUtilities.image2Icon(img);
 632.309 -+    }
 632.310 -+}
   633.1 --- a/sandbox/old-modules/server/do-indexing	Mon Dec 19 11:37:36 2016 +0100
   633.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   633.3 @@ -1,27 +0,0 @@
   633.4 -#!/bin/bash -x
   633.5 -
   633.6 -performIndexing() {
   633.7 -    name=`basename $1`;
   633.8 -    if [ -d $name ] ; then
   633.9 -        HG_OUT=$(tempfile) || exit
  633.10 -        trap "rm -f -- '$HG_OUT'" EXIT
  633.11 -        MODIFIED=$(tempfile) || exit
  633.12 -        trap "rm -f -- '$HG_OUT' '$MODIFIED'" EXIT
  633.13 -        REMOVED=$(tempfile) || exit
  633.14 -        trap "rm -f -- '$HG_OUT' '$MODIFIED' '$REMOVED'" EXIT
  633.15 -
  633.16 -        (cd $name; hg pull; hg --verbose up >$HG_OUT; grep <$HG_OUT "^getting " | cut -d ' ' -f 2- >$MODIFIED; grep <$HG_OUT "^removing " | cut -d ' ' -f 2- >$REMOVED;)
  633.17 -        java -Xbootclasspath/p:lib/javac-api-nb-7.0-b07.jar -jar indexer.jar $ADDITIONAL_INDEXING_PARAMS $name $2 "$MODIFIED" "$REMOVED"
  633.18 -    else
  633.19 -        hg clone $1
  633.20 -        java -Xbootclasspath/p:lib/javac-api-nb-7.0-b07.jar -jar indexer.jar $ADDITIONAL_INDEXING_PARAMS $name $2
  633.21 -    fi;
  633.22 -}
  633.23 -
  633.24 -mkdir -p cache
  633.25 -
  633.26 -for f in `echo $1 | tr ',' '\n'`; do
  633.27 -    performIndexing $f cache
  633.28 -done
  633.29 -
  633.30 -exit
   634.1 --- a/sandbox/old-modules/server/indexer/build.xml	Mon Dec 19 11:37:36 2016 +0100
   634.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   634.3 @@ -1,86 +0,0 @@
   634.4 -<?xml version="1.0" encoding="UTF-8"?>
   634.5 -<!-- You may freely edit this file. See commented blocks below for -->
   634.6 -<!-- some examples of how to customize the build. -->
   634.7 -<!-- (If you delete it and reopen the project it will be recreated.) -->
   634.8 -<!-- By default, only the Clean and Build commands use this build script. -->
   634.9 -<!-- Commands such as Run, Debug, and Test only use this build script if -->
  634.10 -<!-- the Compile on Save feature is turned off for the project. -->
  634.11 -<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
  634.12 -<!-- in the project's Project Properties dialog box.-->
  634.13 -<project name="indexer" default="default" basedir=".">
  634.14 -    <description>Builds, tests, and runs the project indexer.</description>
  634.15 -    <import file="../download.xml"/>
  634.16 -    <import file="nbproject/build-impl.xml"/>
  634.17 -    <!--
  634.18 -
  634.19 -    There exist several targets which are by default empty and which can be 
  634.20 -    used for execution of your tasks. These targets are usually executed 
  634.21 -    before and after some main targets. They are: 
  634.22 -
  634.23 -      -pre-init:                 called before initialization of project properties
  634.24 -      -post-init:                called after initialization of project properties
  634.25 -      -pre-compile:              called before javac compilation
  634.26 -      -post-compile:             called after javac compilation
  634.27 -      -pre-compile-single:       called before javac compilation of single file
  634.28 -      -post-compile-single:      called after javac compilation of single file
  634.29 -      -pre-compile-test:         called before javac compilation of JUnit tests
  634.30 -      -post-compile-test:        called after javac compilation of JUnit tests
  634.31 -      -pre-compile-test-single:  called before javac compilation of single JUnit test
  634.32 -      -post-compile-test-single: called after javac compilation of single JUunit test
  634.33 -      -pre-jar:                  called before JAR building
  634.34 -      -post-jar:                 called after JAR building
  634.35 -      -post-clean:               called after cleaning build products
  634.36 -
  634.37 -    (Targets beginning with '-' are not intended to be called on their own.)
  634.38 -
  634.39 -    Example of inserting an obfuscator after compilation could look like this:
  634.40 -
  634.41 -        <target name="-post-compile">
  634.42 -            <obfuscate>
  634.43 -                <fileset dir="${build.classes.dir}"/>
  634.44 -            </obfuscate>
  634.45 -        </target>
  634.46 -
  634.47 -    For list of available properties check the imported 
  634.48 -    nbproject/build-impl.xml file. 
  634.49 -
  634.50 -
  634.51 -    Another way to customize the build is by overriding existing main targets.
  634.52 -    The targets of interest are: 
  634.53 -
  634.54 -      -init-macrodef-javac:     defines macro for javac compilation
  634.55 -      -init-macrodef-junit:     defines macro for junit execution
  634.56 -      -init-macrodef-debug:     defines macro for class debugging
  634.57 -      -init-macrodef-java:      defines macro for class execution
  634.58 -      -do-jar-with-manifest:    JAR building (if you are using a manifest)
  634.59 -      -do-jar-without-manifest: JAR building (if you are not using a manifest)
  634.60 -      run:                      execution of project 
  634.61 -      -javadoc-build:           Javadoc generation
  634.62 -      test-report:              JUnit report generation
  634.63 -
  634.64 -    An example of overriding the target for project execution could look like this:
  634.65 -
  634.66 -        <target name="run" depends="indexer-impl.jar">
  634.67 -            <exec dir="bin" executable="launcher.exe">
  634.68 -                <arg file="${dist.jar}"/>
  634.69 -            </exec>
  634.70 -        </target>
  634.71 -
  634.72 -    Notice that the overridden target depends on the jar target and not only on 
  634.73 -    the compile target as the regular run target does. Again, for a list of available 
  634.74 -    properties which you can use, check the target you are overriding in the
  634.75 -    nbproject/build-impl.xml file. 
  634.76 -
  634.77 -    -->
  634.78 -
  634.79 -    <target name="copy-to-hudson" depends="jar">
  634.80 -        <mkdir dir="${hudson.compiler.dir}" /> <!--only to be sure, should exist-->
  634.81 -        <copy todir="${hudson.compiler.dir}/indexer">
  634.82 -            <fileset dir="${dist.dir}"/>
  634.83 -        </copy>
  634.84 -    </target>
  634.85 -
  634.86 -    <target name="-post-clean">
  634.87 -        <delete dir="${hudson.compiler.dir}/indexer"/>
  634.88 -    </target>
  634.89 -</project>
   635.1 --- a/sandbox/old-modules/server/indexer/manifest.mf	Mon Dec 19 11:37:36 2016 +0100
   635.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   635.3 @@ -1,3 +0,0 @@
   635.4 -Manifest-Version: 1.0
   635.5 -X-COMMENT: Main-Class will be added automatically by build
   635.6 -
   636.1 --- a/sandbox/old-modules/server/indexer/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   636.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   636.3 @@ -1,914 +0,0 @@
   636.4 -<?xml version="1.0" encoding="UTF-8"?>
   636.5 -<!--
   636.6 -*** GENERATED FROM project.xml - DO NOT EDIT  ***
   636.7 -***         EDIT ../build.xml INSTEAD         ***
   636.8 -
   636.9 -For the purpose of easier reading the script
  636.10 -is divided into following sections:
  636.11 -
  636.12 -  - initialization
  636.13 -  - compilation
  636.14 -  - jar
  636.15 -  - execution
  636.16 -  - debugging
  636.17 -  - javadoc
  636.18 -  - junit compilation
  636.19 -  - junit execution
  636.20 -  - junit debugging
  636.21 -  - applet
  636.22 -  - cleanup
  636.23 -
  636.24 -        -->
  636.25 -<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="indexer-impl">
  636.26 -    <fail message="Please build using Ant 1.7.1 or higher.">
  636.27 -        <condition>
  636.28 -            <not>
  636.29 -                <antversion atleast="1.7.1"/>
  636.30 -            </not>
  636.31 -        </condition>
  636.32 -    </fail>
  636.33 -    <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
  636.34 -    <!-- 
  636.35 -                ======================
  636.36 -                INITIALIZATION SECTION 
  636.37 -                ======================
  636.38 -            -->
  636.39 -    <target name="-pre-init">
  636.40 -        <!-- Empty placeholder for easier customization. -->
  636.41 -        <!-- You can override this target in the ../build.xml file. -->
  636.42 -    </target>
  636.43 -    <target depends="-pre-init" name="-init-private">
  636.44 -        <property file="nbproject/private/config.properties"/>
  636.45 -        <property file="nbproject/private/configs/${config}.properties"/>
  636.46 -        <property file="nbproject/private/private.properties"/>
  636.47 -    </target>
  636.48 -    <target name="-pre-init-libraries">
  636.49 -        <property location="../lib/nblibraries.properties" name="libraries.path"/>
  636.50 -        <dirname file="${libraries.path}" property="libraries.dir.nativedirsep"/>
  636.51 -        <pathconvert dirsep="/" property="libraries.dir">
  636.52 -            <path path="${libraries.dir.nativedirsep}"/>
  636.53 -        </pathconvert>
  636.54 -        <basename file="${libraries.path}" property="libraries.basename" suffix=".properties"/>
  636.55 -        <available file="${libraries.dir}/${libraries.basename}-private.properties" property="private.properties.available"/>
  636.56 -    </target>
  636.57 -    <target depends="-pre-init-libraries" if="private.properties.available" name="-init-private-libraries">
  636.58 -        <loadproperties encoding="ISO-8859-1" srcfile="${libraries.dir}/${libraries.basename}-private.properties">
  636.59 -            <filterchain>
  636.60 -                <replacestring from="$${base}" to="${libraries.dir}"/>
  636.61 -                <escapeunicode/>
  636.62 -            </filterchain>
  636.63 -        </loadproperties>
  636.64 -    </target>
  636.65 -    <target depends="-pre-init,-init-private,-init-private-libraries" name="-init-libraries">
  636.66 -        <loadproperties encoding="ISO-8859-1" srcfile="${libraries.path}">
  636.67 -            <filterchain>
  636.68 -                <replacestring from="$${base}" to="${libraries.dir}"/>
  636.69 -                <escapeunicode/>
  636.70 -            </filterchain>
  636.71 -        </loadproperties>
  636.72 -    </target>
  636.73 -    <target depends="-pre-init,-init-private,-init-libraries" name="-init-user">
  636.74 -        <property file="${user.properties.file}"/>
  636.75 -        <!-- The two properties below are usually overridden -->
  636.76 -        <!-- by the active platform. Just a fallback. -->
  636.77 -        <property name="default.javac.source" value="1.4"/>
  636.78 -        <property name="default.javac.target" value="1.4"/>
  636.79 -    </target>
  636.80 -    <target depends="-pre-init,-init-private,-init-libraries,-init-user" name="-init-project">
  636.81 -        <property file="nbproject/configs/${config}.properties"/>
  636.82 -        <property file="nbproject/project.properties"/>
  636.83 -    </target>
  636.84 -    <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-init-macrodef-property" name="-do-init">
  636.85 -        <available file="${manifest.file}" property="manifest.available"/>
  636.86 -        <condition property="main.class.available">
  636.87 -            <and>
  636.88 -                <isset property="main.class"/>
  636.89 -                <not>
  636.90 -                    <equals arg1="${main.class}" arg2="" trim="true"/>
  636.91 -                </not>
  636.92 -            </and>
  636.93 -        </condition>
  636.94 -        <condition property="manifest.available+main.class">
  636.95 -            <and>
  636.96 -                <isset property="manifest.available"/>
  636.97 -                <isset property="main.class.available"/>
  636.98 -            </and>
  636.99 -        </condition>
 636.100 -        <condition property="do.mkdist">
 636.101 -            <and>
 636.102 -                <isset property="libs.CopyLibs.classpath"/>
 636.103 -                <not>
 636.104 -                    <istrue value="${mkdist.disabled}"/>
 636.105 -                </not>
 636.106 -            </and>
 636.107 -        </condition>
 636.108 -        <condition property="manifest.available+main.class+mkdist.available">
 636.109 -            <and>
 636.110 -                <istrue value="${manifest.available+main.class}"/>
 636.111 -                <isset property="do.mkdist"/>
 636.112 -            </and>
 636.113 -        </condition>
 636.114 -        <condition property="manifest.available+mkdist.available">
 636.115 -            <and>
 636.116 -                <istrue value="${manifest.available}"/>
 636.117 -                <isset property="do.mkdist"/>
 636.118 -            </and>
 636.119 -        </condition>
 636.120 -        <condition property="manifest.available-mkdist.available">
 636.121 -            <or>
 636.122 -                <istrue value="${manifest.available}"/>
 636.123 -                <isset property="do.mkdist"/>
 636.124 -            </or>
 636.125 -        </condition>
 636.126 -        <condition property="manifest.available+main.class-mkdist.available">
 636.127 -            <or>
 636.128 -                <istrue value="${manifest.available+main.class}"/>
 636.129 -                <isset property="do.mkdist"/>
 636.130 -            </or>
 636.131 -        </condition>
 636.132 -        <condition property="have.tests">
 636.133 -            <or>
 636.134 -                <available file="${test.src.dir}"/>
 636.135 -            </or>
 636.136 -        </condition>
 636.137 -        <condition property="have.sources">
 636.138 -            <or>
 636.139 -                <available file="${src.dir}"/>
 636.140 -            </or>
 636.141 -        </condition>
 636.142 -        <condition property="netbeans.home+have.tests">
 636.143 -            <and>
 636.144 -                <isset property="netbeans.home"/>
 636.145 -                <isset property="have.tests"/>
 636.146 -            </and>
 636.147 -        </condition>
 636.148 -        <condition property="no.javadoc.preview">
 636.149 -            <and>
 636.150 -                <isset property="javadoc.preview"/>
 636.151 -                <isfalse value="${javadoc.preview}"/>
 636.152 -            </and>
 636.153 -        </condition>
 636.154 -        <property name="run.jvmargs" value=""/>
 636.155 -        <property name="javac.compilerargs" value=""/>
 636.156 -        <property name="work.dir" value="${basedir}"/>
 636.157 -        <condition property="no.deps">
 636.158 -            <and>
 636.159 -                <istrue value="${no.dependencies}"/>
 636.160 -            </and>
 636.161 -        </condition>
 636.162 -        <property name="javac.debug" value="true"/>
 636.163 -        <property name="javadoc.preview" value="true"/>
 636.164 -        <property name="application.args" value=""/>
 636.165 -        <property name="source.encoding" value="${file.encoding}"/>
 636.166 -        <property name="runtime.encoding" value="${source.encoding}"/>
 636.167 -        <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
 636.168 -            <and>
 636.169 -                <isset property="javadoc.encoding"/>
 636.170 -                <not>
 636.171 -                    <equals arg1="${javadoc.encoding}" arg2=""/>
 636.172 -                </not>
 636.173 -            </and>
 636.174 -        </condition>
 636.175 -        <property name="javadoc.encoding.used" value="${source.encoding}"/>
 636.176 -        <property name="includes" value="**"/>
 636.177 -        <property name="excludes" value=""/>
 636.178 -        <property name="do.depend" value="false"/>
 636.179 -        <condition property="do.depend.true">
 636.180 -            <istrue value="${do.depend}"/>
 636.181 -        </condition>
 636.182 -        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
 636.183 -        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
 636.184 -            <length length="0" string="${endorsed.classpath}" when="greater"/>
 636.185 -        </condition>
 636.186 -        <property name="javac.fork" value="false"/>
 636.187 -    </target>
 636.188 -    <target name="-post-init">
 636.189 -        <!-- Empty placeholder for easier customization. -->
 636.190 -        <!-- You can override this target in the ../build.xml file. -->
 636.191 -    </target>
 636.192 -    <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init" name="-init-check">
 636.193 -        <fail unless="src.dir">Must set src.dir</fail>
 636.194 -        <fail unless="test.src.dir">Must set test.src.dir</fail>
 636.195 -        <fail unless="build.dir">Must set build.dir</fail>
 636.196 -        <fail unless="dist.dir">Must set dist.dir</fail>
 636.197 -        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
 636.198 -        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
 636.199 -        <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
 636.200 -        <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
 636.201 -        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
 636.202 -        <fail unless="dist.jar">Must set dist.jar</fail>
 636.203 -    </target>
 636.204 -    <target name="-init-macrodef-property">
 636.205 -        <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
 636.206 -            <attribute name="name"/>
 636.207 -            <attribute name="value"/>
 636.208 -            <sequential>
 636.209 -                <property name="@{name}" value="${@{value}}"/>
 636.210 -            </sequential>
 636.211 -        </macrodef>
 636.212 -    </target>
 636.213 -    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
 636.214 -        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
 636.215 -            <attribute default="${src.dir}" name="srcdir"/>
 636.216 -            <attribute default="${build.classes.dir}" name="destdir"/>
 636.217 -            <attribute default="${javac.classpath}" name="classpath"/>
 636.218 -            <attribute default="${javac.processorpath}" name="processorpath"/>
 636.219 -            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
 636.220 -            <attribute default="${includes}" name="includes"/>
 636.221 -            <attribute default="${excludes}" name="excludes"/>
 636.222 -            <attribute default="${javac.debug}" name="debug"/>
 636.223 -            <attribute default="${empty.dir}" name="sourcepath"/>
 636.224 -            <attribute default="${empty.dir}" name="gensrcdir"/>
 636.225 -            <element name="customize" optional="true"/>
 636.226 -            <sequential>
 636.227 -                <property location="${build.dir}/empty" name="empty.dir"/>
 636.228 -                <mkdir dir="${empty.dir}"/>
 636.229 -                <mkdir dir="@{apgeneratedsrcdir}"/>
 636.230 -                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
 636.231 -                    <src>
 636.232 -                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
 636.233 -                            <include name="*"/>
 636.234 -                        </dirset>
 636.235 -                    </src>
 636.236 -                    <classpath>
 636.237 -                        <path path="@{classpath}"/>
 636.238 -                    </classpath>
 636.239 -                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
 636.240 -                    <compilerarg line="${javac.compilerargs}"/>
 636.241 -                    <compilerarg value="-processorpath"/>
 636.242 -                    <compilerarg path="@{processorpath}"/>
 636.243 -                    <compilerarg line="${ap.processors.internal}"/>
 636.244 -                    <compilerarg value="-s"/>
 636.245 -                    <compilerarg path="@{apgeneratedsrcdir}"/>
 636.246 -                    <compilerarg line="${ap.proc.none.internal}"/>
 636.247 -                    <customize/>
 636.248 -                </javac>
 636.249 -            </sequential>
 636.250 -        </macrodef>
 636.251 -    </target>
 636.252 -    <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
 636.253 -        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
 636.254 -            <attribute default="${src.dir}" name="srcdir"/>
 636.255 -            <attribute default="${build.classes.dir}" name="destdir"/>
 636.256 -            <attribute default="${javac.classpath}" name="classpath"/>
 636.257 -            <attribute default="${javac.processorpath}" name="processorpath"/>
 636.258 -            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
 636.259 -            <attribute default="${includes}" name="includes"/>
 636.260 -            <attribute default="${excludes}" name="excludes"/>
 636.261 -            <attribute default="${javac.debug}" name="debug"/>
 636.262 -            <attribute default="${empty.dir}" name="sourcepath"/>
 636.263 -            <attribute default="${empty.dir}" name="gensrcdir"/>
 636.264 -            <element name="customize" optional="true"/>
 636.265 -            <sequential>
 636.266 -                <property location="${build.dir}/empty" name="empty.dir"/>
 636.267 -                <mkdir dir="${empty.dir}"/>
 636.268 -                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
 636.269 -                    <src>
 636.270 -                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
 636.271 -                            <include name="*"/>
 636.272 -                        </dirset>
 636.273 -                    </src>
 636.274 -                    <classpath>
 636.275 -                        <path path="@{classpath}"/>
 636.276 -                    </classpath>
 636.277 -                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
 636.278 -                    <compilerarg line="${javac.compilerargs}"/>
 636.279 -                    <customize/>
 636.280 -                </javac>
 636.281 -            </sequential>
 636.282 -        </macrodef>
 636.283 -    </target>
 636.284 -    <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
 636.285 -        <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
 636.286 -            <attribute default="${src.dir}" name="srcdir"/>
 636.287 -            <attribute default="${build.classes.dir}" name="destdir"/>
 636.288 -            <attribute default="${javac.classpath}" name="classpath"/>
 636.289 -            <sequential>
 636.290 -                <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
 636.291 -                    <classpath>
 636.292 -                        <path path="@{classpath}"/>
 636.293 -                    </classpath>
 636.294 -                </depend>
 636.295 -            </sequential>
 636.296 -        </macrodef>
 636.297 -        <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
 636.298 -            <attribute default="${build.classes.dir}" name="destdir"/>
 636.299 -            <sequential>
 636.300 -                <fail unless="javac.includes">Must set javac.includes</fail>
 636.301 -                <pathconvert pathsep="," property="javac.includes.binary">
 636.302 -                    <path>
 636.303 -                        <filelist dir="@{destdir}" files="${javac.includes}"/>
 636.304 -                    </path>
 636.305 -                    <globmapper from="*.java" to="*.class"/>
 636.306 -                </pathconvert>
 636.307 -                <delete>
 636.308 -                    <files includes="${javac.includes.binary}"/>
 636.309 -                </delete>
 636.310 -            </sequential>
 636.311 -        </macrodef>
 636.312 -    </target>
 636.313 -    <target name="-init-macrodef-junit">
 636.314 -        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
 636.315 -            <attribute default="${includes}" name="includes"/>
 636.316 -            <attribute default="${excludes}" name="excludes"/>
 636.317 -            <attribute default="**" name="testincludes"/>
 636.318 -            <sequential>
 636.319 -                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
 636.320 -                    <batchtest todir="${build.test.results.dir}">
 636.321 -                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
 636.322 -                            <filename name="@{testincludes}"/>
 636.323 -                        </fileset>
 636.324 -                    </batchtest>
 636.325 -                    <classpath>
 636.326 -                        <path path="${run.test.classpath}"/>
 636.327 -                    </classpath>
 636.328 -                    <syspropertyset>
 636.329 -                        <propertyref prefix="test-sys-prop."/>
 636.330 -                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
 636.331 -                    </syspropertyset>
 636.332 -                    <formatter type="brief" usefile="false"/>
 636.333 -                    <formatter type="xml"/>
 636.334 -                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
 636.335 -                    <jvmarg line="${run.jvmargs}"/>
 636.336 -                </junit>
 636.337 -            </sequential>
 636.338 -        </macrodef>
 636.339 -    </target>
 636.340 -    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
 636.341 -        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
 636.342 -            <attribute default="${main.class}" name="name"/>
 636.343 -            <attribute default="${debug.classpath}" name="classpath"/>
 636.344 -            <attribute default="" name="stopclassname"/>
 636.345 -            <sequential>
 636.346 -                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
 636.347 -                    <classpath>
 636.348 -                        <path path="@{classpath}"/>
 636.349 -                    </classpath>
 636.350 -                </nbjpdastart>
 636.351 -            </sequential>
 636.352 -        </macrodef>
 636.353 -        <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
 636.354 -            <attribute default="${build.classes.dir}" name="dir"/>
 636.355 -            <sequential>
 636.356 -                <nbjpdareload>
 636.357 -                    <fileset dir="@{dir}" includes="${fix.classes}">
 636.358 -                        <include name="${fix.includes}*.class"/>
 636.359 -                    </fileset>
 636.360 -                </nbjpdareload>
 636.361 -            </sequential>
 636.362 -        </macrodef>
 636.363 -    </target>
 636.364 -    <target name="-init-debug-args">
 636.365 -        <property name="version-output" value="java version &quot;${ant.java.version}"/>
 636.366 -        <condition property="have-jdk-older-than-1.4">
 636.367 -            <or>
 636.368 -                <contains string="${version-output}" substring="java version &quot;1.0"/>
 636.369 -                <contains string="${version-output}" substring="java version &quot;1.1"/>
 636.370 -                <contains string="${version-output}" substring="java version &quot;1.2"/>
 636.371 -                <contains string="${version-output}" substring="java version &quot;1.3"/>
 636.372 -            </or>
 636.373 -        </condition>
 636.374 -        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
 636.375 -            <istrue value="${have-jdk-older-than-1.4}"/>
 636.376 -        </condition>
 636.377 -        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
 636.378 -            <os family="windows"/>
 636.379 -        </condition>
 636.380 -        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
 636.381 -            <isset property="debug.transport"/>
 636.382 -        </condition>
 636.383 -    </target>
 636.384 -    <target depends="-init-debug-args" name="-init-macrodef-debug">
 636.385 -        <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
 636.386 -            <attribute default="${main.class}" name="classname"/>
 636.387 -            <attribute default="${debug.classpath}" name="classpath"/>
 636.388 -            <element name="customize" optional="true"/>
 636.389 -            <sequential>
 636.390 -                <java classname="@{classname}" dir="${work.dir}" fork="true">
 636.391 -                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
 636.392 -                    <jvmarg line="${debug-args-line}"/>
 636.393 -                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
 636.394 -                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
 636.395 -                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
 636.396 -                    <jvmarg line="${run.jvmargs}"/>
 636.397 -                    <classpath>
 636.398 -                        <path path="@{classpath}"/>
 636.399 -                    </classpath>
 636.400 -                    <syspropertyset>
 636.401 -                        <propertyref prefix="run-sys-prop."/>
 636.402 -                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
 636.403 -                    </syspropertyset>
 636.404 -                    <customize/>
 636.405 -                </java>
 636.406 -            </sequential>
 636.407 -        </macrodef>
 636.408 -    </target>
 636.409 -    <target name="-init-macrodef-java">
 636.410 -        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
 636.411 -            <attribute default="${main.class}" name="classname"/>
 636.412 -            <attribute default="${run.classpath}" name="classpath"/>
 636.413 -            <element name="customize" optional="true"/>
 636.414 -            <sequential>
 636.415 -                <java classname="@{classname}" dir="${work.dir}" fork="true">
 636.416 -                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
 636.417 -                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
 636.418 -                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
 636.419 -                    <jvmarg line="${run.jvmargs}"/>
 636.420 -                    <classpath>
 636.421 -                        <path path="@{classpath}"/>
 636.422 -                    </classpath>
 636.423 -                    <syspropertyset>
 636.424 -                        <propertyref prefix="run-sys-prop."/>
 636.425 -                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
 636.426 -                    </syspropertyset>
 636.427 -                    <customize/>
 636.428 -                </java>
 636.429 -            </sequential>
 636.430 -        </macrodef>
 636.431 -    </target>
 636.432 -    <target name="-init-presetdef-jar">
 636.433 -        <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
 636.434 -            <jar compress="${jar.compress}" jarfile="${dist.jar}">
 636.435 -                <j2seproject1:fileset dir="${build.classes.dir}"/>
 636.436 -            </jar>
 636.437 -        </presetdef>
 636.438 -    </target>
 636.439 -    <target name="-init-ap-cmdline-properties">
 636.440 -        <property name="annotation.processing.enabled" value="true"/>
 636.441 -        <property name="annotation.processing.processors.list" value=""/>
 636.442 -        <property name="annotation.processing.run.all.processors" value="true"/>
 636.443 -        <property name="javac.processorpath" value="${javac.classpath}"/>
 636.444 -        <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
 636.445 -        <condition property="ap.supported.internal" value="true">
 636.446 -            <not>
 636.447 -                <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
 636.448 -            </not>
 636.449 -        </condition>
 636.450 -    </target>
 636.451 -    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
 636.452 -        <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
 636.453 -            <isfalse value="${annotation.processing.run.all.processors}"/>
 636.454 -        </condition>
 636.455 -        <condition else="" property="ap.proc.none.internal" value="-proc:none">
 636.456 -            <isfalse value="${annotation.processing.enabled}"/>
 636.457 -        </condition>
 636.458 -    </target>
 636.459 -    <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
 636.460 -        <property name="ap.cmd.line.internal" value=""/>
 636.461 -    </target>
 636.462 -    <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
 636.463 -    <!--
 636.464 -                ===================
 636.465 -                COMPILATION SECTION
 636.466 -                ===================
 636.467 -            -->
 636.468 -    <target name="-deps-jar-init" unless="built-jar.properties">
 636.469 -        <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
 636.470 -        <delete file="${built-jar.properties}" quiet="true"/>
 636.471 -    </target>
 636.472 -    <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
 636.473 -        <echo level="warn" message="Cycle detected: indexer was already built"/>
 636.474 -    </target>
 636.475 -    <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
 636.476 -        <mkdir dir="${build.dir}"/>
 636.477 -        <touch file="${built-jar.properties}" verbose="false"/>
 636.478 -        <property file="${built-jar.properties}" prefix="already.built.jar."/>
 636.479 -        <antcall target="-warn-already-built-jar"/>
 636.480 -        <propertyfile file="${built-jar.properties}">
 636.481 -            <entry key="${basedir}" value=""/>
 636.482 -        </propertyfile>
 636.483 -        <antcall target="-maybe-call-dep">
 636.484 -            <param name="call.built.properties" value="${built-jar.properties}"/>
 636.485 -            <param location="${project.org_netbeans_modules_jackpot30_api}" name="call.subproject"/>
 636.486 -            <param location="${project.org_netbeans_modules_jackpot30_api}/build.xml" name="call.script"/>
 636.487 -            <param name="call.target" value="netbeans"/>
 636.488 -            <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
 636.489 -        </antcall>
 636.490 -    </target>
 636.491 -    <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
 636.492 -    <target depends="init" name="-check-automatic-build">
 636.493 -        <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
 636.494 -    </target>
 636.495 -    <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
 636.496 -        <antcall target="clean"/>
 636.497 -    </target>
 636.498 -    <target depends="init,deps-jar" name="-pre-pre-compile">
 636.499 -        <mkdir dir="${build.classes.dir}"/>
 636.500 -    </target>
 636.501 -    <target name="-pre-compile">
 636.502 -        <!-- Empty placeholder for easier customization. -->
 636.503 -        <!-- You can override this target in the ../build.xml file. -->
 636.504 -    </target>
 636.505 -    <target if="do.depend.true" name="-compile-depend">
 636.506 -        <pathconvert property="build.generated.subdirs">
 636.507 -            <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
 636.508 -                <include name="*"/>
 636.509 -            </dirset>
 636.510 -        </pathconvert>
 636.511 -        <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
 636.512 -    </target>
 636.513 -    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
 636.514 -        <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
 636.515 -        <copy todir="${build.classes.dir}">
 636.516 -            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
 636.517 -        </copy>
 636.518 -    </target>
 636.519 -    <target name="-post-compile">
 636.520 -        <!-- Empty placeholder for easier customization. -->
 636.521 -        <!-- You can override this target in the ../build.xml file. -->
 636.522 -    </target>
 636.523 -    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
 636.524 -    <target name="-pre-compile-single">
 636.525 -        <!-- Empty placeholder for easier customization. -->
 636.526 -        <!-- You can override this target in the ../build.xml file. -->
 636.527 -    </target>
 636.528 -    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
 636.529 -        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
 636.530 -        <j2seproject3:force-recompile/>
 636.531 -        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
 636.532 -    </target>
 636.533 -    <target name="-post-compile-single">
 636.534 -        <!-- Empty placeholder for easier customization. -->
 636.535 -        <!-- You can override this target in the ../build.xml file. -->
 636.536 -    </target>
 636.537 -    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
 636.538 -    <!--
 636.539 -                ====================
 636.540 -                JAR BUILDING SECTION
 636.541 -                ====================
 636.542 -            -->
 636.543 -    <target depends="init" name="-pre-pre-jar">
 636.544 -        <dirname file="${dist.jar}" property="dist.jar.dir"/>
 636.545 -        <mkdir dir="${dist.jar.dir}"/>
 636.546 -    </target>
 636.547 -    <target name="-pre-jar">
 636.548 -        <!-- Empty placeholder for easier customization. -->
 636.549 -        <!-- You can override this target in the ../build.xml file. -->
 636.550 -    </target>
 636.551 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
 636.552 -        <j2seproject1:jar/>
 636.553 -    </target>
 636.554 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
 636.555 -        <j2seproject1:jar manifest="${manifest.file}"/>
 636.556 -    </target>
 636.557 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
 636.558 -        <j2seproject1:jar manifest="${manifest.file}">
 636.559 -            <j2seproject1:manifest>
 636.560 -                <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
 636.561 -            </j2seproject1:manifest>
 636.562 -        </j2seproject1:jar>
 636.563 -        <echo>To run this application from the command line without Ant, try:</echo>
 636.564 -        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
 636.565 -        <property location="${dist.jar}" name="dist.jar.resolved"/>
 636.566 -        <pathconvert property="run.classpath.with.dist.jar">
 636.567 -            <path path="${run.classpath}"/>
 636.568 -            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
 636.569 -        </pathconvert>
 636.570 -        <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
 636.571 -    </target>
 636.572 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
 636.573 -        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
 636.574 -        <pathconvert property="run.classpath.without.build.classes.dir">
 636.575 -            <path path="${run.classpath}"/>
 636.576 -            <map from="${build.classes.dir.resolved}" to=""/>
 636.577 -        </pathconvert>
 636.578 -        <pathconvert pathsep=" " property="jar.classpath">
 636.579 -            <path path="${run.classpath.without.build.classes.dir}"/>
 636.580 -            <chainedmapper>
 636.581 -                <flattenmapper/>
 636.582 -                <globmapper from="*" to="lib/*"/>
 636.583 -            </chainedmapper>
 636.584 -        </pathconvert>
 636.585 -        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
 636.586 -        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
 636.587 -            <fileset dir="${build.classes.dir}"/>
 636.588 -            <manifest>
 636.589 -                <attribute name="Main-Class" value="${main.class}"/>
 636.590 -                <attribute name="Class-Path" value="${jar.classpath}"/>
 636.591 -            </manifest>
 636.592 -        </copylibs>
 636.593 -        <echo>To run this application from the command line without Ant, try:</echo>
 636.594 -        <property location="${dist.jar}" name="dist.jar.resolved"/>
 636.595 -        <echo>java -jar "${dist.jar.resolved}"</echo>
 636.596 -    </target>
 636.597 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+mkdist.available" name="-do-jar-with-libraries-without-mainclass" unless="main.class.available">
 636.598 -        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
 636.599 -        <pathconvert property="run.classpath.without.build.classes.dir">
 636.600 -            <path path="${run.classpath}"/>
 636.601 -            <map from="${build.classes.dir.resolved}" to=""/>
 636.602 -        </pathconvert>
 636.603 -        <pathconvert pathsep=" " property="jar.classpath">
 636.604 -            <path path="${run.classpath.without.build.classes.dir}"/>
 636.605 -            <chainedmapper>
 636.606 -                <flattenmapper/>
 636.607 -                <globmapper from="*" to="lib/*"/>
 636.608 -            </chainedmapper>
 636.609 -        </pathconvert>
 636.610 -        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
 636.611 -        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
 636.612 -            <fileset dir="${build.classes.dir}"/>
 636.613 -            <manifest>
 636.614 -                <attribute name="Class-Path" value="${jar.classpath}"/>
 636.615 -            </manifest>
 636.616 -        </copylibs>
 636.617 -    </target>
 636.618 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">
 636.619 -        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
 636.620 -        <pathconvert property="run.classpath.without.build.classes.dir">
 636.621 -            <path path="${run.classpath}"/>
 636.622 -            <map from="${build.classes.dir.resolved}" to=""/>
 636.623 -        </pathconvert>
 636.624 -        <pathconvert pathsep=" " property="jar.classpath">
 636.625 -            <path path="${run.classpath.without.build.classes.dir}"/>
 636.626 -            <chainedmapper>
 636.627 -                <flattenmapper/>
 636.628 -                <globmapper from="*" to="lib/*"/>
 636.629 -            </chainedmapper>
 636.630 -        </pathconvert>
 636.631 -        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
 636.632 -        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
 636.633 -            <fileset dir="${build.classes.dir}"/>
 636.634 -            <manifest>
 636.635 -                <attribute name="Class-Path" value="${jar.classpath}"/>
 636.636 -            </manifest>
 636.637 -        </copylibs>
 636.638 -    </target>
 636.639 -    <target name="-post-jar">
 636.640 -        <!-- Empty placeholder for easier customization. -->
 636.641 -        <!-- You can override this target in the ../build.xml file. -->
 636.642 -    </target>
 636.643 -    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-mainclass,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
 636.644 -    <!--
 636.645 -                =================
 636.646 -                EXECUTION SECTION
 636.647 -                =================
 636.648 -            -->
 636.649 -    <target depends="init,compile" description="Run a main class." name="run">
 636.650 -        <j2seproject1:java>
 636.651 -            <customize>
 636.652 -                <arg line="${application.args}"/>
 636.653 -            </customize>
 636.654 -        </j2seproject1:java>
 636.655 -    </target>
 636.656 -    <target name="-do-not-recompile">
 636.657 -        <property name="javac.includes.binary" value=""/>
 636.658 -    </target>
 636.659 -    <target depends="init,compile-single" name="run-single">
 636.660 -        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
 636.661 -        <j2seproject1:java classname="${run.class}"/>
 636.662 -    </target>
 636.663 -    <target depends="init,compile-test-single" name="run-test-with-main">
 636.664 -        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
 636.665 -        <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
 636.666 -    </target>
 636.667 -    <!--
 636.668 -                =================
 636.669 -                DEBUGGING SECTION
 636.670 -                =================
 636.671 -            -->
 636.672 -    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
 636.673 -        <j2seproject1:nbjpdastart name="${debug.class}"/>
 636.674 -    </target>
 636.675 -    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
 636.676 -        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
 636.677 -    </target>
 636.678 -    <target depends="init,compile" name="-debug-start-debuggee">
 636.679 -        <j2seproject3:debug>
 636.680 -            <customize>
 636.681 -                <arg line="${application.args}"/>
 636.682 -            </customize>
 636.683 -        </j2seproject3:debug>
 636.684 -    </target>
 636.685 -    <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
 636.686 -    <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
 636.687 -        <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
 636.688 -    </target>
 636.689 -    <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
 636.690 -    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
 636.691 -        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
 636.692 -        <j2seproject3:debug classname="${debug.class}"/>
 636.693 -    </target>
 636.694 -    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
 636.695 -    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
 636.696 -        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
 636.697 -        <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
 636.698 -    </target>
 636.699 -    <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
 636.700 -    <target depends="init" name="-pre-debug-fix">
 636.701 -        <fail unless="fix.includes">Must set fix.includes</fail>
 636.702 -        <property name="javac.includes" value="${fix.includes}.java"/>
 636.703 -    </target>
 636.704 -    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
 636.705 -        <j2seproject1:nbjpdareload/>
 636.706 -    </target>
 636.707 -    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
 636.708 -    <!--
 636.709 -                ===============
 636.710 -                JAVADOC SECTION
 636.711 -                ===============
 636.712 -            -->
 636.713 -    <target depends="init" name="-javadoc-build">
 636.714 -        <mkdir dir="${dist.javadoc.dir}"/>
 636.715 -        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
 636.716 -            <classpath>
 636.717 -                <path path="${javac.classpath}"/>
 636.718 -            </classpath>
 636.719 -            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
 636.720 -                <filename name="**/*.java"/>
 636.721 -            </fileset>
 636.722 -            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
 636.723 -                <include name="**/*.java"/>
 636.724 -            </fileset>
 636.725 -        </javadoc>
 636.726 -    </target>
 636.727 -    <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
 636.728 -        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
 636.729 -    </target>
 636.730 -    <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
 636.731 -    <!--
 636.732 -                =========================
 636.733 -                JUNIT COMPILATION SECTION
 636.734 -                =========================
 636.735 -            -->
 636.736 -    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
 636.737 -        <mkdir dir="${build.test.classes.dir}"/>
 636.738 -    </target>
 636.739 -    <target name="-pre-compile-test">
 636.740 -        <!-- Empty placeholder for easier customization. -->
 636.741 -        <!-- You can override this target in the ../build.xml file. -->
 636.742 -    </target>
 636.743 -    <target if="do.depend.true" name="-compile-test-depend">
 636.744 -        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
 636.745 -    </target>
 636.746 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
 636.747 -        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
 636.748 -        <copy todir="${build.test.classes.dir}">
 636.749 -            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
 636.750 -        </copy>
 636.751 -    </target>
 636.752 -    <target name="-post-compile-test">
 636.753 -        <!-- Empty placeholder for easier customization. -->
 636.754 -        <!-- You can override this target in the ../build.xml file. -->
 636.755 -    </target>
 636.756 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
 636.757 -    <target name="-pre-compile-test-single">
 636.758 -        <!-- Empty placeholder for easier customization. -->
 636.759 -        <!-- You can override this target in the ../build.xml file. -->
 636.760 -    </target>
 636.761 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
 636.762 -        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
 636.763 -        <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
 636.764 -        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
 636.765 -        <copy todir="${build.test.classes.dir}">
 636.766 -            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
 636.767 -        </copy>
 636.768 -    </target>
 636.769 -    <target name="-post-compile-test-single">
 636.770 -        <!-- Empty placeholder for easier customization. -->
 636.771 -        <!-- You can override this target in the ../build.xml file. -->
 636.772 -    </target>
 636.773 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
 636.774 -    <!--
 636.775 -                =======================
 636.776 -                JUNIT EXECUTION SECTION
 636.777 -                =======================
 636.778 -            -->
 636.779 -    <target depends="init" if="have.tests" name="-pre-test-run">
 636.780 -        <mkdir dir="${build.test.results.dir}"/>
 636.781 -    </target>
 636.782 -    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
 636.783 -        <j2seproject3:junit testincludes="**/*Test.java"/>
 636.784 -    </target>
 636.785 -    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
 636.786 -        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
 636.787 -    </target>
 636.788 -    <target depends="init" if="have.tests" name="test-report"/>
 636.789 -    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
 636.790 -    <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
 636.791 -    <target depends="init" if="have.tests" name="-pre-test-run-single">
 636.792 -        <mkdir dir="${build.test.results.dir}"/>
 636.793 -    </target>
 636.794 -    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
 636.795 -        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
 636.796 -        <j2seproject3:junit excludes="" includes="${test.includes}"/>
 636.797 -    </target>
 636.798 -    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
 636.799 -        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
 636.800 -    </target>
 636.801 -    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
 636.802 -    <!--
 636.803 -                =======================
 636.804 -                JUNIT DEBUGGING SECTION
 636.805 -                =======================
 636.806 -            -->
 636.807 -    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
 636.808 -        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
 636.809 -        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
 636.810 -        <delete file="${test.report.file}"/>
 636.811 -        <mkdir dir="${build.test.results.dir}"/>
 636.812 -        <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
 636.813 -            <customize>
 636.814 -                <syspropertyset>
 636.815 -                    <propertyref prefix="test-sys-prop."/>
 636.816 -                    <mapper from="test-sys-prop.*" to="*" type="glob"/>
 636.817 -                </syspropertyset>
 636.818 -                <arg value="${test.class}"/>
 636.819 -                <arg value="showoutput=true"/>
 636.820 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
 636.821 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
 636.822 -            </customize>
 636.823 -        </j2seproject3:debug>
 636.824 -    </target>
 636.825 -    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
 636.826 -        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
 636.827 -    </target>
 636.828 -    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
 636.829 -    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
 636.830 -        <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
 636.831 -    </target>
 636.832 -    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
 636.833 -    <!--
 636.834 -                =========================
 636.835 -                APPLET EXECUTION SECTION
 636.836 -                =========================
 636.837 -            -->
 636.838 -    <target depends="init,compile-single" name="run-applet">
 636.839 -        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
 636.840 -        <j2seproject1:java classname="sun.applet.AppletViewer">
 636.841 -            <customize>
 636.842 -                <arg value="${applet.url}"/>
 636.843 -            </customize>
 636.844 -        </j2seproject1:java>
 636.845 -    </target>
 636.846 -    <!--
 636.847 -                =========================
 636.848 -                APPLET DEBUGGING  SECTION
 636.849 -                =========================
 636.850 -            -->
 636.851 -    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
 636.852 -        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
 636.853 -        <j2seproject3:debug classname="sun.applet.AppletViewer">
 636.854 -            <customize>
 636.855 -                <arg value="${applet.url}"/>
 636.856 -            </customize>
 636.857 -        </j2seproject3:debug>
 636.858 -    </target>
 636.859 -    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
 636.860 -    <!--
 636.861 -                ===============
 636.862 -                CLEANUP SECTION
 636.863 -                ===============
 636.864 -            -->
 636.865 -    <target name="-deps-clean-init" unless="built-clean.properties">
 636.866 -        <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
 636.867 -        <delete file="${built-clean.properties}" quiet="true"/>
 636.868 -    </target>
 636.869 -    <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
 636.870 -        <echo level="warn" message="Cycle detected: indexer was already built"/>
 636.871 -    </target>
 636.872 -    <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
 636.873 -        <mkdir dir="${build.dir}"/>
 636.874 -        <touch file="${built-clean.properties}" verbose="false"/>
 636.875 -        <property file="${built-clean.properties}" prefix="already.built.clean."/>
 636.876 -        <antcall target="-warn-already-built-clean"/>
 636.877 -        <propertyfile file="${built-clean.properties}">
 636.878 -            <entry key="${basedir}" value=""/>
 636.879 -        </propertyfile>
 636.880 -        <antcall target="-maybe-call-dep">
 636.881 -            <param name="call.built.properties" value="${built-clean.properties}"/>
 636.882 -            <param location="${project.org_netbeans_modules_jackpot30_api}" name="call.subproject"/>
 636.883 -            <param location="${project.org_netbeans_modules_jackpot30_api}/build.xml" name="call.script"/>
 636.884 -            <param name="call.target" value="clean"/>
 636.885 -            <param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
 636.886 -        </antcall>
 636.887 -    </target>
 636.888 -    <target depends="init" name="-do-clean">
 636.889 -        <delete dir="${build.dir}"/>
 636.890 -        <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
 636.891 -    </target>
 636.892 -    <target name="-post-clean">
 636.893 -        <!-- Empty placeholder for easier customization. -->
 636.894 -        <!-- You can override this target in the ../build.xml file. -->
 636.895 -    </target>
 636.896 -    <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
 636.897 -    <target name="-check-call-dep">
 636.898 -        <property file="${call.built.properties}" prefix="already.built."/>
 636.899 -        <condition property="should.call.dep">
 636.900 -            <not>
 636.901 -                <isset property="already.built.${call.subproject}"/>
 636.902 -            </not>
 636.903 -        </condition>
 636.904 -        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
 636.905 -        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:${toString:endorsed.classpath.path}">
 636.906 -            <length length="0" string="${endorsed.classpath}" when="greater"/>
 636.907 -        </condition>
 636.908 -    </target>
 636.909 -    <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
 636.910 -        <ant antfile="${call.script}" inheritall="false" target="${call.target}">
 636.911 -            <propertyset>
 636.912 -                <propertyref prefix="transfer."/>
 636.913 -                <mapper from="transfer.*" to="*" type="glob"/>
 636.914 -            </propertyset>
 636.915 -        </ant>
 636.916 -    </target>
 636.917 -</project>
   637.1 --- a/sandbox/old-modules/server/indexer/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   637.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   637.3 @@ -1,8 +0,0 @@
   637.4 -build.xml.data.CRC32=8f49f787
   637.5 -build.xml.script.CRC32=48d52495
   637.6 -build.xml.stylesheet.CRC32=958a1d3e@1.27.0.45
   637.7 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   637.8 -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   637.9 -nbproject/build-impl.xml.data.CRC32=8f49f787
  637.10 -nbproject/build-impl.xml.script.CRC32=81f22719
  637.11 -nbproject/build-impl.xml.stylesheet.CRC32=1cdc5be9@1.35.0.45
   638.1 --- a/sandbox/old-modules/server/indexer/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   638.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   638.3 @@ -1,95 +0,0 @@
   638.4 -annotation.processing.enabled=true
   638.5 -annotation.processing.enabled.in.editor=false
   638.6 -annotation.processing.run.all.processors=true
   638.7 -application.title=indexer
   638.8 -application.vendor=lahvac
   638.9 -build.classes.dir=${build.dir}/classes
  638.10 -build.classes.excludes=**/*.java,**/*.form
  638.11 -# This directory is removed when the project is cleaned:
  638.12 -build.dir=build
  638.13 -build.generated.dir=${build.dir}/generated
  638.14 -build.generated.sources.dir=${build.dir}/generated-sources
  638.15 -# Only compile against the classpath explicitly listed here:
  638.16 -build.sysclasspath=ignore
  638.17 -build.test.classes.dir=${build.dir}/test/classes
  638.18 -build.test.results.dir=${build.dir}/test/results
  638.19 -# Uncomment to specify the preferred debugger connection transport:
  638.20 -#debug.transport=dt_socket
  638.21 -debug.classpath=\
  638.22 -    ${run.classpath}
  638.23 -debug.test.classpath=\
  638.24 -    ${run.test.classpath}
  638.25 -# This directory is removed when the project is cleaned:
  638.26 -dist.dir=dist
  638.27 -dist.jar=${dist.dir}/indexer.jar
  638.28 -dist.javadoc.dir=${dist.dir}/javadoc
  638.29 -endorsed.classpath=\
  638.30 -    ${libs.javac.classpath}
  638.31 -excludes=
  638.32 -file.reference.org-netbeans-modules-java-hints.jar=../lib/org-netbeans-modules-java-hints.jar
  638.33 -file.reference.org-netbeans-modules-java-source.jar=../lib/org-netbeans-modules-java-source.jar
  638.34 -file.reference.org-netbeans-spi-editor-hints.jar=../lib/org-netbeans-spi-editor-hints.jar
  638.35 -file.reference.org-openide-filesystems.jar=../lib/org-openide-filesystems.jar
  638.36 -file.reference.org-openide-util-lookup.jar=../lib/org-openide-util-lookup.jar
  638.37 -file.reference.org-openide-util.jar=../lib/org-openide-util.jar
  638.38 -file.reference.util-commons.jar-1=../../remoting/ide/api/external/util-commons.jar
  638.39 -file.reference.util-pojson.jar-1=../../remoting/ide/api/external/util-pojson.jar
  638.40 -includes=**
  638.41 -jar.compress=false
  638.42 -javac.classpath=\
  638.43 -    ${reference.org_netbeans_modules_jackpot30_api.module}:\
  638.44 -    ${libs.lucene.classpath}:\
  638.45 -    ${libs.javac.classpath}:\
  638.46 -    ${file.reference.org-netbeans-modules-java-source.jar}:\
  638.47 -    ${file.reference.org-openide-filesystems.jar}:\
  638.48 -    ${file.reference.org-openide-util.jar}:\
  638.49 -    ${file.reference.org-openide-util-lookup.jar}:\
  638.50 -    ${file.reference.org-netbeans-spi-editor-hints.jar}:\
  638.51 -    ${file.reference.org-netbeans-modules-java-hints.jar}:\
  638.52 -    ${file.reference.util-commons.jar-1}:\
  638.53 -    ${file.reference.util-pojson.jar-1}
  638.54 -# Space-separated list of extra javac options
  638.55 -javac.compilerargs=
  638.56 -javac.deprecation=false
  638.57 -javac.processorpath=\
  638.58 -    ${javac.classpath}
  638.59 -javac.source=1.5
  638.60 -javac.target=1.5
  638.61 -javac.test.classpath=\
  638.62 -    ${javac.classpath}:\
  638.63 -    ${build.classes.dir}:\
  638.64 -    ${libs.junit_4.classpath}
  638.65 -javadoc.additionalparam=
  638.66 -javadoc.author=false
  638.67 -javadoc.encoding=${source.encoding}
  638.68 -javadoc.noindex=false
  638.69 -javadoc.nonavbar=false
  638.70 -javadoc.notree=false
  638.71 -javadoc.private=false
  638.72 -javadoc.splitindex=true
  638.73 -javadoc.use=true
  638.74 -javadoc.version=false
  638.75 -javadoc.windowtitle=
  638.76 -jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
  638.77 -main.class=org.netbeans.modules.jackpot30.server.indexer.Index
  638.78 -manifest.file=manifest.mf
  638.79 -meta.inf.dir=${src.dir}/META-INF
  638.80 -mkdist.disabled=false
  638.81 -platform.active=default_platform
  638.82 -project.org_netbeans_modules_jackpot30_api=../../api
  638.83 -reference.org_netbeans_modules_jackpot30_api.module=${project.org_netbeans_modules_jackpot30_api}/../build/cluster/modules/org-netbeans-modules-jackpot30-api.jar
  638.84 -run.classpath=\
  638.85 -    ${javac.classpath}:\
  638.86 -    ${build.classes.dir}
  638.87 -# Space-separated list of JVM arguments used when running the project
  638.88 -# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
  638.89 -# or test-sys-prop.name=value to set system properties for unit tests):
  638.90 -run.jvmargs=
  638.91 -run.test.classpath=\
  638.92 -    ${javac.test.classpath}:\
  638.93 -    ${build.test.classes.dir}
  638.94 -source.encoding=UTF-8
  638.95 -src.dir=src
  638.96 -test.src.dir=test
  638.97 -
  638.98 -hudson.compiler.dir=../hudson/data/compiler
   639.1 --- a/sandbox/old-modules/server/indexer/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   639.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   639.3 @@ -1,28 +0,0 @@
   639.4 -<?xml version="1.0" encoding="UTF-8"?>
   639.5 -<project xmlns="http://www.netbeans.org/ns/project/1">
   639.6 -    <type>org.netbeans.modules.java.j2seproject</type>
   639.7 -    <configuration>
   639.8 -        <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
   639.9 -            <name>indexer</name>
  639.10 -            <source-roots>
  639.11 -                <root id="src.dir"/>
  639.12 -            </source-roots>
  639.13 -            <test-roots>
  639.14 -                <root id="test.src.dir"/>
  639.15 -            </test-roots>
  639.16 -        </data>
  639.17 -        <libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
  639.18 -            <definitions>../lib/nblibraries.properties</definitions>
  639.19 -        </libraries>
  639.20 -        <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
  639.21 -            <reference>
  639.22 -                <foreign-project>org_netbeans_modules_jackpot30_api</foreign-project>
  639.23 -                <artifact-type>jar</artifact-type>
  639.24 -                <script>build.xml</script>
  639.25 -                <target>netbeans</target>
  639.26 -                <clean-target>clean</clean-target>
  639.27 -                <id>module</id>
  639.28 -            </reference>
  639.29 -        </references>
  639.30 -    </configuration>
  639.31 -</project>
   640.1 --- a/sandbox/old-modules/server/indexer/src/org/netbeans/modules/jackpot30/server/indexer/Index.java	Mon Dec 19 11:37:36 2016 +0100
   640.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   640.3 @@ -1,106 +0,0 @@
   640.4 -/*
   640.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   640.6 - *
   640.7 - * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
   640.8 - *
   640.9 - * The contents of this file are subject to the terms of either the GNU
  640.10 - * General Public License Version 2 only ("GPL") or the Common
  640.11 - * Development and Distribution License("CDDL") (collectively, the
  640.12 - * "License"). You may not use this file except in compliance with the
  640.13 - * License. You can obtain a copy of the License at
  640.14 - * http://www.netbeans.org/cddl-gplv2.html
  640.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  640.16 - * specific language governing permissions and limitations under the
  640.17 - * License.  When distributing the software, include this License Header
  640.18 - * Notice in each file and include the License file at
  640.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  640.20 - * particular file as subject to the "Classpath" exception as provided
  640.21 - * by Sun in the GPL Version 2 section of the License file that
  640.22 - * accompanied this code. If applicable, add the following below the
  640.23 - * License Header, with the fields enclosed by brackets [] replaced by
  640.24 - * your own identifying information:
  640.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  640.26 - *
  640.27 - * If you wish your version of this file to be governed by only the CDDL
  640.28 - * or only the GPL Version 2, indicate your decision by adding
  640.29 - * "[Contributor] elects to include this software in this distribution
  640.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  640.31 - * single choice of license, a recipient has the option to distribute
  640.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  640.33 - * to extend the choice of license to its licensees as provided above.
  640.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  640.35 - * Version 2 license, then the option applies only if the new code is
  640.36 - * made subject to such option by the copyright holder.
  640.37 - *
  640.38 - * Contributor(s):
  640.39 - *
  640.40 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  640.41 - */
  640.42 -
  640.43 -package org.netbeans.modules.jackpot30.server.indexer;
  640.44 -
  640.45 -import java.io.File;
  640.46 -import java.io.IOException;
  640.47 -import java.util.ArrayList;
  640.48 -import java.util.Arrays;
  640.49 -import java.util.List;
  640.50 -import org.netbeans.modules.jackpot30.impl.indexing.Cache;
  640.51 -import org.netbeans.modules.java.hints.jackpot.impl.Utilities;
  640.52 -
  640.53 -/**
  640.54 - *
  640.55 - * @author lahvac
  640.56 - */
  640.57 -public class Index {
  640.58 -
  640.59 -    static final String PARAM_CONSTRUCT_DUPLICATES_INDEX = "-construct-duplicates-index";
  640.60 -    static final String PARAM_STORE_SOURCES = "-store-sources";
  640.61 -    
  640.62 -    /**
  640.63 -     * @param args the command line arguments
  640.64 -     */
  640.65 -    public static void main(String[] args) throws IOException {
  640.66 -        new Index().index(args);
  640.67 -    }
  640.68 -
  640.69 -    void index(String[] args) throws IOException {
  640.70 -        List<String> argsList = new ArrayList<String>(Arrays.asList(args));
  640.71 -        boolean constructDuplicatesIndex = !argsList.isEmpty() && PARAM_CONSTRUCT_DUPLICATES_INDEX.equals(argsList.get(0));
  640.72 -
  640.73 -        if (constructDuplicatesIndex) argsList.remove(0);
  640.74 -
  640.75 -        boolean storeSources = !argsList.isEmpty() && PARAM_STORE_SOURCES.equals(argsList.get(0));
  640.76 -
  640.77 -        if (storeSources) argsList.remove(0);
  640.78 -        
  640.79 -        String modified = null;
  640.80 -        String removed  = null;
  640.81 -
  640.82 -        if (argsList.size() != 2 && argsList.size() != 4) {
  640.83 -            printHelp();
  640.84 -            return ;
  640.85 -        }
  640.86 -
  640.87 -        if (argsList.size() == 4) {
  640.88 -            modified = argsList.get(2);
  640.89 -            removed = argsList.get(3);
  640.90 -        }
  640.91 -
  640.92 -        long startTime = System.currentTimeMillis();
  640.93 -
  640.94 -        Cache.setStandaloneCacheRoot(new File(argsList.get(1)));
  640.95 -        invokeIndexer(new File(argsList.get(0)), constructDuplicatesIndex, storeSources, modified, removed);
  640.96 -
  640.97 -        long endTime = System.currentTimeMillis();
  640.98 -
  640.99 -        System.out.println("indexing took: " + Utilities.toHumanReadableTime(endTime - startTime));
 640.100 -    }
 640.101 -
 640.102 -    protected void invokeIndexer(File root, boolean duplicatesIndex, boolean storeSources, String modified, String removed) throws IOException {
 640.103 -        StandaloneIndexer.index(root, duplicatesIndex, storeSources, modified, removed);
 640.104 -    }
 640.105 -
 640.106 -    protected void printHelp() {
 640.107 -        System.err.println("Usage: java -jar " + Index.class.getProtectionDomain().getCodeSource().getLocation().getPath() + " [" + PARAM_CONSTRUCT_DUPLICATES_INDEX + "] [" + PARAM_STORE_SOURCES + "] <source-root> <cache> [<modified-files> <removed-files>]");
 640.108 -    }
 640.109 -}
   641.1 --- a/sandbox/old-modules/server/indexer/src/org/netbeans/modules/jackpot30/server/indexer/StandaloneFinder.java	Mon Dec 19 11:37:36 2016 +0100
   641.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   641.3 @@ -1,202 +0,0 @@
   641.4 -/*
   641.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   641.6 - *
   641.7 - * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
   641.8 - *
   641.9 - * The contents of this file are subject to the terms of either the GNU
  641.10 - * General Public License Version 2 only ("GPL") or the Common
  641.11 - * Development and Distribution License("CDDL") (collectively, the
  641.12 - * "License"). You may not use this file except in compliance with the
  641.13 - * License. You can obtain a copy of the License at
  641.14 - * http://www.netbeans.org/cddl-gplv2.html
  641.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  641.16 - * specific language governing permissions and limitations under the
  641.17 - * License.  When distributing the software, include this License Header
  641.18 - * Notice in each file and include the License file at
  641.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  641.20 - * particular file as subject to the "Classpath" exception as provided
  641.21 - * by Sun in the GPL Version 2 section of the License file that
  641.22 - * accompanied this code. If applicable, add the following below the
  641.23 - * License Header, with the fields enclosed by brackets [] replaced by
  641.24 - * your own identifying information:
  641.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  641.26 - *
  641.27 - * If you wish your version of this file to be governed by only the CDDL
  641.28 - * or only the GPL Version 2, indicate your decision by adding
  641.29 - * "[Contributor] elects to include this software in this distribution
  641.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  641.31 - * single choice of license, a recipient has the option to distribute
  641.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  641.33 - * to extend the choice of license to its licensees as provided above.
  641.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  641.35 - * Version 2 license, then the option applies only if the new code is
  641.36 - * made subject to such option by the copyright holder.
  641.37 - *
  641.38 - * Contributor(s):
  641.39 - *
  641.40 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  641.41 - */
  641.42 -
  641.43 -package org.netbeans.modules.jackpot30.server.indexer;
  641.44 -
  641.45 -import com.sun.source.tree.CompilationUnitTree;
  641.46 -import com.sun.source.tree.Tree;
  641.47 -import com.sun.source.util.TreePath;
  641.48 -import com.sun.source.util.Trees;
  641.49 -import com.sun.tools.javac.api.JavacTaskImpl;
  641.50 -import java.io.File;
  641.51 -import java.io.IOException;
  641.52 -import java.net.URI;
  641.53 -import java.util.Arrays;
  641.54 -import java.util.BitSet;
  641.55 -import java.util.Collection;
  641.56 -import java.util.Collections;
  641.57 -import java.util.HashMap;
  641.58 -import java.util.LinkedList;
  641.59 -import java.util.Map;
  641.60 -import javax.tools.Diagnostic;
  641.61 -import javax.tools.JavaCompiler;
  641.62 -import javax.tools.JavaFileObject;
  641.63 -import javax.tools.SimpleJavaFileObject;
  641.64 -import javax.tools.ToolProvider;
  641.65 -import org.apache.lucene.document.Document;
  641.66 -import org.apache.lucene.index.IndexReader;
  641.67 -import org.apache.lucene.index.Term;
  641.68 -import org.apache.lucene.search.Collector;
  641.69 -import org.apache.lucene.search.IndexSearcher;
  641.70 -import org.apache.lucene.search.Query;
  641.71 -import org.apache.lucene.search.Searcher;
  641.72 -import org.apache.lucene.search.TermQuery;
  641.73 -import org.apache.lucene.store.FSDirectory;
  641.74 -import org.netbeans.modules.jackpot30.impl.duplicates.indexing.DuplicatesIndex;
  641.75 -import org.netbeans.modules.jackpot30.impl.indexing.AbstractLuceneIndex.BitSetCollector;
  641.76 -import org.netbeans.modules.jackpot30.impl.indexing.Cache;
  641.77 -import org.netbeans.modules.jackpot30.impl.indexing.FileBasedIndex;
  641.78 -import org.netbeans.modules.java.hints.jackpot.impl.Utilities;
  641.79 -import org.netbeans.modules.java.hints.jackpot.impl.pm.BulkSearch;
  641.80 -import org.netbeans.modules.java.hints.jackpot.impl.pm.BulkSearch.BulkPattern;
  641.81 -import org.netbeans.modules.java.hints.jackpot.spi.HintDescription;
  641.82 -import org.netbeans.modules.java.hints.jackpot.spi.HintDescription.AdditionalQueryConstraints;
  641.83 -import org.netbeans.modules.java.hints.jackpot.spi.PatternConvertor;
  641.84 -import org.netbeans.modules.java.hints.jackpot.spi.Trigger.PatternDescription;
  641.85 -
  641.86 -/**
  641.87 - *
  641.88 - * @author lahvac
  641.89 - */
  641.90 -public class StandaloneFinder {
  641.91 -
  641.92 -    public static Collection<? extends String> findCandidates(File sourceRoot, String pattern) throws IOException {
  641.93 -        BulkPattern bulkPattern = preparePattern(pattern, null);
  641.94 -        
  641.95 -        return FileBasedIndex.get(sourceRoot.toURI().toURL()).findCandidates(bulkPattern);
  641.96 -    }
  641.97 -
  641.98 -    public static int[] findCandidateOccurrenceSpans(File sourceRoot, String relativePath, String pattern) throws IOException {
  641.99 -        BulkPattern bulkPattern = preparePattern(pattern, null);
 641.100 -        CharSequence source = FileBasedIndex.get(sourceRoot.toURI().toURL()).getSourceCode(relativePath).toString().replaceAll("\r\n", "\n");
 641.101 -        JavacTaskImpl jti = prepareJavacTaskImpl();
 641.102 -        CompilationUnitTree cut = jti.parse(new JFOImpl(source)).iterator().next();
 641.103 -        Collection<TreePath> paths = new LinkedList<TreePath>();
 641.104 -        
 641.105 -        for (Collection<TreePath> c : BulkSearch.getDefault().match(null, new TreePath(cut), bulkPattern).values()) {
 641.106 -            paths.addAll(c);
 641.107 -        }
 641.108 -
 641.109 -        Trees t = Trees.instance(jti);
 641.110 -        int[] result = new int[2 * paths.size()];
 641.111 -        int i = 0;
 641.112 -
 641.113 -        for (TreePath tp : paths) {
 641.114 -            result[i++] = (int) t.getSourcePositions().getStartPosition(cut, tp.getLeaf());
 641.115 -            result[i++] = (int) t.getSourcePositions().getEndPosition(cut, tp.getLeaf());
 641.116 -        }
 641.117 -
 641.118 -        return result;
 641.119 -    }
 641.120 -
 641.121 -    public static Collection<Diagnostic<? extends JavaFileObject>> parseAndReportErrors(String pattern) {
 641.122 -        Collection<Diagnostic<? extends JavaFileObject>> errors = new LinkedList<Diagnostic<? extends JavaFileObject>>();
 641.123 -
 641.124 -        preparePattern(pattern, errors);
 641.125 -
 641.126 -        return errors;
 641.127 -    }
 641.128 -
 641.129 -    public static Map<String, Collection<? extends String>> containsHash(File sourceRoot, Iterable<? extends String> hashes) throws IOException {
 641.130 -        File cacheRoot = Cache.findCache(DuplicatesIndex.NAME, DuplicatesIndex.VERSION).findCacheRoot(sourceRoot.toURI().toURL());
 641.131 -        File dir = new File(cacheRoot, "fulltext");
 641.132 -
 641.133 -        if (dir.listFiles() != null && dir.listFiles().length > 0) {
 641.134 -            IndexReader reader = IndexReader.open(FSDirectory.open(dir), true);
 641.135 -            Map<String, Collection<? extends String>> result = new HashMap<String, Collection<? extends String>>();
 641.136 -
 641.137 -            for (String hash : hashes) {
 641.138 -                Collection<String> found = new LinkedList<String>();
 641.139 -                Query query = new TermQuery(new Term("generalized", hash));
 641.140 -                Searcher s = new IndexSearcher(reader);
 641.141 -                BitSet matchingDocuments = new BitSet(reader.maxDoc());
 641.142 -                Collector c = new BitSetCollector(matchingDocuments);
 641.143 -
 641.144 -                s.search(query, c);
 641.145 -
 641.146 -                for (int docNum = matchingDocuments.nextSetBit(0); docNum >= 0; docNum = matchingDocuments.nextSetBit(docNum + 1)) {
 641.147 -                    final Document doc = reader.document(docNum);
 641.148 -
 641.149 -                    found.add(doc.getField("path").stringValue());
 641.150 -                }
 641.151 -
 641.152 -                result.put(hash, found);
 641.153 -            }
 641.154 -            
 641.155 -            return result;
 641.156 -        }
 641.157 -
 641.158 -        return Collections.emptyMap();
 641.159 -    }
 641.160 -    
 641.161 -    private static BulkPattern preparePattern(String pattern, Collection<Diagnostic<? extends JavaFileObject>> errors) {
 641.162 -        return preparePattern(PatternConvertor.create(pattern), errors);
 641.163 -    }
 641.164 -
 641.165 -    //XXX: copied from BatchSearch, may be possible to merge once CompilationInfo is accessible in server mode
 641.166 -    private static BulkPattern preparePattern(final Iterable<? extends HintDescription> patterns, Collection<Diagnostic<? extends JavaFileObject>> errors) {
 641.167 -        JavacTaskImpl javac = prepareJavacTaskImpl();
 641.168 -        Collection<String> code = new LinkedList<String>();
 641.169 -        Collection<Tree> trees = new LinkedList<Tree>();
 641.170 -        Collection<AdditionalQueryConstraints> additionalConstraints = new LinkedList<AdditionalQueryConstraints>();
 641.171 -
 641.172 -        for (HintDescription pattern : patterns) {
 641.173 -            String textPattern = ((PatternDescription) pattern.getTrigger()).getPattern();
 641.174 -
 641.175 -            code.add(textPattern);
 641.176 -            trees.add(Utilities.parseAndAttribute(javac, textPattern, errors));
 641.177 -            additionalConstraints.add(pattern.getAdditionalConstraints());
 641.178 -        }
 641.179 -
 641.180 -        return BulkSearch.getDefault().create(code, trees, additionalConstraints);
 641.181 -    }
 641.182 -
 641.183 -    private static JavacTaskImpl prepareJavacTaskImpl() {
 641.184 -        final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N
 641.185 -        final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
 641.186 -
 641.187 -        assert tool != null;
 641.188 -
 641.189 -        JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, null, Arrays.asList("-bootclasspath",  bootPath, "-Xjcov"), null, Collections.<JavaFileObject>emptyList());
 641.190 -        
 641.191 -        return ct;
 641.192 -    }
 641.193 -
 641.194 -    private static final class JFOImpl extends SimpleJavaFileObject {
 641.195 -        private final CharSequence code;
 641.196 -        public JFOImpl(CharSequence code) {
 641.197 -            super(URI.create(""), Kind.SOURCE);
 641.198 -            this.code = code;
 641.199 -        }
 641.200 -        @Override
 641.201 -        public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException {
 641.202 -            return code;
 641.203 -        }
 641.204 -    }
 641.205 -}
   642.1 --- a/sandbox/old-modules/server/indexer/src/org/netbeans/modules/jackpot30/server/indexer/StandaloneIndexer.java	Mon Dec 19 11:37:36 2016 +0100
   642.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   642.3 @@ -1,169 +0,0 @@
   642.4 -/*
   642.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   642.6 - *
   642.7 - * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
   642.8 - *
   642.9 - * The contents of this file are subject to the terms of either the GNU
  642.10 - * General Public License Version 2 only ("GPL") or the Common
  642.11 - * Development and Distribution License("CDDL") (collectively, the
  642.12 - * "License"). You may not use this file except in compliance with the
  642.13 - * License. You can obtain a copy of the License at
  642.14 - * http://www.netbeans.org/cddl-gplv2.html
  642.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  642.16 - * specific language governing permissions and limitations under the
  642.17 - * License.  When distributing the software, include this License Header
  642.18 - * Notice in each file and include the License file at
  642.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  642.20 - * particular file as subject to the "Classpath" exception as provided
  642.21 - * by Sun in the GPL Version 2 section of the License file that
  642.22 - * accompanied this code. If applicable, add the following below the
  642.23 - * License Header, with the fields enclosed by brackets [] replaced by
  642.24 - * your own identifying information:
  642.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  642.26 - *
  642.27 - * If you wish your version of this file to be governed by only the CDDL
  642.28 - * or only the GPL Version 2, indicate your decision by adding
  642.29 - * "[Contributor] elects to include this software in this distribution
  642.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  642.31 - * single choice of license, a recipient has the option to distribute
  642.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  642.33 - * to extend the choice of license to its licensees as provided above.
  642.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  642.35 - * Version 2 license, then the option applies only if the new code is
  642.36 - * made subject to such option by the copyright holder.
  642.37 - *
  642.38 - * Contributor(s):
  642.39 - *
  642.40 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  642.41 - */
  642.42 -
  642.43 -package org.netbeans.modules.jackpot30.server.indexer;
  642.44 -
  642.45 -import com.sun.source.tree.CompilationUnitTree;
  642.46 -import com.sun.tools.javac.api.JavacTaskImpl;
  642.47 -import java.io.BufferedReader;
  642.48 -import java.io.File;
  642.49 -import java.io.FileReader;
  642.50 -import java.io.IOException;
  642.51 -import java.util.Arrays;
  642.52 -import java.util.Collection;
  642.53 -import java.util.Collections;
  642.54 -import java.util.LinkedList;
  642.55 -import java.util.logging.Level;
  642.56 -import java.util.logging.Logger;
  642.57 -import javax.tools.Diagnostic;
  642.58 -import javax.tools.DiagnosticListener;
  642.59 -import javax.tools.JavaCompiler;
  642.60 -import javax.tools.JavaFileObject;
  642.61 -import javax.tools.StandardJavaFileManager;
  642.62 -import javax.tools.StandardLocation;
  642.63 -import javax.tools.ToolProvider;
  642.64 -import org.netbeans.modules.jackpot30.impl.duplicates.indexing.DuplicatesIndex;
  642.65 -import org.netbeans.modules.jackpot30.impl.indexing.FileBasedIndex;
  642.66 -import org.netbeans.modules.jackpot30.impl.indexing.Index;
  642.67 -import org.netbeans.modules.jackpot30.impl.indexing.Index.IndexWriter;
  642.68 -import org.netbeans.modules.jackpot30.impl.indexing.IndexInfo;
  642.69 -
  642.70 -/**
  642.71 - *
  642.72 - * @author lahvac
  642.73 - */
  642.74 -public class StandaloneIndexer {
  642.75 -
  642.76 -    public static void index(File root, boolean duplicatesIndex, boolean storeSources, String modified, String removed) throws IOException {
  642.77 -        Index index = FileBasedIndex.create(root.toURI().toURL(), storeSources);
  642.78 -        IndexInfo ii = index.getIndexInfo();
  642.79 -        boolean clearIndexing = ii.totalFiles < 0 || ii.majorVersion != FileBasedIndex.MAJOR_VERSION || ii.minorVersion != FileBasedIndex.MINOR_VERSION;
  642.80 -        IndexWriter w = index.openForWriting();
  642.81 -        DuplicatesIndex.IndexWriter dw = duplicatesIndex ? DuplicatesIndex.get(root.toURI().toURL()).openForWriting() : null;
  642.82 -
  642.83 -        try {
  642.84 -            StandaloneIndexer i = new StandaloneIndexer();
  642.85 -
  642.86 -            if (!clearIndexing && modified != null && removed != null) {
  642.87 -                i.doIndex(w, dw, root, modified, removed);
  642.88 -            } else {
  642.89 -                w.clear();
  642.90 -                i.doIndex(w, dw, root);
  642.91 -            }
  642.92 -        } finally {
  642.93 -            w.close();
  642.94 -            if (dw != null) {
  642.95 -                dw.close();
  642.96 -            }
  642.97 -        }
  642.98 -    }
  642.99 -
 642.100 -    private void doIndex(IndexWriter w, DuplicatesIndex.IndexWriter dw, File fileOrDir) throws IOException {
 642.101 -        if (fileOrDir.isDirectory()) {
 642.102 -            for (File f : fileOrDir.listFiles()) {
 642.103 -                doIndex(w, dw, f);
 642.104 -            }
 642.105 -        } else {
 642.106 -            indexFile(w, dw, fileOrDir);
 642.107 -        }
 642.108 -    }
 642.109 -
 642.110 -    private void doIndex(IndexWriter w, DuplicatesIndex.IndexWriter dw, File root, String modified, String removed) throws IOException {
 642.111 -        for (String r : read(removed)) {
 642.112 -            w.remove(r);
 642.113 -            if (dw != null) dw.remove(r);
 642.114 -        }
 642.115 -
 642.116 -        for (String m : read(modified)) {
 642.117 -            indexFile(w, dw, new File(root, m));
 642.118 -        }
 642.119 -    }
 642.120 -
 642.121 -    private void indexFile(IndexWriter w, DuplicatesIndex.IndexWriter dw, File source) throws IOException {
 642.122 -        if (!source.getName().endsWith(".java"))
 642.123 -            return ;
 642.124 -        
 642.125 -        final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N
 642.126 -        final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
 642.127 -        assert tool != null;
 642.128 -
 642.129 -        DiagnosticListener<JavaFileObject> devNull = new DiagnosticListener<JavaFileObject>() {
 642.130 -            public void report(Diagnostic<? extends JavaFileObject> diagnostic) {}
 642.131 -        };
 642.132 -        StandardJavaFileManager m = tool.getStandardFileManager(devNull, null, null);
 642.133 -
 642.134 -        m.setLocation(StandardLocation.CLASS_PATH, Collections.<File>emptyList());
 642.135 -        m.setLocation(StandardLocation.SOURCE_PATH, Collections.<File>emptyList());
 642.136 -        
 642.137 -        Iterable<? extends JavaFileObject> fos = m.getJavaFileObjects(source);
 642.138 -        JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, devNull, Arrays.asList("-bootclasspath",  bootPath), null, fos);
 642.139 -        CompilationUnitTree cut = ct.parse().iterator().next();
 642.140 -
 642.141 -        w.record(source.toURI().toURL(), cut, null);
 642.142 -
 642.143 -        if (dw != null) {
 642.144 -            ct.analyze(ct.enter(Collections.singletonList(cut)));
 642.145 -
 642.146 -            dw.record(ct, source.toURI().toURL(), cut);
 642.147 -        }
 642.148 -    }
 642.149 -
 642.150 -    private static Iterable<? extends String> read(String file) throws IOException {
 642.151 -        Collection<String> result = new LinkedList<String>();
 642.152 -        BufferedReader r = new BufferedReader(new FileReader(file));
 642.153 -
 642.154 -        try {
 642.155 -            String line;
 642.156 -
 642.157 -            while ((line = r.readLine()) != null) {
 642.158 -                if (!line.isEmpty()) {
 642.159 -                    result.add(line);
 642.160 -                }
 642.161 -            }
 642.162 -        } finally {
 642.163 -            try {
 642.164 -                r.close();
 642.165 -            } catch (IOException ex) {
 642.166 -                Logger.getLogger(StandaloneIndexer.class.getName()).log(Level.SEVERE, null, ex);
 642.167 -            }
 642.168 -        }
 642.169 -
 642.170 -        return result;
 642.171 -    }
 642.172 -}
   643.1 --- a/sandbox/old-modules/server/indexer/test/org/netbeans/modules/jackpot30/server/indexer/IndexTest.java	Mon Dec 19 11:37:36 2016 +0100
   643.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   643.3 @@ -1,96 +0,0 @@
   643.4 -/*
   643.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   643.6 - *
   643.7 - * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
   643.8 - *
   643.9 - * The contents of this file are subject to the terms of either the GNU
  643.10 - * General Public License Version 2 only ("GPL") or the Common
  643.11 - * Development and Distribution License("CDDL") (collectively, the
  643.12 - * "License"). You may not use this file except in compliance with the
  643.13 - * License. You can obtain a copy of the License at
  643.14 - * http://www.netbeans.org/cddl-gplv2.html
  643.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  643.16 - * specific language governing permissions and limitations under the
  643.17 - * License.  When distributing the software, include this License Header
  643.18 - * Notice in each file and include the License file at
  643.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  643.20 - * particular file as subject to the "Classpath" exception as provided
  643.21 - * by Sun in the GPL Version 2 section of the License file that
  643.22 - * accompanied this code. If applicable, add the following below the
  643.23 - * License Header, with the fields enclosed by brackets [] replaced by
  643.24 - * your own identifying information:
  643.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  643.26 - *
  643.27 - * If you wish your version of this file to be governed by only the CDDL
  643.28 - * or only the GPL Version 2, indicate your decision by adding
  643.29 - * "[Contributor] elects to include this software in this distribution
  643.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  643.31 - * single choice of license, a recipient has the option to distribute
  643.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  643.33 - * to extend the choice of license to its licensees as provided above.
  643.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  643.35 - * Version 2 license, then the option applies only if the new code is
  643.36 - * made subject to such option by the copyright holder.
  643.37 - *
  643.38 - * Contributor(s):
  643.39 - *
  643.40 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  643.41 - */
  643.42 -
  643.43 -package org.netbeans.modules.jackpot30.server.indexer;
  643.44 -
  643.45 -import java.io.File;
  643.46 -import java.io.IOException;
  643.47 -import junit.framework.TestCase;
  643.48 -
  643.49 -/**
  643.50 - *
  643.51 - * @author lahvac
  643.52 - */
  643.53 -public class IndexTest extends TestCase {
  643.54 -
  643.55 -    public IndexTest(String name) {
  643.56 -        super(name);
  643.57 -    }
  643.58 -
  643.59 -    public void testCmdLine() throws IOException {
  643.60 -        assertCmdLineOk("/foo", false, false, null, null, "/foo", "/cache");
  643.61 -        assertCmdLineOk("/foo", false, false, "/modified.list", "/removed.list", "/foo", "/cache", "/modified.list", "/removed.list");
  643.62 -        assertCmdLineOk("/foo", true, false, null, null, Index.PARAM_CONSTRUCT_DUPLICATES_INDEX, "/foo", "/cache");
  643.63 -        assertCmdLineOk("/foo", true, false, "/modified.list", "/removed.list", Index.PARAM_CONSTRUCT_DUPLICATES_INDEX, "/foo", "/cache", "/modified.list", "/removed.list");
  643.64 -        assertCmdLineOk("/foo", false, true, null, null, Index.PARAM_STORE_SOURCES, "/foo", "/cache");
  643.65 -        assertCmdLineOk("/foo", false, true, "/modified.list", "/removed.list", Index.PARAM_STORE_SOURCES, "/foo", "/cache", "/modified.list", "/removed.list");
  643.66 -        assertCmdLineOk("/foo", true, true, null, null, Index.PARAM_CONSTRUCT_DUPLICATES_INDEX, Index.PARAM_STORE_SOURCES, "/foo", "/cache");
  643.67 -        assertCmdLineOk("/foo", true, true, "/modified.list", "/removed.list", Index.PARAM_CONSTRUCT_DUPLICATES_INDEX, Index.PARAM_STORE_SOURCES, "/foo", "/cache", "/modified.list", "/removed.list");
  643.68 -        assertCmdLineFailed();
  643.69 -        assertCmdLineFailed("/foo");
  643.70 -    }
  643.71 -
  643.72 -    private static void assertCmdLineOk(final String rootGolden, final boolean duplicatesIndexGolden, final boolean storeSourcesGolden, final String modifiedGolden, final String removedGolden, String... cmdLine) throws IOException {
  643.73 -        new Index() {
  643.74 -            @Override
  643.75 -            protected void invokeIndexer(File root, boolean duplicatesIndex, boolean storeSources, String modified, String removed) throws IOException {
  643.76 -                assertEquals(rootGolden, root.getPath());
  643.77 -                assertEquals(duplicatesIndexGolden, duplicatesIndex);
  643.78 -                assertEquals(storeSourcesGolden, storeSources);
  643.79 -                assertEquals(modifiedGolden, modified);
  643.80 -                assertEquals(removedGolden, removed);
  643.81 -            }
  643.82 -            @Override
  643.83 -            protected void printHelp() {
  643.84 -                fail();
  643.85 -            }
  643.86 -        }.index(cmdLine);
  643.87 -    }
  643.88 -
  643.89 -    private static void assertCmdLineFailed(String... cmdLine) throws IOException {
  643.90 -        new Index() {
  643.91 -            @Override
  643.92 -            protected void invokeIndexer(File root, boolean duplicatesIndex, boolean storeSources, String modified, String removed) throws IOException {
  643.93 -                fail();
  643.94 -            }
  643.95 -            @Override
  643.96 -            protected void printHelp() {}
  643.97 -        }.index(cmdLine);
  643.98 -    }
  643.99 -}
 643.100 \ No newline at end of file
   644.1 --- a/sandbox/old-modules/server/indexer/test/org/netbeans/modules/jackpot30/server/indexer/LargeScaleTester.java	Mon Dec 19 11:37:36 2016 +0100
   644.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   644.3 @@ -1,147 +0,0 @@
   644.4 -/*
   644.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   644.6 - *
   644.7 - * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
   644.8 - *
   644.9 - * The contents of this file are subject to the terms of either the GNU
  644.10 - * General Public License Version 2 only ("GPL") or the Common
  644.11 - * Development and Distribution License("CDDL") (collectively, the
  644.12 - * "License"). You may not use this file except in compliance with the
  644.13 - * License. You can obtain a copy of the License at
  644.14 - * http://www.netbeans.org/cddl-gplv2.html
  644.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  644.16 - * specific language governing permissions and limitations under the
  644.17 - * License.  When distributing the software, include this License Header
  644.18 - * Notice in each file and include the License file at
  644.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  644.20 - * particular file as subject to the "Classpath" exception as provided
  644.21 - * by Sun in the GPL Version 2 section of the License file that
  644.22 - * accompanied this code. If applicable, add the following below the
  644.23 - * License Header, with the fields enclosed by brackets [] replaced by
  644.24 - * your own identifying information:
  644.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  644.26 - *
  644.27 - * If you wish your version of this file to be governed by only the CDDL
  644.28 - * or only the GPL Version 2, indicate your decision by adding
  644.29 - * "[Contributor] elects to include this software in this distribution
  644.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  644.31 - * single choice of license, a recipient has the option to distribute
  644.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  644.33 - * to extend the choice of license to its licensees as provided above.
  644.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  644.35 - * Version 2 license, then the option applies only if the new code is
  644.36 - * made subject to such option by the copyright holder.
  644.37 - *
  644.38 - * Contributor(s):
  644.39 - *
  644.40 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  644.41 - */
  644.42 -
  644.43 -package org.netbeans.modules.jackpot30.server.indexer;
  644.44 -
  644.45 -import java.io.File;
  644.46 -import java.io.IOException;
  644.47 -import java.util.logging.Handler;
  644.48 -import java.util.logging.Level;
  644.49 -import java.util.logging.LogRecord;
  644.50 -import java.util.logging.Logger;
  644.51 -import java.util.logging.SimpleFormatter;
  644.52 -import junit.framework.TestCase;
  644.53 -import org.netbeans.modules.jackpot30.impl.indexing.Cache;
  644.54 -import org.netbeans.modules.jackpot30.impl.indexing.FileBasedIndex;
  644.55 -
  644.56 -/**
  644.57 - *
  644.58 - * @author lahvac
  644.59 - */
  644.60 -public class LargeScaleTester extends TestCase {
  644.61 -    
  644.62 -    public LargeScaleTester(String name) {
  644.63 -        super(name);
  644.64 -    }
  644.65 -
  644.66 -    private static final boolean createIndex = true;
  644.67 -
  644.68 -    private File src;
  644.69 -
  644.70 -    public void setUp() throws Exception {
  644.71 -        Logger.getLogger(FileBasedIndex.class.getName()).setLevel(Level.ALL);
  644.72 -        Logger.getLogger(FileBasedIndex.class.getName()).addHandler(new Handler() {
  644.73 -            @Override
  644.74 -            public void publish(LogRecord record) {
  644.75 -                System.err.println(new SimpleFormatter().formatMessage(record));
  644.76 -            }
  644.77 -            @Override
  644.78 -            public void flush() {
  644.79 -                System.err.flush();
  644.80 -            }
  644.81 -            @Override
  644.82 -            public void close() throws SecurityException {}
  644.83 -        });
  644.84 -        
  644.85 -        File source = new File(LargeScaleTester.class.getProtectionDomain().getCodeSource().getLocation().getPath());
  644.86 -        File workingDirectory = new File(new File(source.getParentFile(), "wd"), this.getName());
  644.87 -
  644.88 -        if (createIndex)
  644.89 -            deleteRecursively(workingDirectory);
  644.90 -        
  644.91 -        File cache = new File(workingDirectory, "cache");
  644.92 -        String toIndex = System.getProperty("index-folder");
  644.93 -        
  644.94 -        if (toIndex == null || !(src = new File(toIndex)).isDirectory()) {
  644.95 -            throw new IllegalStateException("Directory to index not correctly specified - add 'test-sys-prop.index-folder=<directory>' to private.properties");
  644.96 -        }
  644.97 -
  644.98 -        Cache.setStandaloneCacheRoot(cache);
  644.99 -
 644.100 -        if (createIndex) {
 644.101 -            long start = System.currentTimeMillis();
 644.102 -            StandaloneIndexer.index(src, false, false, null, null);
 644.103 -            long end = System.currentTimeMillis();
 644.104 -            System.err.println("indexing took: " + (end - start));
 644.105 -            System.err.println("cache size total: " + totalSize(cache) + ", lucene=" + totalSize(new File(cache, "s1/jackpot30/fulltext")));
 644.106 -        }
 644.107 -    }
 644.108 -
 644.109 -    private static void deleteRecursively(File d) throws IOException {
 644.110 -        if (!d.exists()) return;
 644.111 -        
 644.112 -        if (d.isDirectory()) {
 644.113 -            for (File c : d.listFiles()) {
 644.114 -                deleteRecursively(c);
 644.115 -            }
 644.116 -        }
 644.117 -
 644.118 -        if (!d.delete()) throw new IOException();
 644.119 -    }
 644.120 -
 644.121 -    private static long totalSize(File d) throws IOException {
 644.122 -        if (!d.exists()) return 0;
 644.123 -
 644.124 -        if (d.isDirectory()) {
 644.125 -            long total = 0;
 644.126 -
 644.127 -            for (File c : d.listFiles()) {
 644.128 -                total += totalSize(c);
 644.129 -            }
 644.130 -
 644.131 -            return total;
 644.132 -        } else {
 644.133 -            return d.length();
 644.134 -        }
 644.135 -    }
 644.136 -    
 644.137 -    public void testFind() throws Exception {
 644.138 -        performTest("new $type() { $mods$ $resultType $methodName($args$) { $statements$; } }");
 644.139 -        performTest("$1.isDirectory()");
 644.140 -    }
 644.141 -
 644.142 -    private void performTest(String code) throws Exception {
 644.143 -        System.err.println("searching for " + code);
 644.144 -        long start = System.currentTimeMillis();
 644.145 -        System.err.println("Found occurrences: " + StandaloneFinder.findCandidates(src, code).size());
 644.146 -        long end = System.currentTimeMillis();
 644.147 -
 644.148 -        System.err.println("total search time: " + (end - start));
 644.149 -    }
 644.150 -}
   645.1 --- a/sandbox/old-modules/server/indexer/test/org/netbeans/modules/jackpot30/server/indexer/StandaloneFinderTest.java	Mon Dec 19 11:37:36 2016 +0100
   645.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   645.3 @@ -1,154 +0,0 @@
   645.4 -/*
   645.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   645.6 - *
   645.7 - * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
   645.8 - *
   645.9 - * The contents of this file are subject to the terms of either the GNU
  645.10 - * General Public License Version 2 only ("GPL") or the Common
  645.11 - * Development and Distribution License("CDDL") (collectively, the
  645.12 - * "License"). You may not use this file except in compliance with the
  645.13 - * License. You can obtain a copy of the License at
  645.14 - * http://www.netbeans.org/cddl-gplv2.html
  645.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  645.16 - * specific language governing permissions and limitations under the
  645.17 - * License.  When distributing the software, include this License Header
  645.18 - * Notice in each file and include the License file at
  645.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  645.20 - * particular file as subject to the "Classpath" exception as provided
  645.21 - * by Sun in the GPL Version 2 section of the License file that
  645.22 - * accompanied this code. If applicable, add the following below the
  645.23 - * License Header, with the fields enclosed by brackets [] replaced by
  645.24 - * your own identifying information:
  645.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  645.26 - *
  645.27 - * If you wish your version of this file to be governed by only the CDDL
  645.28 - * or only the GPL Version 2, indicate your decision by adding
  645.29 - * "[Contributor] elects to include this software in this distribution
  645.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  645.31 - * single choice of license, a recipient has the option to distribute
  645.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  645.33 - * to extend the choice of license to its licensees as provided above.
  645.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  645.35 - * Version 2 license, then the option applies only if the new code is
  645.36 - * made subject to such option by the copyright holder.
  645.37 - *
  645.38 - * Contributor(s):
  645.39 - *
  645.40 - * Portions Copyrighted 2010 Sun Microsystems, Inc.
  645.41 - */
  645.42 -
  645.43 -package org.netbeans.modules.jackpot30.server.indexer;
  645.44 -
  645.45 -import java.io.ByteArrayInputStream;
  645.46 -import java.io.File;
  645.47 -import java.io.FileOutputStream;
  645.48 -import java.io.IOException;
  645.49 -import java.io.InputStream;
  645.50 -import java.util.ArrayList;
  645.51 -import java.util.Arrays;
  645.52 -import java.util.HashSet;
  645.53 -import java.util.LinkedList;
  645.54 -import java.util.List;
  645.55 -import junit.framework.Assert;
  645.56 -import junit.framework.TestCase;
  645.57 -import org.netbeans.modules.jackpot30.impl.indexing.Cache;
  645.58 -
  645.59 -/**
  645.60 - *
  645.61 - * @author lahvac
  645.62 - */
  645.63 -public class StandaloneFinderTest extends TestCase {
  645.64 -    
  645.65 -    public StandaloneFinderTest(String name) {
  645.66 -        super(name);
  645.67 -    }
  645.68 -
  645.69 -    private File src;
  645.70 -
  645.71 -    public void setUp() throws Exception {
  645.72 -        File source = new File(StandaloneFinderTest.class.getProtectionDomain().getCodeSource().getLocation().getPath());
  645.73 -        File workingDirectory = new File(new File(source.getParentFile(), "wd"), this.getName());
  645.74 -
  645.75 -        deleteRecursively(workingDirectory);
  645.76 -        
  645.77 -        File cache = new File(workingDirectory, "cache");
  645.78 -
  645.79 -        src = new File(workingDirectory, "src");
  645.80 -
  645.81 -        Cache.setStandaloneCacheRoot(cache);
  645.82 -
  645.83 -        copyStringToFile(new File(src, "test/Test1.java"), "package test; public class Test {private void test() { new java.io.File(\"\").isDirectory(); } }");
  645.84 -        copyStringToFile(new File(src, "test/TestLambda.java"), "package test; public class Test1 { private void test() { Runnable r = new Runnable() { public void run() { System.err.println(); } }; } }");
  645.85 -
  645.86 -        StandaloneIndexer.index(src, false, false, null, null);
  645.87 -    }
  645.88 -
  645.89 -    public final static void copyStringToFile (File f, String content) throws Exception {
  645.90 -        f.getParentFile().mkdirs();
  645.91 -
  645.92 -        FileOutputStream os = new FileOutputStream(f);
  645.93 -        InputStream is = new ByteArrayInputStream(content.getBytes("UTF-8"));
  645.94 -        int read;
  645.95 -        while ((read = is.read()) != (-1)) {
  645.96 -            os.write(read);
  645.97 -        }
  645.98 -        os.close ();
  645.99 -        is.close();
 645.100 -    }
 645.101 -
 645.102 -    private static List<Integer> toIntegerList(int[] arr) {
 645.103 -        List<Integer> res = new ArrayList<Integer>(arr.length);
 645.104 -
 645.105 -        for (int e : arr) {
 645.106 -            res.add(e);
 645.107 -        }
 645.108 -
 645.109 -        return res;
 645.110 -    }
 645.111 -
 645.112 -    private static void deleteRecursively(File d) throws IOException {
 645.113 -        if (!d.exists()) return;
 645.114 -        
 645.115 -        if (d.isDirectory()) {
 645.116 -            for (File c : d.listFiles()) {
 645.117 -                deleteRecursively(c);
 645.118 -            }
 645.119 -        }
 645.120 -
 645.121 -        if (!d.delete()) throw new IOException();
 645.122 -    }
 645.123 -    
 645.124 -    public void testFindSpans() throws Exception {
 645.125 -        Assert.assertEquals(Arrays.asList(55, 89), toIntegerList(StandaloneFinder.findCandidateOccurrenceSpans(src, "test/Test1.java", "$1.isDirectory()")));
 645.126 -    }
 645.127 -
 645.128 -    public void testMultiplePatterns() throws Exception {
 645.129 -        String patterns = "$1.isDirectory();; new java.io.File($1);;";
 645.130 -        Assert.assertEquals(Arrays.asList("test/Test1.java"), new LinkedList<String>(StandaloneFinder.findCandidates(src, patterns)));
 645.131 -        Assert.assertEquals(Arrays.asList(55, 75, 55, 89), toIntegerList(StandaloneFinder.findCandidateOccurrenceSpans(src, "test/Test1.java", patterns)));
 645.132 -    }
 645.133 -
 645.134 -    public void testUpdate() throws Exception {
 645.135 -        File modified = new File(src.getParentFile(), "modified");
 645.136 -        File removed  = new File(src.getParentFile(), "removed");
 645.137 -
 645.138 -        copyStringToFile(removed, "test/Test1.java");
 645.139 -        copyStringToFile(modified, "test/Test2.java\ntest/Test3.java");
 645.140 -
 645.141 -        new File(src, "test/Test1.java").delete();
 645.142 -
 645.143 -        copyStringToFile(new File(src, "test/Test2.java"), "package test; public class Test {private void test() { new java.io.File(\"\").isDirectory(); } }");
 645.144 -        copyStringToFile(new File(src, "test/Test3.java"), "package test; public class Test {private void test() { new java.io.File(\"\").isDirectory(); } }");
 645.145 -
 645.146 -        StandaloneIndexer.index(src, false, false, modified.getAbsolutePath(), removed.getAbsolutePath());
 645.147 -
 645.148 -        String patterns = "$1.isDirectory();; new java.io.File($1);;";
 645.149 -        Assert.assertEquals(new HashSet<String>(Arrays.asList("test/Test2.java", "test/Test3.java")), new HashSet<String>(StandaloneFinder.findCandidates(src, patterns)));
 645.150 -    }
 645.151 -    
 645.152 -    public void testLambdaPattern() throws Exception {
 645.153 -        String patterns = "new $type() {\n $mods$ $resultType $methodName($args$) {\n $statements$;\n }\n }\n";
 645.154 -        Assert.assertEquals(Arrays.asList("test/TestLambda.java"), new LinkedList<String>(StandaloneFinder.findCandidates(src, patterns)));
 645.155 -        Assert.assertEquals(Arrays.asList(70, 132), toIntegerList(StandaloneFinder.findCandidateOccurrenceSpans(src, "test/TestLambda.java", patterns)));
 645.156 -    }
 645.157 -}
   646.1 --- a/sandbox/old-modules/server/web.api/build.xml	Mon Dec 19 11:37:36 2016 +0100
   646.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   646.3 @@ -1,75 +0,0 @@
   646.4 -<?xml version="1.0" encoding="UTF-8"?>
   646.5 -<!-- You may freely edit this file. See commented blocks below for -->
   646.6 -<!-- some examples of how to customize the build. -->
   646.7 -<!-- (If you delete it and reopen the project it will be recreated.) -->
   646.8 -<!-- By default, only the Clean and Build commands use this build script. -->
   646.9 -<!-- Commands such as Run, Debug, and Test only use this build script if -->
  646.10 -<!-- the Compile on Save feature is turned off for the project. -->
  646.11 -<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
  646.12 -<!-- in the project's Project Properties dialog box.-->
  646.13 -<project name="web.api" default="default" basedir=".">
  646.14 -    <description>Builds, tests, and runs the project web.api.</description>
  646.15 -    <import file="../download.xml"/>
  646.16 -    <import file="nbproject/build-impl.xml"/>
  646.17 -    <!--
  646.18 -
  646.19 -    There exist several targets which are by default empty and which can be 
  646.20 -    used for execution of your tasks. These targets are usually executed 
  646.21 -    before and after some main targets. They are: 
  646.22 -
  646.23 -      -pre-init:                 called before initialization of project properties
  646.24 -      -post-init:                called after initialization of project properties
  646.25 -      -pre-compile:              called before javac compilation
  646.26 -      -post-compile:             called after javac compilation
  646.27 -      -pre-compile-single:       called before javac compilation of single file
  646.28 -      -post-compile-single:      called after javac compilation of single file
  646.29 -      -pre-compile-test:         called before javac compilation of JUnit tests
  646.30 -      -post-compile-test:        called after javac compilation of JUnit tests
  646.31 -      -pre-compile-test-single:  called before javac compilation of single JUnit test
  646.32 -      -post-compile-test-single: called after javac compilation of single JUunit test
  646.33 -      -pre-jar:                  called before JAR building
  646.34 -      -post-jar:                 called after JAR building
  646.35 -      -post-clean:               called after cleaning build products
  646.36 -
  646.37 -    (Targets beginning with '-' are not intended to be called on their own.)
  646.38 -
  646.39 -    Example of inserting an obfuscator after compilation could look like this:
  646.40 -
  646.41 -        <target name="-post-compile">
  646.42 -            <obfuscate>
  646.43 -                <fileset dir="${build.classes.dir}"/>
  646.44 -            </obfuscate>
  646.45 -        </target>
  646.46 -
  646.47 -    For list of available properties check the imported 
  646.48 -    nbproject/build-impl.xml file. 
  646.49 -
  646.50 -
  646.51 -    Another way to customize the build is by overriding existing main targets.
  646.52 -    The targets of interest are: 
  646.53 -
  646.54 -      -init-macrodef-javac:     defines macro for javac compilation
  646.55 -      -init-macrodef-junit:     defines macro for junit execution
  646.56 -      -init-macrodef-debug:     defines macro for class debugging
  646.57 -      -init-macrodef-java:      defines macro for class execution
  646.58 -      -do-jar-with-manifest:    JAR building (if you are using a manifest)
  646.59 -      -do-jar-without-manifest: JAR building (if you are not using a manifest)
  646.60 -      run:                      execution of project 
  646.61 -      -javadoc-build:           Javadoc generation
  646.62 -      test-report:              JUnit report generation
  646.63 -
  646.64 -    An example of overriding the target for project execution could look like this:
  646.65 -
  646.66 -        <target name="run" depends="web.api-impl.jar">
  646.67 -            <exec dir="bin" executable="launcher.exe">
  646.68 -                <arg file="${dist.jar}"/>
  646.69 -            </exec>
  646.70 -        </target>
  646.71 -
  646.72 -    Notice that the overridden target depends on the jar target and not only on 
  646.73 -    the compile target as the regular run target does. Again, for a list of available 
  646.74 -    properties which you can use, check the target you are overriding in the
  646.75 -    nbproject/build-impl.xml file. 
  646.76 -
  646.77 -    -->
  646.78 -</project>
   647.1 --- a/sandbox/old-modules/server/web.api/manifest.mf	Mon Dec 19 11:37:36 2016 +0100
   647.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   647.3 @@ -1,3 +0,0 @@
   647.4 -Manifest-Version: 1.0
   647.5 -X-COMMENT: Main-Class will be added automatically by build
   647.6 -
   648.1 --- a/sandbox/old-modules/server/web.api/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   648.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   648.3 @@ -1,966 +0,0 @@
   648.4 -<?xml version="1.0" encoding="UTF-8"?>
   648.5 -<!--
   648.6 -*** GENERATED FROM project.xml - DO NOT EDIT  ***
   648.7 -***         EDIT ../build.xml INSTEAD         ***
   648.8 -
   648.9 -For the purpose of easier reading the script
  648.10 -is divided into following sections:
  648.11 -
  648.12 -  - initialization
  648.13 -  - compilation
  648.14 -  - jar
  648.15 -  - execution
  648.16 -  - debugging
  648.17 -  - javadoc
  648.18 -  - junit compilation
  648.19 -  - junit execution
  648.20 -  - junit debugging
  648.21 -  - applet
  648.22 -  - cleanup
  648.23 -
  648.24 -        -->
  648.25 -<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="web.api-impl">
  648.26 -    <fail message="Please build using Ant 1.7.1 or higher.">
  648.27 -        <condition>
  648.28 -            <not>
  648.29 -                <antversion atleast="1.7.1"/>
  648.30 -            </not>
  648.31 -        </condition>
  648.32 -    </fail>
  648.33 -    <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
  648.34 -    <!-- 
  648.35 -                ======================
  648.36 -                INITIALIZATION SECTION 
  648.37 -                ======================
  648.38 -            -->
  648.39 -    <target name="-pre-init">
  648.40 -        <!-- Empty placeholder for easier customization. -->
  648.41 -        <!-- You can override this target in the ../build.xml file. -->
  648.42 -    </target>
  648.43 -    <target depends="-pre-init" name="-init-private">
  648.44 -        <property file="nbproject/private/config.properties"/>
  648.45 -        <property file="nbproject/private/configs/${config}.properties"/>
  648.46 -        <property file="nbproject/private/private.properties"/>
  648.47 -    </target>
  648.48 -    <target name="-pre-init-libraries">
  648.49 -        <property location="../lib/nblibraries.properties" name="libraries.path"/>
  648.50 -        <dirname file="${libraries.path}" property="libraries.dir.nativedirsep"/>
  648.51 -        <pathconvert dirsep="/" property="libraries.dir">
  648.52 -            <path path="${libraries.dir.nativedirsep}"/>
  648.53 -        </pathconvert>
  648.54 -        <basename file="${libraries.path}" property="libraries.basename" suffix=".properties"/>
  648.55 -        <available file="${libraries.dir}/${libraries.basename}-private.properties" property="private.properties.available"/>
  648.56 -    </target>
  648.57 -    <target depends="-pre-init-libraries" if="private.properties.available" name="-init-private-libraries">
  648.58 -        <loadproperties encoding="ISO-8859-1" srcfile="${libraries.dir}/${libraries.basename}-private.properties">
  648.59 -            <filterchain>
  648.60 -                <replacestring from="$${base}" to="${libraries.dir}"/>
  648.61 -                <escapeunicode/>
  648.62 -            </filterchain>
  648.63 -        </loadproperties>
  648.64 -    </target>
  648.65 -    <target depends="-pre-init,-init-private,-init-private-libraries" name="-init-libraries">
  648.66 -        <loadproperties encoding="ISO-8859-1" srcfile="${libraries.path}">
  648.67 -            <filterchain>
  648.68 -                <replacestring from="$${base}" to="${libraries.dir}"/>
  648.69 -                <escapeunicode/>
  648.70 -            </filterchain>
  648.71 -        </loadproperties>
  648.72 -    </target>
  648.73 -    <target depends="-pre-init,-init-private,-init-libraries" name="-init-user">
  648.74 -        <property file="${user.properties.file}"/>
  648.75 -        <!-- The two properties below are usually overridden -->
  648.76 -        <!-- by the active platform. Just a fallback. -->
  648.77 -        <property name="default.javac.source" value="1.4"/>
  648.78 -        <property name="default.javac.target" value="1.4"/>
  648.79 -    </target>
  648.80 -    <target depends="-pre-init,-init-private,-init-libraries,-init-user" name="-init-project">
  648.81 -        <property file="nbproject/configs/${config}.properties"/>
  648.82 -        <property file="nbproject/project.properties"/>
  648.83 -    </target>
  648.84 -    <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-init-macrodef-property" name="-do-init">
  648.85 -        <available file="${manifest.file}" property="manifest.available"/>
  648.86 -        <available file="${application.splash}" property="splashscreen.available"/>
  648.87 -        <condition property="main.class.available">
  648.88 -            <and>
  648.89 -                <isset property="main.class"/>
  648.90 -                <not>
  648.91 -                    <equals arg1="${main.class}" arg2="" trim="true"/>
  648.92 -                </not>
  648.93 -            </and>
  648.94 -        </condition>
  648.95 -        <condition property="manifest.available+main.class">
  648.96 -            <and>
  648.97 -                <isset property="manifest.available"/>
  648.98 -                <isset property="main.class.available"/>
  648.99 -            </and>
 648.100 -        </condition>
 648.101 -        <condition property="do.mkdist">
 648.102 -            <and>
 648.103 -                <isset property="libs.CopyLibs.classpath"/>
 648.104 -                <not>
 648.105 -                    <istrue value="${mkdist.disabled}"/>
 648.106 -                </not>
 648.107 -            </and>
 648.108 -        </condition>
 648.109 -        <condition property="manifest.available+main.class+mkdist.available">
 648.110 -            <and>
 648.111 -                <istrue value="${manifest.available+main.class}"/>
 648.112 -                <isset property="do.mkdist"/>
 648.113 -            </and>
 648.114 -        </condition>
 648.115 -        <condition property="manifest.available+main.class+mkdist.available+splashscreen.available">
 648.116 -            <and>
 648.117 -                <istrue value="${manifest.available+main.class+mkdist.available}"/>
 648.118 -                <istrue value="${splashscreen.available}"/>
 648.119 -            </and>
 648.120 -        </condition>
 648.121 -        <condition property="manifest.available+main.class+mkdist.available+splashscreen.available">
 648.122 -            <and>
 648.123 -                <istrue value="${manifest.available+main.class+mkdist.available}"/>
 648.124 -                <istrue value="${splashscreen.available}"/>
 648.125 -            </and>
 648.126 -        </condition>
 648.127 -        <condition property="manifest.available+mkdist.available">
 648.128 -            <and>
 648.129 -                <istrue value="${manifest.available}"/>
 648.130 -                <isset property="do.mkdist"/>
 648.131 -            </and>
 648.132 -        </condition>
 648.133 -        <condition property="manifest.available-mkdist.available">
 648.134 -            <or>
 648.135 -                <istrue value="${manifest.available}"/>
 648.136 -                <isset property="do.mkdist"/>
 648.137 -            </or>
 648.138 -        </condition>
 648.139 -        <condition property="manifest.available+main.class-mkdist.available">
 648.140 -            <or>
 648.141 -                <istrue value="${manifest.available+main.class}"/>
 648.142 -                <isset property="do.mkdist"/>
 648.143 -            </or>
 648.144 -        </condition>
 648.145 -        <condition property="have.tests">
 648.146 -            <or>
 648.147 -                <available file="${test.src.dir}"/>
 648.148 -            </or>
 648.149 -        </condition>
 648.150 -        <condition property="have.sources">
 648.151 -            <or>
 648.152 -                <available file="${src.dir}"/>
 648.153 -            </or>
 648.154 -        </condition>
 648.155 -        <condition property="netbeans.home+have.tests">
 648.156 -            <and>
 648.157 -                <isset property="netbeans.home"/>
 648.158 -                <isset property="have.tests"/>
 648.159 -            </and>
 648.160 -        </condition>
 648.161 -        <condition property="no.javadoc.preview">
 648.162 -            <and>
 648.163 -                <isset property="javadoc.preview"/>
 648.164 -                <isfalse value="${javadoc.preview}"/>
 648.165 -            </and>
 648.166 -        </condition>
 648.167 -        <property name="run.jvmargs" value=""/>
 648.168 -        <property name="javac.compilerargs" value=""/>
 648.169 -        <property name="work.dir" value="${basedir}"/>
 648.170 -        <condition property="no.deps">
 648.171 -            <and>
 648.172 -                <istrue value="${no.dependencies}"/>
 648.173 -            </and>
 648.174 -        </condition>
 648.175 -        <property name="javac.debug" value="true"/>
 648.176 -        <property name="javadoc.preview" value="true"/>
 648.177 -        <property name="application.args" value=""/>
 648.178 -        <property name="source.encoding" value="${file.encoding}"/>
 648.179 -        <property name="runtime.encoding" value="${source.encoding}"/>
 648.180 -        <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
 648.181 -            <and>
 648.182 -                <isset property="javadoc.encoding"/>
 648.183 -                <not>
 648.184 -                    <equals arg1="${javadoc.encoding}" arg2=""/>
 648.185 -                </not>
 648.186 -            </and>
 648.187 -        </condition>
 648.188 -        <property name="javadoc.encoding.used" value="${source.encoding}"/>
 648.189 -        <property name="includes" value="**"/>
 648.190 -        <property name="excludes" value=""/>
 648.191 -        <property name="do.depend" value="false"/>
 648.192 -        <condition property="do.depend.true">
 648.193 -            <istrue value="${do.depend}"/>
 648.194 -        </condition>
 648.195 -        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
 648.196 -        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
 648.197 -            <length length="0" string="${endorsed.classpath}" when="greater"/>
 648.198 -        </condition>
 648.199 -        <property name="javac.fork" value="false"/>
 648.200 -    </target>
 648.201 -    <target name="-post-init">
 648.202 -        <!-- Empty placeholder for easier customization. -->
 648.203 -        <!-- You can override this target in the ../build.xml file. -->
 648.204 -    </target>
 648.205 -    <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init" name="-init-check">
 648.206 -        <fail unless="src.dir">Must set src.dir</fail>
 648.207 -        <fail unless="test.src.dir">Must set test.src.dir</fail>
 648.208 -        <fail unless="build.dir">Must set build.dir</fail>
 648.209 -        <fail unless="dist.dir">Must set dist.dir</fail>
 648.210 -        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
 648.211 -        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
 648.212 -        <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
 648.213 -        <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
 648.214 -        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
 648.215 -        <fail unless="dist.jar">Must set dist.jar</fail>
 648.216 -    </target>
 648.217 -    <target name="-init-macrodef-property">
 648.218 -        <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
 648.219 -            <attribute name="name"/>
 648.220 -            <attribute name="value"/>
 648.221 -            <sequential>
 648.222 -                <property name="@{name}" value="${@{value}}"/>
 648.223 -            </sequential>
 648.224 -        </macrodef>
 648.225 -    </target>
 648.226 -    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
 648.227 -        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
 648.228 -            <attribute default="${src.dir}" name="srcdir"/>
 648.229 -            <attribute default="${build.classes.dir}" name="destdir"/>
 648.230 -            <attribute default="${javac.classpath}" name="classpath"/>
 648.231 -            <attribute default="${javac.processorpath}" name="processorpath"/>
 648.232 -            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
 648.233 -            <attribute default="${includes}" name="includes"/>
 648.234 -            <attribute default="${excludes}" name="excludes"/>
 648.235 -            <attribute default="${javac.debug}" name="debug"/>
 648.236 -            <attribute default="${empty.dir}" name="sourcepath"/>
 648.237 -            <attribute default="${empty.dir}" name="gensrcdir"/>
 648.238 -            <element name="customize" optional="true"/>
 648.239 -            <sequential>
 648.240 -                <property location="${build.dir}/empty" name="empty.dir"/>
 648.241 -                <mkdir dir="${empty.dir}"/>
 648.242 -                <mkdir dir="@{apgeneratedsrcdir}"/>
 648.243 -                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
 648.244 -                    <src>
 648.245 -                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
 648.246 -                            <include name="*"/>
 648.247 -                        </dirset>
 648.248 -                    </src>
 648.249 -                    <classpath>
 648.250 -                        <path path="@{classpath}"/>
 648.251 -                    </classpath>
 648.252 -                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
 648.253 -                    <compilerarg line="${javac.compilerargs}"/>
 648.254 -                    <compilerarg value="-processorpath"/>
 648.255 -                    <compilerarg path="@{processorpath}"/>
 648.256 -                    <compilerarg line="${ap.processors.internal}"/>
 648.257 -                    <compilerarg value="-s"/>
 648.258 -                    <compilerarg path="@{apgeneratedsrcdir}"/>
 648.259 -                    <compilerarg line="${ap.proc.none.internal}"/>
 648.260 -                    <customize/>
 648.261 -                </javac>
 648.262 -            </sequential>
 648.263 -        </macrodef>
 648.264 -    </target>
 648.265 -    <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
 648.266 -        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
 648.267 -            <attribute default="${src.dir}" name="srcdir"/>
 648.268 -            <attribute default="${build.classes.dir}" name="destdir"/>
 648.269 -            <attribute default="${javac.classpath}" name="classpath"/>
 648.270 -            <attribute default="${javac.processorpath}" name="processorpath"/>
 648.271 -            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
 648.272 -            <attribute default="${includes}" name="includes"/>
 648.273 -            <attribute default="${excludes}" name="excludes"/>
 648.274 -            <attribute default="${javac.debug}" name="debug"/>
 648.275 -            <attribute default="${empty.dir}" name="sourcepath"/>
 648.276 -            <attribute default="${empty.dir}" name="gensrcdir"/>
 648.277 -            <element name="customize" optional="true"/>
 648.278 -            <sequential>
 648.279 -                <property location="${build.dir}/empty" name="empty.dir"/>
 648.280 -                <mkdir dir="${empty.dir}"/>
 648.281 -                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
 648.282 -                    <src>
 648.283 -                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
 648.284 -                            <include name="*"/>
 648.285 -                        </dirset>
 648.286 -                    </src>
 648.287 -                    <classpath>
 648.288 -                        <path path="@{classpath}"/>
 648.289 -                    </classpath>
 648.290 -                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
 648.291 -                    <compilerarg line="${javac.compilerargs}"/>
 648.292 -                    <customize/>
 648.293 -                </javac>
 648.294 -            </sequential>
 648.295 -        </macrodef>
 648.296 -    </target>
 648.297 -    <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
 648.298 -        <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
 648.299 -            <attribute default="${src.dir}" name="srcdir"/>
 648.300 -            <attribute default="${build.classes.dir}" name="destdir"/>
 648.301 -            <attribute default="${javac.classpath}" name="classpath"/>
 648.302 -            <sequential>
 648.303 -                <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
 648.304 -                    <classpath>
 648.305 -                        <path path="@{classpath}"/>
 648.306 -                    </classpath>
 648.307 -                </depend>
 648.308 -            </sequential>
 648.309 -        </macrodef>
 648.310 -        <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
 648.311 -            <attribute default="${build.classes.dir}" name="destdir"/>
 648.312 -            <sequential>
 648.313 -                <fail unless="javac.includes">Must set javac.includes</fail>
 648.314 -                <pathconvert pathsep="," property="javac.includes.binary">
 648.315 -                    <path>
 648.316 -                        <filelist dir="@{destdir}" files="${javac.includes}"/>
 648.317 -                    </path>
 648.318 -                    <globmapper from="*.java" to="*.class"/>
 648.319 -                </pathconvert>
 648.320 -                <delete>
 648.321 -                    <files includes="${javac.includes.binary}"/>
 648.322 -                </delete>
 648.323 -            </sequential>
 648.324 -        </macrodef>
 648.325 -    </target>
 648.326 -    <target name="-init-macrodef-junit">
 648.327 -        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
 648.328 -            <attribute default="${includes}" name="includes"/>
 648.329 -            <attribute default="${excludes}" name="excludes"/>
 648.330 -            <attribute default="**" name="testincludes"/>
 648.331 -            <sequential>
 648.332 -                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
 648.333 -                    <batchtest todir="${build.test.results.dir}">
 648.334 -                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
 648.335 -                            <filename name="@{testincludes}"/>
 648.336 -                        </fileset>
 648.337 -                    </batchtest>
 648.338 -                    <classpath>
 648.339 -                        <path path="${run.test.classpath}"/>
 648.340 -                    </classpath>
 648.341 -                    <syspropertyset>
 648.342 -                        <propertyref prefix="test-sys-prop."/>
 648.343 -                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
 648.344 -                    </syspropertyset>
 648.345 -                    <formatter type="brief" usefile="false"/>
 648.346 -                    <formatter type="xml"/>
 648.347 -                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
 648.348 -                    <jvmarg line="${run.jvmargs}"/>
 648.349 -                </junit>
 648.350 -            </sequential>
 648.351 -        </macrodef>
 648.352 -    </target>
 648.353 -    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
 648.354 -        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
 648.355 -            <attribute default="${main.class}" name="name"/>
 648.356 -            <attribute default="${debug.classpath}" name="classpath"/>
 648.357 -            <attribute default="" name="stopclassname"/>
 648.358 -            <sequential>
 648.359 -                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
 648.360 -                    <classpath>
 648.361 -                        <path path="@{classpath}"/>
 648.362 -                    </classpath>
 648.363 -                </nbjpdastart>
 648.364 -            </sequential>
 648.365 -        </macrodef>
 648.366 -        <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
 648.367 -            <attribute default="${build.classes.dir}" name="dir"/>
 648.368 -            <sequential>
 648.369 -                <nbjpdareload>
 648.370 -                    <fileset dir="@{dir}" includes="${fix.classes}">
 648.371 -                        <include name="${fix.includes}*.class"/>
 648.372 -                    </fileset>
 648.373 -                </nbjpdareload>
 648.374 -            </sequential>
 648.375 -        </macrodef>
 648.376 -    </target>
 648.377 -    <target name="-init-debug-args">
 648.378 -        <property name="version-output" value="java version &quot;${ant.java.version}"/>
 648.379 -        <condition property="have-jdk-older-than-1.4">
 648.380 -            <or>
 648.381 -                <contains string="${version-output}" substring="java version &quot;1.0"/>
 648.382 -                <contains string="${version-output}" substring="java version &quot;1.1"/>
 648.383 -                <contains string="${version-output}" substring="java version &quot;1.2"/>
 648.384 -                <contains string="${version-output}" substring="java version &quot;1.3"/>
 648.385 -            </or>
 648.386 -        </condition>
 648.387 -        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
 648.388 -            <istrue value="${have-jdk-older-than-1.4}"/>
 648.389 -        </condition>
 648.390 -        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
 648.391 -            <os family="windows"/>
 648.392 -        </condition>
 648.393 -        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
 648.394 -            <isset property="debug.transport"/>
 648.395 -        </condition>
 648.396 -    </target>
 648.397 -    <target depends="-init-debug-args" name="-init-macrodef-debug">
 648.398 -        <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
 648.399 -            <attribute default="${main.class}" name="classname"/>
 648.400 -            <attribute default="${debug.classpath}" name="classpath"/>
 648.401 -            <element name="customize" optional="true"/>
 648.402 -            <sequential>
 648.403 -                <java classname="@{classname}" dir="${work.dir}" fork="true">
 648.404 -                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
 648.405 -                    <jvmarg line="${debug-args-line}"/>
 648.406 -                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
 648.407 -                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
 648.408 -                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
 648.409 -                    <jvmarg line="${run.jvmargs}"/>
 648.410 -                    <classpath>
 648.411 -                        <path path="@{classpath}"/>
 648.412 -                    </classpath>
 648.413 -                    <syspropertyset>
 648.414 -                        <propertyref prefix="run-sys-prop."/>
 648.415 -                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
 648.416 -                    </syspropertyset>
 648.417 -                    <customize/>
 648.418 -                </java>
 648.419 -            </sequential>
 648.420 -        </macrodef>
 648.421 -    </target>
 648.422 -    <target name="-init-macrodef-java">
 648.423 -        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
 648.424 -            <attribute default="${main.class}" name="classname"/>
 648.425 -            <attribute default="${run.classpath}" name="classpath"/>
 648.426 -            <element name="customize" optional="true"/>
 648.427 -            <sequential>
 648.428 -                <java classname="@{classname}" dir="${work.dir}" fork="true">
 648.429 -                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
 648.430 -                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
 648.431 -                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
 648.432 -                    <jvmarg line="${run.jvmargs}"/>
 648.433 -                    <classpath>
 648.434 -                        <path path="@{classpath}"/>
 648.435 -                    </classpath>
 648.436 -                    <syspropertyset>
 648.437 -                        <propertyref prefix="run-sys-prop."/>
 648.438 -                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
 648.439 -                    </syspropertyset>
 648.440 -                    <customize/>
 648.441 -                </java>
 648.442 -            </sequential>
 648.443 -        </macrodef>
 648.444 -    </target>
 648.445 -    <target name="-init-presetdef-jar">
 648.446 -        <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
 648.447 -            <jar compress="${jar.compress}" jarfile="${dist.jar}">
 648.448 -                <j2seproject1:fileset dir="${build.classes.dir}"/>
 648.449 -            </jar>
 648.450 -        </presetdef>
 648.451 -    </target>
 648.452 -    <target name="-init-ap-cmdline-properties">
 648.453 -        <property name="annotation.processing.enabled" value="true"/>
 648.454 -        <property name="annotation.processing.processors.list" value=""/>
 648.455 -        <property name="annotation.processing.run.all.processors" value="true"/>
 648.456 -        <property name="javac.processorpath" value="${javac.classpath}"/>
 648.457 -        <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
 648.458 -        <condition property="ap.supported.internal" value="true">
 648.459 -            <not>
 648.460 -                <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
 648.461 -            </not>
 648.462 -        </condition>
 648.463 -    </target>
 648.464 -    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
 648.465 -        <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
 648.466 -            <isfalse value="${annotation.processing.run.all.processors}"/>
 648.467 -        </condition>
 648.468 -        <condition else="" property="ap.proc.none.internal" value="-proc:none">
 648.469 -            <isfalse value="${annotation.processing.enabled}"/>
 648.470 -        </condition>
 648.471 -    </target>
 648.472 -    <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
 648.473 -        <property name="ap.cmd.line.internal" value=""/>
 648.474 -    </target>
 648.475 -    <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
 648.476 -    <!--
 648.477 -                ===================
 648.478 -                COMPILATION SECTION
 648.479 -                ===================
 648.480 -            -->
 648.481 -    <target name="-deps-jar-init" unless="built-jar.properties">
 648.482 -        <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
 648.483 -        <delete file="${built-jar.properties}" quiet="true"/>
 648.484 -    </target>
 648.485 -    <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
 648.486 -        <echo level="warn" message="Cycle detected: web.api was already built"/>
 648.487 -    </target>
 648.488 -    <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
 648.489 -        <mkdir dir="${build.dir}"/>
 648.490 -        <touch file="${built-jar.properties}" verbose="false"/>
 648.491 -        <property file="${built-jar.properties}" prefix="already.built.jar."/>
 648.492 -        <antcall target="-warn-already-built-jar"/>
 648.493 -        <propertyfile file="${built-jar.properties}">
 648.494 -            <entry key="${basedir}" value=""/>
 648.495 -        </propertyfile>
 648.496 -        <antcall target="-maybe-call-dep">
 648.497 -            <param name="call.built.properties" value="${built-jar.properties}"/>
 648.498 -            <param location="${project.indexer}" name="call.subproject"/>
 648.499 -            <param location="${project.indexer}/build.xml" name="call.script"/>
 648.500 -            <param name="call.target" value="jar"/>
 648.501 -            <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
 648.502 -        </antcall>
 648.503 -        <antcall target="-maybe-call-dep">
 648.504 -            <param name="call.built.properties" value="${built-jar.properties}"/>
 648.505 -            <param location="${project.org_netbeans_modules_jackpot30_api}" name="call.subproject"/>
 648.506 -            <param location="${project.org_netbeans_modules_jackpot30_api}/build.xml" name="call.script"/>
 648.507 -            <param name="call.target" value="netbeans"/>
 648.508 -            <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
 648.509 -        </antcall>
 648.510 -    </target>
 648.511 -    <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
 648.512 -    <target depends="init" name="-check-automatic-build">
 648.513 -        <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
 648.514 -    </target>
 648.515 -    <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
 648.516 -        <antcall target="clean"/>
 648.517 -    </target>
 648.518 -    <target depends="init,deps-jar" name="-pre-pre-compile">
 648.519 -        <mkdir dir="${build.classes.dir}"/>
 648.520 -    </target>
 648.521 -    <target name="-pre-compile">
 648.522 -        <!-- Empty placeholder for easier customization. -->
 648.523 -        <!-- You can override this target in the ../build.xml file. -->
 648.524 -    </target>
 648.525 -    <target if="do.depend.true" name="-compile-depend">
 648.526 -        <pathconvert property="build.generated.subdirs">
 648.527 -            <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
 648.528 -                <include name="*"/>
 648.529 -            </dirset>
 648.530 -        </pathconvert>
 648.531 -        <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
 648.532 -    </target>
 648.533 -    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
 648.534 -        <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
 648.535 -        <copy todir="${build.classes.dir}">
 648.536 -            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
 648.537 -        </copy>
 648.538 -    </target>
 648.539 -    <target name="-post-compile">
 648.540 -        <!-- Empty placeholder for easier customization. -->
 648.541 -        <!-- You can override this target in the ../build.xml file. -->
 648.542 -    </target>
 648.543 -    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
 648.544 -    <target name="-pre-compile-single">
 648.545 -        <!-- Empty placeholder for easier customization. -->
 648.546 -        <!-- You can override this target in the ../build.xml file. -->
 648.547 -    </target>
 648.548 -    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
 648.549 -        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
 648.550 -        <j2seproject3:force-recompile/>
 648.551 -        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
 648.552 -    </target>
 648.553 -    <target name="-post-compile-single">
 648.554 -        <!-- Empty placeholder for easier customization. -->
 648.555 -        <!-- You can override this target in the ../build.xml file. -->
 648.556 -    </target>
 648.557 -    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
 648.558 -    <!--
 648.559 -                ====================
 648.560 -                JAR BUILDING SECTION
 648.561 -                ====================
 648.562 -            -->
 648.563 -    <target depends="init" name="-pre-pre-jar">
 648.564 -        <dirname file="${dist.jar}" property="dist.jar.dir"/>
 648.565 -        <mkdir dir="${dist.jar.dir}"/>
 648.566 -    </target>
 648.567 -    <target name="-pre-jar">
 648.568 -        <!-- Empty placeholder for easier customization. -->
 648.569 -        <!-- You can override this target in the ../build.xml file. -->
 648.570 -    </target>
 648.571 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
 648.572 -        <j2seproject1:jar/>
 648.573 -    </target>
 648.574 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
 648.575 -        <j2seproject1:jar manifest="${manifest.file}"/>
 648.576 -    </target>
 648.577 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
 648.578 -        <j2seproject1:jar manifest="${manifest.file}">
 648.579 -            <j2seproject1:manifest>
 648.580 -                <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
 648.581 -            </j2seproject1:manifest>
 648.582 -        </j2seproject1:jar>
 648.583 -        <echo>To run this application from the command line without Ant, try:</echo>
 648.584 -        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
 648.585 -        <property location="${dist.jar}" name="dist.jar.resolved"/>
 648.586 -        <pathconvert property="run.classpath.with.dist.jar">
 648.587 -            <path path="${run.classpath}"/>
 648.588 -            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
 648.589 -        </pathconvert>
 648.590 -        <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
 648.591 -    </target>
 648.592 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available+splashscreen.available" name="-do-jar-with-libraries-and-splashscreen">
 648.593 -        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
 648.594 -        <pathconvert property="run.classpath.without.build.classes.dir">
 648.595 -            <path path="${run.classpath}"/>
 648.596 -            <map from="${build.classes.dir.resolved}" to=""/>
 648.597 -        </pathconvert>
 648.598 -        <pathconvert pathsep=" " property="jar.classpath">
 648.599 -            <path path="${run.classpath.without.build.classes.dir}"/>
 648.600 -            <chainedmapper>
 648.601 -                <flattenmapper/>
 648.602 -                <globmapper from="*" to="lib/*"/>
 648.603 -            </chainedmapper>
 648.604 -        </pathconvert>
 648.605 -        <basename file="${application.splash}" property="splashscreen.basename"/>
 648.606 -        <mkdir dir="${build.classes.dir}/META-INF"/>
 648.607 -        <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
 648.608 -        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
 648.609 -        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
 648.610 -            <fileset dir="${build.classes.dir}"/>
 648.611 -            <manifest>
 648.612 -                <attribute name="Main-Class" value="${main.class}"/>
 648.613 -                <attribute name="Class-Path" value="${jar.classpath}"/>
 648.614 -                <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
 648.615 -            </manifest>
 648.616 -        </copylibs>
 648.617 -        <echo>To run this application from the command line without Ant, try:</echo>
 648.618 -        <property location="${dist.jar}" name="dist.jar.resolved"/>
 648.619 -        <echo>java -jar "${dist.jar.resolved}"</echo>
 648.620 -    </target>
 648.621 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries" unless="splashscreen.available">
 648.622 -        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
 648.623 -        <pathconvert property="run.classpath.without.build.classes.dir">
 648.624 -            <path path="${run.classpath}"/>
 648.625 -            <map from="${build.classes.dir.resolved}" to=""/>
 648.626 -        </pathconvert>
 648.627 -        <pathconvert pathsep=" " property="jar.classpath">
 648.628 -            <path path="${run.classpath.without.build.classes.dir}"/>
 648.629 -            <chainedmapper>
 648.630 -                <flattenmapper/>
 648.631 -                <globmapper from="*" to="lib/*"/>
 648.632 -            </chainedmapper>
 648.633 -        </pathconvert>
 648.634 -        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
 648.635 -        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
 648.636 -            <fileset dir="${build.classes.dir}"/>
 648.637 -            <manifest>
 648.638 -                <attribute name="Main-Class" value="${main.class}"/>
 648.639 -                <attribute name="Class-Path" value="${jar.classpath}"/>
 648.640 -            </manifest>
 648.641 -        </copylibs>
 648.642 -        <echo>To run this application from the command line without Ant, try:</echo>
 648.643 -        <property location="${dist.jar}" name="dist.jar.resolved"/>
 648.644 -        <echo>java -jar "${dist.jar.resolved}"</echo>
 648.645 -    </target>
 648.646 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+mkdist.available" name="-do-jar-with-libraries-without-mainclass" unless="main.class.available">
 648.647 -        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
 648.648 -        <pathconvert property="run.classpath.without.build.classes.dir">
 648.649 -            <path path="${run.classpath}"/>
 648.650 -            <map from="${build.classes.dir.resolved}" to=""/>
 648.651 -        </pathconvert>
 648.652 -        <pathconvert pathsep=" " property="jar.classpath">
 648.653 -            <path path="${run.classpath.without.build.classes.dir}"/>
 648.654 -            <chainedmapper>
 648.655 -                <flattenmapper/>
 648.656 -                <globmapper from="*" to="lib/*"/>
 648.657 -            </chainedmapper>
 648.658 -        </pathconvert>
 648.659 -        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
 648.660 -        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
 648.661 -            <fileset dir="${build.classes.dir}"/>
 648.662 -            <manifest>
 648.663 -                <attribute name="Class-Path" value="${jar.classpath}"/>
 648.664 -            </manifest>
 648.665 -        </copylibs>
 648.666 -    </target>
 648.667 -    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">
 648.668 -        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
 648.669 -        <pathconvert property="run.classpath.without.build.classes.dir">
 648.670 -            <path path="${run.classpath}"/>
 648.671 -            <map from="${build.classes.dir.resolved}" to=""/>
 648.672 -        </pathconvert>
 648.673 -        <pathconvert pathsep=" " property="jar.classpath">
 648.674 -            <path path="${run.classpath.without.build.classes.dir}"/>
 648.675 -            <chainedmapper>
 648.676 -                <flattenmapper/>
 648.677 -                <globmapper from="*" to="lib/*"/>
 648.678 -            </chainedmapper>
 648.679 -        </pathconvert>
 648.680 -        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
 648.681 -        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
 648.682 -            <fileset dir="${build.classes.dir}"/>
 648.683 -            <manifest>
 648.684 -                <attribute name="Class-Path" value="${jar.classpath}"/>
 648.685 -            </manifest>
 648.686 -        </copylibs>
 648.687 -    </target>
 648.688 -    <target name="-post-jar">
 648.689 -        <!-- Empty placeholder for easier customization. -->
 648.690 -        <!-- You can override this target in the ../build.xml file. -->
 648.691 -    </target>
 648.692 -    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries-and-splashscreen,-do-jar-with-libraries,-do-jar-with-libraries-without-mainclass,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
 648.693 -    <!--
 648.694 -                =================
 648.695 -                EXECUTION SECTION
 648.696 -                =================
 648.697 -            -->
 648.698 -    <target depends="init,compile" description="Run a main class." name="run">
 648.699 -        <j2seproject1:java>
 648.700 -            <customize>
 648.701 -                <arg line="${application.args}"/>
 648.702 -            </customize>
 648.703 -        </j2seproject1:java>
 648.704 -    </target>
 648.705 -    <target name="-do-not-recompile">
 648.706 -        <property name="javac.includes.binary" value=""/>
 648.707 -    </target>
 648.708 -    <target depends="init,compile-single" name="run-single">
 648.709 -        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
 648.710 -        <j2seproject1:java classname="${run.class}"/>
 648.711 -    </target>
 648.712 -    <target depends="init,compile-test-single" name="run-test-with-main">
 648.713 -        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
 648.714 -        <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
 648.715 -    </target>
 648.716 -    <!--
 648.717 -                =================
 648.718 -                DEBUGGING SECTION
 648.719 -                =================
 648.720 -            -->
 648.721 -    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
 648.722 -        <j2seproject1:nbjpdastart name="${debug.class}"/>
 648.723 -    </target>
 648.724 -    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
 648.725 -        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
 648.726 -    </target>
 648.727 -    <target depends="init,compile" name="-debug-start-debuggee">
 648.728 -        <j2seproject3:debug>
 648.729 -            <customize>
 648.730 -                <arg line="${application.args}"/>
 648.731 -            </customize>
 648.732 -        </j2seproject3:debug>
 648.733 -    </target>
 648.734 -    <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
 648.735 -    <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
 648.736 -        <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
 648.737 -    </target>
 648.738 -    <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
 648.739 -    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
 648.740 -        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
 648.741 -        <j2seproject3:debug classname="${debug.class}"/>
 648.742 -    </target>
 648.743 -    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
 648.744 -    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
 648.745 -        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
 648.746 -        <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
 648.747 -    </target>
 648.748 -    <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
 648.749 -    <target depends="init" name="-pre-debug-fix">
 648.750 -        <fail unless="fix.includes">Must set fix.includes</fail>
 648.751 -        <property name="javac.includes" value="${fix.includes}.java"/>
 648.752 -    </target>
 648.753 -    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
 648.754 -        <j2seproject1:nbjpdareload/>
 648.755 -    </target>
 648.756 -    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
 648.757 -    <!--
 648.758 -                ===============
 648.759 -                JAVADOC SECTION
 648.760 -                ===============
 648.761 -            -->
 648.762 -    <target depends="init" if="have.sources" name="-javadoc-build">
 648.763 -        <mkdir dir="${dist.javadoc.dir}"/>
 648.764 -        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
 648.765 -            <classpath>
 648.766 -                <path path="${javac.classpath}"/>
 648.767 -            </classpath>
 648.768 -            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
 648.769 -                <filename name="**/*.java"/>
 648.770 -            </fileset>
 648.771 -            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
 648.772 -                <include name="**/*.java"/>
 648.773 -            </fileset>
 648.774 -        </javadoc>
 648.775 -    </target>
 648.776 -    <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
 648.777 -        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
 648.778 -    </target>
 648.779 -    <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
 648.780 -    <!--
 648.781 -                =========================
 648.782 -                JUNIT COMPILATION SECTION
 648.783 -                =========================
 648.784 -            -->
 648.785 -    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
 648.786 -        <mkdir dir="${build.test.classes.dir}"/>
 648.787 -    </target>
 648.788 -    <target name="-pre-compile-test">
 648.789 -        <!-- Empty placeholder for easier customization. -->
 648.790 -        <!-- You can override this target in the ../build.xml file. -->
 648.791 -    </target>
 648.792 -    <target if="do.depend.true" name="-compile-test-depend">
 648.793 -        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
 648.794 -    </target>
 648.795 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
 648.796 -        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
 648.797 -        <copy todir="${build.test.classes.dir}">
 648.798 -            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
 648.799 -        </copy>
 648.800 -    </target>
 648.801 -    <target name="-post-compile-test">
 648.802 -        <!-- Empty placeholder for easier customization. -->
 648.803 -        <!-- You can override this target in the ../build.xml file. -->
 648.804 -    </target>
 648.805 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
 648.806 -    <target name="-pre-compile-test-single">
 648.807 -        <!-- Empty placeholder for easier customization. -->
 648.808 -        <!-- You can override this target in the ../build.xml file. -->
 648.809 -    </target>
 648.810 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
 648.811 -        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
 648.812 -        <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
 648.813 -        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
 648.814 -        <copy todir="${build.test.classes.dir}">
 648.815 -            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
 648.816 -        </copy>
 648.817 -    </target>
 648.818 -    <target name="-post-compile-test-single">
 648.819 -        <!-- Empty placeholder for easier customization. -->
 648.820 -        <!-- You can override this target in the ../build.xml file. -->
 648.821 -    </target>
 648.822 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
 648.823 -    <!--
 648.824 -                =======================
 648.825 -                JUNIT EXECUTION SECTION
 648.826 -                =======================
 648.827 -            -->
 648.828 -    <target depends="init" if="have.tests" name="-pre-test-run">
 648.829 -        <mkdir dir="${build.test.results.dir}"/>
 648.830 -    </target>
 648.831 -    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
 648.832 -        <j2seproject3:junit testincludes="**/*Test.java"/>
 648.833 -    </target>
 648.834 -    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
 648.835 -        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
 648.836 -    </target>
 648.837 -    <target depends="init" if="have.tests" name="test-report"/>
 648.838 -    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
 648.839 -    <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
 648.840 -    <target depends="init" if="have.tests" name="-pre-test-run-single">
 648.841 -        <mkdir dir="${build.test.results.dir}"/>
 648.842 -    </target>
 648.843 -    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
 648.844 -        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
 648.845 -        <j2seproject3:junit excludes="" includes="${test.includes}"/>
 648.846 -    </target>
 648.847 -    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
 648.848 -        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
 648.849 -    </target>
 648.850 -    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
 648.851 -    <!--
 648.852 -                =======================
 648.853 -                JUNIT DEBUGGING SECTION
 648.854 -                =======================
 648.855 -            -->
 648.856 -    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
 648.857 -        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
 648.858 -        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
 648.859 -        <delete file="${test.report.file}"/>
 648.860 -        <mkdir dir="${build.test.results.dir}"/>
 648.861 -        <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
 648.862 -            <customize>
 648.863 -                <syspropertyset>
 648.864 -                    <propertyref prefix="test-sys-prop."/>
 648.865 -                    <mapper from="test-sys-prop.*" to="*" type="glob"/>
 648.866 -                </syspropertyset>
 648.867 -                <arg value="${test.class}"/>
 648.868 -                <arg value="showoutput=true"/>
 648.869 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
 648.870 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
 648.871 -            </customize>
 648.872 -        </j2seproject3:debug>
 648.873 -    </target>
 648.874 -    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
 648.875 -        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
 648.876 -    </target>
 648.877 -    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
 648.878 -    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
 648.879 -        <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
 648.880 -    </target>
 648.881 -    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
 648.882 -    <!--
 648.883 -                =========================
 648.884 -                APPLET EXECUTION SECTION
 648.885 -                =========================
 648.886 -            -->
 648.887 -    <target depends="init,compile-single" name="run-applet">
 648.888 -        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
 648.889 -        <j2seproject1:java classname="sun.applet.AppletViewer">
 648.890 -            <customize>
 648.891 -                <arg value="${applet.url}"/>
 648.892 -            </customize>
 648.893 -        </j2seproject1:java>
 648.894 -    </target>
 648.895 -    <!--
 648.896 -                =========================
 648.897 -                APPLET DEBUGGING  SECTION
 648.898 -                =========================
 648.899 -            -->
 648.900 -    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
 648.901 -        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
 648.902 -        <j2seproject3:debug classname="sun.applet.AppletViewer">
 648.903 -            <customize>
 648.904 -                <arg value="${applet.url}"/>
 648.905 -            </customize>
 648.906 -        </j2seproject3:debug>
 648.907 -    </target>
 648.908 -    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
 648.909 -    <!--
 648.910 -                ===============
 648.911 -                CLEANUP SECTION
 648.912 -                ===============
 648.913 -            -->
 648.914 -    <target name="-deps-clean-init" unless="built-clean.properties">
 648.915 -        <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
 648.916 -        <delete file="${built-clean.properties}" quiet="true"/>
 648.917 -    </target>
 648.918 -    <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
 648.919 -        <echo level="warn" message="Cycle detected: web.api was already built"/>
 648.920 -    </target>
 648.921 -    <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
 648.922 -        <mkdir dir="${build.dir}"/>
 648.923 -        <touch file="${built-clean.properties}" verbose="false"/>
 648.924 -        <property file="${built-clean.properties}" prefix="already.built.clean."/>
 648.925 -        <antcall target="-warn-already-built-clean"/>
 648.926 -        <propertyfile file="${built-clean.properties}">
 648.927 -            <entry key="${basedir}" value=""/>
 648.928 -        </propertyfile>
 648.929 -        <antcall target="-maybe-call-dep">
 648.930 -            <param name="call.built.properties" value="${built-clean.properties}"/>
 648.931 -            <param location="${project.indexer}" name="call.subproject"/>
 648.932 -            <param location="${project.indexer}/build.xml" name="call.script"/>
 648.933 -            <param name="call.target" value="clean"/>
 648.934 -            <param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
 648.935 -        </antcall>
 648.936 -        <antcall target="-maybe-call-dep">
 648.937 -            <param name="call.built.properties" value="${built-clean.properties}"/>
 648.938 -            <param location="${project.org_netbeans_modules_jackpot30_api}" name="call.subproject"/>
 648.939 -            <param location="${project.org_netbeans_modules_jackpot30_api}/build.xml" name="call.script"/>
 648.940 -            <param name="call.target" value="clean"/>
 648.941 -            <param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
 648.942 -        </antcall>
 648.943 -    </target>
 648.944 -    <target depends="init" name="-do-clean">
 648.945 -        <delete dir="${build.dir}"/>
 648.946 -        <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
 648.947 -    </target>
 648.948 -    <target name="-post-clean">
 648.949 -        <!-- Empty placeholder for easier customization. -->
 648.950 -        <!-- You can override this target in the ../build.xml file. -->
 648.951 -    </target>
 648.952 -    <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
 648.953 -    <target name="-check-call-dep">
 648.954 -        <property file="${call.built.properties}" prefix="already.built."/>
 648.955 -        <condition property="should.call.dep">
 648.956 -            <not>
 648.957 -                <isset property="already.built.${call.subproject}"/>
 648.958 -            </not>
 648.959 -        </condition>
 648.960 -    </target>
 648.961 -    <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
 648.962 -        <ant antfile="${call.script}" inheritall="false" target="${call.target}">
 648.963 -            <propertyset>
 648.964 -                <propertyref prefix="transfer."/>
 648.965 -                <mapper from="transfer.*" to="*" type="glob"/>
 648.966 -            </propertyset>
 648.967 -        </ant>
 648.968 -    </target>
 648.969 -</project>
   649.1 --- a/sandbox/old-modules/server/web.api/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   649.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   649.3 @@ -1,8 +0,0 @@
   649.4 -build.xml.data.CRC32=2d84667c
   649.5 -build.xml.script.CRC32=0d0c4a18
   649.6 -build.xml.stylesheet.CRC32=958a1d3e@1.27.0.45
   649.7 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   649.8 -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   649.9 -nbproject/build-impl.xml.data.CRC32=2d84667c
  649.10 -nbproject/build-impl.xml.script.CRC32=8250004f
  649.11 -nbproject/build-impl.xml.stylesheet.CRC32=ff4aa3ed@1.35.0.45
   650.1 --- a/sandbox/old-modules/server/web.api/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   650.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   650.3 @@ -1,99 +0,0 @@
   650.4 -annotation.processing.enabled=true
   650.5 -annotation.processing.enabled.in.editor=false
   650.6 -annotation.processing.run.all.processors=true
   650.7 -application.title=web.api
   650.8 -application.vendor=lahvac
   650.9 -build.classes.dir=${build.dir}/classes
  650.10 -build.classes.excludes=**/*.java,**/*.form
  650.11 -# This directory is removed when the project is cleaned:
  650.12 -build.dir=build
  650.13 -build.generated.dir=${build.dir}/generated
  650.14 -build.generated.sources.dir=${build.dir}/generated-sources
  650.15 -# Only compile against the classpath explicitly listed here:
  650.16 -build.sysclasspath=ignore
  650.17 -build.test.classes.dir=${build.dir}/test/classes
  650.18 -build.test.results.dir=${build.dir}/test/results
  650.19 -# Uncomment to specify the preferred debugger connection transport:
  650.20 -#debug.transport=dt_socket
  650.21 -debug.classpath=\
  650.22 -    ${run.classpath}
  650.23 -debug.test.classpath=\
  650.24 -    ${run.test.classpath}
  650.25 -# This directory is removed when the project is cleaned:
  650.26 -dist.dir=dist
  650.27 -dist.jar=${dist.dir}/web.api.jar
  650.28 -dist.javadoc.dir=${dist.dir}/javadoc
  650.29 -endorsed.classpath=\
  650.30 -    ${libs.javac.classpath}
  650.31 -excludes=
  650.32 -file.reference.org-netbeans-modules-java-source.jar=../lib/org-netbeans-modules-java-source.jar
  650.33 -file.reference.org-netbeans-spi-editor-hints.jar=../lib/org-netbeans-spi-editor-hints.jar
  650.34 -file.reference.org-openide-filesystems.jar=../lib/org-openide-filesystems.jar
  650.35 -file.reference.org-openide-util-lookup.jar=../lib/org-openide-util-lookup.jar
  650.36 -file.reference.org-openide-util.jar=../lib/org-openide-util.jar
  650.37 -file.reference.util-commons.jar=../../remoting/ide/api/external/util-commons.jar
  650.38 -file.reference.util-pojson.jar=../../remoting/ide/api/external/util-pojson.jar
  650.39 -includes=**
  650.40 -jar.compress=false
  650.41 -javac.classpath=\
  650.42 -    ${reference.org_netbeans_modules_jackpot30_api.module}:\
  650.43 -    ${libs.jersey.classpath}:\
  650.44 -    ${libs.lucene.classpath}:\
  650.45 -    ${libs.javac.classpath}:\
  650.46 -    ${reference.indexer.jar}:\
  650.47 -    ${file.reference.org-netbeans-modules-java-source.jar}:\
  650.48 -    ${file.reference.org-openide-filesystems.jar}:\
  650.49 -    ${file.reference.util-commons.jar}:\
  650.50 -    ${file.reference.util-pojson.jar}:\
  650.51 -    ${libs.freemarker.classpath}:\
  650.52 -    ${file.reference.org-openide-util.jar}:\
  650.53 -    ${file.reference.org-openide-util-lookup.jar}:\
  650.54 -    ${file.reference.org-netbeans-spi-editor-hints.jar}:\
  650.55 -    ${reference.org_netbeans_modules_jackpot30_remoting_api.module}
  650.56 -# Space-separated list of extra javac options
  650.57 -javac.compilerargs=
  650.58 -javac.deprecation=false
  650.59 -javac.processorpath=\
  650.60 -    ${javac.classpath}
  650.61 -javac.source=1.5
  650.62 -javac.target=1.5
  650.63 -javac.test.classpath=\
  650.64 -    ${javac.classpath}:\
  650.65 -    ${build.classes.dir}:\
  650.66 -    ${libs.junit_4.classpath}
  650.67 -javadoc.additionalparam=
  650.68 -javadoc.author=false
  650.69 -javadoc.encoding=${source.encoding}
  650.70 -javadoc.noindex=false
  650.71 -javadoc.nonavbar=false
  650.72 -javadoc.notree=false
  650.73 -javadoc.private=false
  650.74 -javadoc.splitindex=true
  650.75 -javadoc.use=true
  650.76 -javadoc.version=false
  650.77 -javadoc.windowtitle=
  650.78 -jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
  650.79 -main.class=org.netbeans.modules.jackpot30.server.webapi.Main
  650.80 -manifest.file=manifest.mf
  650.81 -meta.inf.dir=${src.dir}/META-INF
  650.82 -mkdist.disabled=false
  650.83 -platform.active=default_platform
  650.84 -project.indexer=../indexer
  650.85 -project.org_netbeans_modules_jackpot30_api=../../api
  650.86 -project.org_netbeans_modules_jackpot30_remoting_api=../../remoting/ide/api
  650.87 -reference.indexer.jar=${project.indexer}/dist/indexer.jar
  650.88 -reference.org_netbeans_modules_jackpot30_api.module=${project.org_netbeans_modules_jackpot30_api}/../build/cluster/modules/org-netbeans-modules-jackpot30-api.jar
  650.89 -reference.org_netbeans_modules_jackpot30_remoting_api.module=${project.org_netbeans_modules_jackpot30_remoting_api}/../build/cluster/modules/org-netbeans-modules-jackpot30-remoting-api.jar
  650.90 -run.classpath=\
  650.91 -    ${javac.classpath}:\
  650.92 -    ${build.classes.dir}
  650.93 -# Space-separated list of JVM arguments used when running the project
  650.94 -# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
  650.95 -# or test-sys-prop.name=value to set system properties for unit tests):
  650.96 -run.jvmargs=-Xbootclasspath/p:${libs.javac.classpath}
  650.97 -run.test.classpath=\
  650.98 -    ${javac.test.classpath}:\
  650.99 -    ${build.test.classes.dir}
 650.100 -source.encoding=UTF-8
 650.101 -src.dir=src
 650.102 -test.src.dir=test
   651.1 --- a/sandbox/old-modules/server/web.api/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   651.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   651.3 @@ -1,44 +0,0 @@
   651.4 -<?xml version="1.0" encoding="UTF-8"?>
   651.5 -<project xmlns="http://www.netbeans.org/ns/project/1">
   651.6 -    <type>org.netbeans.modules.java.j2seproject</type>
   651.7 -    <configuration>
   651.8 -        <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
   651.9 -            <name>web.api</name>
  651.10 -            <source-roots>
  651.11 -                <root id="src.dir"/>
  651.12 -            </source-roots>
  651.13 -            <test-roots>
  651.14 -                <root id="test.src.dir"/>
  651.15 -            </test-roots>
  651.16 -        </data>
  651.17 -        <libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
  651.18 -            <definitions>../lib/nblibraries.properties</definitions>
  651.19 -        </libraries>
  651.20 -        <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
  651.21 -            <reference>
  651.22 -                <foreign-project>indexer</foreign-project>
  651.23 -                <artifact-type>jar</artifact-type>
  651.24 -                <script>build.xml</script>
  651.25 -                <target>jar</target>
  651.26 -                <clean-target>clean</clean-target>
  651.27 -                <id>jar</id>
  651.28 -            </reference>
  651.29 -            <reference>
  651.30 -                <foreign-project>org_netbeans_modules_jackpot30_api</foreign-project>
  651.31 -                <artifact-type>jar</artifact-type>
  651.32 -                <script>build.xml</script>
  651.33 -                <target>netbeans</target>
  651.34 -                <clean-target>clean</clean-target>
  651.35 -                <id>module</id>
  651.36 -            </reference>
  651.37 -            <reference>
  651.38 -                <foreign-project>org_netbeans_modules_jackpot30_remoting_api</foreign-project>
  651.39 -                <artifact-type>jar</artifact-type>
  651.40 -                <script>build.xml</script>
  651.41 -                <target>netbeans</target>
  651.42 -                <clean-target>clean</clean-target>
  651.43 -                <id>module</id>
  651.44 -            </reference>
  651.45 -        </references>
  651.46 -    </configuration>
  651.47 -</project>
   652.1 --- a/sandbox/old-modules/server/web.api/src/org/netbeans/modules/jackpot30/server/webapi/API.java	Mon Dec 19 11:37:36 2016 +0100
   652.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   652.3 @@ -1,233 +0,0 @@
   652.4 -/*
   652.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   652.6 - *
   652.7 - * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
   652.8 - *
   652.9 - * The contents of this file are subject to the terms of either the GNU
  652.10 - * General Public License Version 2 only ("GPL") or the Common
  652.11 - * Development and Distribution License("CDDL") (collectively, the
  652.12 - * "License"). You may not use this file except in compliance with the
  652.13 - * License. You can obtain a copy of the License at
  652.14 - * http://www.netbeans.org/cddl-gplv2.html
  652.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  652.16 - * specific language governing permissions and limitations under the
  652.17 - * License.  When distributing the software, include this License Header
  652.18 - * Notice in each file and include the License file at
  652.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  652.20 - * particular file as subject to the "Classpath" exception as provided
  652.21 - * by Sun in the GPL Version 2 section of the License file that
  652.22 - * accompanied this code. If applicable, add the following below the
  652.23 - * License Header, with the fields enclosed by brackets [] replaced by
  652.24 - * your own identifying information:
  652.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  652.26 - *
  652.27 - * If you wish your version of this file to be governed by only the CDDL
  652.28 - * or only the GPL Version 2, indicate your decision by adding
  652.29 - * "[Contributor] elects to include this software in this distribution
  652.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  652.31 - * single choice of license, a recipient has the option to distribute
  652.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  652.33 - * to extend the choice of license to its licensees as provided above.
  652.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  652.35 - * Version 2 license, then the option applies only if the new code is
  652.36 - * made subject to such option by the copyright holder.
  652.37 - *
  652.38 - * Contributor(s):
  652.39 - *
  652.40 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  652.41 - */
  652.42 -
  652.43 -package org.netbeans.modules.jackpot30.server.webapi;
  652.44 -
  652.45 -import java.io.IOException;
  652.46 -import java.net.URL;
  652.47 -import java.util.Arrays;
  652.48 -import java.util.Collection;
  652.49 -import java.util.HashMap;
  652.50 -import java.util.LinkedList;
  652.51 -import java.util.List;
  652.52 -import java.util.Map;
  652.53 -import java.util.Map.Entry;
  652.54 -import javax.tools.Diagnostic;
  652.55 -import javax.tools.JavaFileObject;
  652.56 -import javax.ws.rs.DefaultValue;
  652.57 -import javax.ws.rs.GET;
  652.58 -import javax.ws.rs.Path;
  652.59 -import javax.ws.rs.Produces;
  652.60 -import javax.ws.rs.QueryParam;
  652.61 -import org.codeviation.pojson.Pojson;
  652.62 -import org.netbeans.modules.jackpot30.impl.examples.Example;
  652.63 -import org.netbeans.modules.jackpot30.impl.examples.Example.Option;
  652.64 -import org.netbeans.modules.jackpot30.impl.examples.LoadExamples;
  652.65 -import org.netbeans.modules.jackpot30.impl.indexing.Cache;
  652.66 -import org.netbeans.modules.jackpot30.impl.indexing.FileBasedIndex;
  652.67 -import org.netbeans.modules.jackpot30.impl.indexing.Index;
  652.68 -import org.netbeans.modules.jackpot30.server.indexer.StandaloneFinder;
  652.69 -
  652.70 -/**
  652.71 - *
  652.72 - * @author lahvac
  652.73 - */
  652.74 -@Path("/")
  652.75 -public class API {
  652.76 -
  652.77 -    @GET
  652.78 -    @Path("/find")
  652.79 -    @Produces("text/plain")
  652.80 -    public String find(@QueryParam("path") String segment, @QueryParam("pattern") String pattern) throws IOException {
  652.81 -        StringBuilder sb = new StringBuilder();
  652.82 -
  652.83 -        for (String candidate : StandaloneFinder.findCandidates(Cache.sourceRootForKey(segment), pattern)) {
  652.84 -            sb.append(candidate);
  652.85 -            sb.append("\n");
  652.86 -        }
  652.87 -
  652.88 -        return sb.toString();
  652.89 -    }
  652.90 -
  652.91 -    @GET
  652.92 -    @Path("/findSpans")
  652.93 -    @Produces("text/plain")
  652.94 -    public String findSpans(@QueryParam("path") String segment, @QueryParam("relativePath") String relativePath, @QueryParam("pattern") String pattern) throws IOException {
  652.95 -        StringBuilder sb = new StringBuilder();
  652.96 -
  652.97 -        for (int o : StandaloneFinder.findCandidateOccurrenceSpans(Cache.sourceRootForKey(segment), relativePath, pattern)) {
  652.98 -            sb.append(o);
  652.99 -            sb.append(":");
 652.100 -        }
 652.101 -
 652.102 -        if (sb.length() > 0) {
 652.103 -            sb.delete(sb.length() - 1, sb.length());
 652.104 -        }
 652.105 -
 652.106 -        return sb.toString();
 652.107 -    }
 652.108 -
 652.109 -    @GET
 652.110 -    @Path("/list")
 652.111 -    @Produces("text/plain")
 652.112 -    public String list() throws IOException {
 652.113 -        StringBuilder sb = new StringBuilder();
 652.114 -
 652.115 -        for (String root : Cache.knownSourceRoots()) {
 652.116 -            URL sourceRoot = Cache.sourceRootForKey(root).toURI().toURL();
 652.117 -            Index index = FileBasedIndex.get(sourceRoot);
 652.118 -            String displayName;
 652.119 -
 652.120 -            if (index != null && index.getIndexInfo().displayName != null) {
 652.121 -                displayName = index.getIndexInfo().displayName;
 652.122 -            } else {
 652.123 -                String path = sourceRoot.getPath().replaceFirst("/$", "");
 652.124 -                
 652.125 -                displayName = path.substring(path.lastIndexOf('/') + 1);
 652.126 -            }
 652.127 -
 652.128 -            sb.append(root);
 652.129 -            sb.append(":");
 652.130 -            sb.append(displayName);
 652.131 -            sb.append("\n");
 652.132 -        }
 652.133 -
 652.134 -        return sb.toString();
 652.135 -    }
 652.136 -
 652.137 -    @GET
 652.138 -    @Path("/cat")
 652.139 -    @Produces("text/plain")
 652.140 -    public String cat(@QueryParam("path") String segment, @QueryParam("relative") String relative) throws IOException {
 652.141 -        URL sourceRoot = Cache.sourceRootForKey(segment).toURI().toURL();
 652.142 -        Index index = FileBasedIndex.get(sourceRoot);
 652.143 -
 652.144 -        if (index == null) {
 652.145 -            throw new IOException("No index");
 652.146 -        }
 652.147 -
 652.148 -        CharSequence source = index.getSourceCode(relative);
 652.149 -
 652.150 -        if (source == null) {
 652.151 -            throw new IOException("Source code not found");
 652.152 -        }
 652.153 -        
 652.154 -        return source.toString().replaceAll("\r\n", "\n");
 652.155 -    }
 652.156 -
 652.157 -    @GET
 652.158 -    @Path("/info")
 652.159 -    @Produces("text/plain")
 652.160 -    public String info(@QueryParam("path") String segment) throws IOException {
 652.161 -        URL sourceRoot = Cache.sourceRootForKey(segment).toURI().toURL();
 652.162 -        Index index = FileBasedIndex.get(sourceRoot);
 652.163 -
 652.164 -        if (index == null) {
 652.165 -            throw new IOException("No index");
 652.166 -        }
 652.167 -
 652.168 -        return Pojson.save(index.getIndexInfo());
 652.169 -    }
 652.170 -
 652.171 -    @GET
 652.172 -    @Path("/examples")
 652.173 -    @Produces("text/plain")
 652.174 -    public String examples() throws IOException {
 652.175 -        List<Map<String, String>> examples = new LinkedList<Map<String, String>>();
 652.176 -
 652.177 -        for (Example ex : LoadExamples.loadExamples()) {
 652.178 -            if (ex.getOptions().contains(Option.VERIFY) || ex.getOptions().contains(Option.FIX)) continue;
 652.179 -            Map<String, String> desc = new HashMap<String, String>();
 652.180 -
 652.181 -            desc.put("displayName", ex.getDisplayName());
 652.182 -            desc.put("pattern", ex.getCode());
 652.183 -
 652.184 -            examples.add(desc);
 652.185 -        }
 652.186 -
 652.187 -        return Pojson.save(examples);
 652.188 -    }
 652.189 -
 652.190 -    @GET
 652.191 -    @Path("/errors")
 652.192 -    @Produces("text/plain")
 652.193 -    public String errors(@QueryParam("pattern") String pattern) throws IOException {
 652.194 -        StringBuilder sb = new StringBuilder();
 652.195 -
 652.196 -        for (Diagnostic<? extends JavaFileObject> d : StandaloneFinder.parseAndReportErrors(pattern)) {
 652.197 -            sb.append(d.getMessage(null));
 652.198 -            sb.append("\n");
 652.199 -        }
 652.200 -
 652.201 -        return sb.toString();
 652.202 -    }
 652.203 -
 652.204 -    @GET
 652.205 -    @Path("/findDuplicates")
 652.206 -    @Produces("text/plain")
 652.207 -    public String findDuplicates(@QueryParam("path") String segment, @QueryParam("hashes") String hashes) throws IOException {
 652.208 -        Map<String, Map<String, Collection<? extends String>>> hash2Segment2Contains = new HashMap<String, Map<String, Collection<? extends String>>>();
 652.209 -        Collection<String> segments = new LinkedList<String>();
 652.210 -
 652.211 -        if (segment != null) segments.add(segment);
 652.212 -        else {
 652.213 -            for (String key : Cache.knownSourceRoots()) {
 652.214 -                segments.add(key);
 652.215 -            }
 652.216 -        }
 652.217 -
 652.218 -        Iterable<? extends String> hashesList = Arrays.asList(Pojson.load(String[].class, hashes));
 652.219 -
 652.220 -        for (String key : segments) {
 652.221 -            Map<String, Collection<? extends String>> found = StandaloneFinder.containsHash(Cache.sourceRootForKey(key), hashesList);
 652.222 -
 652.223 -            for (Entry<String, Collection<? extends String>> e : found.entrySet()) {
 652.224 -                Map<String, Collection<? extends String>> perRoot = hash2Segment2Contains.get(e.getKey());
 652.225 -
 652.226 -                if (perRoot == null) {
 652.227 -                    hash2Segment2Contains.put(e.getKey(), perRoot = new HashMap<String, Collection<? extends String>>());
 652.228 -                }
 652.229 -
 652.230 -                perRoot.put(key, e.getValue());
 652.231 -            }
 652.232 -        }
 652.233 -
 652.234 -        return Pojson.save(hash2Segment2Contains);
 652.235 -    }
 652.236 -}
   653.1 --- a/sandbox/old-modules/server/web.api/src/org/netbeans/modules/jackpot30/server/webapi/Main.java	Mon Dec 19 11:37:36 2016 +0100
   653.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   653.3 @@ -1,93 +0,0 @@
   653.4 -/*
   653.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   653.6 - *
   653.7 - * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
   653.8 - *
   653.9 - * The contents of this file are subject to the terms of either the GNU
  653.10 - * General Public License Version 2 only ("GPL") or the Common
  653.11 - * Development and Distribution License("CDDL") (collectively, the
  653.12 - * "License"). You may not use this file except in compliance with the
  653.13 - * License. You can obtain a copy of the License at
  653.14 - * http://www.netbeans.org/cddl-gplv2.html
  653.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  653.16 - * specific language governing permissions and limitations under the
  653.17 - * License.  When distributing the software, include this License Header
  653.18 - * Notice in each file and include the License file at
  653.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  653.20 - * particular file as subject to the "Classpath" exception as provided
  653.21 - * by Sun in the GPL Version 2 section of the License file that
  653.22 - * accompanied this code. If applicable, add the following below the
  653.23 - * License Header, with the fields enclosed by brackets [] replaced by
  653.24 - * your own identifying information:
  653.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  653.26 - *
  653.27 - * If you wish your version of this file to be governed by only the CDDL
  653.28 - * or only the GPL Version 2, indicate your decision by adding
  653.29 - * "[Contributor] elects to include this software in this distribution
  653.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  653.31 - * single choice of license, a recipient has the option to distribute
  653.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  653.33 - * to extend the choice of license to its licensees as provided above.
  653.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  653.35 - * Version 2 license, then the option applies only if the new code is
  653.36 - * made subject to such option by the copyright holder.
  653.37 - *
  653.38 - * Contributor(s):
  653.39 - *
  653.40 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  653.41 - */
  653.42 -
  653.43 -package org.netbeans.modules.jackpot30.server.webapi;
  653.44 -
  653.45 -import com.sun.grizzly.http.embed.GrizzlyWebServer;
  653.46 -import com.sun.grizzly.http.servlet.ServletAdapter;
  653.47 -import com.sun.grizzly.tcp.http11.GrizzlyAdapter;
  653.48 -import com.sun.grizzly.tcp.http11.GrizzlyRequest;
  653.49 -import com.sun.grizzly.tcp.http11.GrizzlyResponse;
  653.50 -import com.sun.jersey.spi.container.servlet.ServletContainer;
  653.51 -import java.io.File;
  653.52 -import java.io.IOException;
  653.53 -import org.netbeans.modules.jackpot30.impl.indexing.Cache;
  653.54 -
  653.55 -/**
  653.56 - *
  653.57 - * @author lahvac
  653.58 - */
  653.59 -public class Main {
  653.60 -
  653.61 -    /**
  653.62 -     * @param args the command line arguments
  653.63 -     */
  653.64 -    public static void main(String[] args) throws IOException {
  653.65 -        if (args.length != 1 && args.length != 2) {
  653.66 -            System.err.println("Usage: java -jar " + Main.class.getProtectionDomain().getCodeSource().getLocation().getPath() + " <cache> [<static-content>]");
  653.67 -            return ;
  653.68 -        }
  653.69 -        
  653.70 -        Cache.setStandaloneCacheRoot(new File(args[0]));
  653.71 -
  653.72 -        GrizzlyWebServer gws;
  653.73 -        
  653.74 -        if (args.length == 2) {
  653.75 -            gws = new GrizzlyWebServer(9998, args[1]);
  653.76 -        } else {
  653.77 -            gws = new GrizzlyWebServer(9998);
  653.78 -        }
  653.79 -
  653.80 -        // Jersey web resources
  653.81 -        ServletAdapter jerseyAdapter = new ServletAdapter();
  653.82 -        jerseyAdapter.addInitParameter("com.sun.jersey.config.property.packages", "org.netbeans.modules.jackpot30.server.webapi");
  653.83 -        jerseyAdapter.setContextPath("/index");
  653.84 -        jerseyAdapter.setServletInstance(new ServletContainer());
  653.85 -
  653.86 -        // register all above defined adapters
  653.87 -        gws.addGrizzlyAdapter(jerseyAdapter);
  653.88 -        gws.addGrizzlyAdapter(new GrizzlyAdapter(){
  653.89 -            public void service(GrizzlyRequest request, GrizzlyResponse response){}
  653.90 -        });
  653.91 -
  653.92 -        // let Grizzly run
  653.93 -        gws.start();
  653.94 -    }
  653.95 -
  653.96 -}
   654.1 --- a/sandbox/old-modules/server/web.api/src/org/netbeans/modules/jackpot30/server/webapi/UI.java	Mon Dec 19 11:37:36 2016 +0100
   654.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   654.3 @@ -1,274 +0,0 @@
   654.4 -/*
   654.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   654.6 - *
   654.7 - * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
   654.8 - *
   654.9 - * The contents of this file are subject to the terms of either the GNU
  654.10 - * General Public License Version 2 only ("GPL") or the Common
  654.11 - * Development and Distribution License("CDDL") (collectively, the
  654.12 - * "License"). You may not use this file except in compliance with the
  654.13 - * License. You can obtain a copy of the License at
  654.14 - * http://www.netbeans.org/cddl-gplv2.html
  654.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  654.16 - * specific language governing permissions and limitations under the
  654.17 - * License.  When distributing the software, include this License Header
  654.18 - * Notice in each file and include the License file at
  654.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  654.20 - * particular file as subject to the "Classpath" exception as provided
  654.21 - * by Sun in the GPL Version 2 section of the License file that
  654.22 - * accompanied this code. If applicable, add the following below the
  654.23 - * License Header, with the fields enclosed by brackets [] replaced by
  654.24 - * your own identifying information:
  654.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  654.26 - *
  654.27 - * If you wish your version of this file to be governed by only the CDDL
  654.28 - * or only the GPL Version 2, indicate your decision by adding
  654.29 - * "[Contributor] elects to include this software in this distribution
  654.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  654.31 - * single choice of license, a recipient has the option to distribute
  654.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  654.33 - * to extend the choice of license to its licensees as provided above.
  654.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  654.35 - * Version 2 license, then the option applies only if the new code is
  654.36 - * made subject to such option by the copyright holder.
  654.37 - *
  654.38 - * Contributor(s):
  654.39 - *
  654.40 - * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
  654.41 - */
  654.42 -
  654.43 -package org.netbeans.modules.jackpot30.server.webapi;
  654.44 -
  654.45 -import freemarker.cache.TemplateLoader;
  654.46 -import freemarker.template.Configuration;
  654.47 -import freemarker.template.Template;
  654.48 -import freemarker.template.TemplateException;
  654.49 -import java.io.IOException;
  654.50 -import java.io.InputStream;
  654.51 -import java.io.InputStreamReader;
  654.52 -import java.io.Reader;
  654.53 -import java.io.StringWriter;
  654.54 -import java.net.URI;
  654.55 -import java.net.URISyntaxException;
  654.56 -import java.util.ArrayList;
  654.57 -import java.util.Collections;
  654.58 -import java.util.HashMap;
  654.59 -import java.util.LinkedList;
  654.60 -import java.util.List;
  654.61 -import java.util.Map;
  654.62 -import javax.ws.rs.GET;
  654.63 -import javax.ws.rs.Path;
  654.64 -import javax.ws.rs.Produces;
  654.65 -import javax.ws.rs.QueryParam;
  654.66 -import org.codeviation.pojson.Pojson;
  654.67 -import org.netbeans.modules.jackpot30.remoting.api.WebUtilities;
  654.68 -import static org.netbeans.modules.jackpot30.remoting.api.WebUtilities.escapeForQuery;
  654.69 -
  654.70 -/**
  654.71 - *
  654.72 - * @author lahvac
  654.73 - */
  654.74 -@Path("/ui")
  654.75 -public class UI {
  654.76 -
  654.77 -    @GET
  654.78 -    @Path("/search")
  654.79 -    @Produces("text/html")
  654.80 -    public String search(@QueryParam("path") String path, @QueryParam("pattern") String pattern) throws URISyntaxException, IOException, TemplateException {
  654.81 -        Map<String, Object> configurationData = new HashMap<String, Object>();
  654.82 -
  654.83 -        configurationData.put("paths", list());
  654.84 -        configurationData.put("selectedPath", path);
  654.85 -        configurationData.put("pattern", pattern);
  654.86 -        configurationData.put("patternEscaped", escapeForQuery(pattern));
  654.87 -        configurationData.put("examples", loadExamples());
  654.88 -
  654.89 -        if (pattern != null && path != null) {
  654.90 -            URI u = new URI("http://localhost:9998/index/find?path=" + escapeForQuery(path) + "&pattern=" + escapeForQuery(pattern));
  654.91 -            List<Map<String, Object>> results = new LinkedList<Map<String, Object>>();
  654.92 -            long queryTime = System.currentTimeMillis();
  654.93 -            List<String> candidates = new ArrayList<String>(WebUtilities.requestStringArrayResponse(u));
  654.94 -
  654.95 -            queryTime = System.currentTimeMillis() - queryTime;
  654.96 -
  654.97 -            Collections.sort(candidates);
  654.98 -
  654.99 -            for (String c : candidates) {
 654.100 -                Map<String, Object> found = new HashMap<String, Object>(3);
 654.101 -
 654.102 -                found.put("relativePath", c);
 654.103 -
 654.104 -                results.add(found);
 654.105 -            }
 654.106 -
 654.107 -            configurationData.put("results", results);
 654.108 -
 654.109 -            Map<String, Object> statistics = new HashMap<String, Object>();
 654.110 -
 654.111 -            statistics.put("files", candidates.size());
 654.112 -            statistics.put("queryTime", queryTime);
 654.113 -
 654.114 -            configurationData.put("statistics", statistics);
 654.115 -        }
 654.116 -
 654.117 -        return processTemplate("/org/netbeans/modules/jackpot30/server/webapi/ui-search.html", configurationData);
 654.118 -    }
 654.119 -
 654.120 -    @GET
 654.121 -    @Path("/show")
 654.122 -    @Produces("text/html")
 654.123 -    public String show(@QueryParam("path") String path, @QueryParam("relative") String relativePath, @QueryParam("pattern") String pattern) throws URISyntaxException, IOException, TemplateException {
 654.124 -        Map<String, Object> configurationData = new HashMap<String, Object>();
 654.125 -        List<Map<String, String>> occurrences = new LinkedList<Map<String, String>>();
 654.126 -
 654.127 -        configurationData.put("occurrences", occurrences);
 654.128 -
 654.129 -        URI codeURL = new URI("http://localhost:9998/index/cat?path=" + escapeForQuery(path) + "&relative=" + escapeForQuery(relativePath));
 654.130 -        String code = WebUtilities.requestStringResponse(codeURL);
 654.131 -        URI spansURL = new URI("http://localhost:9998/index/findSpans?path=" + escapeForQuery(path) + "&relativePath=" + escapeForQuery(relativePath) + "&pattern=" + escapeForQuery(pattern));
 654.132 -        int currentCodePos = 0;
 654.133 -        for (int[] span : parseSpans(WebUtilities.requestStringResponse(spansURL))) { //XXX: sorted!
 654.134 -            Map<String, String> occ = new HashMap<String, String>();
 654.135 -            occ.put("prefix", WebUtilities.escapeForHTMLElement(code.substring(currentCodePos, span[0])));
 654.136 -            occ.put("occurrence", WebUtilities.escapeForHTMLElement(code.substring(span[0], span[1])));
 654.137 -            occurrences.add(occ);
 654.138 -            currentCodePos = span[1];
 654.139 -        }
 654.140 -
 654.141 -        configurationData.put("suffix", WebUtilities.escapeForHTMLElement(code.substring(currentCodePos, code.length())));
 654.142 -
 654.143 -        return processTemplate("/org/netbeans/modules/jackpot30/server/webapi/ui-cat.html", configurationData);
 654.144 -    }
 654.145 -    
 654.146 -    @GET
 654.147 -    @Path("/snippet")
 654.148 -    @Produces("text/html")
 654.149 -    public String snippet(@QueryParam("path") String path, @QueryParam("relative") String relativePath, @QueryParam("pattern") String pattern) throws URISyntaxException, IOException, TemplateException {
 654.150 -        List<Map<String, String>> snippets = new LinkedList<Map<String, String>>();
 654.151 -
 654.152 -        URI codeURL = new URI("http://localhost:9998/index/cat?path=" + escapeForQuery(path) + "&relative=" + escapeForQuery(relativePath));
 654.153 -        String code = WebUtilities.requestStringResponse(codeURL);
 654.154 -        URI spansURL = new URI("http://localhost:9998/index/findSpans?path=" + escapeForQuery(path) + "&relativePath=" + escapeForQuery(relativePath) + "&pattern=" + escapeForQuery(pattern));
 654.155 -
 654.156 -        for (int[] span : parseSpans(WebUtilities.requestStringResponse(spansURL))) {
 654.157 -            snippets.add(prepareSnippet(code, span));
 654.158 -        }
 654.159 -
 654.160 -        return processTemplate("/org/netbeans/modules/jackpot30/server/webapi/ui-snippet.html", Collections.<String, Object>singletonMap("snippets", snippets));
 654.161 -    }
 654.162 -
 654.163 -    private static List<Map<String, String>> list() throws URISyntaxException {
 654.164 -        List<Map<String, String>> result = new LinkedList<Map<String, String>>();
 654.165 -
 654.166 -        for (String enc : WebUtilities.requestStringArrayResponse(new URI("http://localhost:9998/index/list"))) {
 654.167 -            Map<String, String> rootDesc = new HashMap<String, String>();
 654.168 -            String[] col = enc.split(":", 2);
 654.169 -
 654.170 -            rootDesc.put("segment", col[0]);
 654.171 -            rootDesc.put("displayName", col[1]);
 654.172 -            result.add(rootDesc);
 654.173 -        }
 654.174 -
 654.175 -        return result;
 654.176 -    }
 654.177 -    
 654.178 -    private static Iterable<int[]> parseSpans(String from) {
 654.179 -        if (from.isEmpty()) {
 654.180 -            return Collections.emptyList();
 654.181 -        }
 654.182 -        String[] split = from.split(":");
 654.183 -        List<int[]> result = new LinkedList<int[]>();
 654.184 -
 654.185 -        for (int i = 0; i < split.length; i += 2) {
 654.186 -            result.add(new int[] {
 654.187 -                Integer.parseInt(split[i + 0].trim()),
 654.188 -                Integer.parseInt(split[i + 1].trim())
 654.189 -            });
 654.190 -        }
 654.191 -
 654.192 -        return result;
 654.193 -    }
 654.194 -
 654.195 -    private static final int DESIRED_CONTEXT = 2;
 654.196 -
 654.197 -    private static Map<String, String> prepareSnippet(String code, int[] span) {
 654.198 -        int grandStart = span[0];
 654.199 -        int firstLineStart = grandStart = lineStart(code, grandStart);
 654.200 -
 654.201 -        while (grandStart > 0 && contextLength(code.substring(grandStart, firstLineStart)) < DESIRED_CONTEXT)
 654.202 -            grandStart = lineStart(code, grandStart - 1);
 654.203 -
 654.204 -        int grandEnd = span[1];
 654.205 -        int firstLineEnd = grandEnd = lineEnd(code, grandEnd);
 654.206 -        
 654.207 -        while (grandEnd < code.length() - 1 && contextLength(code.substring(firstLineEnd, grandEnd)) < DESIRED_CONTEXT)
 654.208 -            grandEnd = lineEnd(code, grandEnd + 1);
 654.209 -
 654.210 -        Map<String, String> result = new HashMap<String, String>();
 654.211 -        
 654.212 -        result.put("prefix", WebUtilities.escapeForHTMLElement(code.substring(grandStart, span[0])));
 654.213 -        result.put("occurrence", WebUtilities.escapeForHTMLElement(code.substring(span[0], span[1])));
 654.214 -        result.put("suffix", WebUtilities.escapeForHTMLElement(code.substring(span[1], grandEnd)));
 654.215 -
 654.216 -        return result;
 654.217 -    }
 654.218 -
 654.219 -    private static int lineStart(String code, int o) {
 654.220 -        while (o > 0 && code.charAt(o) != '\n') {
 654.221 -            o--;
 654.222 -        }
 654.223 -
 654.224 -        return o;
 654.225 -    }
 654.226 -
 654.227 -    private static int lineEnd(String code, int o) {
 654.228 -        while (o < code.length() - 1 && code.charAt(o) != '\n') {
 654.229 -            o++;
 654.230 -        }
 654.231 -
 654.232 -        return o;
 654.233 -    }
 654.234 -
 654.235 -    private static int contextLength(String in) {
 654.236 -        return in.replaceAll("\n[ \t]*\n", "\n").trim().split("\n").length;
 654.237 -    }
 654.238 -
 654.239 -    @SuppressWarnings("unchecked")
 654.240 -    private List<Map<String, String>> loadExamples() throws IOException, URISyntaxException {
 654.241 -        return Pojson.load(LinkedList.class, new URI("http://localhost:9998/index/examples"));
 654.242 -    }
 654.243 -
 654.244 -    private static String processTemplate(String template, Map<String, Object> configurationData) throws TemplateException, IOException {
 654.245 -        Configuration conf = new Configuration();
 654.246 -
 654.247 -        conf.setTemplateLoader(new TemplateLoaderImpl());
 654.248 -
 654.249 -        Template templ = conf.getTemplate(template);
 654.250 -        StringWriter out = new StringWriter();
 654.251 -
 654.252 -        templ.process(configurationData, out);
 654.253 -
 654.254 -        return out.toString();
 654.255 -    }
 654.256 -
 654.257 -    private static final class TemplateLoaderImpl implements TemplateLoader {
 654.258 -
 654.259 -        public Object findTemplateSource(String name) throws IOException {
 654.260 -            return TemplateLoaderImpl.class.getResourceAsStream("/" + name);
 654.261 -        }
 654.262 -
 654.263 -        public long getLastModified(Object templateSource) {
 654.264 -            return 0L;
 654.265 -        }
 654.266 -
 654.267 -        public Reader getReader(Object templateSource, String encoding) throws IOException {
 654.268 -            InputStream in = (InputStream) templateSource;
 654.269 -
 654.270 -            return new InputStreamReader(in);
 654.271 -        }
 654.272 -
 654.273 -        public void closeTemplateSource(Object templateSource) throws IOException {
 654.274 -        }
 654.275 -    }
 654.276 -
 654.277 -}
   655.1 --- a/sandbox/old-modules/server/web.api/src/org/netbeans/modules/jackpot30/server/webapi/ui-cat.html	Mon Dec 19 11:37:36 2016 +0100
   655.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   655.3 @@ -1,10 +0,0 @@
   655.4 -<html>
   655.5 -<head>
   655.6 -    <style type="text/css">
   655.7 -        .occurrence {BACKGROUND: #DDDD00;}
   655.8 -    </style>
   655.9 -</head>
  655.10 -<body>
  655.11 -<pre><#list occurrences as occurrence>${occurrence.prefix}<span class="occurrence">${occurrence.occurrence}</span></#list>${suffix}</pre>
  655.12 -</body>
  655.13 -</html>
   656.1 --- a/sandbox/old-modules/server/web.api/src/org/netbeans/modules/jackpot30/server/webapi/ui-search.html	Mon Dec 19 11:37:36 2016 +0100
   656.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   656.3 @@ -1,70 +0,0 @@
   656.4 -<html>
   656.5 -<head>
   656.6 -    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
   656.7 -<#if results??>
   656.8 -    <script type="text/javascript">
   656.9 -        $(document).ready(function() {
  656.10 -            $('#list').find('dd').hide().end().find('dt').click(function() {
  656.11 -                current_dd=$(this).next();
  656.12 -                //XXX: will do the AJAX call for both show and hide!
  656.13 -                $.get("snippet?path=${selectedPath}&relative=" + current_dd.attr("id") + "&pattern=${patternEscaped}",function(data) {
  656.14 -                    current_dd.html(data).slideToggle();
  656.15 -                })
  656.16 -            });
  656.17 -        });
  656.18 -    </script>
  656.19 -</#if>
  656.20 -    <style type="text/css">
  656.21 -        .occurrence {BACKGROUND: #DDDD00;}
  656.22 -    </style>
  656.23 -</head>
  656.24 -<body>
  656.25 -<form method="get">
  656.26 -
  656.27 -<label for="path">Project:</label>
  656.28 -<select size="1" name="path">");
  656.29 -    <#list paths as path>
  656.30 -        <option <#if selectedPath?? && path.segment == selectedPath>selected</#if> value="${path.segment}">
  656.31 -            ${path.displayName}
  656.32 -        </option>
  656.33 -    </#list>
  656.34 -</select>
  656.35 -<br>
  656.36 -<label for="pattern">Pattern:</label><br>
  656.37 -<textarea rows="10" cols="40" name="pattern">
  656.38 -<#if pattern??>
  656.39 -${pattern}
  656.40 -</#if>
  656.41 -</textarea><br>
  656.42 -<input type="submit" name="Find Candidates"/>
  656.43 -</form>
  656.44 -
  656.45 -<div class="examples">
  656.46 -<#if examples??>
  656.47 -    Examples:
  656.48 -    <dl id="examples-list">
  656.49 -        <#list examples as example>
  656.50 -            <dt>${example.displayName}</dt>
  656.51 -            <dd><pre>${example.pattern}</pre>
  656.52 -            </dd>
  656.53 -        </#list>
  656.54 -    </dl>
  656.55 -</#if>
  656.56 -</div>
  656.57 -
  656.58 -<#if results??>
  656.59 -    Found candidates for pattern: ${pattern}
  656.60 -    <dl id="list">
  656.61 -        <#list results as result>
  656.62 -            <dt>${result.relativePath}<a href="/index/ui/show?path=${selectedPath}&relative=${result.relativePath}&pattern=${patternEscaped}">show</a></dt>
  656.63 -            <dd id="${result.relativePath}">
  656.64 -            </dd>
  656.65 -        </#list>
  656.66 -    </dl>
  656.67 -</#if>
  656.68 -
  656.69 -<#if statistics??>
  656.70 -     Query time: ${statistics.queryTime}ms, matching files: ${statistics.files}.
  656.71 -</#if>
  656.72 -</body>
  656.73 -</html>
   657.1 --- a/sandbox/old-modules/server/web.api/src/org/netbeans/modules/jackpot30/server/webapi/ui-snippet.html	Mon Dec 19 11:37:36 2016 +0100
   657.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   657.3 @@ -1,7 +0,0 @@
   657.4 -<#if snippets??>
   657.5 -    <#list snippets as snippet>
   657.6 -        <pre>${snippet.prefix}<span class="occurrence">${snippet.occurrence}</span>${snippet.suffix}</pre><br>
   657.7 -    </#list>
   657.8 -<#else>
   657.9 -    No occurrences.
  657.10 -</#if>
   658.1 --- a/sandbox/old-modules/server/web.api/test/org/netbeans/modules/jackpot30/server/webapi/APITest.java	Mon Dec 19 11:37:36 2016 +0100
   658.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   658.3 @@ -1,107 +0,0 @@
   658.4 -/*
   658.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   658.6 - *
   658.7 - * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
   658.8 - *
   658.9 - * The contents of this file are subject to the terms of either the GNU
  658.10 - * General Public License Version 2 only ("GPL") or the Common
  658.11 - * Development and Distribution License("CDDL") (collectively, the
  658.12 - * "License"). You may not use this file except in compliance with the
  658.13 - * License. You can obtain a copy of the License at
  658.14 - * http://www.netbeans.org/cddl-gplv2.html
  658.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  658.16 - * specific language governing permissions and limitations under the
  658.17 - * License.  When distributing the software, include this License Header
  658.18 - * Notice in each file and include the License file at
  658.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  658.20 - * particular file as subject to the "Classpath" exception as provided
  658.21 - * by Sun in the GPL Version 2 section of the License file that
  658.22 - * accompanied this code. If applicable, add the following below the
  658.23 - * License Header, with the fields enclosed by brackets [] replaced by
  658.24 - * your own identifying information:
  658.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  658.26 - *
  658.27 - * If you wish your version of this file to be governed by only the CDDL
  658.28 - * or only the GPL Version 2, indicate your decision by adding
  658.29 - * "[Contributor] elects to include this software in this distribution
  658.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  658.31 - * single choice of license, a recipient has the option to distribute
  658.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  658.33 - * to extend the choice of license to its licensees as provided above.
  658.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  658.35 - * Version 2 license, then the option applies only if the new code is
  658.36 - * made subject to such option by the copyright holder.
  658.37 - *
  658.38 - * Contributor(s):
  658.39 - *
  658.40 - * Portions Copyrighted 2009 Sun Microsystems, Inc.
  658.41 - */
  658.42 -
  658.43 -package org.netbeans.modules.jackpot30.server.webapi;
  658.44 -
  658.45 -import java.io.ByteArrayInputStream;
  658.46 -import java.io.File;
  658.47 -import java.io.FileOutputStream;
  658.48 -import java.io.InputStream;
  658.49 -import org.junit.Assert;
  658.50 -import org.junit.Before;
  658.51 -import org.junit.Test;
  658.52 -import org.netbeans.modules.jackpot30.impl.indexing.Cache;
  658.53 -import org.netbeans.modules.jackpot30.server.indexer.StandaloneIndexer;
  658.54 -
  658.55 -/**
  658.56 - *
  658.57 - * @author lahvac
  658.58 - */
  658.59 -public class APITest {
  658.60 -
  658.61 -    public APITest() {
  658.62 -    }
  658.63 -
  658.64 -    private File src;
  658.65 -
  658.66 -    @Before
  658.67 -    public void setUp() throws Exception {
  658.68 -        File source = new File(APITest.class.getProtectionDomain().getCodeSource().getLocation().getPath());
  658.69 -        File workingDirectory = new File(source.getParentFile(), "wd");
  658.70 -        File cache = new File(workingDirectory, "cache");
  658.71 -
  658.72 -        src = new File(workingDirectory, "src");
  658.73 -
  658.74 -        Cache.setStandaloneCacheRoot(cache);
  658.75 -
  658.76 -        copyStringToFile(new File(src, "test/Test1.java"), "package test; public class Test {private void test() { new java.io.File(\"\").isDirectory(); } }");
  658.77 -
  658.78 -        StandaloneIndexer.index(src, false, false, null, null);
  658.79 -    }
  658.80 -
  658.81 -    public final static void copyStringToFile (File f, String content) throws Exception {
  658.82 -        f.getParentFile().mkdirs();
  658.83 -        
  658.84 -        FileOutputStream os = new FileOutputStream(f);
  658.85 -        InputStream is = new ByteArrayInputStream(content.getBytes("UTF-8"));
  658.86 -        int read;
  658.87 -        while ((read = is.read()) != (-1)) {
  658.88 -            os.write(read);
  658.89 -        }
  658.90 -        os.close ();
  658.91 -        is.close();
  658.92 -    }
  658.93 -
  658.94 -    @Test
  658.95 -    public void testFind() throws Exception {
  658.96 -        String cacheKey = null;
  658.97 -
  658.98 -        for (String key : Cache.knownSourceRoots()) {
  658.99 -            if (src.getAbsolutePath().equals(Cache.sourceRootForKey(key).getAbsolutePath())) {
 658.100 -                cacheKey = key;
 658.101 -                break;
 658.102 -            }
 658.103 -        }
 658.104 -
 658.105 -        Assert.assertNotNull(cacheKey);
 658.106 -
 658.107 -        Assert.assertEquals("test/Test1.java\n", new API().find(cacheKey, "$1.isDirectory()"));
 658.108 -    }
 658.109 -
 658.110 -}
 658.111 \ No newline at end of file
   659.1 --- a/sandbox/old-modules/transformer/build.xml	Mon Dec 19 11:37:36 2016 +0100
   659.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   659.3 @@ -1,9 +0,0 @@
   659.4 -<?xml version="1.0" encoding="UTF-8"?>
   659.5 -<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
   659.6 -<!-- for some information on what you could do (e.g. targets to override). -->
   659.7 -<!-- If you delete this file and reopen the project it will be recreated. -->
   659.8 -<project name="org.netbeans.modules.jackpot30.transformers" default="netbeans" basedir=".">
   659.9 -    <description>Builds, tests, and runs the project org.netbeans.modules.jackpot30.transformers.</description>
  659.10 -    <import file="nbproject/build-impl.xml"/>
  659.11 -    <import file="${suite.dir}/findbugs-import.xml"/>
  659.12 -</project>
   660.1 --- a/sandbox/old-modules/transformer/manifest.mf	Mon Dec 19 11:37:36 2016 +0100
   660.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   660.3 @@ -1,7 +0,0 @@
   660.4 -Manifest-Version: 1.0
   660.5 -AutoUpdate-Show-In-Client: false
   660.6 -OpenIDE-Module: org.netbeans.modules.jackpot30.transformers
   660.7 -OpenIDE-Module-Layer: org/netbeans/modules/jackpot30/transformers/resources/layer.xml
   660.8 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jackpot30/transformers/resources/Bundle.properties
   660.9 -OpenIDE-Module-Specification-Version: 1.16
  660.10 -
   661.1 --- a/sandbox/old-modules/transformer/nbproject/build-impl.xml	Mon Dec 19 11:37:36 2016 +0100
   661.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   661.3 @@ -1,30 +0,0 @@
   661.4 -<?xml version="1.0" encoding="UTF-8"?>
   661.5 -<!--
   661.6 -*** GENERATED FROM project.xml - DO NOT EDIT  ***
   661.7 -***         EDIT ../build.xml INSTEAD         ***
   661.8 --->
   661.9 -<project name="org.netbeans.modules.jackpot30.transformers-impl" basedir="..">
  661.10 -    <property file="nbproject/private/suite-private.properties"/>
  661.11 -    <property file="nbproject/suite.properties"/>
  661.12 -    <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
  661.13 -    <property file="${suite.dir}/nbproject/private/platform-private.properties"/>
  661.14 -    <property file="${suite.dir}/nbproject/platform.properties"/>
  661.15 -    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
  661.16 -        <attribute name="name"/>
  661.17 -        <attribute name="value"/>
  661.18 -        <sequential>
  661.19 -            <property name="@{name}" value="${@{value}}"/>
  661.20 -        </sequential>
  661.21 -    </macrodef>
  661.22 -    <property file="${user.properties.file}"/>
  661.23 -    <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  661.24 -    <nbmproject2:property name="netbeans.dest.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
  661.25 -    <fail message="You must define 'nbplatform.${nbplatform.active}.harness.dir'">
  661.26 -        <condition>
  661.27 -            <not>
  661.28 -                <available file="${harness.dir}" type="dir"/>
  661.29 -            </not>
  661.30 -        </condition>
  661.31 -    </fail>
  661.32 -    <import file="${harness.dir}/build.xml"/>
  661.33 -</project>
   662.1 --- a/sandbox/old-modules/transformer/nbproject/genfiles.properties	Mon Dec 19 11:37:36 2016 +0100
   662.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   662.3 @@ -1,8 +0,0 @@
   662.4 -build.xml.data.CRC32=ec1a83f8
   662.5 -build.xml.script.CRC32=14b2fe09
   662.6 -build.xml.stylesheet.CRC32=79c3b980@1.28.0.7
   662.7 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   662.8 -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   662.9 -nbproject/build-impl.xml.data.CRC32=9e6fb388
  662.10 -nbproject/build-impl.xml.script.CRC32=99a123ad
  662.11 -nbproject/build-impl.xml.stylesheet.CRC32=68e521fc@2.70
   663.1 --- a/sandbox/old-modules/transformer/nbproject/project.properties	Mon Dec 19 11:37:36 2016 +0100
   663.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   663.3 @@ -1,2 +0,0 @@
   663.4 -javac.source=1.5
   663.5 -javac.compilerargs=-Xlint -Xlint:-serial
   664.1 --- a/sandbox/old-modules/transformer/nbproject/project.xml	Mon Dec 19 11:37:36 2016 +0100
   664.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   664.3 @@ -1,157 +0,0 @@
   664.4 -<?xml version="1.0" encoding="UTF-8"?>
   664.5 -<project xmlns="http://www.netbeans.org/ns/project/1">
   664.6 -    <type>org.netbeans.modules.apisupport.project</type>
   664.7 -    <configuration>
   664.8 -        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
   664.9 -            <code-name-base>org.netbeans.modules.jackpot30.transformers</code-name-base>
  664.10 -            <suite-component/>
  664.11 -            <module-dependencies>
  664.12 -                <dependency>
  664.13 -                    <code-name-base>org.netbeans.api.java.classpath</code-name-base>
  664.14 -                    <build-prerequisite/>
  664.15 -                    <compile-dependency/>
  664.16 -                    <run-dependency>
  664.17 -                        <release-version>1</release-version>
  664.18 -                        <specification-version>1.19</specification-version>
  664.19 -                    </run-dependency>
  664.20 -                </dependency>
  664.21 -                <dependency>
  664.22 -                    <code-name-base>org.netbeans.libs.javacapi</code-name-base>
  664.23 -                    <build-prerequisite/>
  664.24 -                    <compile-dependency/>
  664.25 -                    <run-dependency>
  664.26 -                        <specification-version>0.8.0.1</specification-version>
  664.27 -                    </run-dependency>
  664.28 -                </dependency>
  664.29 -                <dependency>
  664.30 -                    <code-name-base>org.netbeans.modules.jackpot30.api</code-name-base>
  664.31 -                    <build-prerequisite/>
  664.32 -                    <compile-dependency/>
  664.33 -                    <run-dependency>
  664.34 -                        <specification-version>1.0</specification-version>
  664.35 -                    </run-dependency>
  664.36 -                </dependency>
  664.37 -                <dependency>
  664.38 -                    <code-name-base>org.netbeans.modules.java.hints</code-name-base>
  664.39 -                    <build-prerequisite/>
  664.40 -                    <compile-dependency/>
  664.41 -                    <run-dependency>
  664.42 -                        <release-version>1</release-version>
  664.43 -                        <implementation-version/>
  664.44 -                    </run-dependency>
  664.45 -                </dependency>
  664.46 -                <dependency>
  664.47 -                    <code-name-base>org.netbeans.modules.java.source</code-name-base>
  664.48 -                    <build-prerequisite/>
  664.49 -                    <compile-dependency/>
  664.50 -                    <run-dependency>
  664.51 -                        <specification-version>0.43.0.7.7.1</specification-version>
  664.52 -                    </run-dependency>
  664.53 -                </dependency>
  664.54 -                <dependency>
  664.55 -                    <code-name-base>org.netbeans.spi.editor.hints</code-name-base>
  664.56 -                    <build-prerequisite/>
  664.57 -                    <compile-dependency/>
  664.58 -                    <run-dependency>
  664.59 -                        <release-version>0-1</release-version>
  664.60 -                        <specification-version>1.7.0.7.2</specification-version>
  664.61 -                    </run-dependency>
  664.62 -                </dependency>
  664.63 -                <dependency>
  664.64 -                    <code-name-base>org.openide.filesystems</code-name-base>
  664.65 -                    <build-prerequisite/>
  664.66 -                    <compile-dependency/>
  664.67 -                    <run-dependency>
  664.68 -                        <specification-version>7.21.0.1.1</specification-version>
  664.69 -                    </run-dependency>
  664.70 -                </dependency>
  664.71 -                <dependency>
  664.72 -                    <code-name-base>org.openide.modules</code-name-base>
  664.73 -                    <build-prerequisite/>
  664.74 -                    <compile-dependency/>
  664.75 -                    <run-dependency>
  664.76 -                        <specification-version>7.10</specification-version>
  664.77 -                    </run-dependency>
  664.78 -                </dependency>
  664.79 -                <dependency>
  664.80 -                    <code-name-base>org.openide.util</code-name-base>
  664.81 -                    <build-prerequisite/>
  664.82 -                    <compile-dependency/>
  664.83 -                    <run-dependency>
  664.84 -                        <specification-version>7.22.0.1</specification-version>
  664.85 -                    </run-dependency>
  664.86 -                </dependency>
  664.87 -                <dependency>
  664.88 -                    <code-name-base>org.openide.util.lookup</code-name-base>
  664.89 -                    <build-prerequisite/>
  664.90 -                    <compile-dependency/>
  664.91 -                    <run-dependency>
  664.92 -                        <specification-version>8.0.0.1</specification-version>
  664.93 -                    </run-dependency>
  664.94 -                </dependency>
  664.95 -            </module-dependencies>
  664.96 -            <test-dependencies>
  664.97 -                <test-type>
  664.98 -                    <name>unit</name>
  664.99 -                    <test-dependency>
 664.100 -                        <code-name-base>org.netbeans.bootstrap</code-name-base>
 664.101 -                    </test-dependency>
 664.102 -                    <test-dependency>
 664.103 -                        <code-name-base>org.netbeans.core.startup</code-name-base>
 664.104 -                    </test-dependency>
 664.105 -                    <test-dependency>
 664.106 -                        <code-name-base>org.netbeans.libs.junit4</code-name-base>
 664.107 -                        <compile-dependency/>
 664.108 -                    </test-dependency>
 664.109 -                    <test-dependency>
 664.110 -                        <code-name-base>org.netbeans.modules.classfile</code-name-base>
 664.111 -                    </test-dependency>
 664.112 -                    <test-dependency>
 664.113 -                        <code-name-base>org.netbeans.modules.defaults</code-name-base>
 664.114 -                    </test-dependency>
 664.115 -                    <test-dependency>
 664.116 -                        <code-name-base>org.netbeans.modules.editor</code-name-base>
 664.117 -                    </test-dependency>
 664.118 -                    <test-dependency>
 664.119 -                        <code-name-base>org.netbeans.modules.editor.mimelookup</code-name-base>
 664.120 -                    </test-dependency>
 664.121 -                    <test-dependency>
 664.122 -                        <code-name-base>org.netbeans.modules.editor.settings</code-name-base>
 664.123 -                    </test-dependency>
 664.124 -                    <test-dependency>
 664.125 -                        <code-name-base>org.netbeans.modules.editor.settings.storage</code-name-base>
 664.126 -                    </test-dependency>
 664.127 -                    <test-dependency>
 664.128 -                        <code-name-base>org.netbeans.modules.editor.util</code-name-base>
 664.129 -                    </test-dependency>
 664.130 -                    <test-dependency>
 664.131 -                        <code-name-base>org.netbeans.modules.jackpot30.test.borrowed</code-name-base>
 664.132 -                        <recursive/>
 664.133 -                        <compile-dependency/>
 664.134 -                    </test-dependency>
 664.135 -                    <test-dependency>
 664.136 -                        <code-name-base>org.netbeans.modules.java.lexer</code-name-base>
 664.137 -                    </test-dependency>
 664.138 -                    <test-dependency>
 664.139 -                        <code-name-base>org.netbeans.modules.masterfs</code-name-base>
 664.140 -                    </test-dependency>
 664.141 -                    <test-dependency>
 664.142 -                        <code-name-base>org.netbeans.modules.nbjunit</code-name-base>
 664.143 -                        <recursive/>
 664.144 -                        <compile-dependency/>
 664.145 -                    </test-dependency>
 664.146 -                    <test-dependency>
 664.147 -                        <code-name-base>org.netbeans.modules.progress.ui</code-name-base>
 664.148 -                    </test-dependency>
 664.149 -                    <test-dependency>
 664.150 -                        <code-name-base>org.netbeans.modules.projectui</code-name-base>
 664.151 -                    </test-dependency>
 664.152 -                    <test-dependency>
 664.153 -                        <code-name-base>org.openidex.util</code-name-base>
 664.154 -                    </test-dependency>
 664.155 -                </test-type>
 664.156 -            </test-dependencies>
 664.157 -            <public-packages/>
 664.158 -        </data>
 664.159 -    </configuration>
 664.160 -</project>
   665.1 --- a/sandbox/old-modules/transformer/nbproject/suite.properties	Mon Dec 19 11:37:36 2016 +0100
   665.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   665.3 @@ -1,1 +0,0 @@
   665.4 -suite.dir=${basedir}/..
   666.1 Binary file sandbox/old-modules/transformer/release/libs/annotations.jar has changed
   667.1 --- a/sandbox/old-modules/transformer/src/org/netbeans/modules/jackpot30/transformers/Annotations.java	Mon Dec 19 11:37:36 2016 +0100
   667.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   667.3 @@ -1,70 +0,0 @@
   667.4 -/*
   667.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   667.6 - *
   667.7 - * Copyright 2008-2009 Sun Microsystems, Inc. All rights reserved.
   667.8 - *
   667.9 - * The contents of this file are subject to the terms of either the GNU
  667.10 - * General Public License Version 2 only ("GPL") or the Common
  667.11 - * Development and Distribution License("CDDL") (collectively, the
  667.12 - * "License"). You may not use this file except in compliance with the
  667.13 - * License. You can obtain a copy of the License at
  667.14 - * http://www.netbeans.org/cddl-gplv2.html
  667.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  667.16 - * specific language governing permissions and limitations under the
  667.17 - * License.  When distributing the software, include this License Header
  667.18 - * Notice in each file and include the License file at
  667.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  667.20 - * particular file as subject to the "Classpath" exception as provided
  667.21 - * by Sun in the GPL Version 2 section of the License file that
  667.22 - * accompanied this code. If applicable, add the following below the
  667.23 - * License Header, with the fields enclosed by brackets [] replaced by
  667.24 - * your own identifying information:
  667.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  667.26 - *
  667.27 - * If you wish your version of this file to be governed by only the CDDL
  667.28 - * or only the GPL Version 2, indicate your decision by adding
  667.29 - * "[Contributor] elects to include this software in this distribution
  667.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  667.31 - * single choice of license, a recipient has the option to distribute
  667.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  667.33 - * to extend the choice of license to its licensees as provided above.
  667.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  667.35 - * Version 2 license, then the option applies only if the new code is
  667.36 - * made subject to such option by the copyright holder.
  667.37 - *
  667.38 - * Contributor(s):
  667.39 - *
  667.40 - * Portions Copyrighted 2008-2009 Sun Microsystems, Inc.
  667.41 - */
  667.42 -
  667.43 -package org.netbeans.modules.jackpot30.transformers;
  667.44 -
  667.45 -/**
  667.46 - *
  667.47 - * @author Jan Lahoda
  667.48 - */
  667.49 -public enum Annotations {
  667.50 -
  667.51 -    TRANSFORMATION_SET("TransformationSet"),
  667.52 -    TRANSFORMATION,
  667.53 -    FIX,
  667.54 -    PATTERN,
  667.55 -    CONSTRAINT;
  667.56 -
  667.57 -    private static final String PACKAGE_NAME = "net.java.lang.annotations.";
  667.58 -    
  667.59 -    private final String specialName;
  667.60 -
  667.61 -    private Annotations() {
  667.62 -        this(null);
  667.63 -    }
  667.64 -
  667.65 -    private Annotations(String specialName) {
  667.66 -        this.specialName = specialName;
  667.67 -    }
  667.68 -    
  667.69 -    public String toFQN() {
  667.70 -        return PACKAGE_NAME + (specialName != null ? specialName : name().charAt(0) + name().substring(1).toLowerCase());
  667.71 -    }
  667.72 -
  667.73 -}
   668.1 --- a/sandbox/old-modules/transformer/src/org/netbeans/modules/jackpot30/transformers/TransformationHintProviderImpl.java	Mon Dec 19 11:37:36 2016 +0100
   668.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   668.3 @@ -1,508 +0,0 @@
   668.4 -/*
   668.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   668.6 - *
   668.7 - * Copyright 2008-2009 Sun Microsystems, Inc. All rights reserved.
   668.8 - *
   668.9 - * The contents of this file are subject to the terms of either the GNU
  668.10 - * General Public License Version 2 only ("GPL") or the Common
  668.11 - * Development and Distribution License("CDDL") (collectively, the
  668.12 - * "License"). You may not use this file except in compliance with the
  668.13 - * License. You can obtain a copy of the License at
  668.14 - * http://www.netbeans.org/cddl-gplv2.html
  668.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  668.16 - * specific language governing permissions and limitations under the
  668.17 - * License.  When distributing the software, include this License Header
  668.18 - * Notice in each file and include the License file at
  668.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  668.20 - * particular file as subject to the "Classpath" exception as provided
  668.21 - * by Sun in the GPL Version 2 section of the License file that
  668.22 - * accompanied this code. If applicable, add the following below the
  668.23 - * License Header, with the fields enclosed by brackets [] replaced bysanno
  668.24 - * your own identifying information:
  668.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  668.26 - *
  668.27 - * If you wish your version of this file to be governed by only the CDDL
  668.28 - * or only the GPL Version 2, indicate your decision by adding
  668.29 - * "[Contributor] elects to include this software in this distribution
  668.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  668.31 - * single choice of license, a recipient has the option to distribute
  668.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  668.33 - * to extend the choice of license to its licensees as provided above.
  668.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  668.35 - * Version 2 license, then the option applies only if the new code is
  668.36 - * made subject to such option by the copyright holder.
  668.37 - *
  668.38 - * Contributor(s):
  668.39 - *
  668.40 - * Portions Copyrighted 2008-2009 Sun Microsystems, Inc.
  668.41 - */
  668.42 -
  668.43 -package org.netbeans.modules.jackpot30.transformers;
  668.44 -
  668.45 -import org.netbeans.modules.java.hints.jackpot.spi.Trigger.PatternDescription;
  668.46 -import org.netbeans.modules.java.hints.spi.AbstractHint.HintSeverity;
  668.47 -import org.netbeans.modules.java.hints.jackpot.spi.support.ErrorDescriptionFactory;
  668.48 -import org.netbeans.modules.java.hints.jackpot.spi.ElementBasedHintProvider;
  668.49 -import org.netbeans.modules.java.hints.jackpot.spi.HintContext;
  668.50 -import org.netbeans.modules.java.hints.jackpot.spi.HintDescription;
  668.51 -import org.netbeans.modules.java.hints.jackpot.spi.HintDescription.Worker;
  668.52 -import org.netbeans.modules.java.hints.jackpot.spi.HintDescriptionFactory;
  668.53 -import org.netbeans.modules.java.hints.jackpot.spi.HintMetadata;
  668.54 -import org.netbeans.modules.java.hints.jackpot.spi.JavaFix;
  668.55 -import com.sun.source.tree.Tree;
  668.56 -import com.sun.source.util.SourcePositions;
  668.57 -import com.sun.source.util.TreePath;
  668.58 -import java.io.File;
  668.59 -import java.io.IOException;
  668.60 -import java.net.URL;
  668.61 -import java.util.Collection;
  668.62 -import java.util.Collections;
  668.63 -import java.util.EnumSet;
  668.64 -import java.util.HashMap;
  668.65 -import java.util.HashSet;
  668.66 -import java.util.LinkedList;
  668.67 -import java.util.List;
  668.68 -import java.util.Map;
  668.69 -import java.util.Map.Entry;
  668.70 -import java.util.Set;
  668.71 -import java.util.concurrent.atomic.AtomicBoolean;
  668.72 -import java.util.regex.Matcher;
  668.73 -import javax.lang.model.element.AnnotationMirror;
  668.74 -import javax.lang.model.element.AnnotationValue;
  668.75 -import javax.lang.model.element.Element;
  668.76 -import javax.lang.model.element.ElementKind;
  668.77 -import javax.lang.model.element.ExecutableElement;
  668.78 -import javax.lang.model.element.Modifier;
  668.79 -import javax.lang.model.element.PackageElement;
  668.80 -import javax.lang.model.element.TypeElement;
  668.81 -import javax.lang.model.type.DeclaredType;
  668.82 -import javax.lang.model.type.TypeMirror;
  668.83 -import javax.lang.model.util.ElementFilter;
  668.84 -import org.netbeans.api.java.classpath.ClassPath;
  668.85 -import org.netbeans.api.java.source.ClasspathInfo;
  668.86 -import org.netbeans.api.java.source.ClasspathInfo.PathKind;
  668.87 -import org.netbeans.api.java.source.CompilationController;
  668.88 -import org.netbeans.api.java.source.CompilationInfo;
  668.89 -import org.netbeans.api.java.source.ElementHandle;
  668.90 -import org.netbeans.api.java.source.JavaSource;
  668.91 -import org.netbeans.api.java.source.Task;
  668.92 -import org.netbeans.api.java.source.TypeMirrorHandle;
  668.93 -import org.netbeans.api.java.source.support.CancellableTreePathScanner;
  668.94 -import org.netbeans.spi.editor.hints.ErrorDescription;
  668.95 -import org.netbeans.spi.editor.hints.Fix;
  668.96 -import org.netbeans.spi.java.classpath.support.ClassPathSupport;
  668.97 -import org.openide.filesystems.FileUtil;
  668.98 -import org.openide.modules.InstalledFileLocator;
  668.99 -import org.openide.util.Exceptions;
 668.100 -
 668.101 -import org.openide.util.lookup.ServiceProvider;
 668.102 -import static org.netbeans.modules.jackpot30.transformers.Annotations.*;
 668.103 -
 668.104 -/**
 668.105 - *
 668.106 - * @author Jan Lahoda
 668.107 - */
 668.108 -@ServiceProvider(service=ElementBasedHintProvider.class)
 668.109 -public class TransformationHintProviderImpl implements ElementBasedHintProvider {
 668.110 -
 668.111 -    private JavaSource prepareJavaSource(CompilationInfo info) {
 668.112 -        ClasspathInfo currentCP = info.getClasspathInfo();
 668.113 -        ClassPath overlayCompileCP = prepareOverlayCompileCP();
 668.114 -        ClassPath extendedCompileCP = ClassPathSupport.createProxyClassPath(overlayCompileCP, currentCP.getClassPath(PathKind.COMPILE));
 668.115 -        ClassPath overlayBootCP = prepareOverlayBootCP();
 668.116 -        ClassPath extendedBootCP = ClassPathSupport.createProxyClassPath(overlayBootCP, currentCP.getClassPath(PathKind.BOOT));
 668.117 -        ClasspathInfo extendedCPInfo = ClasspathInfo.create(extendedBootCP, extendedCompileCP, currentCP.getClassPath(PathKind.SOURCE));
 668.118 -
 668.119 -        return JavaSource.create(extendedCPInfo);
 668.120 -    }
 668.121 -    
 668.122 -    public Collection<? extends HintDescription> computeHints(final CompilationInfo info) {
 668.123 -        final List<HintDescription> hints = new LinkedList<HintDescription>();
 668.124 -
 668.125 -        if (ANNOTATIONS_JAR != null && (JDK_OVERLAY_JAR != null || NB_OVERLAY_JAR != null)) {
 668.126 -            try {
 668.127 -                prepareJavaSource(info).runUserActionTask(new Task<CompilationController>() {
 668.128 -                    public void run(final CompilationController overlayInfo) throws Exception {
 668.129 -                        List<HintDescription> w = doComputeHints(info, overlayInfo);
 668.130 -
 668.131 -                        if (w != null) {
 668.132 -                            hints.addAll(w);
 668.133 -                        }
 668.134 -                    }
 668.135 -                }, true);
 668.136 -            } catch (IOException ex) {
 668.137 -                Exceptions.printStackTrace(ex);
 668.138 -            }
 668.139 -        } else {
 668.140 -            List<HintDescription> w = doComputeHints(info, null);
 668.141 -
 668.142 -            if (w != null) {
 668.143 -                hints.addAll(w);
 668.144 -            }
 668.145 -        }
 668.146 -
 668.147 -        return hints;
 668.148 -    }
 668.149 -
 668.150 -    private static final Set<ElementKind> KINDS_FOR_ELEMENT_HANDLE = EnumSet.of(
 668.151 -            ElementKind.PACKAGE, ElementKind.CLASS, ElementKind.INTERFACE, ElementKind.ENUM,
 668.152 -            ElementKind.ANNOTATION_TYPE, ElementKind.METHOD, ElementKind.CONSTRUCTOR,
 668.153 -            ElementKind.INSTANCE_INIT, ElementKind.STATIC_INIT, ElementKind.FIELD,
 668.154 -            ElementKind.ENUM_CONSTANT);
 668.155 -    
 668.156 -    private  List<HintDescription> doComputeHints(CompilationInfo info,
 668.157 -                                                  CompilationInfo overlayInfo) {
 668.158 -
 668.159 -        FindAnnotation ann = new FindAnnotation(info, overlayInfo, /*XXX*/new AtomicBoolean());
 668.160 -
 668.161 -        ann.scan(info.getCompilationUnit(), null);
 668.162 -
 668.163 -        return ann.hints;
 668.164 -    }
 668.165 -
 668.166 -    private final class FindAnnotation extends CancellableTreePathScanner<Void, Void> {
 668.167 -
 668.168 -        private final CompilationInfo info;
 668.169 -        private final CompilationInfo overlayInfo;
 668.170 -        private final List<HintDescription> hints = new LinkedList<HintDescription>();
 668.171 -
 668.172 -        public FindAnnotation(CompilationInfo info, CompilationInfo overlayInfo, AtomicBoolean cancel) {
 668.173 -            super(cancel);
 668.174 -            this.info = info;
 668.175 -            this.overlayInfo = overlayInfo;
 668.176 -        }
 668.177 -
 668.178 -        private final Set<Element> handledElements = new HashSet<Element>();
 668.179 -        
 668.180 -        private void handleElementImpl(Element el) {
 668.181 -            if (!handledElements.add(el)) return ;
 668.182 -
 668.183 -            List<HintDescription> currentHints = processAnnotations(el, el.getEnclosingElement(), info, info);
 668.184 -
 668.185 -            if (overlayInfo != null && currentHints.isEmpty() && KINDS_FOR_ELEMENT_HANDLE.contains(el.getKind())) {
 668.186 -                Element overlay = ElementHandle.create(el).resolve(overlayInfo);
 668.187 -
 668.188 -                if (overlay != null) {
 668.189 -                    currentHints = processAnnotations(overlay, overlay.getEnclosingElement(), info, overlayInfo);
 668.190 -                }
 668.191 -            }
 668.192 -
 668.193 -            this.hints.addAll(currentHints);
 668.194 -        }
 668.195 -
 668.196 -        private void handleElement(Element el) {
 668.197 -            PackageElement p = info.getElements().getPackageOf(el);
 668.198 -
 668.199 -            while (p != el) {
 668.200 -                handleElementImpl(el);
 668.201 -                el = el.getEnclosingElement();
 668.202 -            }
 668.203 -
 668.204 -            handleElementImpl(p);
 668.205 -        }
 668.206 -
 668.207 -        @Override
 668.208 -        public Void scan(Tree tree, Void p) {
 668.209 -            if (tree == null) return null;
 668.210 -
 668.211 -            TreePath tp = new TreePath(getCurrentPath(), tree);
 668.212 -            Element el = info.getTrees().getElement(tp);
 668.213 -
 668.214 -            if (el != null) {
 668.215 -                handleElement(el);
 668.216 -            }
 668.217 -
 668.218 -            return super.scan(tree, p);
 668.219 -        }
 668.220 -    }
 668.221 -
 668.222 -    private static final class WorkerImpl implements Worker {
 668.223 -        
 668.224 -        private final String displayName;
 668.225 -        private final List<FixDescription> fixDescriptions;
 668.226 -
 668.227 -        public WorkerImpl(String displayName, List<FixDescription> fixDescriptions) {
 668.228 -            this.displayName = displayName;
 668.229 -            this.fixDescriptions = fixDescriptions;
 668.230 -        }
 668.231 -
 668.232 -        public Collection<? extends ErrorDescription> createErrors(HintContext ctx) {
 668.233 -            //XXX: antipatterns not supported by the current infrastructure
 668.234 -//            TreePath tp = treePath;
 668.235 -//
 668.236 -//            while (tp != null) {
 668.237 -//                if (!pd.getPattern().checkAntipatterns(tp)) {
 668.238 -//                    return null;
 668.239 -//                }
 668.240 -//
 668.241 -//                tp = tp.getParentPath();
 668.242 -//            }
 668.243 -
 668.244 -            List<Fix> fixes = new LinkedList<Fix>();
 668.245 -
 668.246 -            for (FixDescription d : fixDescriptions) {
 668.247 -                String dn = d.getDisplayName();
 668.248 -
 668.249 -                if (dn.length() == 0) {
 668.250 -                    dn = defaultFixDisplayName(ctx.getInfo(), ctx.getVariables(), d);
 668.251 -                }
 668.252 -
 668.253 -                fixes.add(JavaFix.rewriteFix(ctx.getInfo(), dn, ctx.getPath(), d.getPattern(), ctx.getVariables(), ctx.getMultiVariables(), ctx.getVariableNames(), Collections.<String, TypeMirror>emptyMap()/*XXX: pd.pattern.getConstraints()*/));
 668.254 -            }
 668.255 -
 668.256 -            return Collections.singletonList(ErrorDescriptionFactory.forName(ctx, ctx.getPath(), displayName, fixes.toArray(new Fix[0])));
 668.257 -        }
 668.258 -    }
 668.259 -
 668.260 -    private static <T> T findValue(AnnotationMirror m, String name, Class<T> clazz) {
 668.261 -        for (Entry<? extends ExecutableElement, ? extends AnnotationValue> e : m.getElementValues().entrySet()) {
 668.262 -            if (name.equals(e.getKey().getSimpleName().toString())) {
 668.263 -                return clazz.cast(e.getValue().getValue());
 668.264 -            }
 668.265 -        }
 668.266 -
 668.267 -        TypeElement te = (TypeElement) m.getAnnotationType().asElement();
 668.268 -
 668.269 -        for (ExecutableElement ee : ElementFilter.methodsIn(te.getEnclosedElements())) {
 668.270 -            if (name.equals(ee.getSimpleName().toString())) {
 668.271 -                if (ee.getDefaultValue() == null) {
 668.272 -                    return null;
 668.273 -                }
 668.274 -                return clazz.cast(ee.getDefaultValue().getValue());
 668.275 -            }
 668.276 -        }
 668.277 -
 668.278 -        return null;
 668.279 -    }
 668.280 -
 668.281 -    private static HintDescription create(CompilationInfo info, Element el, AnnotationMirror transformation, String id, CompilationInfo fake) {
 668.282 -        Collection rawPatterns = findValue(transformation, "pattern", Collection.class);
 668.283 -
 668.284 -        if (rawPatterns == null || rawPatterns.isEmpty()) {
 668.285 -            return null;
 668.286 -        }
 668.287 -
 668.288 -        Iterable<AnnotationMirror> patterns = Utilities.checkedIterableByFilter(rawPatterns, AnnotationMirror.class, true);
 668.289 -
 668.290 -        String patternString = findValue(patterns.iterator().next(), "value", String.class);
 668.291 -
 668.292 -        if (patternString == null) {
 668.293 -            return null;
 668.294 -        }
 668.295 -
 668.296 -        Collection rawConstraints = findValue(transformation, "constraint", Collection.class);
 668.297 -
 668.298 -        if (rawConstraints == null) {
 668.299 -            return null;
 668.300 -        }
 668.301 -
 668.302 -        Iterable<AnnotationMirror> constraints = Utilities.checkedIterableByFilter(rawConstraints, AnnotationMirror.class, true);
 668.303 -        Map<String, String> variableTypes = new HashMap<String, String>();
 668.304 -
 668.305 -        for (AnnotationMirror m : constraints) {
 668.306 -            String var = findValue(m, "variable", String.class);
 668.307 -            TypeMirror tm = findValue(m, "type", TypeMirror.class);
 668.308 -
 668.309 -            if (var == null || tm == null) {
 668.310 -                return null;
 668.311 -            }
 668.312 -
 668.313 -            variableTypes.put(var, tm.toString()); //XXX: toString()
 668.314 -        }
 668.315 -
 668.316 -        if (!el.getModifiers().contains(Modifier.STATIC) && !variableTypes.containsKey("$this")) {
 668.317 -            TypeMirror parent = el.getEnclosingElement().asType();
 668.318 -
 668.319 -            variableTypes.put("$this", TypeMirrorHandle.create(fake.getTypes().erasure(parent)).resolve(info).toString()); //XXX: toString()
 668.320 -        }
 668.321 -
 668.322 -        List<String> aps = new LinkedList<String>();
 668.323 -
 668.324 -        for (AnnotationMirror ap : Utilities.checkedIterableByFilter(findValue(transformation, "antipattern", Collection.class), AnnotationMirror.class, true)) {
 668.325 -            aps.add(findValue(ap, "value", String.class));
 668.326 -        }
 668.327 -
 668.328 -        List<FixDescription> fixes = new LinkedList<FixDescription>();
 668.329 -        Collection rawFixes = findValue(transformation, "fix", Collection.class);
 668.330 -
 668.331 -        if (rawFixes == null) {
 668.332 -            return null;
 668.333 -        }
 668.334 -
 668.335 -        for (AnnotationMirror f : Utilities.checkedIterableByFilter(rawFixes, AnnotationMirror.class, true)) {
 668.336 -            String dn = findValue(f, "displayName", String.class);
 668.337 -            String to = findValue(f, "value", String.class);
 668.338 -
 668.339 -            if (dn == null || to == null) {
 668.340 -                return null;
 668.341 -            }
 668.342 -
 668.343 -            fixes.add(new FixDescription(dn, to));
 668.344 -        }
 668.345 -
 668.346 -        String displayName = findValue(transformation, "displayName", String.class);
 668.347 -
 668.348 -        if (displayName == null) {
 668.349 -            return null;//XXX
 668.350 -        }
 668.351 -
 668.352 -        HintMetadata hm = HintMetadata.Builder.create(id).setDescription(displayName, displayName).setCategory(CATEGORY).build();
 668.353 -
 668.354 -        return HintDescriptionFactory.create()
 668.355 -                                     .setMetadata(hm)
 668.356 -                                     .setTrigger(PatternDescription.create(patternString, variableTypes))
 668.357 -                                     .setWorker(new WorkerImpl(displayName, fixes))
 668.358 -                                     .produce();
 668.359 -    }
 668.360 -
 668.361 -    private static final String CATEGORY = "Transformations";
 668.362 -
 668.363 -    private static final class FixDescription {
 668.364 -        private final String displayName;
 668.365 -        private final String pattern;
 668.366 -
 668.367 -        public FixDescription(String displayName, String pattern) {
 668.368 -            this.displayName = displayName;
 668.369 -            this.pattern = pattern;
 668.370 -        }
 668.371 -
 668.372 -        public String getDisplayName() {
 668.373 -            return displayName;
 668.374 -        }
 668.375 -
 668.376 -        public String getPattern() {
 668.377 -            return pattern;
 668.378 -        }
 668.379 -
 668.380 -    }
 668.381 -
 668.382 -    private static final File ANNOTATIONS_JAR;
 668.383 -    private static final File NB_OVERLAY_JAR;
 668.384 -    private static final File JDK_OVERLAY_JAR;
 668.385 -
 668.386 -    static {
 668.387 -        ANNOTATIONS_JAR = InstalledFileLocator.getDefault().locate("libs/annotations.jar", null, false);
 668.388 -        NB_OVERLAY_JAR = InstalledFileLocator.getDefault().locate("overlay/org-netbeans-nboverlay.jar", null, false);
 668.389 -        JDK_OVERLAY_JAR = InstalledFileLocator.getDefault().locate("overlay/jdk.jar", null, false);
 668.390 -    }
 668.391 -    
 668.392 -    private ClassPath prepareOverlayCompileCP() throws IllegalArgumentException {
 668.393 -        if (NB_OVERLAY_JAR ==null) {
 668.394 -            return ClassPathSupport.createClassPath(new URL[0]);
 668.395 -        }
 668.396 -        
 668.397 -        return ClassPathSupport.createClassPath(FileUtil.urlForArchiveOrDir(NB_OVERLAY_JAR));
 668.398 -    }
 668.399 -
 668.400 -    private ClassPath prepareOverlayBootCP() throws IllegalArgumentException {
 668.401 -        if (ANNOTATIONS_JAR == null) {
 668.402 -            return ClassPathSupport.createClassPath(new URL[0]);
 668.403 -        }
 668.404 -
 668.405 -        if (JDK_OVERLAY_JAR == null) {
 668.406 -            return ClassPathSupport.createClassPath(FileUtil.urlForArchiveOrDir(ANNOTATIONS_JAR));
 668.407 -        }
 668.408 -
 668.409 -        return ClassPathSupport.createClassPath(FileUtil.urlForArchiveOrDir(ANNOTATIONS_JAR), FileUtil.urlForArchiveOrDir(JDK_OVERLAY_JAR));
 668.410 -    }
 668.411 -
 668.412 -    private List<HintDescription> processAnnotations(Element e, Element enclosing, CompilationInfo info, CompilationInfo fake) {
 668.413 -        boolean foundTransformations = false;
 668.414 -        List<HintDescription> result = new LinkedList<HintDescription>();
 668.415 -        String id;
 668.416 -        switch (e.getKind()) {
 668.417 -            case ANNOTATION_TYPE:
 668.418 -            case CLASS:
 668.419 -            case ENUM:
 668.420 -            case INTERFACE:
 668.421 -                id = fake.getElements().getBinaryName((TypeElement) e).toString();
 668.422 -                break;
 668.423 -            case FIELD:
 668.424 -            case ENUM_CONSTANT:
 668.425 -                id = fake.getElements().getBinaryName((TypeElement) enclosing).toString() + e.getSimpleName().toString();
 668.426 -                break;
 668.427 -            case CONSTRUCTOR:
 668.428 -            case METHOD:
 668.429 -                //XXX: parameters!
 668.430 -                id = fake.getElements().getBinaryName((TypeElement) enclosing).toString() + e.getSimpleName().toString();
 668.431 -                break;
 668.432 -            default:
 668.433 -                id = "no-id";
 668.434 -                break;
 668.435 -        }
 668.436 -
 668.437 -        int index = 0;
 668.438 -        
 668.439 -        for (AnnotationMirror am : e.getAnnotationMirrors()) {
 668.440 -            String fqn = ((TypeElement) am.getAnnotationType().asElement()).getQualifiedName().toString();
 668.441 -            List<AnnotationMirror> transformations = new LinkedList<AnnotationMirror>();
 668.442 -            if (TRANSFORMATION.toFQN().equals(fqn)) {
 668.443 -                transformations.add(am);
 668.444 -                foundTransformations = true;
 668.445 -            }
 668.446 -            if (TRANSFORMATION_SET.toFQN().equals(fqn)) {
 668.447 -                for (AnnotationMirror m : Utilities.checkedIterableByFilter(findValue(am, "value", Collection.class), AnnotationMirror.class, true)) {
 668.448 -                    transformations.add(m);
 668.449 -                }
 668.450 -                foundTransformations = true;
 668.451 -            }
 668.452 -            
 668.453 -            for (AnnotationMirror t : transformations) {
 668.454 -                HintDescription pd = create(info, e, t, id + "-" + (index++), fake);
 668.455 -
 668.456 -                if (pd != null) {
 668.457 -                    result.add(pd);
 668.458 -                }
 668.459 -            }
 668.460 -        }
 668.461 -
 668.462 -        if (!foundTransformations && e.getKind() == ElementKind.METHOD) {
 668.463 -            TypeElement owner = (TypeElement) e.getEnclosingElement();
 668.464 -
 668.465 -            for (TypeMirror tm : fake.getTypes().directSupertypes(owner.asType())) {
 668.466 -                DeclaredType dt     = (DeclaredType) tm;
 668.467 -                TypeElement  parent = (TypeElement)  dt.asElement();
 668.468 -
 668.469 -                for (ExecutableElement ee : ElementFilter.methodsIn(parent.getEnclosedElements())) {
 668.470 -                    if (!fake.getElements().overrides((ExecutableElement) e, ee, (TypeElement) enclosing)) {
 668.471 -                        continue;
 668.472 -                    }
 668.473 -                    List<HintDescription> r = processAnnotations(ee, enclosing, info, fake);
 668.474 -
 668.475 -                    result.addAll(r);
 668.476 -                }
 668.477 -
 668.478 -            }
 668.479 -        }
 668.480 -
 668.481 -        return result;
 668.482 -    }
 668.483 -
 668.484 -    private static String defaultFixDisplayName(CompilationInfo info, Map<String, TreePath> variables, FixDescription d) {
 668.485 -        Map<String, String> stringsForVariables = new HashMap<String, String>();
 668.486 -
 668.487 -        for (Entry<String, TreePath> e : variables.entrySet()) {
 668.488 -            Tree t = e.getValue().getLeaf();
 668.489 -            SourcePositions sp = info.getTrees().getSourcePositions();
 668.490 -            int startPos = (int) sp.getStartPosition(info.getCompilationUnit(), t);
 668.491 -            int endPos = (int) sp.getEndPosition(info.getCompilationUnit(), t);
 668.492 -            
 668.493 -            stringsForVariables.put(e.getKey(), info.getText().substring(startPos, endPos));
 668.494 -        }
 668.495 -
 668.496 -        if (!stringsForVariables.containsKey("$this")) {
 668.497 -            stringsForVariables.put("$this", "this");
 668.498 -        }
 668.499 -
 668.500 -        String replaceTarget = d.getPattern();
 668.501 -
 668.502 -        for (Entry<String, String> e : stringsForVariables.entrySet()) {
 668.503 -            String quotedVariable = java.util.regex.Pattern.quote(e.getKey());
 668.504 -            String quotedTarget = Matcher.quoteReplacement(e.getValue());
 668.505 -            replaceTarget = replaceTarget.replaceAll(quotedVariable, quotedTarget);
 668.506 -        }
 668.507 -
 668.508 -        return "Rewrite to " + replaceTarget;
 668.509 -    }
 668.510 -
 668.511 -}
   669.1 --- a/sandbox/old-modules/transformer/src/org/netbeans/modules/jackpot30/transformers/Utilities.java	Mon Dec 19 11:37:36 2016 +0100
   669.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   669.3 @@ -1,138 +0,0 @@
   669.4 -/*
   669.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   669.6 - *
   669.7 - * Copyright 2008-2009 Sun Microsystems, Inc. All rights reserved.
   669.8 - *
   669.9 - * The contents of this file are subject to the terms of either the GNU
  669.10 - * General Public License Version 2 only ("GPL") or the Common
  669.11 - * Development and Distribution License("CDDL") (collectively, the
  669.12 - * "License"). You may not use this file except in compliance with the
  669.13 - * License. You can obtain a copy of the License at
  669.14 - * http://www.netbeans.org/cddl-gplv2.html
  669.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  669.16 - * specific language governing permissions and limitations under the
  669.17 - * License.  When distributing the software, include this License Header
  669.18 - * Notice in each file and include the License file at
  669.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  669.20 - * particular file as subject to the "Classpath" exception as provided
  669.21 - * by Sun in the GPL Version 2 section of the License file that
  669.22 - * accompanied this code. If applicable, add the following below the
  669.23 - * License Header, with the fields enclosed by brackets [] replaced by
  669.24 - * your own identifying information:
  669.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  669.26 - *
  669.27 - * If you wish your version of this file to be governed by only the CDDL
  669.28 - * or only the GPL Version 2, indicate your decision by adding
  669.29 - * "[Contributor] elects to include this software in this distribution
  669.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  669.31 - * single choice of license, a recipient has the option to distribute
  669.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  669.33 - * to extend the choice of license to its licensees as provided above.
  669.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  669.35 - * Version 2 license, then the option applies only if the new code is
  669.36 - * made subject to such option by the copyright holder.
  669.37 - *
  669.38 - * Contributor(s):
  669.39 - *
  669.40 - * Portions Copyrighted 2008-2009 Sun Microsystems, Inc.
  669.41 - */
  669.42 -
  669.43 -package org.netbeans.modules.jackpot30.transformers;
  669.44 -
  669.45 -import com.sun.source.tree.AnnotationTree;
  669.46 -import com.sun.source.tree.AssignmentTree;
  669.47 -import com.sun.source.tree.ExpressionTree;
  669.48 -import com.sun.source.tree.IdentifierTree;
  669.49 -import com.sun.source.tree.LiteralTree;
  669.50 -import com.sun.source.tree.MemberSelectTree;
  669.51 -import com.sun.source.tree.NewArrayTree;
  669.52 -import com.sun.source.tree.Tree;
  669.53 -import com.sun.source.tree.Tree.Kind;
  669.54 -import java.util.Arrays;
  669.55 -import java.util.Iterator;
  669.56 -import java.util.LinkedList;
  669.57 -import java.util.List;
  669.58 -import javax.lang.model.element.TypeElement;
  669.59 -import javax.lang.model.type.TypeMirror;
  669.60 -import org.netbeans.api.java.source.TreeMaker;
  669.61 -import org.netbeans.api.java.source.WorkingCopy;
  669.62 -import org.openide.util.NbCollections;
  669.63 -
  669.64 -/**
  669.65 - *
  669.66 - * @author Jan Lahoda
  669.67 - */
  669.68 -public class Utilities {
  669.69 -
  669.70 -    private Utilities() {}
  669.71 -
  669.72 -    public static <E> Iterable<E> checkedIterableByFilter(final Iterable raw, final Class<E> type, final boolean strict) {
  669.73 -        return new Iterable<E>() {
  669.74 -            public Iterator<E> iterator() {
  669.75 -                return NbCollections.checkedIteratorByFilter(raw.iterator(), type, strict);
  669.76 -            }
  669.77 -        };
  669.78 -    }
  669.79 -    
  669.80 -//    public static AnnotationTree constructConstraint(WorkingCopy wc, String name, TypeMirror tm) {
  669.81 -//        TreeMaker make = wc.getTreeMaker();
  669.82 -//        ExpressionTree variable = prepareAssignment(make, "variable", make.Literal(name));
  669.83 -//        ExpressionTree type     = prepareAssignment(make, "type", make.MemberSelect((ExpressionTree) make.Type(wc.getTypes().erasure(tm)), "class"));
  669.84 -//        TypeElement constraint  = wc.getElements().getTypeElement(Annotations.CONSTRAINT.toFQN());
  669.85 -//
  669.86 -//        return make.Annotation(make.QualIdent(constraint), Arrays.asList(variable, type));
  669.87 -//    }
  669.88 -
  669.89 -    public static ExpressionTree prepareAssignment(TreeMaker make, String name, ExpressionTree value) {
  669.90 -        return make.Assignment(make.Identifier(name), value);
  669.91 -    }
  669.92 -
  669.93 -    public static ExpressionTree findValue(AnnotationTree m, String name) {
  669.94 -        for (ExpressionTree et : m.getArguments()) {
  669.95 -            if (et.getKind() == Kind.ASSIGNMENT) {
  669.96 -                AssignmentTree at = (AssignmentTree) et;
  669.97 -                String varName = ((IdentifierTree) at.getVariable()).getName().toString();
  669.98 -
  669.99 -                if (varName.equals(name)) {
 669.100 -                    return at.getExpression();
 669.101 -                }
 669.102 -            }
 669.103 -
 669.104 -            if (et instanceof LiteralTree/*XXX*/ && "value".equals(name)) {
 669.105 -                return et;
 669.106 -            }
 669.107 -        }
 669.108 -
 669.109 -        return null;
 669.110 -    }
 669.111 -
 669.112 -    public static List<AnnotationTree> findArrayValue(AnnotationTree at, String name) {
 669.113 -        ExpressionTree fixesArray = findValue(at, name);
 669.114 -        List<AnnotationTree> fixes = new LinkedList<AnnotationTree>();
 669.115 -
 669.116 -        if (fixesArray != null && fixesArray.getKind() == Kind.NEW_ARRAY) {
 669.117 -            NewArrayTree trees = (NewArrayTree) fixesArray;
 669.118 -
 669.119 -            for (ExpressionTree fix : trees.getInitializers()) {
 669.120 -                if (fix.getKind() == Kind.ANNOTATION) {
 669.121 -                    fixes.add((AnnotationTree) fix);
 669.122 -                }
 669.123 -            }
 669.124 -        }
 669.125 -
 669.126 -        if (fixesArray != null && fixesArray.getKind() == Kind.ANNOTATION) {
 669.127 -            fixes.add((AnnotationTree) fixesArray);
 669.128 -        }
 669.129 -        
 669.130 -        return fixes;
 669.131 -    }
 669.132 -
 669.133 -    public static boolean isPureMemberSelect(Tree mst, boolean allowVariables) {
 669.134 -        switch (mst.getKind()) {
 669.135 -            case IDENTIFIER: return allowVariables || ((IdentifierTree) mst).getName().charAt(0) != '$';
 669.136 -            case MEMBER_SELECT: return isPureMemberSelect(((MemberSelectTree) mst).getExpression(), allowVariables);
 669.137 -            default: return false;
 669.138 -        }
 669.139 -    }
 669.140 -
 669.141 -}
   670.1 --- a/sandbox/old-modules/transformer/src/org/netbeans/modules/jackpot30/transformers/resources/Bundle.properties	Mon Dec 19 11:37:36 2016 +0100
   670.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   670.3 @@ -1,38 +0,0 @@
   670.4 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   670.5 -#
   670.6 -# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
   670.7 -#
   670.8 -# The contents of this file are subject to the terms of either the GNU
   670.9 -# General Public License Version 2 only ("GPL") or the Common
  670.10 -# Development and Distribution License("CDDL") (collectively, the
  670.11 -# "License"). You may not use this file except in compliance with the
  670.12 -# License. You can obtain a copy of the License at
  670.13 -# http://www.netbeans.org/cddl-gplv2.html
  670.14 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  670.15 -# specific language governing permissions and limitations under the
  670.16 -# License.  When distributing the software, include this License Header
  670.17 -# Notice in each file and include the License file at
  670.18 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  670.19 -# particular file as subject to the "Classpath" exception as provided
  670.20 -# by Sun in the GPL Version 2 section of the License file that
  670.21 -# accompanied this code. If applicable, add the following below the
  670.22 -# License Header, with the fields enclosed by brackets [] replaced by
  670.23 -# your own identifying information:
  670.24 -# "Portions Copyrighted [year] [name of copyright owner]"
  670.25 -#
  670.26 -# If you wish your version of this file to be governed by only the CDDL
  670.27 -# or only the GPL Version 2, indicate your decision by adding
  670.28 -# "[Contributor] elects to include this software in this distribution
  670.29 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
  670.30 -# single choice of license, a recipient has the option to distribute
  670.31 -# your version of this file under either the CDDL, the GPL Version 2 or
  670.32 -# to extend the choice of license to its licensees as provided above.
  670.33 -# However, if you add GPL Version 2 code and therefore, elected the GPL
  670.34 -# Version 2 license, then the option applies only if the new code is
  670.35 -# made subject to such option by the copyright holder.
  670.36 -#
  670.37 -# Contributor(s):
  670.38 -#
  670.39 -# Portions Copyrighted 2009 Sun Microsystems, Inc.
  670.40 -
  670.41 -OpenIDE-Module-Name=Jackpot 3.0 Transformations
   671.1 --- a/sandbox/old-modules/transformer/src/org/netbeans/modules/jackpot30/transformers/resources/layer.xml	Mon Dec 19 11:37:36 2016 +0100
   671.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   671.3 @@ -1,4 +0,0 @@
   671.4 -<?xml version="1.0" encoding="UTF-8"?>
   671.5 -<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
   671.6 -<filesystem>
   671.7 -</filesystem>
   672.1 --- a/sandbox/old-modules/transformer/test/unit/src/org/netbeans/modules/jackpot30/transformers/TransformationHintProviderImplTest.java	Mon Dec 19 11:37:36 2016 +0100
   672.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   672.3 @@ -1,555 +0,0 @@
   672.4 -/*
   672.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   672.6 - *
   672.7 - * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
   672.8 - *
   672.9 - * The contents of this file are subject to the terms of either the GNU
  672.10 - * General Public License Version 2 only ("GPL") or the Common
  672.11 - * Development and Distribution License("CDDL") (collectively, the
  672.12 - * "License"). You may not use this file except in compliance with the
  672.13 - * License. You can obtain a copy of the License at
  672.14 - * http://www.netbeans.org/cddl-gplv2.html
  672.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  672.16 - * specific language governing permissions and limitations under the
  672.17 - * License.  When distributing the software, include this License Header
  672.18 - * Notice in each file and include the License file at
  672.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  672.20 - * particular file as subject to the "Classpath" exception as provided
  672.21 - * by Sun in the GPL Version 2 section of the License file that
  672.22 - * accompanied this code. If applicable, add the following below the
  672.23 - * License Header, with the fields enclosed by brackets [] replaced by
  672.24 - * your own identifying information:
  672.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  672.26 - *
  672.27 - * If you wish your version of this file to be governed by only the CDDL
  672.28 - * or only the GPL Version 2, indicate your decision by adding
  672.29 - * "[Contributor] elects to include this software in this distribution
  672.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  672.31 - * single choice of license, a recipient has the option to distribute
  672.32 - * your version of this file under either the CDDL, the GPL Version 2 or
  672.33 - * to extend the choice of license to its licensees as provided above.
  672.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  672.35 - * Version 2 license, then the option applies only if the new code is
  672.36 - * made subject to such option by the copyright holder.
  672.37 - *
  672.38 - * Contributor(s):
  672.39 - *
  672.40 - * Portions Copyrighted 2008 Sun Microsystems, Inc.
  672.41 - */
  672.42 -
  672.43 -package org.netbeans.modules.jackpot30.transformers;
  672.44 -
  672.45 -import com.sun.source.tree.Tree.Kind;
  672.46 -import java.io.File;
  672.47 -import java.io.IOException;
  672.48 -import java.util.ArrayList;
  672.49 -import java.util.Arrays;
  672.50 -import java.util.Collections;
  672.51 -import java.util.HashMap;
  672.52 -import java.util.LinkedList;
  672.53 -import java.util.List;
  672.54 -import java.util.Map;
  672.55 -import java.util.concurrent.atomic.AtomicBoolean;
  672.56 -import javax.swing.text.Document;
  672.57 -import org.netbeans.api.java.lexer.JavaTokenId;
  672.58 -import org.netbeans.api.java.source.CompilationInfo;
  672.59 -import org.netbeans.api.java.source.JavaSource;
  672.60 -import org.netbeans.api.java.source.JavaSource.Phase;
  672.61 -import org.netbeans.api.java.source.SourceUtilsTestUtil;
  672.62 -import org.netbeans.api.java.source.TestUtilities;
  672.63 -import org.netbeans.api.lexer.Language;
  672.64 -import org.netbeans.junit.NbTestCase;
  672.65 -import org.netbeans.modules.java.hints.jackpot.impl.RulesManager;
  672.66 -import org.netbeans.modules.java.hints.jackpot.impl.hints.HintsInvoker;
  672.67 -import org.netbeans.modules.java.hints.jackpot.spi.ClassPathBasedHintProvider;
  672.68 -import org.netbeans.modules.java.hints.jackpot.spi.HintDescription;
  672.69 -import org.netbeans.modules.java.hints.jackpot.spi.Trigger.PatternDescription;
  672.70 -import org.netbeans.modules.java.source.TreeLoader;
  672.71 -import org.netbeans.spi.editor.hints.ErrorDescription;
  672.72 -import org.netbeans.spi.editor.hints.Fix;
  672.73 -import org.openide.LifecycleManager;
  672.74 -import org.openide.cookies.EditorCookie;
  672.75 -import org.openide.filesystems.FileObject;
  672.76 -import org.openide.filesystems.FileUtil;
  672.77 -import org.openide.loaders.DataObject;
  672.78 -import org.openide.modules.InstalledFileLocator;
  672.79 -
  672.80 -/**
  672.81 - *
  672.82 - * @author Jan Lahoda
  672.83 - */
  672.84 -public class TransformationHintProviderImplTest extends NbTestCase {
  672.85 -
  672.86 -    public TransformationHintProviderImplTest(String name) {
  672.87 -        super(name);
  672.88 -    }
  672.89 -
  672.90 -    public void testSimpleAnalysis() throws Exception {
  672.91 -        performAnalysisTest("package test;\n" +
  672.92 -                            "import net.java.lang.annotations.Constraint;\n" +
  672.93 -                            "import net.java.lang.annotations.Fix;\n" +
  672.94 -                            "import net.java.lang.annotations.Pattern;\n" +
  672.95 -                            "import net.java.lang.annotations.Transformation;\n" +
  672.96 -                            "public class Test {\n" +
  672.97 -                            "    @Transformation(\n" +
  672.98 -                            "        displayName=\"O\",\n" +
  672.99 -                            "        pattern=@Pattern(\"$0.getCookie($1)\"),\n" +
 672.100 -                            "        constraint={\n" +
 672.101 -                            "            @Constraint(variable=\"$0\", type=Test.class),\n" +
 672.102 -                            "            @Constraint(variable=\"$1\", type=Class.class)\n" +
 672.103 -                            "        },\n" +
 672.104 -                            "        fix=@Fix(\"$0.lookup($1)\")\n" +
 672.105 -                            "    )\n" +
 672.106 -                            "    public void getCookie(Class c) {}\n" +
 672.107 -                            "    private void test() {\n" +
 672.108 -                            "         getCookie(null);\n" +
 672.109 -                            "    }\n" +
 672.110 -                            "}\n",
 672.111 -                            "17:9-17:18:verifier:O");
 672.112 -    }
 672.113 -
 672.114 -    public void testCanGoUp() throws Exception {
 672.115 -        performAnalysisTest("package test;\n" +
 672.116 -                            "import net.java.lang.annotations.Constraint;\n" +
 672.117 -                            "import net.java.lang.annotations.Fix;\n" +
 672.118 -                            "import net.java.lang.annotations.Pattern;\n" +
 672.119 -                            "import net.java.lang.annotations.Transformation;\n" +
 672.120 -                            "public abstract class Test {\n" +
 672.121 -                            "    @Transformation(\n" +
 672.122 -                            "        displayName=\"O\",\n" +
 672.123 -                            "        pattern=@Pattern(\"$0.getCookie().toString()\"),\n" +
 672.124 -                            "        constraint={\n" +
 672.125 -                            "            @Constraint(variable=\"$0\", type=Test.class)\n" +
 672.126 -                            "        },\n" +
 672.127 -                            "        fix=@Fix(\"$0.lookup($1)\")\n" +
 672.128 -                            "    )\n" +
 672.129 -                            "    public abstract String getCookie();\n" +
 672.130 -                            "    private void test() {\n" +
 672.131 -                            "         getCookie().toString();\n" +
 672.132 -                            "    }\n" +
 672.133 -                            "}\n",
 672.134 -                            "16:21-16:29:verifier:O");
 672.135 -    }
 672.136 -
 672.137 -    public void testForConstructor() throws Exception {
 672.138 -        performAnalysisTest("package test;\n" +
 672.139 -                            "import net.java.lang.annotations.Constraint;\n" +
 672.140 -                            "import net.java.lang.annotations.Fix;\n" +
 672.141 -                            "import net.java.lang.annotations.Pattern;\n" +
 672.142 -                            "import net.java.lang.annotations.Transformation;\n" +
 672.143 -                            "public class Test {\n" +
 672.144 -                            "    @Transformation(\n" +
 672.145 -                            "        displayName=\"O\",\n" +
 672.146 -                            "        pattern=@Pattern(\"new test.Test()\"),\n" +
 672.147 -                            "        fix={}\n" +
 672.148 -                            "    )\n" +
 672.149 -                            "    public Test() {}\n" +
 672.150 -                            "    private void test() {\n" +
 672.151 -                            "         new Test();\n" +
 672.152 -                            "    }\n" +
 672.153 -                            "}\n",
 672.154 -                            "13:9-13:19:verifier:O");
 672.155 -    }
 672.156 -
 672.157 -    public void testMoreWarnings() throws Exception {
 672.158 -        performAnalysisTest("package test;\n" +
 672.159 -                            "import net.java.lang.annotations.Constraint;\n" +
 672.160 -                            "import net.java.lang.annotations.Fix;\n" +
 672.161 -                            "import net.java.lang.annotations.Pattern;\n" +
 672.162 -                            "import net.java.lang.annotations.Transformation;\n" +
 672.163 -                            "public class Test {\n" +
 672.164 -                            "    @Transformation(\n" +
 672.165 -                            "        displayName=\"O\",\n" +
 672.166 -                            "        pattern=@Pattern(\"new test.Test()\"),\n" +
 672.167 -                            "        fix={}\n" +
 672.168 -                            "    )\n" +
 672.169 -                            "    public Test() {}\n" +
 672.170 -                            "    private void test() {\n" +
 672.171 -                            "         new Test();\n" +
 672.172 -                            "         new Test();\n" +
 672.173 -                            "    }\n" +
 672.174 -                            "}\n",
 672.175 -                            "13:9-13:19:verifier:O",
 672.176 -                            "14:9-14:19:verifier:O");
 672.177 -    }
 672.178 -
 672.179 -    public void testCorrectImports() throws Exception {
 672.180 -        performFixTest("test/Test.java",
 672.181 -                            "package test;\n" +
 672.182 -                            "import net.java.lang.annotations.Constraint;\n" +
 672.183 -                            "import net.java.lang.annotations.Fix;\n" +
 672.184 -                            "import net.java.lang.annotations.Pattern;\n" +
 672.185 -                            "import net.java.lang.annotations.Transformation;\n" +
 672.186 -                            "public abstract class Test {\n" +
 672.187 -                            "    @Transformation(\n" +
 672.188 -                            "        displayName=\"O\",\n" +
 672.189 -                            "        pattern=@Pattern(\"$this.test()\"),\n" +
 672.190 -                            "        fix=@Fix(\"test.Test.test1().toString()\")\n" +
 672.191 -                            "    )\n" +
 672.192 -                            "    private void test() {\n" +
 672.193 -                            "         test();\n" +
 672.194 -                            "    }" +
 672.195 -                            "    static String test1() {return null;}\n" +
 672.196 -                            "}\n",
 672.197 -                            "12:9-12:13:verifier:O",
 672.198 -                            "FixImpl",
 672.199 -                            "package test;\n" +
 672.200 -                            "import net.java.lang.annotations.Constraint;\n" +
 672.201 -                            "import net.java.lang.annotations.Fix;\n" +
 672.202 -                            "import net.java.lang.annotations.Pattern;\n" +
 672.203 -                            "import net.java.lang.annotations.Transformation;\n" +
 672.204 -                            "public abstract class Test {\n" +
 672.205 -                            "    @Transformation(\n" +
 672.206 -                            "        displayName=\"O\",\n" +
 672.207 -                            "        pattern=@Pattern(\"$this.test()\"),\n" +
 672.208 -                            "        fix=@Fix(\"test.Test.test1().toString()\")\n" +
 672.209 -                            "    )\n" +
 672.210 -                            "    private void test() {\n" +
 672.211 -                            "         Test.test1().toString();\n" +
 672.212 -                            "    }" +
 672.213 -                            "    static String test1() {return null;}\n" +
 672.214 -                            "}\n");
 672.215 -    }
 672.216 -
 672.217 -    public void testNoExceptions1() throws Exception {
 672.218 -        performNoExceptionsTest("package test;\n" +
 672.219 -                                "import net.java.lang.annotations.Constraint;\n" +
 672.220 -                                "import net.java.lang.annotations.Fix;\n" +
 672.221 -                                "import net.java.lang.annotations.Pattern;\n" +
 672.222 -                                "import net.java.lang.annotations.Transformation;\n" +
 672.223 -                                "public abstract class Test {\n" +
 672.224 -                                "    |public abstract String getCookie();\n" +
 672.225 -                                "    private void test() {\n" +
 672.226 -                                "         getCookie().toString();\n" +
 672.227 -                                "    }\n" +
 672.228 -                                "}\n",
 672.229 -                                "    @Transformation(\n" +
 672.230 -                                "        displayName=\"O\",\n" +
 672.231 -                                "        pattern=@Pattern(\"$0.getCookie().toString()\"),\n" +
 672.232 -                                "        constraint={\n" +
 672.233 -                                "            @Constraint(variable=\"$0\", type=Test.class)\n" +
 672.234 -                                "        },\n" +
 672.235 -                                "        fix={@Fix(\"$0.lookup($1)\")}\n" +
 672.236 -                                "    )\n".replaceAll("[ \n]+", " "));
 672.237 -    }
 672.238 -
 672.239 -    public void testNoExceptions2() throws Exception {
 672.240 -        performNoExceptionsTest("package test;\n" +
 672.241 -                                "import net.java.lang.annotations.Constraint;\n" +
 672.242 -                                "import net.java.lang.annotations.Fix;\n" +
 672.243 -                                "import net.java.lang.annotations.Pattern;\n" +
 672.244 -                                "import net.java.lang.annotations.Transformation;\n" +
 672.245 -                                "public abstract class Test {\n" +
 672.246 -                                "    |public abstract String getCookie();\n" +
 672.247 -                                "    private void test() {\n" +
 672.248 -                                "         getCookie().toString();\n" +
 672.249 -                                "    }\n" +
 672.250 -                                "}\n",
 672.251 -                                "    @Transformation(\n" +
 672.252 -                                "        displayName=\"O\",\n" +
 672.253 -                                "        pattern=@Pattern(\"$0.getCookie().toString()\"),\n" +
 672.254 -                                "        constraint=\n" +
 672.255 -                                "            @Constraint(variable=\"$0\", type=Test.class)\n" +
 672.256 -                                "        ,\n" +
 672.257 -                                "        fix=@Fix(\"$0.lookup($1)\")\n" +
 672.258 -                                "    )\n".replaceAll("[ \n]+", " "));
 672.259 -    }
 672.260 -
 672.261 -    public void testType1() throws Exception {
 672.262 -        performFixTest("test/Test.java",
 672.263 -                            "package test;\n" +
 672.264 -                            "import net.java.lang.annotations.Constraint;\n" +
 672.265 -                            "import net.java.lang.annotations.Fix;\n" +
 672.266 -                            "import net.java.lang.annotations.Pattern;\n" +
 672.267 -                            "import net.java.lang.annotations.Transformation;\n" +
 672.268 -                            "public abstract class Test {\n" +
 672.269 -                            "    @Transformation(\n" +
 672.270 -                            "        displayName=\"O\",\n" +
 672.271 -                            "        pattern=@Pattern(\"test.Test.Bad\"),\n" +
 672.272 -                            "        fix=@Fix(\"test.Test.Good\")\n" +
 672.273 -                            "    )\n" +
 672.274 -                            "    public static class Bad {}\n" +
 672.275 -                            "    public static class Good {}\n" +
 672.276 -                            "    static void test1() { Bad b; }\n" +
 672.277 -                            "}\n",
 672.278 -                            "13:26-13:29:verifier:O",
 672.279 -                            "FixImpl",
 672.280 -                            "package test;\n" +
 672.281 -                            "import net.java.lang.annotations.Constraint;\n" +
 672.282 -                            "import net.java.lang.annotations.Fix;\n" +
 672.283 -                            "import net.java.lang.annotations.Pattern;\n" +
 672.284 -                            "import net.java.lang.annotations.Transformation;\n" +
 672.285 -                            "public abstract class Test {\n" +
 672.286 -                            "    @Transformation(\n" +
 672.287 -                            "        displayName=\"O\",\n" +
 672.288 -                            "        pattern=@Pattern(\"test.Test.Bad\"),\n" +
 672.289 -                            "        fix=@Fix(\"test.Test.Good\")\n" +
 672.290 -                            "    )\n" +
 672.291 -                            "    public static class Bad {}\n" +
 672.292 -                            "    public static class Good {}\n" +
 672.293 -                            "    static void test1() { Good b; }\n" +
 672.294 -                            "}\n".replaceAll("[ \n]+", " "));
 672.295 -    }
 672.296 -
 672.297 -    public void testCorrectReplace() throws Exception {
 672.298 -        performFixTest("test/Test.java",
 672.299 -                            "package test;\n" +
 672.300 -                            "import net.java.lang.annotations.Constraint;\n" +
 672.301 -                            "import net.java.lang.annotations.Fix;\n" +
 672.302 -                            "import net.java.lang.annotations.Pattern;\n" +
 672.303 -                            "import net.java.lang.annotations.Transformation;\n" +
 672.304 -                            "public class Test {\n" +
 672.305 -                            "    @Transformation(\n" +
 672.306 -                            "        displayName=\"O\",\n" +
 672.307 -                            "        pattern=@Pattern(\"$this.test()\"),\n" +
 672.308 -                            "        fix=@Fix(\"$this.test()\")\n" +
 672.309 -                            "    )\n" +
 672.310 -                            "    private void test() {\n" +
 672.311 -                            "         new Test().test();\n" +
 672.312 -                            "    }\n" +
 672.313 -                            "}\n",
 672.314 -                            "12:20-12:24:verifier:O",
 672.315 -                            "FixImpl",
 672.316 -                            "package test;\n" +
 672.317 -                            "import net.java.lang.annotations.Constraint;\n" +
 672.318 -                            "import net.java.lang.annotations.Fix;\n" +
 672.319 -                            "import net.java.lang.annotations.Pattern;\n" +
 672.320 -                            "import net.java.lang.annotations.Transformation;\n" +
 672.321 -                            "public class Test {\n" +
 672.322 -                            "    @Transformation(\n" +
 672.323 -                            "        displayName=\"O\",\n" +
 672.324 -                            "        pattern=@Pattern(\"$this.test()\"),\n" +
 672.325 -                            "        fix=@Fix(\"$this.test()\")\n" +
 672.326 -                            "    )\n" +
 672.327 -                            "    private void test() {\n" +
 672.328 -                            "         new Test().test();\n" +
 672.329 -                            "    }\n" +
 672.330 -                            "}\n");
 672.331 -    }
 672.332 -
 672.333 -    @Override
 672.334 -    protected void setUp() throws Exception {
 672.335 -        super.setUp();
 672.336 -        
 672.337 -        File jar = FileUtil.archiveOrDirForURL(TransformationHintProviderImpl.class.getProtectionDomain().getCodeSource().getLocation());
 672.338 -
 672.339 -        assertNotNull(jar);
 672.340 -
 672.341 -        String nbHome = jar.getParentFile().getParentFile().getAbsolutePath();
 672.342 -
 672.343 -        System.setProperty("netbeans.home",nbHome);
 672.344 -
 672.345 -        SourceUtilsTestUtil.prepareTest(new String[] {"org/netbeans/modules/java/editor/resources/layer.xml"}, new Object[0]);
 672.346 -        TreeLoader.DISABLE_CONFINEMENT_TEST = true;
 672.347 -    }
 672.348 -
 672.349 -    private List<ErrorDescription> computeWarnings() {
 672.350 -        List<HintDescription> hints = new ArrayList<HintDescription>();
 672.351 -
 672.352 -        RulesManager.computeElementBasedHintsXXX(info, new AtomicBoolean(), Collections.singletonList(new TransformationHintProviderImpl()), Collections.<ClassPathBasedHintProvider>emptyList(), hints);
 672.353 -
 672.354 -        List<ErrorDescription> warnings = new HintsInvoker(info, new AtomicBoolean()).computeHints(info, hints);
 672.355 -
 672.356 -        return warnings;
 672.357 -    }
 672.358 -
 672.359 -    private void prepareTest(String fileName, String code) throws Exception {
 672.360 -        prepareTest(fileName, code, false);
 672.361 -    }
 672.362 -
 672.363 -    private void prepareTest(String fileName, String code, boolean ignoreErrors) throws Exception {
 672.364 -        clearWorkDir();
 672.365 -
 672.366 -        FileUtil.refreshFor(File.listRoots());
 672.367 -
 672.368 -        FileObject workFO = FileUtil.toFileObject(getWorkDir());
 672.369 -
 672.370 -        assertNotNull(workFO);
 672.371 -
 672.372 -        workFO.refresh();
 672.373 -
 672.374 -        sourceRoot = workFO.createFolder("src");
 672.375 -        FileObject buildRoot  = workFO.createFolder("build");
 672.376 -        FileObject cache = workFO.createFolder("cache");
 672.377 -
 672.378 -        FileObject data = FileUtil.createData(sourceRoot, fileName);
 672.379 -        File dataFile = FileUtil.toFile(data);
 672.380 -
 672.381 -        assertNotNull(dataFile);
 672.382 -
 672.383 -        TestUtilities.copyStringToFile(dataFile, code);
 672.384 -
 672.385 -        File ann = InstalledFileLocator.getDefault().locate("libs/annotations.jar", null, false);
 672.386 -
 672.387 -        if (ann == null) {
 672.388 -            ann = InstalledFileLocator.getDefault().locate("release/libs/annotations.jar", null, false);
 672.389 -        }
 672.390 -
 672.391 -        assertNotNull(System.getProperty("netbeans.home"), ann);
 672.392 -
 672.393 -        FileObject annFO = FileUtil.toFileObject(ann);
 672.394 -
 672.395 -        assertNotNull(annFO);
 672.396 -
 672.397 -        SourceUtilsTestUtil.prepareTest(sourceRoot, buildRoot, cache, new FileObject[] {FileUtil.getArchiveRoot(annFO)});
 672.398 -
 672.399 -        DataObject od = DataObject.find(data);
 672.400 -        EditorCookie ec = od.getLookup().lookup(EditorCookie.class);
 672.401 -
 672.402 -        assertNotNull(ec);
 672.403 -
 672.404 -        doc = ec.openDocument();
 672.405 -        doc.putProperty(Language.class, JavaTokenId.language());
 672.406 -
 672.407 -        JavaSource js = JavaSource.forFileObject(data);
 672.408 -
 672.409 -        assertNotNull(js);
 672.410 -
 672.411 -        info = SourceUtilsTestUtil.getCompilationInfo(js, Phase.RESOLVED);
 672.412 -
 672.413 -        assertNotNull(info);
 672.414 -
 672.415 -        if (!ignoreErrors) {
 672.416 -            assertEquals(info.getDiagnostics().toString(), 0, info.getDiagnostics().size());
 672.417 -        }
 672.418 -    }
 672.419 -
 672.420 -    private FileObject sourceRoot;
 672.421 -    private CompilationInfo info;
 672.422 -    private Document doc;
 672.423 -    private String wordDirPath;
 672.424 -    
 672.425 -    protected void performNoExceptionsTest(String code, String type) throws Exception {
 672.426 -        String wDP = getWorkDirPath();
 672.427 -        
 672.428 -        int offset = code.indexOf('|');
 672.429 -
 672.430 -        code = code.replace("|", "");
 672.431 -
 672.432 -        File prev = null;
 672.433 -
 672.434 -        for (int i = 0; i < type.length(); i++) {
 672.435 -            StringBuilder nueCode = new StringBuilder();
 672.436 -
 672.437 -            nueCode.append(code);
 672.438 -            nueCode.insert(offset, type.substring(0, i + 1));
 672.439 -
 672.440 -            this.wordDirPath = wDP + File.separatorChar + i;
 672.441 -            
 672.442 -            performAnalysisTest(nueCode.toString(), null, true);
 672.443 -
 672.444 -            if (prev != null) {
 672.445 -                deleteFile(prev);
 672.446 -                FileUtil.refreshFor(File.listRoots());
 672.447 -            }
 672.448 -
 672.449 -            prev = getWorkDir();
 672.450 -        }
 672.451 -    }
 672.452 -
 672.453 -    protected void performAnalysisTest(String code, String... golden) throws Exception {
 672.454 -        performAnalysisTest(code, golden, false);
 672.455 -    }
 672.456 -
 672.457 -    protected void performAnalysisTest(String code, String[] golden, boolean ignoreErrors) throws Exception {
 672.458 -        prepareTest("test/Test.java", code, ignoreErrors);
 672.459 -
 672.460 -        List<ErrorDescription> warnings = computeWarnings();
 672.461 -        List<String> dns = new LinkedList<String>();
 672.462 -
 672.463 -        for (ErrorDescription ed : warnings) {
 672.464 -            dns.add(ed.toString());
 672.465 -        }
 672.466 -
 672.467 -        if (golden != null) {
 672.468 -            assertEquals(Arrays.asList(golden), dns);
 672.469 -        }
 672.470 -    }
 672.471 -
 672.472 -    protected String performFixTest(String fileName, String code, String errorDescriptionToString, String fixDebugString, String golden) throws Exception {
 672.473 -        prepareTest(fileName, code);
 672.474 -
 672.475 -        List<ErrorDescription> errors = computeWarnings();
 672.476 -
 672.477 -        ErrorDescription toFix = null;
 672.478 -
 672.479 -        for (ErrorDescription d : errors) {
 672.480 -            if (errorDescriptionToString.equals(d.toString())) {
 672.481 -                toFix = d;
 672.482 -                break;
 672.483 -            }
 672.484 -        }
 672.485 -
 672.486 -        assertNotNull("Error: \"" + errorDescriptionToString + "\" not found. All ErrorDescriptions: " + errors.toString(), toFix);
 672.487 -
 672.488 -        assertTrue("Must be computed", toFix.getFixes().isComputed());
 672.489 -
 672.490 -        List<Fix> fixes = toFix.getFixes().getFixes();
 672.491 -        List<String> fixNames = new LinkedList<String>();
 672.492 -        Fix toApply = null;
 672.493 -
 672.494 -        for (Fix f : fixes) {
 672.495 -            if (fixDebugString.equals(toDebugString(info, f))) {
 672.496 -                toApply = f;
 672.497 -            }
 672.498 -
 672.499 -            fixNames.add(toDebugString(info, f));
 672.500 -        }
 672.501 -
 672.502 -        assertNotNull("Cannot find fix to invoke: " + fixNames.toString(), toApply);
 672.503 -
 672.504 -        toApply.implement();
 672.505 -
 672.506 -        FileObject toCheck = sourceRoot.getFileObject(fileName);
 672.507 -
 672.508 -        assertNotNull(toCheck);
 672.509 -
 672.510 -        DataObject toCheckDO = DataObject.find(toCheck);
 672.511 -        EditorCookie ec = toCheckDO.getCookie(EditorCookie.class);
 672.512 -        Document toCheckDocument = ec.openDocument();
 672.513 -
 672.514 -        String realCode = toCheckDocument.getText(0, toCheckDocument.getLength());
 672.515 -
 672.516 -        //ignore whitespaces:
 672.517 -        realCode = realCode.replaceAll("[ \t\n]+", " ");
 672.518 -
 672.519 -        if (golden != null) {
 672.520 -            golden = golden.replaceAll("[ \t\n]+", " ");
 672.521 -            assertEquals("The output code does not match the expected code.", golden, realCode);
 672.522 -        }
 672.523 -
 672.524 -        LifecycleManager.getDefault().saveAll();
 672.525 -
 672.526 -        return realCode;
 672.527 -    }
 672.528 -
 672.529 -    private String toDebugString(CompilationInfo info, Fix f) {
 672.530 -        return "FixImpl";
 672.531 -    }
 672.532 -
 672.533 -    @Override
 672.534 -    public String getWorkDirPath() {
 672.535 -        if (this.wordDirPath != null) {
 672.536 -            return this.wordDirPath;
 672.537 -        }
 672.538 -        
 672.539 -        return super.getWorkDirPath();
 672.540 -    }
 672.541 -
 672.542 -    private static void deleteFile(File file) throws IOException {
 672.543 -        if (file.isDirectory()) {
 672.544 -            // file is a directory - delete sub files first
 672.545 -            File files[] = file.listFiles();
 672.546 -            for (int i = 0; i < files.length; i++) {
 672.547 -                deleteFile(files[i]);
 672.548 -            }
 672.549 -
 672.550 -        }
 672.551 -        // file is a File :-)
 672.552 -        boolean result = file.delete();
 672.553 -        if (result == false ) {
 672.554 -            // a problem has appeared
 672.555 -            throw new IOException("Cannot delete file, file = "+file.getPath());
 672.556 -        }
 672.557 -    }
 672.558 -}