Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Pazderski2019-05-19 21:32:16 +0000
committerPaul Pazderski2019-06-24 21:05:42 +0000
commit6afacb4913af567c273ad62405455ce6e72b6cb9 (patch)
tree9d6f8b5099c5ccd9f9283612e9831284996dda9a
parent68c0b2fa5325eacfc6f00650302e2e53a2fc53b0 (diff)
downloadeclipse.platform.ua-I20190625-0535.tar.gz
eclipse.platform.ua-I20190625-0535.tar.xz
eclipse.platform.ua-I20190625-0535.zip
Bug 547304 - [cleanup] Fix wrong space/tab indentationI20190626-0720I20190625-1800I20190625-0535I20190624-1800
This change fixes space or mixed tab/space indentations in all Java files. This also includes two or three space indentations and even fix most stray single spaces in indentations. The change includes only whitespace formatting and no code changes. Change-Id: Ie21edf6dba7384276d834e9fd10805b1f304403f
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/BaseHelpSystem.java10
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpDisplay.java16
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/IHelpBaseConstants.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/MissingContentManager.java32
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/HttpsUtility.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/PreferenceFileHandler.java16
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContextProvider.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIC.java62
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocProvider.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/CriteriaHelpScope.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeUtils.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/WorkingSetScope.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/util/CriteriaUtilities.java34
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/util/IndexUtils.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/browser/CustomBrowser.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLConnection.java24
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/LimitedSizeCharArrayWriter.java16
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/XHTMLSearchParticipant.java42
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/IndexerJob.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/server/WebappManager.java20
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/validation/TocValidator.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/server/HelpServer.java6
-rw-r--r--org.eclipse.help.base/src_ant/org/eclipse/help/internal/base/ant/BuildHelpIndex.java4
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/RootScopePage.java4
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.java4
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DefaultHelpUI.java14
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DynamicHelpAction.java14
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ExecuteCommandAction.java8
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIResources.java8
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/SearchAction.java14
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserAdapter.java4
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/handlers/ShowIndexHandler.java8
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java8
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpPreferencePage.java34
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICButtons.java8
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICDialog.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICTable.java30
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaContentProvider.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterSearchScopeFactory.java46
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalHelpPage.java24
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalSearchScopeFactory.java18
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/WebSearchScopeFactory.java18
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/FontUtils.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BrowserPart.java10
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpPart.java44
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpSorter.java6
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeDescriptor.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeWizardPage.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/FederatedSearchSorter.java12
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpView.java26
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HyperlinkTreePart.java6
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexPart.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/LocalScopeDialog.java10
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/MissingContentPart.java12
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RelatedTopicsPart.java30
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RenameDialog.java36
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java16
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopePreferenceManager.java32
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSelectPart.java4
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetDialog.java144
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchResultsPart.java14
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SeeAlsoPart.java2
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/StatusProducer.java16
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/CookiesData.java14
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/EnabledTopicUtils.java2
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/IconFinder.java8
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/LayoutData.java2
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/PrintData.java30
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/RequestScope.java22
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ScopeSavingSearchData.java2
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/SearchData.java32
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ServerState.java6
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ServletResources.java4
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TocData.java120
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarData.java2
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TopicFinder.java26
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/UrlUtil.java52
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/View.java2
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetData.java2
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/service/AboutService.java14
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/service/AdvancedSearchService.java2
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/BreadcrumbsFilter.java4
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ChildLinkInserter.java16
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/CookieUtil.java14
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/EclipseConnector.java62
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ExtraFilters.java2
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/FilterHTMLHeadAndBodyOutputStream.java10
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/FramesetFilter.java4
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexFragmentServlet.java50
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InfocenterWorkingSetManager.java6
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InjectionFilter.java4
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/NavServlet.java28
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PluginsRootFilter.java4
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PluginsRootResolvingStream.java194
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PreferenceWriter.java64
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ServletPrintWriter.java100
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocFragmentServlet.java74
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractButton.java192
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractFrame.java66
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractView.java104
-rw-r--r--org.eclipse.help/src/org/eclipse/help/ICriterionDefinition.java36
-rw-r--r--org.eclipse.help/src/org/eclipse/help/ICriterionValueDefinition.java24
-rw-r--r--org.eclipse.help/src/org/eclipse/help/IIndexEntry.java36
-rw-r--r--org.eclipse.help/src/org/eclipse/help/IIndexEntry2.java12
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/CachedEntityResolver.java36
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/HelpData.java16
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/UAElement.java30
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/context/Context.java8
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/context/ContextFileProvider.java16
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionDocumentReader.java2
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFile.java56
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFileParser.java12
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFileProvider.java18
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionManager.java4
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/criteria/CriterionResource.java4
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/dynamic/DocumentReader.java2
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/dynamic/DocumentWriter.java34
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/entityresolver/LocalEntityResolver.java20
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/extension/ContentExtensionFileParser.java12
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/index/IndexAssembler.java8
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/index/IndexDocumentReader.java2
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/index/IndexFile.java56
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/index/IndexFileParser.java4
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/index/IndexFileProvider.java18
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/index/IndexManager.java4
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/index/IndexSee.java8
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/toc/TocAssembler.java10
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileParser.java2
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileProvider.java2
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/toc/TocManager.java4
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/toc/TocSorter.java2
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/toc/TopicSorter.java4
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/util/ProductPreferences.java8
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/util/ResourceLocator.java2
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/util/URLCoder.java2
-rw-r--r--org.eclipse.ua.tests.doc/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.ua.tests.doc/pom.xml2
-rw-r--r--org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/actions/CheckLinkAction.java6
-rw-r--r--org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/actions/CheckTocAction.java12
-rw-r--r--org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/actions/LoadTocAction.java22
-rw-r--r--org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/dialogs/SelectTocDialog.java2
-rw-r--r--org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/linkchecker/OnLoadFilter.java70
-rw-r--r--org.eclipse.ua.tests/base/org/eclipse/ua/tests/AllPerformanceTests.java2
-rw-r--r--org.eclipse.ua.tests/base/org/eclipse/ua/tests/util/UATestContentProducer.java2
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCompositeParser.java4
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestMarkupParser.java4
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestPersistence.java142
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestSuccessors.java2
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestTaskEvents.java2
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/execution/ActionWithParameters.java2
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/execution/TestCommandExecution.java12
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/other/TestCheatSheetCategories.java2
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/other/TestCheatSheetCollection.java16
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/other/TestStatePersistence.java40
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/parser/InvalidCheatsheet.java4
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/parser/NoError.java4
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/parser/ParseFromString.java8
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/util/MockTaskEditor.java2
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/ParseTocWithCriteria.java110
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/TestCriteriaProvider.java58
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/DynamicXHTMLProcessorTest.java4
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/index/IndexAssemblerTest.java30
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ConcurrentTocAccess.java20
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextMergeTest.java18
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextTest.java130
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/DocumentReaderTest.java4
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/EntityResolutionTest.java42
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexEntryTest.java42
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexSeeTest.java64
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TocObjectTest.java32
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TopicTest.java12
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UAElementTest.java10
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserCriterionDefinition.java2
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserCriterionValueDefinition.java2
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/HelpServerTest.java12
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/IndexAssemblePerformanceTest.java6
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/LowIterationHelpServerTest.java12
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/TocAssemblePerformanceTest.java8
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/HelpDataTest.java18
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ContentServletTest.java10
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ContextServletTest.java2
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/GetContentUsingRemoteHelp.java62
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/GetContextUsingRemoteHelp.java8
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/IndexServletTest.java22
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/LoadIndexUsingRemoteHelp.java6
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/LoadTocUsingRemoteHelp.java10
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockContentServlet.java4
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockSearchServlet.java4
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockTocServlet.java10
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ParallelSearchServletTest.java14
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ParallelSearchUsingRemote.java8
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceStore.java54
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceTest.java2
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchIndexCreation.java6
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchUsingRemoteHelp.java24
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TestServerManager.java6
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TocServletTest.java44
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/scope/IntersectionTest.java2
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/scope/UnionTest.java2
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/AnalyzerTest.java106
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/BasicTest.java64
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/EncodedCharacterSearch.java32
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/ExtraDirTest.java4
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/InfocenterWorkingSetManagerTest.java32
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/LocaleTest.java160
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/MockSearchParticipant.java2
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/MockSearchParticipantXML.java2
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java6
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/WildcardTest.java62
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/WorkingSetManagerTest.java18
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/EnabledTopicTest.java36
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/HelpData.java24
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocSortingTest.java10
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TopicFinderTest.java2
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/DocumentCreator.java4
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/LoadTestServlet.java2
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ParallelTestSupport.java2
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/ChildLinkInsertion.java56
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/CommentFilterOne.java6
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/CommentFilterThree.java6
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/CommentFilterTwo.java6
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/FilterExtensionTest.java2
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/FilterTest.java4
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HelpServerBinding.java20
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HelpServerInterrupt.java4
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/ParallelServerAccessTest.java10
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/PluginsRootReplacement.java22
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/RestrictedTopicParameter.java4
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/UrlCoderTest.java2
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/UrlUtilsTests.java2
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/ContentServiceTest.java10
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/ExtensionServiceTest.java10
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/TocFragmentServiceTest.java18
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TestFrame.java2
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TestHelpToolbarFrame.java8
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TitleSearchButton.java2
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TitleSearchView.java4
-rw-r--r--org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/anchors/ExtensionReorderingTest.java118
-rw-r--r--org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/performance/OpenIntroTest.java8
-rw-r--r--org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializer.java560
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/ICheatSheetEvent.java4
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/ActionRunner.java4
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/CheatsheetSearchParticipant.java14
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/CommandRunner.java8
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/explorer/ConfirmRestartDialog.java2
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/explorer/ResetTaskAction.java2
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/explorer/RestartAllAction.java4
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/explorer/SkipAction.java2
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/explorer/TreeExplorerMenu.java8
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/explorer/TreeLabelProvider.java28
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/model/AbstractTask.java4
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/model/BlockedTaskFinder.java16
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/model/CompositeCheatSheetModel.java34
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/model/CompositeCheatSheetSaveHelper.java30
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/model/SuccesorTaskFinder.java28
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/model/TaskChoiceCompletionStrategy.java20
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/model/TaskDependencies.java6
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/model/TaskGroup.java4
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/model/TaskSetCompletionStrategy.java22
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/model/TaskStateUtilities.java16
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/parser/CompositeCheatSheetParser.java36
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/parser/EditableTaskParseStrategy.java4
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/parser/ICompositeCheatsheetTags.java4
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/parser/MarkupParser.java2
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/parser/TaskGroupParseStrategy.java6
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/views/CheatsheetTaskEditor.java4
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/views/CompositeCheatSheetPage.java86
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/views/DescriptionPanel.java26
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/views/TaskExplorerManager.java2
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/AbstractExecutable.java10
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetCommand.java6
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java24
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetSaveHelper.java12
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/IncompatibleSiblingChecker.java28
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java68
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/registry/CheatSheetElement.java2
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/registry/CheatSheetRegistryReader.java20
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/state/TrayStateManager.java4
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetManager.java36
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetPage.java10
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetViewer.java58
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CoreItem.java52
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ErrorPage.java28
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewItem.java16
-rw-r--r--org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/CustomizationContentsArea.java24
-rw-r--r--org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/CustomizationDialog.java16
-rw-r--r--org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/IUniversalIntroConstants.java88
-rw-r--r--org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/IntroData.java76
-rw-r--r--org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/Messages.java12
-rw-r--r--org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/UniversalIntroPlugin.java212
-rw-r--r--org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/WelcomeCustomizationPreferencePage.java2
-rw-r--r--org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/contentdetect/ContentDetectHelper.java16
-rw-r--r--org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/contentdetect/ContentDetector.java6
-rw-r--r--org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/util/BundleUtil.java422
-rw-r--r--org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/util/Log.java220
-rw-r--r--org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/util/StringUtil.java8
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/FontSelection.java32
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/IIntroConstants.java68
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/IntroPlugin.java276
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/Messages.java70
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/HTMLUtil.java292
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/IIntroHTMLConstants.java126
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/html/IntroHTMLGenerator.java8
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractBaseIntroElement.java134
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroContainer.java1210
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroElement.java832
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroIdElement.java50
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPage.java1652
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPartImplementation.java676
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractTextElement.java58
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/ExtensionMap.java2
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/History.java482
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroAnchor.java20
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroContentProvider.java60
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroExtensionContent.java380
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroGroup.java190
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHTML.java214
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHead.java100
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroHomePage.java68
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroImage.java84
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroInclude.java78
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroInjectedIFrame.java26
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLaunchBarElement.java296
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLaunchBarShortcut.java128
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroLink.java154
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroModelRoot.java1626
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPage.java18
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPageTitle.java26
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroPartPresentation.java2
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroSearchParticipant.java22
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroSeparator.java14
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroStandbyContentPart.java64
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroText.java94
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroURLAction.java60
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/BaseExtensionPointManager.java460
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/ExtensionPointManager.java170
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/IntroContentParser.java300
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/ModelLoaderUtil.java302
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/loader/SharedConfigExtensionsManager.java166
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURL.java1046
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/IntroURLParser.java316
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/url/ShowHelpURLHandler.java208
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/util/BundleUtil.java484
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/util/FindSupport.java58
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/util/ModelUtil.java798
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/viewer/IntroModelContentProvider.java84
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/viewer/IntroModelLabelProvider.java192
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/EmptyStandbyContentPart.java92
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/parts/StandbyPart.java770
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartImplementation.java1296
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/BrowserIntroPartLocationListener.java260
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/FormIntroPartImplementation.java946
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/TextIntroPartImplementation.java66
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageContentForm.java230
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageForm.java262
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageFormWithNavigation.java178
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageStyleManager.java970
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/PageWidgetFactory.java854
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/RootPageForm.java518
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/swt/SharedStyleManager.java400
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/DialogUtil.java242
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/ImageUtil.java290
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/IntroModelSerializer.java652
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/Log.java220
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/StringUtil.java14
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util/Util.java336
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/CustomizableIntroPart.java658
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IIntroAction.java16
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IIntroContentProvider.java84
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IIntroContentProviderSite.java30
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IIntroURL.java40
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IIntroXHTMLContentProvider.java56
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IStandbyContentPart.java162
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/intro/config/IntroURLFactory.java74
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/intro/contentproviders/AlwaysWelcomeCheckbox.java20
384 files changed, 15782 insertions, 15782 deletions
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/BaseHelpSystem.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/BaseHelpSystem.java
index caddf429d..2e26d18d1 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/BaseHelpSystem.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/BaseHelpSystem.java
@@ -173,9 +173,9 @@ public final class BaseHelpSystem {
}
/*
- * Assigns the provider responsible for providing help
- * document content.
- */
+ * Assigns the provider responsible for providing help
+ * document content.
+ */
HelpPlugin.getDefault().setHelpProvider(new HelpProvider());
}
@@ -197,7 +197,7 @@ public final class BaseHelpSystem {
public static URL resolve(String href, boolean documentOnly) {
String url = null;
if (href == null || href.contains("://") //$NON-NLS-1$
- || isFileProtocol(href))
+ || isFileProtocol(href))
url = href;
else {
BaseHelpSystem.ensureWebappRunning();
@@ -217,7 +217,7 @@ public final class BaseHelpSystem {
public static URL resolve(String href, String servlet) {
String url = null;
if (href == null || href.contains("://") //$NON-NLS-1$
- || isFileProtocol(href)) {
+ || isFileProtocol(href)) {
url = href;
}
else {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpDisplay.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpDisplay.java
index 28ebfd10d..9e7276255 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpDisplay.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpDisplay.java
@@ -301,13 +301,13 @@ public class HelpDisplay {
}
private static AbstractHelpDisplay getHelpDisplay() {
- if (helpDisplay == null) {
- createHelpDisplay();
- }
- if (helpDisplay == null) {
- helpDisplay = new DefaultDisplay();
- }
- return helpDisplay;
- }
+ if (helpDisplay == null) {
+ createHelpDisplay();
+ }
+ if (helpDisplay == null) {
+ helpDisplay = new DefaultDisplay();
+ }
+ return helpDisplay;
+ }
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/IHelpBaseConstants.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/IHelpBaseConstants.java
index ca8f01418..8a3bd7b1b 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/IHelpBaseConstants.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/IHelpBaseConstants.java
@@ -38,6 +38,6 @@ public interface IHelpBaseConstants {
String P_KEY_REMOTE_HELP_ICEnabled = "remoteHelpICEnabled"; //$NON-NLS-1$
String P_KEY_SHOW_SEARCH_DESCRIPTION = "showSearchDescription"; //$NON-NLS-1$
String P_KEY_SHOW_SEARCH_CATEGORIES = "showSearchCategories"; //$NON-NLS-1$
- String P_SHOW_BREADCRUMBS = "showBreadcrumbs"; //$NON-NLS-1$
- String P_PAGE_NOT_FOUND = "page_not_found"; //$NON-NLS-1$
+ String P_SHOW_BREADCRUMBS = "showBreadcrumbs"; //$NON-NLS-1$
+ String P_PAGE_NOT_FOUND = "page_not_found"; //$NON-NLS-1$
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/MissingContentManager.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/MissingContentManager.java
index b3711396a..fc9d47ada 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/MissingContentManager.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/MissingContentManager.java
@@ -76,7 +76,7 @@ public class MissingContentManager {
private static MissingContentManager instance;
private List<Placeholder> placeholders;
- private Set<String> bundlesToIgnore; // A set of bundles the user does not want to see reference to
+ private Set<String> bundlesToIgnore; // A set of bundles the user does not want to see reference to
public static MissingContentManager getInstance() {
if ( instance == null ) {
@@ -89,13 +89,13 @@ public class MissingContentManager {
* Read the extension registry
*/
private MissingContentManager() {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
placeholders = new ArrayList<>();
bundlesToIgnore = new HashSet<>();
- if ( BaseHelpSystem.getMode() == BaseHelpSystem.MODE_INFOCENTER ) {
- return; // Placeholders are not shown for infocenters
- }
- // Read the placeholders from the extension registry
+ if ( BaseHelpSystem.getMode() == BaseHelpSystem.MODE_INFOCENTER ) {
+ return; // Placeholders are not shown for infocenters
+ }
+ // Read the placeholders from the extension registry
IConfigurationElement[] elements = registry
.getConfigurationElementsFor(EXTENSION_POINT_ID_TOC);
for (int i = 0; i < elements.length; ++i) {
@@ -127,7 +127,7 @@ public class MissingContentManager {
}
/**
- * Called when a page cannot be found
+ * Called when a page cannot be found
* @param path the path of the page that could not be loaded
* @return a place holder page if defined, otherwise an error page
*/
@@ -136,9 +136,9 @@ public class MissingContentManager {
Placeholder placeholder = iter.next();
if (path.startsWith(placeholder.path) && Platform.getBundle(placeholder.bundle) == null) {
if ( showPlaceholderPage) {
- return placeholder.placeholderPage;
+ return placeholder.placeholderPage;
} else {
- return "/org.eclipse.help.webapp/" + MISSING_TOPIC_PATH + path.substring(HELP_PROTOCOL.length()); //$NON-NLS-1$
+ return "/org.eclipse.help.webapp/" + MISSING_TOPIC_PATH + path.substring(HELP_PROTOCOL.length()); //$NON-NLS-1$
}
}
}
@@ -166,10 +166,10 @@ public class MissingContentManager {
public String getHelpMissingPage(boolean isHelpView) {
Placeholder[] unresolvedPlaceHolders = getUnresolvedPlaceholders();
if (unresolvedPlaceHolders.length == 0) {
- return null;
+ return null;
} else {
- String suffix = isHelpView ? MISSING_BOOKS_HELP_VIEW_HREF : MISSING_BOOKS_HREF;
- return "/org.eclipse.help.webapp" + '/'+ suffix; //$NON-NLS-1$
+ String suffix = isHelpView ? MISSING_BOOKS_HELP_VIEW_HREF : MISSING_BOOKS_HREF;
+ return "/org.eclipse.help.webapp" + '/'+ suffix; //$NON-NLS-1$
}
}
@@ -178,7 +178,7 @@ public class MissingContentManager {
*/
public String getRemoteHelpUnavailablePage(boolean isHelpView) {
if ( BaseHelpSystem.getMode()!=BaseHelpSystem.MODE_INFOCENTER ) {
- String suffix = isHelpView ? REMOTE_STATUS_HELP_VIEW_HREF : REMOTE_STATUS_HREF;
+ String suffix = isHelpView ? REMOTE_STATUS_HELP_VIEW_HREF : REMOTE_STATUS_HREF;
return "/org.eclipse.help.webapp/" + suffix; //$NON-NLS-1$
}
return null;
@@ -191,9 +191,9 @@ public class MissingContentManager {
Placeholder ph = iter.next();
String bundle = ph.bundle;
if (bundle != null && !bundlesToIgnore.contains(bundle) ) {
- if (Platform.getBundle(bundle) == null ) {
- unresolved.add(ph);
- }
+ if (Platform.getBundle(bundle) == null ) {
+ unresolved.add(ph);
+ }
}
}
return unresolved.toArray(new Placeholder[unresolved.size()]);
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/HttpsUtility.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/HttpsUtility.java
index 2b7f61cd8..a0054d779 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/HttpsUtility.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/HttpsUtility.java
@@ -61,10 +61,10 @@ public class HttpsUtility {
try {
URL url = new URL(thisProtocol, thisHost, Integer.valueOf(thisPort) .intValue(),
thisPath + PATH_TOC + '?' + PARAM_LANG + '=' + locale);
- return getHttpsStream(url);
+ return getHttpsStream(url);
} catch (Exception e) {
e.printStackTrace();
- return null;
+ return null;
}
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/PreferenceFileHandler.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/PreferenceFileHandler.java
index e20ac63f2..0d9e25eb6 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/PreferenceFileHandler.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/PreferenceFileHandler.java
@@ -47,17 +47,17 @@ public class PreferenceFileHandler {
// TODO: Decide if comma is a good delimiter, or if we should use a different delimiter.
namePreference = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_NAME, "", null); //$NON-NLS-1$
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_NAME, "", null); //$NON-NLS-1$
hostPreference = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID,IHelpBaseConstants.P_KEY_REMOTE_HELP_HOST, "", null); //$NON-NLS-1$
+ (HelpBasePlugin.PLUGIN_ID,IHelpBaseConstants.P_KEY_REMOTE_HELP_HOST, "", null); //$NON-NLS-1$
pathPreference = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID,IHelpBaseConstants.P_KEY_REMOTE_HELP_PATH, "", null); //$NON-NLS-1$
+ (HelpBasePlugin.PLUGIN_ID,IHelpBaseConstants.P_KEY_REMOTE_HELP_PATH, "", null); //$NON-NLS-1$
protocolPreference = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID,IHelpBaseConstants.P_KEY_REMOTE_HELP_PROTOCOL, "", null); //$NON-NLS-1$
+ (HelpBasePlugin.PLUGIN_ID,IHelpBaseConstants.P_KEY_REMOTE_HELP_PROTOCOL, "", null); //$NON-NLS-1$
portPreference = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID,IHelpBaseConstants.P_KEY_REMOTE_HELP_PORT, "", null); //$NON-NLS-1$
+ (HelpBasePlugin.PLUGIN_ID,IHelpBaseConstants.P_KEY_REMOTE_HELP_PORT, "", null); //$NON-NLS-1$
icEnabledPreference =Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID,IHelpBaseConstants.P_KEY_REMOTE_HELP_ICEnabled, "", null); //$NON-NLS-1$
+ (HelpBasePlugin.PLUGIN_ID,IHelpBaseConstants.P_KEY_REMOTE_HELP_ICEnabled, "", null); //$NON-NLS-1$
//Get host array first, and initialize values
if(hostPreference.length()==0)
@@ -230,10 +230,10 @@ public class PreferenceFileHandler {
public static int getEmbeddedHelpOption() {
boolean isRemoteOn = Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, false, null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, false, null);
boolean isRemotePreferred = Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PREFERRED, false, null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PREFERRED, false, null);
if(!isRemoteOn)
{
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContextProvider.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContextProvider.java
index 8c08eb891..5e297afed 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContextProvider.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContextProvider.java
@@ -52,7 +52,7 @@ public class RemoteContextProvider extends AbstractContextProvider {
if (RemoteHelp.isEnabled()) {
int numICs = host.length; // Total number of hosts
- //Loop through remote InfoCenters and return first CSH match found
+ //Loop through remote InfoCenters and return first CSH match found
URL url=null;
for (int i = 0; i < numICs; i++) {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIC.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIC.java
index c0e1aef52..253efb1ce 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIC.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIC.java
@@ -31,22 +31,22 @@ public class RemoteIC {
public RemoteIC(boolean enabled, String name, String host, String path, String port){
- this.enabled = enabled;
- this.name = name;
- this.host = host;
- this.path = path;
- this.port = port;
- this.protocol = PROTOCOL_HTTP;
+ this.enabled = enabled;
+ this.name = name;
+ this.host = host;
+ this.path = path;
+ this.port = port;
+ this.protocol = PROTOCOL_HTTP;
}
public RemoteIC(boolean enabled, String name, String host, String path, String protocol, String port){
- this.enabled = enabled;
- this.name = name;
- this.host = host;
- this.path = path;
- this.protocol = protocol;
- this.port = port;
+ this.enabled = enabled;
+ this.name = name;
+ this.host = host;
+ this.path = path;
+ this.protocol = protocol;
+ this.port = port;
}
public String getHost() {
@@ -100,24 +100,24 @@ public class RemoteIC {
//I added this method, which overrides the original "equal" method in the class Object
- @Override
+ @Override
public boolean equals(Object anotherObject)throws ClassCastException {
- if (!(anotherObject instanceof RemoteIC))
- return false;
- if ( !(((RemoteIC) anotherObject).getName().equals(this.getName())))
- return false;
- if ( !(((RemoteIC) anotherObject).getHost().equals(this.getHost())))
- return false;
- if ( !(((RemoteIC) anotherObject).getPath().equals(this.getPath())))
- return false;
- if ( !(((RemoteIC) anotherObject).getProtocol().equals(this.getProtocol())))
- return false;
- if ( !(((RemoteIC) anotherObject).getPort().equals(this.getPort())))
- return false;
- if ( !(((RemoteIC) anotherObject).isEnabled()==this.isEnabled()))
- return false;
-
- //if we made it here, the the objects are the same
- return true;
- }
+ if (!(anotherObject instanceof RemoteIC))
+ return false;
+ if ( !(((RemoteIC) anotherObject).getName().equals(this.getName())))
+ return false;
+ if ( !(((RemoteIC) anotherObject).getHost().equals(this.getHost())))
+ return false;
+ if ( !(((RemoteIC) anotherObject).getPath().equals(this.getPath())))
+ return false;
+ if ( !(((RemoteIC) anotherObject).getProtocol().equals(this.getProtocol())))
+ return false;
+ if ( !(((RemoteIC) anotherObject).getPort().equals(this.getPort())))
+ return false;
+ if ( !(((RemoteIC) anotherObject).isEnabled()==this.isEnabled()))
+ return false;
+
+ //if we made it here, the the objects are the same
+ return true;
+ }
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocProvider.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocProvider.java
index b57b27235..bf2026582 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocProvider.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocProvider.java
@@ -116,9 +116,9 @@ public class RemoteTocProvider extends AbstractTocProvider {
currentContributions.length);
}
} catch (Throwable t) {
- String msg = "Internal error while reading TOC contents from remote server"; //$NON-NLS-1$
- HelpBasePlugin.logError(msg, t);
- RemoteHelp.setError(t);
+ String msg = "Internal error while reading TOC contents from remote server"; //$NON-NLS-1$
+ HelpBasePlugin.logError(msg, t);
+ RemoteHelp.setError(t);
} finally {
if (in != null) {
try {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/CriteriaHelpScope.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/CriteriaHelpScope.java
index 2eb418478..e71b86007 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/CriteriaHelpScope.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/CriteriaHelpScope.java
@@ -106,7 +106,7 @@ public class CriteriaHelpScope extends AbstractHelpScope {
private Map<String, Set<String>> getCriteriaInfo(ICriteria[] criteria) {
Map<String, Set<String>> criteriaMap = new HashMap<>();
CriteriaUtilities.addCriteriaToMap(criteriaMap, criteria);
- return criteriaMap;
+ return criteriaMap;
}
@Override
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeUtils.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeUtils.java
index 36b81372a..d1fe94604 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeUtils.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeUtils.java
@@ -87,7 +87,7 @@ public class ScopeUtils {
}
}
return false;
- }
+ }
/*
* Returns true if one of the children meets the conditions
@@ -101,7 +101,7 @@ public class ScopeUtils {
}
}
return false;
- }
+ }
/*
* Returns true if one of the children meets the conditions
@@ -118,7 +118,7 @@ public class ScopeUtils {
IIndexEntry[] entries = entry.getSubentries();
for (int e = 0; e < entries.length; e++) {
if (showInTree(entries[e], scope)) {
- return true;
+ return true;
}
}
if (entry instanceof IIndexEntry2) {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/WorkingSetScope.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/WorkingSetScope.java
index 7e0e47488..35f7856d0 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/WorkingSetScope.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/WorkingSetScope.java
@@ -81,7 +81,7 @@ public class WorkingSetScope extends AbstractHelpScope {
if (parent instanceof AdaptableHelpResource) {
adaptable = (AdaptableHelpResource) parent;
} else {
- adaptable = null;
+ adaptable = null;
}
}
}
@@ -132,7 +132,7 @@ public class WorkingSetScope extends AbstractHelpScope {
private Map<String, Set<String>> getCriteriaInfo(ICriteria[] criteria) {
Map<String, Set<String>> criteriaMap = new HashMap<>();
CriteriaUtilities.addCriteriaToMap(criteriaMap, criteria);
- return criteriaMap;
+ return criteriaMap;
}
@Override
@@ -157,7 +157,7 @@ public class WorkingSetScope extends AbstractHelpScope {
return isHrefInScope(topic.getHref());
} else {
if (uae instanceof ITopic) {
- topics.add(uae);
+ topics.add(uae);
}
uae = uae.getParentElement();
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/CriteriaUtilities.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/CriteriaUtilities.java
index f9d0ab20f..9457f60ad 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/CriteriaUtilities.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/CriteriaUtilities.java
@@ -25,22 +25,22 @@ import org.eclipse.help.internal.criteria.CriterionResource;
public class CriteriaUtilities {
- public static List<String> getCriteriaValues(String rawValues) {
+ public static List<String> getCriteriaValues(String rawValues) {
List<String> result = new ArrayList<>();
- if (rawValues != null) {
- String[] values = rawValues.split(","); //$NON-NLS-1$
- for(int j = 0; j < values.length; ++j){
- String value = values[j].trim();
- if (value.length() > 0) {
- result.add(value);
- }
- }
- }
+ if (rawValues != null) {
+ String[] values = rawValues.split(","); //$NON-NLS-1$
+ for(int j = 0; j < values.length; ++j){
+ String value = values[j].trim();
+ if (value.length() > 0) {
+ result.add(value);
+ }
+ }
+ }
return result;
- }
+ }
- public static void addCriteriaToMap(Map<String, Set<String>> map, ICriteria[] criteria) {
- for (int i = 0; i < criteria.length; ++i) {
+ public static void addCriteriaToMap(Map<String, Set<String>> map, ICriteria[] criteria) {
+ for (int i = 0; i < criteria.length; ++i) {
ICriteria criterion = criteria[i];
String name = criterion.getName();
List<String> values = CriteriaUtilities.getCriteriaValues(criterion.getValue());
@@ -54,10 +54,10 @@ public class CriteriaUtilities {
map.put(name, existingValueSet);
}
}
- }
+ }
- public static void addCriteriaToMap(Map<String, Set<String>> map, CriterionResource[] criteria) {
- for(int i = 0; i < criteria.length; ++ i){
+ public static void addCriteriaToMap(Map<String, Set<String>> map, CriterionResource[] criteria) {
+ for(int i = 0; i < criteria.length; ++ i){
CriterionResource criterion = criteria[i];
String criterionName = criterion.getCriterionName();
List<String> criterionValues = criterion.getCriterionValues();
@@ -68,6 +68,6 @@ public class CriteriaUtilities {
existedValueSet.addAll(criterionValues);
map.put(criterionName, existedValueSet);
}
- }
+ }
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/IndexUtils.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/IndexUtils.java
index 8996fea14..abf61446c 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/IndexUtils.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/IndexUtils.java
@@ -49,7 +49,7 @@ public class IndexUtils {
String entryKeyword = indexEntry.getKeyword();
if (path[depth].equals(entryKeyword)) {
if (path.length == depth + 1) {
- return new IIndexEntry[] { indexEntry };
+ return new IIndexEntry[] { indexEntry };
}
IIndexEntry[] targets = findSeeTargets(indexEntry, see, depth + 1);
IIndexEntry[] result = new IIndexEntry[targets.length + 1];
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/browser/CustomBrowser.java b/org.eclipse.help.base/src/org/eclipse/help/internal/browser/CustomBrowser.java
index c6b5124ce..90f1b30fb 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/browser/CustomBrowser.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/browser/CustomBrowser.java
@@ -37,7 +37,7 @@ public class CustomBrowser implements IBrowser {
@Override
public void displayURL(String url) throws Exception {
String path = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID, CustomBrowser.CUSTOM_BROWSER_PATH_KEY, "", null); //$NON-NLS-1$
+ (HelpBasePlugin.PLUGIN_ID, CustomBrowser.CUSTOM_BROWSER_PATH_KEY, "", null); //$NON-NLS-1$
String[] command = prepareCommand(path, url);
try {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLConnection.java b/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLConnection.java
index 04f17582f..b4bcaa094 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLConnection.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLConnection.java
@@ -87,7 +87,7 @@ public class HelpURLConnection extends URLConnection {
public HelpURLConnection(URL url, boolean localOnly) {
super(url);
- this.localOnly = localOnly;
+ this.localOnly = localOnly;
String urlFile = url.getFile();
// Strip off everything before and including the PLUGINS_ROOT
@@ -136,16 +136,16 @@ public class HelpURLConnection extends URLConnection {
if (plugin != null && (helpOption==PreferenceFileHandler.LOCAL_HELP_ONLY || helpOption==PreferenceFileHandler.LOCAL_HELP_PRIORITY)) {
in = getLocalHelp(plugin);
}
- if (in == null && (helpOption==PreferenceFileHandler.LOCAL_HELP_PRIORITY || helpOption==PreferenceFileHandler.REMOTE_HELP_PRIORITY)) {
-
- in = openFromRemoteServer(getHref(), getLocale());
- if( in != null ){
- in = new RemoteHelpInputStream(in);
- }
- if(in==null && plugin!=null && helpOption==PreferenceFileHandler.REMOTE_HELP_PRIORITY)
- {
- in = getLocalHelp(plugin);
- }
+ if (in == null && (helpOption==PreferenceFileHandler.LOCAL_HELP_PRIORITY || helpOption==PreferenceFileHandler.REMOTE_HELP_PRIORITY)) {
+
+ in = openFromRemoteServer(getHref(), getLocale());
+ if( in != null ){
+ in = new RemoteHelpInputStream(in);
+ }
+ if(in==null && plugin!=null && helpOption==PreferenceFileHandler.REMOTE_HELP_PRIORITY)
+ {
+ in = getLocalHelp(plugin);
+ }
}
if (in == null) {
throw new IOException("Resource not found."); //$NON-NLS-1$
@@ -405,7 +405,7 @@ public class HelpURLConnection extends URLConnection {
if (remoteURL == null) {
in = tryOpeningAllServers(pathSuffix);
} else {
- in = openRemoteStream(remoteURL, pathSuffix);
+ in = openRemoteStream(remoteURL, pathSuffix);
}
return in;
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java
index cdc550ec8..6948153ba 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java
@@ -58,7 +58,7 @@ public final class Analyzer_en extends Analyzer {
if ( stopWords == null ) {
stopWords = new HashSet<>();
for (int i = 0; i < STOP_WORDS.length; i++) {
- stopWords.add(STOP_WORDS[i]);
+ stopWords.add(STOP_WORDS[i]);
}
}
return stopWords;
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/LimitedSizeCharArrayWriter.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/LimitedSizeCharArrayWriter.java
index deca309ce..5dad1d9d9 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/LimitedSizeCharArrayWriter.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/LimitedSizeCharArrayWriter.java
@@ -29,7 +29,7 @@ public class LimitedSizeCharArrayWriter extends CharArrayWriter {
@Override
public void write(char[] c, int off, int len) {
- size += len;
+ size += len;
super.write(c, off, len);
}
@@ -37,23 +37,23 @@ public class LimitedSizeCharArrayWriter extends CharArrayWriter {
public void write(char[] cbuf) throws IOException {
size += cbuf.length;
if (size < maxSize) {
- super.write(cbuf);
+ super.write(cbuf);
}
}
@Override
public void write(String str, int off, int len) {
- size += len;
- if (size < maxSize) {
- super.write(str, off, len);
- }
+ size += len;
+ if (size < maxSize) {
+ super.write(str, off, len);
+ }
}
@Override
public void write(int c) {
size += 1;
if (size < maxSize) {
- super.write(c);
+ super.write(c);
}
}
@@ -61,7 +61,7 @@ public class LimitedSizeCharArrayWriter extends CharArrayWriter {
public void write(String str) throws IOException {
size += str.length();
if (size < maxSize) {
- super.write(str);
+ super.write(str);
}
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java
index a46cf4b8e..c03c2f3ec 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java
@@ -365,7 +365,7 @@ public class LocalSearchManager {
HashSet<String> set = new HashSet<>();
addSearchBindings(set);
// must ask global search participants directly
- SearchParticipant[] gps = getGlobalParticipants();
+ SearchParticipant[] gps = getGlobalParticipants();
for (int i = 0; i < gps.length; i++) {
Set<String> ids;
try {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java
index b90bc3fae..6b32c1e99 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java
@@ -400,7 +400,7 @@ public class QueryBuilder {
}
} else {
fields = new String[fieldNames.size() + 2];
- boosts = new float[fieldNames.size() + 2];
+ boosts = new float[fieldNames.size() + 2];
Iterator<String> fieldNamesIt = fieldNames.iterator();
for (int i = 0; i < fieldNames.size(); i++) {
fields[i] = fieldNamesIt.next();
@@ -408,8 +408,8 @@ public class QueryBuilder {
}
fields[fieldNames.size()] = "contents"; //$NON-NLS-1$
boosts[fieldNames.size()] = 1.0f;
- fields[fieldNames.size()+1] = "title"; //$NON-NLS-1$
- boosts[fieldNames.size()+1] = 1.0f;
+ fields[fieldNames.size()+1] = "title"; //$NON-NLS-1$
+ boosts[fieldNames.size()+1] = 1.0f;
}
Query query = getLuceneQuery(fields, boosts);
query = improveRankingForUnqotedPhrase(query, fields, boosts);
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java
index 107076697..688dc54fa 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java
@@ -1045,7 +1045,7 @@ public class SearchIndex implements IHelpSearchIndex {
}
if (raf != null ) {
try {
- raf.close();
+ raf.close();
} catch (IOException ioe) {
}
raf = null;
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java
index 7f4635e66..0f0eb89dd 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java
@@ -51,7 +51,7 @@ public class SearchProgressMonitor implements IProgressMonitor {
@Override
public void addQTCException(QueryTooComplexException exception) throws QueryTooComplexException {
- throw exception;
+ throw exception;
}
};
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java
index 8e96555ef..720a0b832 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java
@@ -193,8 +193,8 @@ public class SearchResults implements ISearchHitCollector {
if (scope == null) {
return null;
}
- String href = scope.getHref();
- IToc toc=scope.getAdapter(IToc.class);
+ String href = scope.getHref();
+ IToc toc=scope.getAdapter(IToc.class);
if (toc != null){
href=toc.getTopic(null).getHref();
}
@@ -245,7 +245,7 @@ public class SearchResults implements ISearchHitCollector {
if (toc != null) {
foundInToc = true;
if (filter == null || filter.inScope(toc)) {
- return toc;
+ return toc;
}
}
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/XHTMLSearchParticipant.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/XHTMLSearchParticipant.java
index 59af0879a..1114fa05d 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/XHTMLSearchParticipant.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/XHTMLSearchParticipant.java
@@ -42,27 +42,27 @@ public class XHTMLSearchParticipant extends SearchParticipantXML {
@Override
protected void handleStartElement(String name, Attributes attributes, IParsedXMLContent data) {
- title = null;
- if (META_TAG.equalsIgnoreCase(name)) {
- String nameAttribute = attributes.getValue(NAME_ATTRIBUTE);
- if (DESCRIPTION.equalsIgnoreCase(nameAttribute)) {
- String descriptionAttribute = attributes.getValue(CONTENT_ATTRIBUTE);
- if (descriptionAttribute != null) {
- hasDescriptionMetaTag = true;
- data.addToSummary(descriptionAttribute);
- data.addText(" "); //$NON-NLS-1$
- data.addText(descriptionAttribute);
- data.addText(" "); //$NON-NLS-1$
- }
- } else if (KEYWORDS.equalsIgnoreCase(nameAttribute)) {
- String keywordsAttribute = attributes.getValue(CONTENT_ATTRIBUTE);
- if (keywordsAttribute != null) {
- data.addText(" "); //$NON-NLS-1$
- data.addText(keywordsAttribute);
- data.addText(" "); //$NON-NLS-1$
- }
- }
- }
+ title = null;
+ if (META_TAG.equalsIgnoreCase(name)) {
+ String nameAttribute = attributes.getValue(NAME_ATTRIBUTE);
+ if (DESCRIPTION.equalsIgnoreCase(nameAttribute)) {
+ String descriptionAttribute = attributes.getValue(CONTENT_ATTRIBUTE);
+ if (descriptionAttribute != null) {
+ hasDescriptionMetaTag = true;
+ data.addToSummary(descriptionAttribute);
+ data.addText(" "); //$NON-NLS-1$
+ data.addText(descriptionAttribute);
+ data.addText(" "); //$NON-NLS-1$
+ }
+ } else if (KEYWORDS.equalsIgnoreCase(nameAttribute)) {
+ String keywordsAttribute = attributes.getValue(CONTENT_ATTRIBUTE);
+ if (keywordsAttribute != null) {
+ data.addText(" "); //$NON-NLS-1$
+ data.addText(keywordsAttribute);
+ data.addText(" "); //$NON-NLS-1$
+ }
+ }
+ }
}
@Override
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/IndexerJob.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/IndexerJob.java
index 432b8f41e..055c7e2b3 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/IndexerJob.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/IndexerJob.java
@@ -30,12 +30,12 @@ public class IndexerJob extends Job {
try {
long start = System.currentTimeMillis();
if (HelpPlugin.DEBUG_SEARCH) {
- System.out.println("Start to update search index"); //$NON-NLS-1$
+ System.out.println("Start to update search index"); //$NON-NLS-1$
}
BaseHelpSystem.getLocalSearchManager().ensureIndexUpdated(monitor, index);
long stop = System.currentTimeMillis();
if (HelpPlugin.DEBUG_SEARCH) {
- System.out.println("Milliseconds to update search index = = " + (stop - start)); //$NON-NLS-1$
+ System.out.println("Milliseconds to update search index = = " + (stop - start)); //$NON-NLS-1$
}
return Status.OK_STATUS;
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java b/org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java
index c492a3bbe..1056b765a 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java
@@ -232,7 +232,7 @@ public class JettyHelpServer extends HelpServer {
return true;
}
String host = HelpBasePlugin.getBundleContext().getProperty("server_host"); //$NON-NLS-1$
- return host != null && host.trim().length() > 0;
+ return host != null && host.trim().length() > 0;
}
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/server/WebappManager.java b/org.eclipse.help.base/src/org/eclipse/help/internal/server/WebappManager.java
index 9b4e9b8ad..5b56bf03f 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/server/WebappManager.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/server/WebappManager.java
@@ -27,15 +27,15 @@ public class WebappManager {
private static final String SERVER_EXTENSION_ID = "org.eclipse.help.base.server"; //$NON-NLS-1$
private static final String SERVER_CLASS_ATTRIBUTE = "class"; //$NON-NLS-1$
- private static HelpServer getHelpServer() {
- if (server == null) {
- createWebappServer();
- }
- if (server == null) {
- server = new JettyHelpServer();
- }
- return server;
- }
+ private static HelpServer getHelpServer() {
+ if (server == null) {
+ createWebappServer();
+ }
+ if (server == null) {
+ server = new JettyHelpServer();
+ }
+ return server;
+ }
public static void start(String webappName) throws Exception {
getHelpServer().start(webappName);
@@ -50,7 +50,7 @@ public class WebappManager {
}
public static String getHost() {
- return getHelpServer().getHost();
+ return getHelpServer().getHost();
}
private static void createWebappServer() {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/validation/TocValidator.java b/org.eclipse.help.base/src/org/eclipse/help/internal/validation/TocValidator.java
index 8569c365e..339b5d7be 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/validation/TocValidator.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/validation/TocValidator.java
@@ -54,7 +54,7 @@ public class TocValidator {
}
public static abstract class Filter {
- abstract public boolean isIncluded(String href);
+ abstract public boolean isIncluded(String href);
}
public static class PassThroughFilter extends Filter {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/server/HelpServer.java b/org.eclipse.help.base/src/org/eclipse/help/server/HelpServer.java
index 601ac5654..a43bac8b3 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/server/HelpServer.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/server/HelpServer.java
@@ -44,13 +44,13 @@ public abstract class HelpServer {
* @param webappName the name of a running web application
* @throws CoreException If there was any error during stopping.
*/
- public abstract void stop(String webappName) throws CoreException ;
+ public abstract void stop(String webappName) throws CoreException ;
/**
* Returns the port number the app server listens on
* @return integer port number, 0 if server not started
*/
- public abstract int getPort();
+ public abstract int getPort();
/**
@@ -59,5 +59,5 @@ public abstract class HelpServer {
* @return String representation of host name of IP, null if server not
* started yet
*/
- public abstract String getHost();
+ public abstract String getHost();
}
diff --git a/org.eclipse.help.base/src_ant/org/eclipse/help/internal/base/ant/BuildHelpIndex.java b/org.eclipse.help.base/src_ant/org/eclipse/help/internal/base/ant/BuildHelpIndex.java
index d13c6a150..2c1cde11f 100644
--- a/org.eclipse.help.base/src_ant/org/eclipse/help/internal/base/ant/BuildHelpIndex.java
+++ b/org.eclipse.help.base/src_ant/org/eclipse/help/internal/base/ant/BuildHelpIndex.java
@@ -59,8 +59,8 @@ public class BuildHelpIndex extends Task {
builder.setDestination(target);
IProgressMonitor monitor = (IProgressMonitor) getProject()
.getReferences().get(AntCorePlugin.ECLIPSE_PROGRESS_MONITOR);
- if (monitor == null)
- monitor = new NullProgressMonitor();
+ if (monitor == null)
+ monitor = new NullProgressMonitor();
try {
builder.execute(monitor);
} catch (CoreException e) {
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/RootScopePage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/RootScopePage.java
index 807e8c54f..50a076504 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/RootScopePage.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/RootScopePage.java
@@ -85,8 +85,8 @@ public abstract class RootScopePage extends PreferencePage implements
@Override
protected final Control createContents(Composite parent) {
initializeDefaults(getPreferenceStore());
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
- "org.eclipse.help.ui.searchScope"); //$NON-NLS-1$
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
+ "org.eclipse.help.ui.searchScope"); //$NON-NLS-1$
contentContainer = new Composite(parent, SWT.NULL);
GridLayout layout = new GridLayout();
GridData gd;
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.java
index 46b0569fe..a697da616 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.java
@@ -224,8 +224,8 @@ public class ContextHelpDialog {
}
if (styledText == null && context.getText() != null) {
styledText = context.getText();
- styledText= styledText.replaceAll("<b>","<@#\\$b>"); //$NON-NLS-1$ //$NON-NLS-2$
- styledText= styledText.replaceAll("</b>", "</@#\\$b>"); //$NON-NLS-1$ //$NON-NLS-2$
+ styledText= styledText.replaceAll("<b>","<@#\\$b>"); //$NON-NLS-1$ //$NON-NLS-2$
+ styledText= styledText.replaceAll("</b>", "</@#\\$b>"); //$NON-NLS-1$ //$NON-NLS-2$
}
if (styledText == null) { // no description found in context objects.
styledText = Messages.ContextHelpPart_noDescription;
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DefaultHelpUI.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DefaultHelpUI.java
index b99562e26..af046ffe2 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DefaultHelpUI.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DefaultHelpUI.java
@@ -197,7 +197,7 @@ public class DefaultHelpUI extends AbstractHelpUI {
IWorkbenchPage page = window.getActivePage();
if (page != null) {
boolean searchFromBrowser = Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_SEARCH_FROM_BROWSER, false, null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_SEARCH_FROM_BROWSER, false, null);
if (searchFromBrowser) {
String parameters = "tab=search"; //$NON-NLS-1$
if (expression != null) {
@@ -239,9 +239,9 @@ public class DefaultHelpUI extends AbstractHelpUI {
public static void showIndex() {
HelpView helpView = getHelpView();
- if (helpView != null) {
- helpView.showIndex();
- }
+ if (helpView != null) {
+ helpView.showIndex();
+ }
}
private static HelpView getHelpView() {
@@ -310,9 +310,9 @@ public class DefaultHelpUI extends AbstractHelpUI {
if (context == null)
return;
boolean winfopop = Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_WINDOW_INFOPOP, false, null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_WINDOW_INFOPOP, false, null);
boolean dinfopop = Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_DIALOG_INFOPOP, false, null) || FontUtils.isFontTooLargeForTray();
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_DIALOG_INFOPOP, false, null) || FontUtils.isFontTooLargeForTray();
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
Shell activeShell = getActiveShell();
@@ -333,7 +333,7 @@ public class DefaultHelpUI extends AbstractHelpUI {
IHelpResource[] topics = context.getRelatedTopics();
boolean isSingleChoiceWithoutDescription = contextText == null && topics.length == 1;
String openMode = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_HELP_VIEW_OPEN_MODE, IHelpBaseConstants.P_IN_PLACE, null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_HELP_VIEW_OPEN_MODE, IHelpBaseConstants.P_IN_PLACE, null);
if (isSingleChoiceWithoutDescription && IHelpBaseConstants.P_IN_EDITOR.equals(openMode)) {
showInWorkbenchBrowser(topics[0].getHref(), true);
} else if (isSingleChoiceWithoutDescription && IHelpBaseConstants.P_IN_BROWSER.equals(openMode)) {
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DynamicHelpAction.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DynamicHelpAction.java
index 6d1ce5077..df4a4895b 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DynamicHelpAction.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DynamicHelpAction.java
@@ -21,23 +21,23 @@ import org.eclipse.ui.PlatformUI;
public class DynamicHelpAction implements IWorkbenchWindowActionDelegate {
- public DynamicHelpAction() {
- }
+ public DynamicHelpAction() {
+ }
@Override
public void dispose() {
- }
+ }
@Override
public void init(IWorkbenchWindow window) {
- }
+ }
@Override
public void run(IAction action) {
- PlatformUI.getWorkbench().getHelpSystem().displayDynamicHelp();
- }
+ PlatformUI.getWorkbench().getHelpSystem().displayDynamicHelp();
+ }
@Override
public void selectionChanged(IAction action, ISelection selection) {
- }
+ }
} \ No newline at end of file
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ExecuteCommandAction.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ExecuteCommandAction.java
index 714408a02..fb7157231 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ExecuteCommandAction.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ExecuteCommandAction.java
@@ -131,10 +131,10 @@ public class ExecuteCommandAction implements ILiveHelpAction {
IWorkbench wb = PlatformUI.getWorkbench();
if (wb != null) {
Object serviceObject = wb.getAdapter(IHandlerService.class);
- if (serviceObject != null) {
- IHandlerService service = (IHandlerService)serviceObject;
- return service;
- }
+ if (serviceObject != null) {
+ IHandlerService service = (IHandlerService)serviceObject;
+ return service;
+ }
}
return null;
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIResources.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIResources.java
index d57eef200..249a676d6 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIResources.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIResources.java
@@ -153,10 +153,10 @@ public class HelpUIResources {
IConfigurationElement[] configElements = extensionsFound[i].getConfigurationElements();
for(int j=0; j < configElements.length; j++){
- if (configElements[j].getName().equals(TOC_ICON_ELEMENT)){
- IConfigurationElement iconElem = configElements[j];
- String attrs[] = iconElem.getAttributeNames();
- String contributorID = iconElem.getContributor().getName();
+ if (configElements[j].getName().equals(TOC_ICON_ELEMENT)){
+ IConfigurationElement iconElem = configElements[j];
+ String attrs[] = iconElem.getAttributeNames();
+ String contributorID = iconElem.getContributor().getName();
for (int k=0; k < attrs.length; k++){
if(attrs[k].equals(OPEN_ICON_PATH))
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/SearchAction.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/SearchAction.java
index 8a4f3c273..ff6f5accc 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/SearchAction.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/SearchAction.java
@@ -21,23 +21,23 @@ import org.eclipse.ui.PlatformUI;
public class SearchAction implements IWorkbenchWindowActionDelegate {
- public SearchAction() {
- }
+ public SearchAction() {
+ }
@Override
public void dispose() {
- }
+ }
@Override
public void init(IWorkbenchWindow window) {
- }
+ }
@Override
public void run(IAction action) {
- PlatformUI.getWorkbench().getHelpSystem().displaySearch();
- }
+ PlatformUI.getWorkbench().getHelpSystem().displaySearch();
+ }
@Override
public void selectionChanged(IAction action, ISelection selection) {
- }
+ }
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java
index 8799fc392..bd00246ef 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java
@@ -392,7 +392,7 @@ public class EmbeddedBrowser {
private static String getWindowTitle() {
if (Platform.getPreferencesService().getBoolean(HelpUIPlugin.PLUGIN_ID, "windowTitlePrefix", false, null)) { //$NON-NLS-1$
return NLS.bind(Messages.browserTitle, BaseHelpSystem
- .getProductName());
+ .getProductName());
}
return BaseHelpSystem.getProductName();
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserAdapter.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserAdapter.java
index 0df793897..d815416ab 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserAdapter.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserAdapter.java
@@ -72,8 +72,8 @@ public class EmbeddedBrowserAdapter implements IBrowser, IBrowserCloseListener{
/* only attempt to use a second thread if the Browser's native renderer is IE */
boolean useUIThread2 = BaseHelpSystem.getMode() == BaseHelpSystem.MODE_WORKBENCH
&& Constants.OS_WIN32.equalsIgnoreCase(Platform.getOS())
- && !Constants.WS_WPF.equalsIgnoreCase(SWT.getPlatform())
- && "ie".equalsIgnoreCase(browserType); //$NON-NLS-1$
+ && !Constants.WS_WPF.equalsIgnoreCase(SWT.getPlatform())
+ && "ie".equalsIgnoreCase(browserType); //$NON-NLS-1$
if (useUIThread2) {
if (secondThread == null) {
secondThread = new UIThread2();
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/handlers/ShowIndexHandler.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/handlers/ShowIndexHandler.java
index f0ba180a3..d149636d2 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/handlers/ShowIndexHandler.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/handlers/ShowIndexHandler.java
@@ -34,10 +34,10 @@ public class ShowIndexHandler extends AbstractHandler {
* Currently returns true, could be controlled by a preference
* in the future
*/
- private boolean isOpenInHelpView() {
- boolean searchFromBrowser =
- Platform.getPreferencesService().getBoolean(HelpBasePlugin.PLUGIN_ID,IHelpBaseConstants.P_KEY_SEARCH_FROM_BROWSER, false, null);
- return !searchFromBrowser;
+ private boolean isOpenInHelpView() {
+ boolean searchFromBrowser =
+ Platform.getPreferencesService().getBoolean(HelpBasePlugin.PLUGIN_ID,IHelpBaseConstants.P_KEY_SEARCH_FROM_BROWSER, false, null);
+ return !searchFromBrowser;
}
@Override
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java
index 082731d75..2418bd47e 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java
@@ -122,7 +122,7 @@ public class HelpContentPreferencePage extends PreferencePage implements
List<IC> ics = table.getICs();
ICPreferences.setICs(ics);
- RemoteHelp.notifyPreferenceChange();
+ RemoteHelp.notifyPreferenceChange();
return super.performOk();
}
@@ -137,7 +137,7 @@ public class HelpContentPreferencePage extends PreferencePage implements
searchLocalHelpOnly.addListener(SWT.Selection, changeListener);
boolean isRemoteOn = Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, false, null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, false, null);
searchLocalHelpOnly.setSelection(!isRemoteOn);
Dialog.applyDialogFont(searchLocalHelpOnly);
@@ -149,9 +149,9 @@ public class HelpContentPreferencePage extends PreferencePage implements
searchLocalHelpFirst.addListener(SWT.Selection, changeListener);
boolean isRemoteOn = Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, false, null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, false, null);
boolean isRemotePreferred = Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PREFERRED, false, null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PREFERRED, false, null);
searchLocalHelpFirst.setSelection(isRemoteOn && !isRemotePreferred);
Dialog.applyDialogFont(searchLocalHelpFirst);
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpPreferencePage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpPreferencePage.java
index 54a8c7e65..b62b908e4 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpPreferencePage.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpPreferencePage.java
@@ -121,21 +121,21 @@ public class HelpPreferencePage extends PreferencePage implements
searchLocationCombo.add(Messages.HelpPreferencePage_openInBrowser);
searchLocationCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
boolean searchFromBrowser = Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_SEARCH_FROM_BROWSER, false, null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_SEARCH_FROM_BROWSER, false, null);
searchLocationCombo.setText(searchFromBrowser ? Messages.HelpPreferencePage_openInBrowser : Messages.HelpPreferencePage_view);
}
private void createOpenContents(Composite mainComposite) {
if (BrowserManager.getInstance().isEmbeddedBrowserPresent()) {
- Label isExternalLabel = new Label(mainComposite, SWT.NONE);
- isExternalLabel.setText(Messages.HelpPreferencePage_openContents);
- isExternalLabel.setLayoutData(createLabelData());
+ Label isExternalLabel = new Label(mainComposite, SWT.NONE);
+ isExternalLabel.setText(Messages.HelpPreferencePage_openContents);
+ isExternalLabel.setLayoutData(createLabelData());
useExternalCombo = new Combo(mainComposite, SWT.READ_ONLY);
useExternalCombo.add(Messages.HelpPreferencePage_helpBrowser);
useExternalCombo.add(Messages.HelpPreferencePage_externalBrowser);
useExternalCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
boolean useExternal = Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_ALWAYS_EXTERNAL_BROWSER, false, null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_ALWAYS_EXTERNAL_BROWSER, false, null);
useExternalCombo.setText(useExternal ? Messages.HelpPreferencePage_externalBrowser : Messages.HelpPreferencePage_helpBrowser);
}
}
@@ -181,7 +181,7 @@ public class HelpPreferencePage extends PreferencePage implements
dialogHelpCombo.add(Messages.HelpPreferencePage_infopop);
dialogHelpCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
boolean dinfopop = Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_DIALOG_INFOPOP, false, null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_DIALOG_INFOPOP, false, null);
dialogHelpCombo.setText(dinfopop ? Messages.HelpPreferencePage_infopop : Messages.HelpPreferencePage_tray);
}
@@ -195,7 +195,7 @@ public class HelpPreferencePage extends PreferencePage implements
windowHelpCombo.add(Messages.HelpPreferencePage_infopop);
windowHelpCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
boolean winfopop = Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_WINDOW_INFOPOP, false, null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_WINDOW_INFOPOP, false, null);
windowHelpCombo.setText(winfopop ? Messages.HelpPreferencePage_infopop : Messages.HelpPreferencePage_view);
}
@@ -248,9 +248,9 @@ public class HelpPreferencePage extends PreferencePage implements
dialogHelpCombo.setText(dinfopop ? Messages.HelpPreferencePage_infopop : Messages.HelpPreferencePage_tray);
if (openModeCombo !=null) {
- String openMode = defaults.get(
+ String openMode = defaults.get(
IHelpBaseConstants.P_KEY_HELP_VIEW_OPEN_MODE, IHelpBaseConstants.P_IN_PLACE);
- openModeCombo.setText(openModeToString(openMode));
+ openModeCombo.setText(openModeToString(openMode));
}
super.performDefaults();
@@ -288,20 +288,20 @@ public class HelpPreferencePage extends PreferencePage implements
}
private String openModeToString(String openMode) {
- if (IHelpBaseConstants.P_IN_BROWSER.equals(openMode)) {
- return Messages.HelpPreferencePage_openInBrowser;
- } else if (IHelpBaseConstants.P_IN_EDITOR.equals(openMode)) {
- return Messages.HelpPreferencePage_openInEditor;
+ if (IHelpBaseConstants.P_IN_BROWSER.equals(openMode)) {
+ return Messages.HelpPreferencePage_openInBrowser;
+ } else if (IHelpBaseConstants.P_IN_EDITOR.equals(openMode)) {
+ return Messages.HelpPreferencePage_openInEditor;
} else {
return Messages.HelpPreferencePage_openInPlace;
}
}
private String openModeFromString(String openMode) {
- if (Messages.HelpPreferencePage_openInBrowser.equals(openMode)) {
- return IHelpBaseConstants.P_IN_BROWSER;
- } else if (Messages.HelpPreferencePage_openInEditor.equals(openMode)) {
- return IHelpBaseConstants.P_IN_EDITOR;
+ if (Messages.HelpPreferencePage_openInBrowser.equals(openMode)) {
+ return IHelpBaseConstants.P_IN_BROWSER;
+ } else if (Messages.HelpPreferencePage_openInEditor.equals(openMode)) {
+ return IHelpBaseConstants.P_IN_EDITOR;
} else {
return IHelpBaseConstants.P_IN_PLACE;
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICButtons.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICButtons.java
index da9d204b4..578689593 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICButtons.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICButtons.java
@@ -154,10 +154,10 @@ public class ICButtons implements SelectionListener{
}
boolean shouldRemove =
- MessageDialog.openQuestion(
- page.getShell(),
- NLS.bind(Messages.HelpContentBlock_rmvTitle ,""), //$NON-NLS-1$
- NLS.bind(Messages.HelpContentBlock_rmvLabel ,remove));
+ MessageDialog.openQuestion(
+ page.getShell(),
+ NLS.bind(Messages.HelpContentBlock_rmvTitle ,""), //$NON-NLS-1$
+ NLS.bind(Messages.HelpContentBlock_rmvLabel ,remove));
if (shouldRemove)
{
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICDialog.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICDialog.java
index 1734424d0..6708687da 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICDialog.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICDialog.java
@@ -250,7 +250,7 @@ public class ICDialog extends StatusDialog implements Listener, SelectionListene
@Override
public void handleEvent(Event event) {
- updateValidity();
+ updateValidity();
}
@Override
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICTable.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICTable.java
index a34cd3df3..99c7f904f 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICTable.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICTable.java
@@ -96,29 +96,29 @@ public class ICTable {
ColumnLayoutData[] fTableColumnLayouts= {
- new ColumnWeightData(85),
- new ColumnWeightData(165),
- new ColumnWeightData(60)
+ new ColumnWeightData(85),
+ new ColumnWeightData(165),
+ new ColumnWeightData(60)
};
TableColumn column;
tableLayout.addColumnData(fTableColumnLayouts[0]);
- column = new TableColumn(table, SWT.NONE, 0);
- column.setResizable(fTableColumnLayouts[0].resizable);
- column.setText(NAME_COLUMN);
+ column = new TableColumn(table, SWT.NONE, 0);
+ column.setResizable(fTableColumnLayouts[0].resizable);
+ column.setText(NAME_COLUMN);
- tableLayout.addColumnData(fTableColumnLayouts[1]);
- column = new TableColumn(table, SWT.NONE, 1);
- column.setResizable(fTableColumnLayouts[1].resizable);
- column.setText(LOCATION_COLUMN);
+ tableLayout.addColumnData(fTableColumnLayouts[1]);
+ column = new TableColumn(table, SWT.NONE, 1);
+ column.setResizable(fTableColumnLayouts[1].resizable);
+ column.setText(LOCATION_COLUMN);
- tableLayout.addColumnData(fTableColumnLayouts[2]);
- column = new TableColumn(table, SWT.NONE, 2);
- column.setResizable(fTableColumnLayouts[2].resizable);
- column.setText(STATUS_COLUMN);
+ tableLayout.addColumnData(fTableColumnLayouts[2]);
+ column = new TableColumn(table, SWT.NONE, 2);
+ column.setResizable(fTableColumnLayouts[2].resizable);
+ column.setText(STATUS_COLUMN);
- return table;
+ return table;
}
/**
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaContentProvider.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaContentProvider.java
index dda2fb357..52639d345 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaContentProvider.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaContentProvider.java
@@ -120,7 +120,7 @@ public class HelpCriteriaContentProvider implements ITreeContentProvider {
CriterionName parentCriterion = (CriterionName) parentElement;
String[] values = BaseHelpSystem.getWorkingSetManager().getCriterionValueIds(parentCriterion.getId());
- CriterionValue[] criterionValues = new CriterionValue[values.length];
+ CriterionValue[] criterionValues = new CriterionValue[values.length];
for (int i = 0; i < values.length; i++) {
criterionValues[i] = new CriterionValue(values[i], parentElement);
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterSearchScopeFactory.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterSearchScopeFactory.java
index 1d4e65bd8..7b0e93b8e 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterSearchScopeFactory.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterSearchScopeFactory.java
@@ -34,32 +34,32 @@ public class InfoCenterSearchScopeFactory implements ISearchScopeFactory {
@Override
public ISearchScope createSearchScope(IPreferenceStore store, String engineId,
Dictionary<String, Object> parameters) {
- String url = getProperty(P_URL, store, engineId, parameters);
- String ssvalue = getProperty(P_SEARCH_SELECTED, store, engineId, parameters);
- boolean searchSelected = ssvalue!=null && ssvalue.equalsIgnoreCase("true"); //$NON-NLS-1$
- String [] tocs=null;
- if (searchSelected) {
- String tvalue = getProperty(P_TOCS, store, engineId, parameters);
- if (tvalue!=null && tvalue.length()>0) {
- StringTokenizer stok = new StringTokenizer(tvalue, TOC_SEPARATOR);
- ArrayList<String> list = new ArrayList<>();
- while (stok.hasMoreTokens()) {
- String toc = stok.nextToken();
- list.add(toc);
- }
- if (list.size()>0)
+ String url = getProperty(P_URL, store, engineId, parameters);
+ String ssvalue = getProperty(P_SEARCH_SELECTED, store, engineId, parameters);
+ boolean searchSelected = ssvalue!=null && ssvalue.equalsIgnoreCase("true"); //$NON-NLS-1$
+ String [] tocs=null;
+ if (searchSelected) {
+ String tvalue = getProperty(P_TOCS, store, engineId, parameters);
+ if (tvalue!=null && tvalue.length()>0) {
+ StringTokenizer stok = new StringTokenizer(tvalue, TOC_SEPARATOR);
+ ArrayList<String> list = new ArrayList<>();
+ while (stok.hasMoreTokens()) {
+ String toc = stok.nextToken();
+ list.add(toc);
+ }
+ if (list.size()>0)
tocs = list.toArray(new String[list.size()]);
- }
- }
- return new InfoCenter.Scope(url, searchSelected, tocs);
- }
+ }
+ }
+ return new InfoCenter.Scope(url, searchSelected, tocs);
+ }
private String getProperty(String key, IPreferenceStore store, String engineId,
Dictionary<String, Object> parameters) {
- // try the store first
- String value = store.getString(engineId+"."+key); //$NON-NLS-1$
- if (value!=null && value.length()>0) return value;
- // try the parameters
+ // try the store first
+ String value = store.getString(engineId+"."+key); //$NON-NLS-1$
+ if (value!=null && value.length()>0) return value;
+ // try the parameters
return (String) parameters.get(key);
- }
+ }
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalHelpPage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalHelpPage.java
index 9cb0e56c4..d7d07de59 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalHelpPage.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalHelpPage.java
@@ -99,7 +99,7 @@ public class LocalHelpPage extends RootScopePage {
public void widgetSelected(SelectionEvent e) {
contentTree.getTree().setEnabled(false);
if (criteriaTree != null) {
- criteriaTree.getTree().setEnabled(false);
+ criteriaTree.getTree().setEnabled(false);
}
}
});
@@ -115,7 +115,7 @@ public class LocalHelpPage extends RootScopePage {
public void widgetSelected(SelectionEvent e) {
contentTree.getTree().setEnabled(true);
if (criteriaTree != null) {
- criteriaTree.getTree().setEnabled(true);
+ criteriaTree.getTree().setEnabled(true);
}
}
@@ -146,7 +146,7 @@ public class LocalHelpPage extends RootScopePage {
| GridData.VERTICAL_ALIGN_CENTER);
gd.horizontalSpan = 2;
criteriaLabel.setLayoutData(gd);
- createCriteriaTree(parent, font);
+ createCriteriaTree(parent, font);
}
initializeCheckedState();
@@ -265,7 +265,7 @@ public class LocalHelpPage extends RootScopePage {
}
void updateParentState(Object child, boolean baseChildState,
- CheckboxTreeViewer tree, ITreeContentProvider contentProvider) {
+ CheckboxTreeViewer tree, ITreeContentProvider contentProvider) {
if (child == null)
return;
@@ -293,7 +293,7 @@ public class LocalHelpPage extends RootScopePage {
void setSubtreeChecked(Object parent, boolean state,
boolean checkExpandedState,
- CheckboxTreeViewer tree, ITreeContentProvider contentProvider) {
+ CheckboxTreeViewer tree, ITreeContentProvider contentProvider) {
Object[] children = contentProvider.getChildren(parent);
for (int i = children.length - 1; i >= 0; i--) {
@@ -310,7 +310,7 @@ public class LocalHelpPage extends RootScopePage {
@SuppressWarnings({ "unchecked", "rawtypes" })
private void findCheckedElements(java.util.List checkedResources, Object parent,
- CheckboxTreeViewer tree, ITreeContentProvider contentProvider) {
+ CheckboxTreeViewer tree, ITreeContentProvider contentProvider) {
Object[] children = contentProvider.getChildren(parent);
for (int i = 0; i < children.length; i++) {
if (tree.getGrayed(children[i]))
@@ -321,7 +321,7 @@ public class LocalHelpPage extends RootScopePage {
}
private CriterionResource[] findCheckedCriteria(Object parent,
- CheckboxTreeViewer tree, ITreeContentProvider contentProvider) {
+ CheckboxTreeViewer tree, ITreeContentProvider contentProvider) {
Object[] children = contentProvider.getChildren(parent);
List<CriterionResource> resources = new ArrayList<>();
for (int i = 0; i < children.length; i++) {
@@ -331,8 +331,8 @@ public class LocalHelpPage extends RootScopePage {
Object[] grandChildren = contentProvider.getChildren(name);
for (int j = 0; j < grandChildren.length; j++) {
if (tree.getChecked(grandChildren[j])) {
- CriterionValue value = (CriterionValue) grandChildren[j];
- resource.addCriterionValue(value.getId());
+ CriterionValue value = (CriterionValue) grandChildren[j];
+ resource.addCriterionValue(value.getId());
}
}
if (resource.getCriterionValues().size() > 0) {
@@ -343,7 +343,7 @@ public class LocalHelpPage extends RootScopePage {
}
void handleCheckStateChange(final CheckStateChangedEvent event,
- final CheckboxTreeViewer tree, final ITreeContentProvider contentProvider) {
+ final CheckboxTreeViewer tree, final ITreeContentProvider contentProvider) {
BusyIndicator.showWhile(getShell().getDisplay(), () -> {
Object element = event.getElement();
boolean state = event.getChecked();
@@ -424,7 +424,7 @@ public class LocalHelpPage extends RootScopePage {
for (Iterator<String> iter = values.iterator(); iter.hasNext();) {
String valueString = iter.next();
CriterionValue value = new CriterionValue(valueString, name);
- criteriaTree.setChecked(value, true);
+ criteriaTree.setChecked(value, true);
updateParentState(value, true, criteriaTree, criteriaTreeContentProvider);
}
}
@@ -436,7 +436,7 @@ public class LocalHelpPage extends RootScopePage {
searchSelected.setSelection(false);
contentTree.setCheckedElements(new Object[0]);
if (criteriaTree != null) {
- criteriaTree.setCheckedElements(new Object[0]);
+ criteriaTree.setCheckedElements(new Object[0]);
}
super.performDefaults();
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalSearchScopeFactory.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalSearchScopeFactory.java
index e3aab0f81..9cf6b9961 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalSearchScopeFactory.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalSearchScopeFactory.java
@@ -26,17 +26,17 @@ import org.eclipse.jface.preference.IPreferenceStore;
* Creates the scope for local search using the help working sets
*/
public class LocalSearchScopeFactory implements ISearchScopeFactory {
- public final static String P_WORKING_SET = "workingSet"; //$NON-NLS-1$
- public final static String P_CAPABILITY_FILTERING = "capabilityFiltering"; //$NON-NLS-1$
+ public final static String P_WORKING_SET = "workingSet"; //$NON-NLS-1$
+ public final static String P_CAPABILITY_FILTERING = "capabilityFiltering"; //$NON-NLS-1$
@Override
public ISearchScope createSearchScope(IPreferenceStore store, String engineId,
Dictionary<String, Object> parameters) {
- String name = store.getString(engineId+"."+P_WORKING_SET); //$NON-NLS-1$
- WorkingSet workingSet = null;
- if (name != null)
- workingSet = BaseHelpSystem.getWorkingSetManager().getWorkingSet(name);
- boolean capabilityFiltering = store.getBoolean(engineId+"."+P_CAPABILITY_FILTERING); //$NON-NLS-1$
- return new LocalHelpScope(workingSet, capabilityFiltering);
- }
+ String name = store.getString(engineId+"."+P_WORKING_SET); //$NON-NLS-1$
+ WorkingSet workingSet = null;
+ if (name != null)
+ workingSet = BaseHelpSystem.getWorkingSetManager().getWorkingSet(name);
+ boolean capabilityFiltering = store.getBoolean(engineId+"."+P_CAPABILITY_FILTERING); //$NON-NLS-1$
+ return new LocalHelpScope(workingSet, capabilityFiltering);
+ }
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/WebSearchScopeFactory.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/WebSearchScopeFactory.java
index ce86bd5d3..863e1db5d 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/WebSearchScopeFactory.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/WebSearchScopeFactory.java
@@ -29,16 +29,16 @@ public class WebSearchScopeFactory implements ISearchScopeFactory {
@Override
public ISearchScope createSearchScope(IPreferenceStore store, String engineId,
Dictionary<String, Object> parameters) {
- String urlTemplate = getProperty(store, engineId, parameters);
- return new WebSearch.Scope(urlTemplate);
- }
+ String urlTemplate = getProperty(store, engineId, parameters);
+ return new WebSearch.Scope(urlTemplate);
+ }
private String getProperty(IPreferenceStore store, String engineId,
Dictionary<String, Object> parameters) {
- // try the store first
- String value = store.getString(engineId+"."+P_URL); //$NON-NLS-1$
- if (value!=null && value.length()>0) return value;
- // try the parameters
- return (String)parameters.get(P_URL);
- }
+ // try the store first
+ String value = store.getString(engineId+"."+P_URL); //$NON-NLS-1$
+ if (value!=null && value.length()>0) return value;
+ // try the parameters
+ return (String)parameters.get(P_URL);
+ }
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/FontUtils.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/FontUtils.java
index c2673630d..6acfcba65 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/FontUtils.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/FontUtils.java
@@ -44,7 +44,7 @@ public class FontUtils {
String scaleString = percent/100 + "." + (percent % 100) / 10; //$NON-NLS-1$
String os = Platform.getOS();
if (Constants.WS_WIN32.equalsIgnoreCase(os) ||
- Constants.OS_MACOSX.equalsIgnoreCase(os)) {
+ Constants.OS_MACOSX.equalsIgnoreCase(os)) {
return "document.body.style.zoom = " + scaleString; //$NON-NLS-1$
}
return null; // No rescale in Mozilla browsers
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BrowserPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BrowserPart.java
index e9b827508..3556d0c88 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BrowserPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BrowserPart.java
@@ -56,7 +56,7 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
private final static String QUERY = "BrowserPartQuery:"; //$NON-NLS-1$
private final static String HIGHLIGHT_ON = "highlight-on"; //$NON-NLS-1$
private final static String HELP_VIEW_SCALE = "help_view_scale"; //$NON-NLS-1$
- private final static String EMPTY_PAGE = "<html><head></head><body></body></html>"; //$NON-NLS-1$
+ private final static String EMPTY_PAGE = "<html><head></head><body></body></html>"; //$NON-NLS-1$
private ReusableHelpPart parent;
@@ -160,7 +160,7 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
}
lastProgress = -1;
if (fontScalePercentage != 100) {
- rescale();
+ rescale();
}
String value = executeQuery("document.title"); //$NON-NLS-1$
BrowserPart.this.title = value != null ? value : "N/A"; //$NON-NLS-1$
@@ -286,7 +286,7 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
fontScalePercentage = Platform.getPreferencesService().getInt(HelpBasePlugin.PLUGIN_ID,
HELP_VIEW_SCALE, 100, null);
if (menuManager != null) {
- addMenuActions(menuManager);
+ addMenuActions(menuManager);
}
}
}
@@ -462,8 +462,8 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
private void enableButtons() {
if (magnifyAction != null) {
- magnifyAction.setEnabled(fontScalePercentage < SCALE_MAX);
- reduceAction.setEnabled(fontScalePercentage > SCALE_MIN);
+ magnifyAction.setEnabled(fontScalePercentage < SCALE_MAX);
+ reduceAction.setEnabled(fontScalePercentage > SCALE_MIN);
}
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpPart.java
index 9f1312005..5125134e2 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpPart.java
@@ -153,7 +153,7 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
if (href.startsWith(MORE_HREF)) {
doMore(href.substring(MORE_HREF.length()));
} else {
- doOpenLink(e.getHref());
+ doOpenLink(e.getHref());
}
}
@@ -172,12 +172,12 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
@Override
public void getName(AccessibleEvent e) {
- if (e.childID == ACC.CHILDID_SELF) {
- String currentName = e.result;
- e.result = Messages.ReusableHelpPart_contextHelpPage_name
- + ' ' + getSection().getText()+ ' ' +currentName;
- }
- }
+ if (e.childID == ACC.CHILDID_SELF) {
+ String currentName = e.result;
+ e.result = Messages.ReusableHelpPart_contextHelpPage_name
+ + ' ' + getSection().getText()+ ' ' +currentName;
+ }
+ }
});
}
@@ -279,10 +279,10 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
if (lastProvider != null) {
String providerSearchExpression = lastProvider.getSearchExpression(lastControl);
if (providerSearchExpression != null) {
- updateSearchExpression(providerSearchExpression, lastControl);
- return;
+ updateSearchExpression(providerSearchExpression, lastControl);
+ return;
}
- }
+ }
if (lastContext instanceof IContext2) {
String title = ((IContext2)lastContext).getTitle();
if (title!=null) {
@@ -312,8 +312,8 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
lastPart = part;
if (provider!= null && (context==null || ((context instanceof Context) && IWorkbenchHelpContextIds.MISSING.equals(((Context)context).getId())))) {
if (HelpPlugin.DEBUG_CONTEXT) {
- System.out.println("Getting context from provider"); //$NON-NLS-1$
- }
+ System.out.println("Getting context from provider"); //$NON-NLS-1$
+ }
lastContext = provider.getContext(c);
}
updateSearchExpression();
@@ -322,18 +322,18 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
if (lastContext!=null) {
helpText = formatHelpContext(lastContext);
if (HelpPlugin.DEBUG_CONTEXT) {
- System.out.println("Context Activation, context = " + lastContext.getText()); //$NON-NLS-1$
- }
+ System.out.println("Context Activation, context = " + lastContext.getText()); //$NON-NLS-1$
+ }
} else {
if (HelpPlugin.DEBUG_CONTEXT) {
- System.out.println("Context Activation on control"); //$NON-NLS-1$
- }
+ System.out.println("Context Activation on control"); //$NON-NLS-1$
+ }
helpText = createContextHelp(c);
}
updateTitle(c);
updateDescription(helpText);
if (RelatedTopicsPart.isUseDynamicHelp()) {
- updateDynamicHelp();
+ updateDynamicHelp();
}
}
@@ -394,7 +394,7 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
if (expression == null) {
searchTerms = computeSearchTerms(c);
} else {
- searchTerms = new String[] { expression };
+ searchTerms = new String[] { expression };
}
}
@@ -404,8 +404,8 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
if (part != null) {
if (searchTerms != null) {
if (HelpPlugin.DEBUG_CONTEXT) {
- System.out.println("Dynamic help - search for " + searchTerms); //$NON-NLS-1$
- }
+ System.out.println("Dynamic help - search for " + searchTerms); //$NON-NLS-1$
+ }
part.startSearch(buildSearchExpression(searchTerms), lastContext);
}
}
@@ -469,12 +469,12 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
.getSite().getRegisteredName()));
} else if (part instanceof IEditorPart) {
if (part.getSite() != null && part.getSite().getRegisteredName() != null) {
- searchTerms.add(part.getSite().getRegisteredName());
+ searchTerms.add(part.getSite().getRegisteredName());
}
}
}
/*
- // Searching by perspective seems counterproductive - CG
+ // Searching by perspective seems counterproductive - CG
IPerspectiveDescriptor persp = page.getPerspective();
if (persp != null) {
searchTerms.add(NLS.bind(
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpSorter.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpSorter.java
index b871aa30c..bf1614002 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpSorter.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpSorter.java
@@ -36,7 +36,7 @@ public class ContextHelpSorter extends ViewerComparator {
IHelpResource r1 = (IHelpResource) elements[i];
String c1 = context.getCategory(r1);
if (!list.contains(c1)) {
- list.add(c1);
+ list.add(c1);
}
}
super.sort(viewer, elements);
@@ -50,8 +50,8 @@ public class ContextHelpSorter extends ViewerComparator {
if (!(e1 instanceof IHelpResource)) {
return 1;
}
- IHelpResource r1 = (IHelpResource) e1;
- IHelpResource r2 = (IHelpResource) e2;
+ IHelpResource r1 = (IHelpResource) e1;
+ IHelpResource r2 = (IHelpResource) e2;
String c1 = context.getCategory(r1);
String c2 = context.getCategory(r2);
int i1 = list.indexOf(c1);
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeDescriptor.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeDescriptor.java
index 8ff970c0b..37e0f28ea 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeDescriptor.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeDescriptor.java
@@ -126,7 +126,7 @@ public class EngineTypeDescriptor {
}
}
catch (CoreException e) {
- HelpUIPlugin.logError("Scope factory " + fclass + " cannot be instantiated", null); //$NON-NLS-1$ //$NON-NLS-2$
+ HelpUIPlugin.logError("Scope factory " + fclass + " cannot be instantiated", null); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeWizardPage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeWizardPage.java
index 90073bf70..5664871b4 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeWizardPage.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeWizardPage.java
@@ -86,7 +86,7 @@ public class EngineTypeWizardPage extends WizardPage {
public void createControl(Composite parent) {
Font font = parent.getFont();
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
- "org.eclipse.help.ui.searchScope"); //$NON-NLS-1$
+ "org.eclipse.help.ui.searchScope"); //$NON-NLS-1$
Composite container = new Composite(parent, SWT.NULL);
GridLayout layout = new GridLayout();
container.setLayout(layout);
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/FederatedSearchSorter.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/FederatedSearchSorter.java
index a750051dd..615b2c206 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/FederatedSearchSorter.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/FederatedSearchSorter.java
@@ -35,17 +35,17 @@ public class FederatedSearchSorter extends ViewerComparator {
return 5;
}
}
- return super.category(element);
- }
+ return super.category(element);
+ }
@Override
public int compare(Viewer viewer, Object e1, Object e2) {
- int cat1 = category(e1);
- int cat2 = category(e2);
+ int cat1 = category(e1);
+ int cat2 = category(e2);
- if (cat1 != cat2)
- return cat1 - cat2;
+ if (cat1 != cat2)
+ return cat1 - cat2;
try {
ISearchEngineResult r1 = (ISearchEngineResult) e1;
ISearchEngineResult r2 = (ISearchEngineResult) e2;
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpView.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpView.java
index 31e553dc2..765bc8fde 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpView.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpView.java
@@ -75,7 +75,7 @@ public class HelpView extends ViewPart implements IPartListener2,
reusableHelpPart.setDefaultContextHelpText(Messages.HelpView_defaultText);
reusableHelpPart.showPage(getFirstPage());
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
- "org.eclipse.help.ui.helpView"); //$NON-NLS-1$
+ "org.eclipse.help.ui.helpView"); //$NON-NLS-1$
IWorkbenchWindow window = getSite().getPage().getWorkbenchWindow();
if (window == null)
return;
@@ -124,13 +124,13 @@ public class HelpView extends ViewPart implements IPartListener2,
@Override
public void saveState(IMemento memento) {
- if (reusableHelpPart!=null && memento!=null) {
- String pageId = reusableHelpPart.getCurrentPageId();
- if (pageId!=null)
- memento.putString("pageId", pageId); //$NON-NLS-1$
- reusableHelpPart.saveState(memento);
- }
- }
+ if (reusableHelpPart!=null && memento!=null) {
+ String pageId = reusableHelpPart.getCurrentPageId();
+ if (pageId!=null)
+ memento.putString("pageId", pageId); //$NON-NLS-1$
+ reusableHelpPart.saveState(memento);
+ }
+ }
private void handlePartActivation(IWorkbenchPartReference ref) {
if (reusableHelpPart == null)
@@ -157,12 +157,12 @@ public class HelpView extends ViewPart implements IPartListener2,
} else {
if (HelpPlugin.DEBUG_CONTEXT) {
if (c == null) {
- System.out.println("Context: focus control is null " ); //$NON-NLS-1$
+ System.out.println("Context: focus control is null " ); //$NON-NLS-1$
}
if (!c.isVisible()) {
- System.out.println("Context: focus control not visible " ); //$NON-NLS-1$
+ System.out.println("Context: focus control not visible " ); //$NON-NLS-1$
}
- }
+ }
}
}
@@ -238,8 +238,8 @@ public class HelpView extends ViewPart implements IPartListener2,
selectionChanged(null);
} else {
if (HelpPlugin.DEBUG_CONTEXT) {
- System.out.println("Help View: activation of " + partRef.getPartName() + " part"); //$NON-NLS-1$ //$NON-NLS-2$
- }
+ System.out.println("Help View: activation of " + partRef.getPartName() + " part"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
handlePartActivation(partRef);
}
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HyperlinkTreePart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HyperlinkTreePart.java
index 607101e0a..143251a09 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HyperlinkTreePart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HyperlinkTreePart.java
@@ -286,7 +286,7 @@ public abstract class HyperlinkTreePart extends AbstractFormPart implements
public void init(ReusableHelpPart parent, String id, IMemento memento) {
this.parent = parent;
this.id = id;
- refilter();
+ refilter();
}
@Override
@@ -404,7 +404,7 @@ public abstract class HyperlinkTreePart extends AbstractFormPart implements
for (int i = 0; i < engineDescriptors.length; i++) {
final EngineDescriptor ed = engineDescriptors[i];
if (ed.getEngineTypeId().equals("org.eclipse.help.ui.localSearch") //$NON-NLS-1$
- && ed.getEngine() != null) {
+ && ed.getEngine() != null) {
scope = ed.createSearchScope(set.getPreferenceStore());
}
}
@@ -414,7 +414,7 @@ public abstract class HyperlinkTreePart extends AbstractFormPart implements
treeViewer.resetFilters();
if (workingSet != null) {
WorkingSetScope helpScope = new WorkingSetScope(workingSet, set.getName());
- treeViewer.addFilter(new ScopeFilter(helpScope));
+ treeViewer.addFilter(new ScopeFilter(helpScope));
}
treeViewer.refresh();
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexPart.java
index 1b40bdf8b..2c1bc1a4c 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexPart.java
@@ -228,7 +228,7 @@ public class IndexPart extends HyperlinkTreePart implements IHelpUIConstants {
IHelpResource[] topics = entry.getTopics();
IIndexEntry[] subentries = entry.getSubentries();
IIndexSee[] sees = entry instanceof IIndexEntry2 ? ((IIndexEntry2)entry).getSees() :
- new IIndexSee[0];
+ new IIndexSee[0];
if (topics.length <= 1 && subentries.length == 0 && sees.length == 0) {
// Entries with only one topic do not show children
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/LocalScopeDialog.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/LocalScopeDialog.java
index 8f9266a76..256c35d6b 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/LocalScopeDialog.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/LocalScopeDialog.java
@@ -55,11 +55,11 @@ public class LocalScopeDialog extends TrayDialog {
}
String id = localSearchDesc.getEngineTypeId();
localHelpPage = localSearchDesc.createRootPage(scopeSet.getName());
- localHelpPage.setTitle(localSearchDesc.getLabel() + '_' + id);
- localHelpPage.setImageDescriptor(localSearchDesc.getImageDescriptor());
- localHelpPage.setDescription(localSearchDesc.getDescription());
- localHelpPage.setPreferenceStore(preferenceStore);
- localHelpPage.createControl(parent);
+ localHelpPage.setTitle(localSearchDesc.getLabel() + '_' + id);
+ localHelpPage.setImageDescriptor(localSearchDesc.getImageDescriptor());
+ localHelpPage.setDescription(localSearchDesc.getDescription());
+ localHelpPage.setPreferenceStore(preferenceStore);
+ localHelpPage.createControl(parent);
Control helpPageControl = localHelpPage.getControl();
GridData layoutData = new GridData(GridData.FILL_BOTH);
helpPageControl.setLayoutData(layoutData);
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/MissingContentPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/MissingContentPart.java
index 2725a6aae..aae7f1f63 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/MissingContentPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/MissingContentPart.java
@@ -72,7 +72,7 @@ public class MissingContentPart extends AbstractFormPart implements IHelpPart {
createHelpMissingLink(container, toolkit, Dialog.DLG_IMG_MESSAGE_WARNING, Messages.remoteHelpUnavailable,
MissingContentManager.getInstance().getRemoteHelpUnavailablePage(true), true);
} else if ( isUnresolvedPlaceholders) {
- createHelpMissingLink(container, toolkit, Dialog.DLG_IMG_MESSAGE_INFO, Messages.ReusableHelpPart_missingContent,
+ createHelpMissingLink(container, toolkit, Dialog.DLG_IMG_MESSAGE_INFO, Messages.ReusableHelpPart_missingContent,
MissingContentManager.getInstance().getHelpMissingPage(true), false);
}
toolkit.dispose();
@@ -86,7 +86,7 @@ public class MissingContentPart extends AbstractFormPart implements IHelpPart {
paddingData.heightHint = 2;
padding.setLayoutData(paddingData);
toolkit.adapt(padding);
- Image warningImage = JFaceResources.getImage(imageKey);
+ Image warningImage = JFaceResources.getImage(imageKey);
statusLink = toolkit.createImageHyperlink(container, SWT.NULL);
statusLink.setText(linkText);
statusLink.setImage(warningImage);
@@ -96,9 +96,9 @@ public class MissingContentPart extends AbstractFormPart implements IHelpPart {
public void linkActivated(HyperlinkEvent e) {
helpPart.showURL(target);
if ( isRemote ) {
- helpPart.checkRemoteStatus();
+ helpPart.checkRemoteStatus();
} else {
- helpPart.checkPlaceholderStatus();
+ helpPart.checkPlaceholderStatus();
}
}
});
@@ -108,7 +108,7 @@ public class MissingContentPart extends AbstractFormPart implements IHelpPart {
private void disposeLink() {
if (statusLink != null) {
- statusLink.dispose();
+ statusLink.dispose();
}
statusLink = null;
}
@@ -140,7 +140,7 @@ public class MissingContentPart extends AbstractFormPart implements IHelpPart {
@Override
public void setVisible(boolean visible) {
if (container != null) {
- container.setVisible(visible);
+ container.setVisible(visible);
}
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RelatedTopicsPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RelatedTopicsPart.java
index f22e5a09c..7be698d76 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RelatedTopicsPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RelatedTopicsPart.java
@@ -60,7 +60,7 @@ public class RelatedTopicsPart extends AbstractFormPart implements IHelpPart {
hHint, flushCache);
Point botSize = dynamicHelpPart == null ? new Point(0, 0) :
- dynamicHelpPart.getControl().computeSize(wHint,
+ dynamicHelpPart.getControl().computeSize(wHint,
hHint, flushCache);
Point size = new Point(0, 0);
size.x = Math.max(topSize.x, botSize.x);
@@ -74,13 +74,13 @@ public class RelatedTopicsPart extends AbstractFormPart implements IHelpPart {
Point topSize = contextHelpPart.getControl().computeSize(
carea.width, SWT.DEFAULT, flushCache);
Point botSize = dynamicHelpPart == null ? new Point(0, 0) :
- dynamicHelpPart.getControl().computeSize(
+ dynamicHelpPart.getControl().computeSize(
carea.width, SWT.DEFAULT, flushCache);
int y = VSPACE;
contextHelpPart.getControl().setBounds(0, y, carea.width, topSize.y);
y += topSize.y + VSPACE;
if (dynamicHelpPart != null) {
- dynamicHelpPart.getControl().setBounds(0, y, carea.width, botSize.y);
+ dynamicHelpPart.getControl().setBounds(0, y, carea.width, botSize.y);
}
}
@@ -116,7 +116,7 @@ public class RelatedTopicsPart extends AbstractFormPart implements IHelpPart {
contextHelpPart = new ContextHelpPart(form.getBody(), toolkit);
if (isUseDynamicHelp()) {
dynamicHelpPart = new DynamicHelpPart(form.getBody(), toolkit);
- }
+ }
}
@Override
@@ -126,8 +126,8 @@ public class RelatedTopicsPart extends AbstractFormPart implements IHelpPart {
contextHelpPart.init(parent, IHelpUIConstants.HV_CONTEXT_HELP, memento);
mform.addPart(contextHelpPart);
if (isUseDynamicHelp()) {
- dynamicHelpPart.init(parent, IHelpUIConstants.HV_SEARCH_RESULT, memento);
- mform.addPart(dynamicHelpPart);
+ dynamicHelpPart.init(parent, IHelpUIConstants.HV_SEARCH_RESULT, memento);
+ mform.addPart(dynamicHelpPart);
}
mform.initialize();
}
@@ -184,7 +184,7 @@ public class RelatedTopicsPart extends AbstractFormPart implements IHelpPart {
public void stop() {
contextHelpPart.stop();
if (dynamicHelpPart != null) {
- dynamicHelpPart.stop();
+ dynamicHelpPart.stop();
}
}
@@ -225,14 +225,14 @@ public class RelatedTopicsPart extends AbstractFormPart implements IHelpPart {
}
public static boolean isUseDynamicHelp() {
- if (!dynamicHelpPreferenceRead) {
- dynamicHelpPreferenceRead = true;
- // Preference created in case anyone complains about the removal of
- // the dynamic help section. This is not API, not documented and may
- // be removed in a future release.
- useDynamicHelp =
- Platform.getPreferencesService().getBoolean(HelpBasePlugin.PLUGIN_ID, "show_dynamic_help", false, null); //$NON-NLS-1$
- }
+ if (!dynamicHelpPreferenceRead) {
+ dynamicHelpPreferenceRead = true;
+ // Preference created in case anyone complains about the removal of
+ // the dynamic help section. This is not API, not documented and may
+ // be removed in a future release.
+ useDynamicHelp =
+ Platform.getPreferencesService().getBoolean(HelpBasePlugin.PLUGIN_ID, "show_dynamic_help", false, null); //$NON-NLS-1$
+ }
return useDynamicHelp;
}
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RenameDialog.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RenameDialog.java
index 00d5234d7..35746378b 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RenameDialog.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RenameDialog.java
@@ -39,11 +39,11 @@ public class RenameDialog extends SelectionStatusDialog {
private IStatus status;
private boolean isCaseSensitive;
- /**
- * Create a new rename dialog instance for the given window.
- * @param shell The parent of the dialog
- * @param oldName Current name of the item being renamed
- */
+ /**
+ * Create a new rename dialog instance for the given window.
+ * @param shell The parent of the dialog
+ * @param oldName Current name of the item being renamed
+ */
public RenameDialog(Shell shell, String oldName) {
super(shell);
this.isCaseSensitive = false;
@@ -51,13 +51,13 @@ public class RenameDialog extends SelectionStatusDialog {
setOldName(oldName);
}
- /**
- * Create a new rename dialog instance for the given window.
- * @param shell The parent of the dialog
- * @param isCaseSensitive Flags whether dialog will perform case sensitive checks against old names
- * @param names Set of names which the user should not be allowed to rename to
- * @param oldName Current name of the item being renamed
- */
+ /**
+ * Create a new rename dialog instance for the given window.
+ * @param shell The parent of the dialog
+ * @param isCaseSensitive Flags whether dialog will perform case sensitive checks against old names
+ * @param names Set of names which the user should not be allowed to rename to
+ * @param oldName Current name of the item being renamed
+ */
public RenameDialog(Shell shell, boolean isCaseSensitive, String[] names, String oldName){
super(shell);
this.isCaseSensitive = isCaseSensitive;
@@ -91,7 +91,7 @@ public class RenameDialog extends SelectionStatusDialog {
Composite container = new Composite(parent, SWT.NULL);
GridLayout layout = new GridLayout();
layout.numColumns = 2;
- layout.marginHeight = layout.marginWidth = 9;
+ layout.marginHeight = layout.marginWidth = 9;
container.setLayout(layout);
GridData gd = new GridData(GridData.FILL_BOTH);
@@ -113,8 +113,8 @@ public class RenameDialog extends SelectionStatusDialog {
public int open() {
text.setText(oldName);
text.selectAll();
- setOkStatus();
- textChanged(oldName, false);
+ setOkStatus();
+ textChanged(oldName, false);
return super.open();
}
@@ -139,7 +139,7 @@ public class RenameDialog extends SelectionStatusDialog {
}
okButton.setEnabled(true);
if (setStatus) {
- setOkStatus();
+ setOkStatus();
}
}
@@ -179,6 +179,6 @@ public class RenameDialog extends SelectionStatusDialog {
@Override
public void setTitle(String title) {
- getShell().setText(title);
- }
+ getShell().setText(title);
+ }
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java
index f4128df83..ec5366ad0 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java
@@ -331,8 +331,8 @@ public class ReusableHelpPart implements IHelpUIConstants,
subMenuManager = new SubMenuManager(
ReusableHelpPart.this.menuManager);
} else {
- subMenuManager = null;
- }
+ subMenuManager = null;
+ }
}
}
@@ -352,7 +352,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
try {
((SubToolBarManager) subToolBarManager).disposeManager();
if (subMenuManager != null) {
- ((SubMenuManager)subMenuManager).disposeManager();
+ ((SubMenuManager)subMenuManager).disposeManager();
}
} catch (RuntimeException e) {
// Bug 218079
@@ -535,7 +535,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
} else {
((SubToolBarManager) subToolBarManager).setVisible(visible);
if (subMenuManager != null) {
- ((SubMenuManager)subMenuManager).setVisible(visible);
+ ((SubMenuManager)subMenuManager).setVisible(visible);
}
ReusableHelpPart.this.toolBarManager.update(true);
getControl().getParent().layout();
@@ -574,8 +574,8 @@ public class ReusableHelpPart implements IHelpUIConstants,
PartRec rec = partRecs.get(focusPart);
String partId = rec.part.getId();
if ( partId != IHelpUIConstants.HV_SEE_ALSO && partId != IHelpUIConstants.HV_MISSING_CONTENT) {
- rec.part.setFocus();
- return;
+ rec.part.setFocus();
+ return;
}
}
}
@@ -1331,9 +1331,9 @@ public class ReusableHelpPart implements IHelpUIConstants,
if (aurl.endsWith("&noframes=true") || aurl.endsWith("?noframes=true")) //$NON-NLS-1$ //$NON-NLS-2$
aurl = aurl.substring(0, aurl.length() - 14);
DefaultHelpUI.showInWorkbenchBrowser(aurl, false);
- */
+ */
- PlatformUI.getWorkbench().getHelpSystem().displayHelpResource(aurl);
+ PlatformUI.getWorkbench().getHelpSystem().displayHelpResource(aurl);
} catch (Exception e) {
HelpUIPlugin.logError("Error opening browser", e); //$NON-NLS-1$
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopePreferenceManager.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopePreferenceManager.java
index 4e02384e2..ec5f9688d 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopePreferenceManager.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopePreferenceManager.java
@@ -35,16 +35,16 @@ public class ScopePreferenceManager extends PreferenceManager implements IHelpUI
@Override
public void createPage() {
- try {
- Object obj = config.createExecutableExtension(IHelpUIConstants.ATT_CLASS);
- IPreferencePage page = (IPreferencePage)obj;
- setPage(page);
- page.setTitle(getLabelText());
- }
- catch (CoreException e) {
- HelpUIPlugin.logError("Unable to create executable extension", e); //$NON-NLS-1$
- }
- }
+ try {
+ Object obj = config.createExecutableExtension(IHelpUIConstants.ATT_CLASS);
+ IPreferencePage page = (IPreferencePage)obj;
+ setPage(page);
+ page.setTitle(getLabelText());
+ }
+ catch (CoreException e) {
+ HelpUIPlugin.logError("Unable to create executable extension", e); //$NON-NLS-1$
+ }
+ }
}
class EnginePreferenceNode extends PreferenceNode {
private EngineDescriptor desc;
@@ -59,12 +59,12 @@ public class ScopePreferenceManager extends PreferenceManager implements IHelpUI
@Override
public void createPage() {
- IPreferencePage page = desc.createRootPage(set.getName());
- setPage(page);
- page.setTitle(desc.getLabel());
- page.setImageDescriptor(desc.getImageDescriptor());
- page.setDescription(desc.getDescription());
- }
+ IPreferencePage page = desc.createRootPage(set.getName());
+ setPage(page);
+ page.setTitle(desc.getLabel());
+ page.setImageDescriptor(desc.getImageDescriptor());
+ page.setDescription(desc.getDescription());
+ }
}
/**
*
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSelectPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSelectPart.java
index 075835844..cf827f6e8 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSelectPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSelectPart.java
@@ -64,7 +64,7 @@ public class ScopeSelectPart extends AbstractFormPart implements IHelpPart {
@Override
public void linkActivated(HyperlinkEvent e) {
- doChangeScopeSet();
+ doChangeScopeSet();
}
});
toolkit.adapt(scopeSetLink, true, true);
@@ -177,7 +177,7 @@ public class ScopeSelectPart extends AbstractFormPart implements IHelpPart {
@Override
public void dispose() {
if (scopeObserver != null) {
- ScopeState.getInstance().getScopeSetManager().deleteObserver(scopeObserver);
+ ScopeState.getInstance().getScopeSetManager().deleteObserver(scopeObserver);
}
super.dispose();
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetDialog.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetDialog.java
index 96564822b..f7af292cc 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetDialog.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetDialog.java
@@ -93,8 +93,8 @@ public class ScopeSetDialog extends TrayDialog {
private ILabelProvider labelProvider;
private Object input;
private TableViewer viewer;
- private int widthInChars = 55;
- private int heightInChars = 15;
+ private int widthInChars = 55;
+ private int heightInChars = 15;
private ScopeSet initialSelection;
private Object[] result;
private boolean localOnly;
@@ -234,65 +234,65 @@ public class ScopeSetDialog extends TrayDialog {
@Override
protected Control createDialogArea(Composite container) {
- Composite innerContainer = (Composite)super.createDialogArea(container);
- createRadioButtons(innerContainer);
- createTable(innerContainer);
- enableTable();
- PlatformUI.getWorkbench().getHelpSystem().setHelp(innerContainer,
+ Composite innerContainer = (Composite)super.createDialogArea(container);
+ createRadioButtons(innerContainer);
+ createTable(innerContainer);
+ enableTable();
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(innerContainer,
"org.eclipse.help.ui.searchScope"); //$NON-NLS-1$
- createEditingButtons(innerContainer);
+ createEditingButtons(innerContainer);
viewer.addSelectionChangedListener(event -> updateButtons());
- ViewerFilter[] filters = { new NonDefaultFilter() };
+ ViewerFilter[] filters = { new NonDefaultFilter() };
viewer.setFilters(filters );
- return innerContainer;
- }
+ return innerContainer;
+ }
private void createRadioButtons(Composite parent) {
boolean showAll = initialSelection != null && initialSelection.isDefault();
showAllRadio = new Button(parent, SWT.RADIO);
- showAllRadio.setText(Messages.ScopeSet_selectAll);
+ showAllRadio.setText(Messages.ScopeSet_selectAll);
- showSelectedRadio = new Button(parent, SWT.RADIO);
- showSelectedRadio.setText(Messages.ScopeSet_selectWorkingSet);
- showAllRadio.addSelectionListener(new ShowAllListener());
- showAllRadio.setSelection(showAll);
- showSelectedRadio.setSelection(!showAll);
+ showSelectedRadio = new Button(parent, SWT.RADIO);
+ showSelectedRadio.setText(Messages.ScopeSet_selectWorkingSet);
+ showAllRadio.addSelectionListener(new ShowAllListener());
+ showAllRadio.setSelection(showAll);
+ showSelectedRadio.setSelection(!showAll);
}
- private void createTable(Composite parent) {
- viewer = new TableViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- viewer.setContentProvider(contentProvider);
- viewer.setLabelProvider(labelProvider);
- viewer.setInput(input);
+ private void createTable(Composite parent) {
+ viewer = new TableViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ viewer.setContentProvider(contentProvider);
+ viewer.setLabelProvider(labelProvider);
+ viewer.setInput(input);
viewer.addDoubleClickListener(event -> okPressed());
- if (initialSelection != null) {
+ if (initialSelection != null) {
viewer.setSelection(new StructuredSelection(initialSelection));
}
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.heightHint = convertHeightInCharsToPixels(heightInChars);
- gd.widthHint = convertWidthInCharsToPixels(widthInChars);
- Table table = viewer.getTable();
- table.setLayoutData(gd);
- table.setFont(parent.getFont());
- }
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.heightHint = convertHeightInCharsToPixels(heightInChars);
+ gd.widthHint = convertWidthInCharsToPixels(widthInChars);
+ Table table = viewer.getTable();
+ table.setLayoutData(gd);
+ table.setFont(parent.getFont());
+ }
private void enableTable() {
if (viewer != null) {
- boolean showSelected = showSelectedRadio.getSelection();
+ boolean showSelected = showSelectedRadio.getSelection();
viewer.getTable().setEnabled(showSelected);
- viewer.refresh();
- // Ensure that a scope is selected unless there are no
- // user defined scopes
- if (showSelected && viewer.getSelection().isEmpty()) {
- Object firstElement = viewer.getElementAt(0);
- if ( firstElement != null ) {
- viewer.setSelection(new StructuredSelection(firstElement));
- }
- }
+ viewer.refresh();
+ // Ensure that a scope is selected unless there are no
+ // user defined scopes
+ if (showSelected && viewer.getSelection().isEmpty()) {
+ Object firstElement = viewer.getElementAt(0);
+ if ( firstElement != null ) {
+ viewer.setSelection(new StructuredSelection(firstElement));
+ }
+ }
}
}
- private void createEditingButtons(Composite composite) {
+ private void createEditingButtons(Composite composite) {
Composite buttonComposite= new Composite(composite, SWT.RIGHT);
GridLayout layout= new GridLayout();
layout.numColumns= 2;
@@ -300,12 +300,12 @@ public class ScopeSetDialog extends TrayDialog {
GridData data= new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.GRAB_HORIZONTAL);
data.grabExcessHorizontalSpace= true;
composite.setData(data);
- createButton(buttonComposite, NEW_ID, Messages.ScopeSetDialog_new, false);
- renameButton = createButton(buttonComposite, RENAME_ID, Messages.ScopeSetDialog_rename, false);
- editButton = createButton(buttonComposite, EDIT_ID, Messages.ScopeSetDialog_edit, false);
- removeButton = createButton(buttonComposite, REMOVE_ID, Messages.ScopeSetDialog_remove, false);
- updateButtons();
- }
+ createButton(buttonComposite, NEW_ID, Messages.ScopeSetDialog_new, false);
+ renameButton = createButton(buttonComposite, RENAME_ID, Messages.ScopeSetDialog_rename, false);
+ editButton = createButton(buttonComposite, EDIT_ID, Messages.ScopeSetDialog_edit, false);
+ removeButton = createButton(buttonComposite, REMOVE_ID, Messages.ScopeSetDialog_remove, false);
+ updateButtons();
+ }
public ScopeSet getActiveSet() {
if (result!=null && result.length>0)
@@ -315,22 +315,22 @@ public class ScopeSetDialog extends TrayDialog {
@Override
protected void okPressed() {
- if (operations!=null) {
- for (int i=0; i<operations.size(); i++) {
+ if (operations!=null) {
+ for (int i=0; i<operations.size(); i++) {
PendingOperation operation = operations.get(i);
- operation.commit();
- }
- operations = null;
- }
- if (showAllRadio.getSelection()) {
- setResult(manager.getDefaultScope());
- } else {
- // Build a list of selected children.
+ operation.commit();
+ }
+ operations = null;
+ }
+ if (showAllRadio.getSelection()) {
+ setResult(manager.getDefaultScope());
+ } else {
+ // Build a list of selected children.
IStructuredSelection selection = viewer.getStructuredSelection();
- setResult(selection.toList());
- }
- super.okPressed();
- }
+ setResult(selection.toList());
+ }
+ super.okPressed();
+ }
private void setResult(ScopeSet scope) {
result = new Object[] { scope };
@@ -347,13 +347,13 @@ public class ScopeSetDialog extends TrayDialog {
@Override
protected void cancelPressed() {
- if (operations!=null) {
- for (int i=0; i<operations.size(); i++) {
+ if (operations!=null) {
+ for (int i=0; i<operations.size(); i++) {
PendingOperation operation = operations.get(i);
- operation.cancel();
- }
- operations = null;
- }
+ operation.cancel();
+ }
+ operations = null;
+ }
super.cancelPressed();
}
@@ -394,15 +394,15 @@ public class ScopeSetDialog extends TrayDialog {
Set<String> namesInUse = new HashSet<>();
for (int i=0; i<sets.size(); i++) {
ScopeSet set = sets.get(i);
- namesInUse.add(set.getName().toLowerCase());
- }
+ namesInUse.add(set.getName().toLowerCase());
+ }
for (int i = 1; i < 1000; i++) {
String name = Messages.ScopeSetDialog_defaultName + i;
if (!namesInUse.contains(name.toLowerCase())) {
return name;
}
}
- return ""; //$NON-NLS-1$
+ return ""; //$NON-NLS-1$
}
@@ -415,7 +415,7 @@ public class ScopeSetDialog extends TrayDialog {
PreferenceManager manager = new ScopePreferenceManager(descManager, set);
if (!localOnly) {
- PreferenceDialog dialog = new ScopePreferenceDialog(getShell(), manager, descManager, set.isEditable());
+ PreferenceDialog dialog = new ScopePreferenceDialog(getShell(), manager, descManager, set.isEditable());
dialog.setPreferenceStore(set.getPreferenceStore());
dialog.create();
dialog.getShell().setText(NLS.bind(Messages.ScopePreferenceDialog_wtitle, set.getName()));
@@ -455,7 +455,7 @@ public class ScopeSetDialog extends TrayDialog {
dialog.create();
String dialogTitle = isRename ?
Messages.RenameDialog_wtitle : Messages.NewDialog_wtitle;
- dialog.getShell().setText(dialogTitle);
+ dialog.getShell().setText(dialogTitle);
if (dialog.open()==RenameDialog.OK) {
return dialog.getNewName();
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java
index eb4aa12d4..ba9bdc580 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java
@@ -237,7 +237,7 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo
if (e.character == '\r') {
if (goButton.isEnabled()) {
doSearch(searchWordCombo.getText());
- }
+ }
}
}
});
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchResultsPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchResultsPart.java
index 2cb87c01a..ac23b1fc8 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchResultsPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchResultsPart.java
@@ -130,17 +130,17 @@ public class SearchResultsPart extends AbstractFormPart implements IHelpPart {
*/
boolean descOn = Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_SHOW_SEARCH_DESCRIPTION, false, null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_SHOW_SEARCH_DESCRIPTION, false, null);
boolean showCategories = Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_SHOW_SEARCH_CATEGORIES, false, null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_SHOW_SEARCH_CATEGORIES, false, null);
showCategoriesAction = new Action() {
@Override
public void run() {
updateResultSections();
- IEclipsePreferences pref = InstanceScope.INSTANCE.getNode(HelpBasePlugin.PLUGIN_ID);
- pref.putBoolean(IHelpBaseConstants.P_KEY_SHOW_SEARCH_CATEGORIES, showCategoriesAction.isChecked());
- try {
+ IEclipsePreferences pref = InstanceScope.INSTANCE.getNode(HelpBasePlugin.PLUGIN_ID);
+ pref.putBoolean(IHelpBaseConstants.P_KEY_SHOW_SEARCH_CATEGORIES, showCategoriesAction.isChecked());
+ try {
pref.flush();
} catch (BackingStoreException e) {
}
@@ -159,8 +159,8 @@ public class SearchResultsPart extends AbstractFormPart implements IHelpPart {
public void run() {
updateResultSections();
IEclipsePreferences pref = InstanceScope.INSTANCE.getNode(HelpBasePlugin.PLUGIN_ID);
- pref.putBoolean(IHelpBaseConstants.P_KEY_SHOW_SEARCH_DESCRIPTION, showDescriptionAction.isChecked());
- try {
+ pref.putBoolean(IHelpBaseConstants.P_KEY_SHOW_SEARCH_DESCRIPTION, showDescriptionAction.isChecked());
+ try {
pref.flush();
} catch (BackingStoreException e) {
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SeeAlsoPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SeeAlsoPart.java
index 3d90abe4b..9c1e4a50b 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SeeAlsoPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SeeAlsoPart.java
@@ -85,7 +85,7 @@ public class SeeAlsoPart extends AbstractFormPart implements IHelpPart {
if (isCurrentPage) {
link.setFont(JFaceResources.getBannerFont());
} else {
- link.setFont(JFaceResources.getDefaultFont());
+ link.setFont(JFaceResources.getDefaultFont());
}
data.exclude = false;
link.setVisible(!data.exclude);
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/StatusProducer.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/StatusProducer.java
index 15065a4ba..9c63cb3b0 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/StatusProducer.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/StatusProducer.java
@@ -107,11 +107,11 @@ public class StatusProducer implements IHelpContentProducer {
// check to see if a predefined error page exists
// in the preferences
if (href.equalsIgnoreCase(MissingContentManager.MISSING_TOPIC_HREF)){
- String errorPage = Platform.getPreferencesService().getString(
- HelpBasePlugin.PLUGIN_ID,
- "page_not_found", //$NON-NLS-1$
- null,
- null);
+ String errorPage = Platform.getPreferencesService().getString(
+ HelpBasePlugin.PLUGIN_ID,
+ "page_not_found", //$NON-NLS-1$
+ null,
+ null);
if (errorPage != null && errorPage.length() > 0) {
URL helpURL;
@@ -302,7 +302,7 @@ public class StatusProducer implements IHelpContentProducer {
}
pageBuffer.append(tab(3)+ "</ul>\n"); //$NON-NLS-1$
if (isHelpView) {
- pageBuffer.append(tab(3)+"<br/><p>\n"); //$NON-NLS-1$
+ pageBuffer.append(tab(3)+"<br/><p>\n"); //$NON-NLS-1$
pageBuffer.append(tab(4)+ "<a href=helpview:ignoreMissingBooks>"+ //$NON-NLS-1$
WebappResources.getString("ignoreMissingBooks", locale) + "</a>\n"); //$NON-NLS-1$ //$NON-NLS-2$
pageBuffer.append(tab(3)+ "</p>\n"); //$NON-NLS-1$
@@ -310,8 +310,8 @@ public class StatusProducer implements IHelpContentProducer {
pageBuffer.append(tab(3)+"<br/><p>\n"); //$NON-NLS-1$
//pageBuffer.append("<img src=\"PLUGINS_ROOT/org.eclipse.help/command_link.png\"/>"); //$NON-NLS-1$
pageBuffer.append("<a class=\"command-link\"" //$NON-NLS-1$
- + " href='javascript:executeCommand(\"org.eclipse.help.ui.ignoreMissingPlaceholders\")'>" //$NON-NLS-1$
- + WebappResources.getString("ignoreMissingBooks", locale)+"</a>"); //$NON-NLS-1$ //$NON-NLS-2$
+ + " href='javascript:executeCommand(\"org.eclipse.help.ui.ignoreMissingPlaceholders\")'>" //$NON-NLS-1$
+ + WebappResources.getString("ignoreMissingBooks", locale)+"</a>"); //$NON-NLS-1$ //$NON-NLS-2$
pageBuffer.append(tab(3)+ "</p>\n"); //$NON-NLS-1$
}
pageBuffer.append(END_BODY_HTML);
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/CookiesData.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/CookiesData.java
index 9a3a10def..f6e85b443 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/CookiesData.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/CookiesData.java
@@ -36,16 +36,16 @@ public class CookiesData extends RequestData {
public boolean isSynchToc() {
Cookie[] cookies = request.getCookies();
if (cookies != null) {
- for (Cookie cookie : cookies) {
- if ("synchToc".equals(cookie.getName())) { //$NON-NLS-1$
- return String.valueOf(true).equals(cookie.getValue());
- }
- }
+ for (Cookie cookie : cookies) {
+ if ("synchToc".equals(cookie.getName())) { //$NON-NLS-1$
+ return String.valueOf(true).equals(cookie.getValue());
+ }
+ }
}
boolean isSynchToc = Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, "advanced.syncDefault", false, null); //$NON-NLS-1$
+ (HelpBasePlugin.PLUGIN_ID, "advanced.syncDefault", false, null); //$NON-NLS-1$
CookieUtil.setCookieValue("synchToc", Boolean.toString(isSynchToc), request, response); //$NON-NLS-1$
return isSynchToc;
- }
+ }
}
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/EnabledTopicUtils.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/EnabledTopicUtils.java
index 9554f24b7..616c8dbad 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/EnabledTopicUtils.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/EnabledTopicUtils.java
@@ -64,7 +64,7 @@ public class EnabledTopicUtils {
*/
public static boolean isEnabled(IToc toc) {
if (!HelpBasePlugin.getActivitySupport().isEnabled(toc.getHref()) ||
- UAContentFilter.isFiltered(toc, HelpEvaluationContext.getContext())) {
+ UAContentFilter.isFiltered(toc, HelpEvaluationContext.getContext())) {
return false;
}
// A toc is enabled only if at least one subtopic is enabled
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/IconFinder.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/IconFinder.java
index a0b9330ac..2983782ea 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/IconFinder.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/IconFinder.java
@@ -84,10 +84,10 @@ public class IconFinder {
String suffix;
switch(type){
- case 0:suffix = OPEN;break;
- case 1:suffix = CLOSED;break;
- case 2:suffix = LEAF;break;
- default: suffix = OPEN; break;
+ case 0:suffix = OPEN;break;
+ case 1:suffix = CLOSED;break;
+ case 2:suffix = LEAF;break;
+ default: suffix = OPEN; break;
}
String result = lookupImagePath(iconId + suffix);
if (result != null) {
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/LayoutData.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/LayoutData.java
index a10db3e44..e66c37eae 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/LayoutData.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/LayoutData.java
@@ -221,7 +221,7 @@ public class LayoutData extends RequestData {
BundleContext bundleContext = HelpWebappPlugin.getContext();
ServiceReference<?> ref = bundleContext.getServiceReference(BundleLocalization.class.getName());
BundleLocalization localization = (BundleLocalization) bundleContext.getService(ref);
- return localization.getLocalization(bundle, locale).getString(resource);
+ return localization.getLocalization(bundle, locale).getString(resource);
} catch (Exception e) {
// Fall through
}
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/PrintData.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/PrintData.java
index 0bfecd227..5e5eedf6f 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/PrintData.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/PrintData.java
@@ -164,10 +164,10 @@ public class PrintData extends RequestData {
public void generateResources(Writer out) throws IOException, ServletException {
// check resource allocation
if (!getConnection()) {
- RequestDispatcher rd = context.getRequestDispatcher("/advanced/printError.jsp"); //$NON-NLS-1$
- request.setAttribute("msg", "noConnection"); //$NON-NLS-1$ //$NON-NLS-2$
- rd.forward(request, response);
- return;
+ RequestDispatcher rd = context.getRequestDispatcher("/advanced/printError.jsp"); //$NON-NLS-1$
+ request.setAttribute("msg", "noConnection"); //$NON-NLS-1$ //$NON-NLS-2$
+ rd.forward(request, response);
+ return;
}
@@ -196,17 +196,17 @@ public class PrintData extends RequestData {
}
}
- private static synchronized boolean getConnection() {
- if (allowedConnections > 0) {
- allowedConnections--;
- return true;
- }
- return false;
- }
-
- private static synchronized void releaseConnection() {
- allowedConnections++;
- }
+ private static synchronized boolean getConnection() {
+ if (allowedConnections > 0) {
+ allowedConnections--;
+ return true;
+ }
+ return false;
+ }
+
+ private static synchronized void releaseConnection() {
+ allowedConnections++;
+ }
/*
* Calculate the amount of topics to print in one request
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/RequestScope.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/RequestScope.java
index d841f57e3..539fea155 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/RequestScope.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/RequestScope.java
@@ -144,7 +144,7 @@ public class RequestScope {
}
} else {
IEclipsePreferences pref = InstanceScope.INSTANCE.getNode(HelpBasePlugin.PLUGIN_ID);
- pref.put(IHelpBaseConstants.P_KEY_HELP_SCOPE, scope);
+ pref.put(IHelpBaseConstants.P_KEY_HELP_SCOPE, scope);
try {
pref.flush();
} catch (BackingStoreException e) {
@@ -171,12 +171,12 @@ public class RequestScope {
private static String getScopeFromPreferences() {
String scope = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_HELP_SCOPE, null, null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_HELP_SCOPE, null, null);
return scope;
}
public static boolean filterBySearchScope(HttpServletRequest request) {
- return true;
+ return true;
}
public static boolean getFlag(HttpServletRequest request, String flagName ) {
@@ -185,26 +185,26 @@ public class RequestScope {
value = getValueFromCookies(request, flagName);
} else {
value = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID, flagName + "Webapp", null, null); //$NON-NLS-1$
+ (HelpBasePlugin.PLUGIN_ID, flagName + "Webapp", null, null); //$NON-NLS-1$
}
if (value == null) {
return Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, flagName, false, null);
+ (HelpBasePlugin.PLUGIN_ID, flagName, false, null);
}
return "true".equalsIgnoreCase(value); //$NON-NLS-1$
}
public static void setFlag(HttpServletRequest request,
- HttpServletResponse response,
- String flagName,
- boolean value)
+ HttpServletResponse response,
+ String flagName,
+ boolean value)
{
if (HelpSystem.isShared()) {
- CookieUtil.setCookieValueWithoutPath(flagName, Boolean.toString(value), request, response);
+ CookieUtil.setCookieValueWithoutPath(flagName, Boolean.toString(value), request, response);
} else {
IEclipsePreferences pref = InstanceScope.INSTANCE.getNode(HelpBasePlugin.PLUGIN_ID);
- pref.putBoolean(flagName + "Webapp", value ); //$NON-NLS-1$
- try {
+ pref.putBoolean(flagName + "Webapp", value ); //$NON-NLS-1$
+ try {
pref.flush();
} catch (BackingStoreException e) {
}
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ScopeSavingSearchData.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ScopeSavingSearchData.java
index 33b7e2bad..fd8a667d3 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ScopeSavingSearchData.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ScopeSavingSearchData.java
@@ -27,7 +27,7 @@ public class ScopeSavingSearchData extends SearchData {
@Override
protected boolean canSaveScope() {
- return true;
+ return true;
}
}
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/SearchData.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/SearchData.java
index a4bdbb86c..b41de42b9 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/SearchData.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/SearchData.java
@@ -113,7 +113,7 @@ public class SearchData extends ActivitiesData {
if (isScopeRequest()) {
workingSetName = request.getParameter("workingSet"); //$NON-NLS-1$
if ( canSaveScope() ) {
- saveWorkingSet(workingSetName);
+ saveWorkingSet(workingSetName);
}
}
@@ -122,7 +122,7 @@ public class SearchData extends ActivitiesData {
}
protected boolean canSaveScope() {
- // Scope is only saved from scopeState.jsp
+ // Scope is only saved from scopeState.jsp
// This prevents cookies from being saved with a /advanced path
return false;
}
@@ -329,15 +329,15 @@ public class SearchData extends ActivitiesData {
public boolean isShowDescriptions() {
Cookie[] cookies = request.getCookies();
if (cookies != null) {
- for (Cookie cookie : cookies) {
- if ("showDescriptions".equals(cookie.getName())) { //$NON-NLS-1$
- return String.valueOf(true).equals(cookie.getValue());
- }
- }
+ for (Cookie cookie : cookies) {
+ if ("showDescriptions".equals(cookie.getName())) { //$NON-NLS-1$
+ return String.valueOf(true).equals(cookie.getValue());
+ }
+ }
}
// get default from preferences
return Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_SHOW_SEARCH_DESCRIPTION, true, null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_SHOW_SEARCH_DESCRIPTION, true, null);
}
/**
@@ -398,7 +398,7 @@ public class SearchData extends ActivitiesData {
if (workingSetName != null && workingSetName.length() != 0)
return workingSetName;
- if (isSearchRequest()) {
+ if (isSearchRequest()) {
workingSetName = request.getParameter("scope"); //$NON-NLS-1$
// if we have already set the working set, then use it.
if (workingSetName == null) {
@@ -617,22 +617,22 @@ public class SearchData extends ActivitiesData {
}
public String getNotFoundMessage() {
- String scope = getScope();
- if (scope.equals(ServletResources.getString("All", request))) { //$NON-NLS-1$
- return ServletResources.getString("Nothing_found", request); //$NON-NLS-1$
+ String scope = getScope();
+ if (scope.equals(ServletResources.getString("All", request))) { //$NON-NLS-1$
+ return ServletResources.getString("Nothing_found", request); //$NON-NLS-1$
} else {
- return NLS.bind(ServletResources.getString("Nothing_found_in_scope", request), scope); //$NON-NLS-1$
+ return NLS.bind(ServletResources.getString("Nothing_found_in_scope", request), scope); //$NON-NLS-1$
}
}
public String getScopeActiveMessage() {
- String scope = getScope();
+ String scope = getScope();
return NLS.bind(ServletResources.getString("activeScope", request), scope); //$NON-NLS-1$
}
public String getMatchesInScopeMessage() {
- String scope = getScope();
- return NLS.bind(ServletResources.getString("matchesInScope", request), "" + getResultsCount(), scope); //$NON-NLS-1$ //$NON-NLS-2$
+ String scope = getScope();
+ return NLS.bind(ServletResources.getString("matchesInScope", request), "" + getResultsCount(), scope); //$NON-NLS-1$ //$NON-NLS-2$
}
public String getPreProcessorResults()
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ServerState.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ServerState.java
index ecda6ba0d..fd6fe284c 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ServerState.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ServerState.java
@@ -27,9 +27,9 @@ public class ServerState {
* situation where the Webapp is run without being launched on the built in server
* in which case we set the mode to infocenter.
*/
- public static void webappStarted(ServletContext context, HttpServletRequest request,
+ public static void webappStarted(ServletContext context, HttpServletRequest request,
HttpServletResponse response) {
- BaseHelpSystem.checkMode();
- }
+ BaseHelpSystem.checkMode();
+ }
}
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ServletResources.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ServletResources.java
index 6fd6b3887..7166ff0c0 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ServletResources.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ServletResources.java
@@ -138,8 +138,8 @@ public class ServletResources {
}
int amp = property.indexOf('&');
if (amp <0 || amp >= property.length() - 1) {
- return null;
- }
+ return null;
+ }
return ("" + property.charAt(amp +1)).toLowerCase(Locale.ENGLISH); //$NON-NLS-1$
}
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TocData.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TocData.java
index 7230c0d89..46d140341 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TocData.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TocData.java
@@ -233,7 +233,7 @@ public class TocData extends ActivitiesData {
TopicFinder finder = new TopicFinder("/nav/" + completePath, tocs, scope); //$NON-NLS-1$
topicPath = finder.getTopicPath();
selectedToc = finder.getSelectedToc();
- numericPath = finder.getNumericPath();
+ numericPath = finder.getNumericPath();
} else {
// toc not specified as parameter
// try obtaining the TOC from the topic
@@ -258,7 +258,7 @@ public class TocData extends ActivitiesData {
}
}
if (selectedToc != -1) {
- topicPath = decodePath(path, tocs[selectedToc], scope);
+ topicPath = decodePath(path, tocs[selectedToc], scope);
}
} else {
selectedToc = -1;
@@ -336,49 +336,49 @@ public class TocData extends ActivitiesData {
return childTopics;
}
private void generateTopicLinks(ITopic topic, Writer w, int indent) {
- String topicHref = topic.getHref();
- try {
- if (indent == 0)
- w.write("<b>"); //$NON-NLS-1$
- for (int tab = 0; tab < indent; tab++) {
- w.write("&nbsp;&nbsp;"); //$NON-NLS-1$
- }
- if (topicHref != null && topicHref.length() > 0) {
- w.write("<a href=\""); //$NON-NLS-1$
- if ('/' == topicHref.charAt(0)) {
- w.write("topic"); //$NON-NLS-1$
- }
- w.write(topicHref);
- w.write("\">"); //$NON-NLS-1$
- w.write(UrlUtil.htmlEncode(topic.getLabel()));
- w.write("</a>"); //$NON-NLS-1$
- } else {
- w.write(UrlUtil.htmlEncode(topic.getLabel()));
- }
- w.write("<br>\n"); //$NON-NLS-1$
- if (indent == 0)
- w.write("</b>"); //$NON-NLS-1$
- } catch (IOException ioe) {
- }
- ITopic[] topics = topic.getSubtopics();
- for (ITopic topic2 : topics) {
- generateTopicLinks(topic2, w, indent + 1);
- }
- }
-
- public void generateLinks(Writer out) {
- for (IToc toc : tocs) {
- ITopic tocTopic = toc.getTopic(null);
- generateTopicLinks(tocTopic, out, 0);
- ITopic[] topics = toc.getTopics();
- for (ITopic topic : topics) {
- generateTopicLinks(topic, out, 1);
- }
- }
-
- }
-
- public ITopic[] getTopicPathFromRootPath(IToc toc) {
+ String topicHref = topic.getHref();
+ try {
+ if (indent == 0)
+ w.write("<b>"); //$NON-NLS-1$
+ for (int tab = 0; tab < indent; tab++) {
+ w.write("&nbsp;&nbsp;"); //$NON-NLS-1$
+ }
+ if (topicHref != null && topicHref.length() > 0) {
+ w.write("<a href=\""); //$NON-NLS-1$
+ if ('/' == topicHref.charAt(0)) {
+ w.write("topic"); //$NON-NLS-1$
+ }
+ w.write(topicHref);
+ w.write("\">"); //$NON-NLS-1$
+ w.write(UrlUtil.htmlEncode(topic.getLabel()));
+ w.write("</a>"); //$NON-NLS-1$
+ } else {
+ w.write(UrlUtil.htmlEncode(topic.getLabel()));
+ }
+ w.write("<br>\n"); //$NON-NLS-1$
+ if (indent == 0)
+ w.write("</b>"); //$NON-NLS-1$
+ } catch (IOException ioe) {
+ }
+ ITopic[] topics = topic.getSubtopics();
+ for (ITopic topic2 : topics) {
+ generateTopicLinks(topic2, w, indent + 1);
+ }
+ }
+
+ public void generateLinks(Writer out) {
+ for (IToc toc : tocs) {
+ ITopic tocTopic = toc.getTopic(null);
+ generateTopicLinks(tocTopic, out, 0);
+ ITopic[] topics = toc.getTopics();
+ for (ITopic topic : topics) {
+ generateTopicLinks(topic, out, 1);
+ }
+ }
+
+ }
+
+ public ITopic[] getTopicPathFromRootPath(IToc toc) {
ITopic[] topicPath;
// Determine the topicPath from the path passed in as a parameter
int[] rootPath = getRootPath();
@@ -400,23 +400,23 @@ public class TocData extends ActivitiesData {
return topicPath;
}
- public ITopic[] getTopicPath() {
- return topicPath;
- }
+ public ITopic[] getTopicPath() {
+ return topicPath;
+ }
- public int[] getRootPath() {
- return rootPath;
- }
+ public int[] getRootPath() {
+ return rootPath;
+ }
- public String getTopicHref() {
- return topicHref;
- }
+ public String getTopicHref() {
+ return topicHref;
+ }
- public String getNumericPath() {
- return numericPath;
- }
+ public String getNumericPath() {
+ return numericPath;
+ }
- public boolean isExpandPath() {
- return expandPathParam != null;
- }
+ public boolean isExpandPath() {
+ return expandPathParam != null;
+ }
}
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarData.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarData.java
index abc6b9507..3e0cc15d1 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarData.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarData.java
@@ -131,7 +131,7 @@ public class ToolbarData extends RequestData {
toolbarName = request.getParameter("toolbar"); //$NON-NLS-1$
}
if (button.isAddedToToolbar(toolbarName)) {
- extensionButtons.add(button);
+ extensionButtons.add(button);
}
}
}
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TopicFinder.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TopicFinder.java
index 476a0e151..cc01fa593 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TopicFinder.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TopicFinder.java
@@ -62,10 +62,10 @@ public class TopicFinder {
}
// if there was an anchor, search again without it
} while (foundTopicPath == null && index != -1);
- } else {
- selectedToc = -1;
+ } else {
+ selectedToc = -1;
foundTopicPath = null;
- }
+ }
}
public ITopic[] getTopicPathFromNav(String nav) {
@@ -90,22 +90,22 @@ public class TopicFinder {
}
}
- public ITopic[] getTopicPath() {
+ public ITopic[] getTopicPath() {
return foundTopicPath;
}
- public int getSelectedToc() {
- return selectedToc;
- }
+ public int getSelectedToc() {
+ return selectedToc;
+ }
- public String getNumericPath() {
- return numericPath;
- }
+ public String getNumericPath() {
+ return numericPath;
+ }
/*
- * Finds a path of ITopics in the given IToc to the given topic. If the
- * toc doesn't contain the topic, returns null.
- */
+ * Finds a path of ITopics in the given IToc to the given topic. If the
+ * toc doesn't contain the topic, returns null.
+ */
private ITopic[] getTopicPathInToc(ITopic topicToFind, IToc toc) {
if (topicToFind.getLabel().equals(toc.getLabel())) {
return new ITopic[0];
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/UrlUtil.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/UrlUtil.java
index 727b94c39..b24570c43 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/UrlUtil.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/UrlUtil.java
@@ -205,9 +205,9 @@ public class UrlUtil {
}
if (new WebappPreferences().isRestrictTopicParameter()) {
- if (path.contains(":/")) { //$NON-NLS-1$
- return false;
- }
+ if (path.contains(":/")) { //$NON-NLS-1$
+ return false;
+ }
}
return true;
}
@@ -261,14 +261,14 @@ public class UrlUtil {
}
public static boolean isBot(HttpServletRequest request) {
- String agent = request.getHeader("User-Agent"); //$NON-NLS-1$
- if (agent==null)
- return false;
- agent=agent.toLowerCase(Locale.ENGLISH);
+ String agent = request.getHeader("User-Agent"); //$NON-NLS-1$
+ if (agent==null)
+ return false;
+ agent=agent.toLowerCase(Locale.ENGLISH);
// sample substring Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
return agent.contains("bot") || agent.contains("crawl")//$NON-NLS-1$ //$NON-NLS-2$
- || request.getParameter("bot") != null;//$NON-NLS-1$
- }
+ || request.getParameter("bot") != null;//$NON-NLS-1$
+ }
public static boolean isGecko(HttpServletRequest request) {
String agent = request.getHeader("User-Agent"); //$NON-NLS-1$
@@ -277,7 +277,7 @@ public class UrlUtil {
public static boolean isGecko(String agent) {
if (agent==null)
- return false;
+ return false;
agent=agent.toLowerCase(Locale.ENGLISH);
// sample substring Gecko/20020508
if (agent.contains("like gecko")) { //$NON-NLS-1$
@@ -293,7 +293,7 @@ public class UrlUtil {
public static boolean isIE(String agent) {
if (agent==null)
- return false;
+ return false;
agent=agent.toLowerCase(Locale.ENGLISH);
// When accessing with Bobby identified Bobby return 5.5 to allow
@@ -313,7 +313,7 @@ public class UrlUtil {
public static String getIEVersion(String agent) {
if (agent==null)
- return "0"; //$NON-NLS-1$
+ return "0"; //$NON-NLS-1$
agent=agent.toLowerCase(Locale.ENGLISH);
// When accessing with Bobby identified Bobby return 5.5 to allow
@@ -339,7 +339,7 @@ public class UrlUtil {
public static boolean isKonqueror(String agent) {
if (agent==null)
- return false;
+ return false;
agent=agent.toLowerCase(Locale.ENGLISH);
return agent.contains("konqueror"); //$NON-NLS-1$
}
@@ -357,7 +357,7 @@ public class UrlUtil {
public static boolean isMozilla(String agent) {
if (agent==null)
- return false;
+ return false;
agent=agent.toLowerCase(Locale.ENGLISH);
return agent.contains("mozilla/5"); //$NON-NLS-1$
}
@@ -369,7 +369,7 @@ public class UrlUtil {
public static String getMozillaVersion(String agent) {
if (agent==null)
- return "0"; //$NON-NLS-1$
+ return "0"; //$NON-NLS-1$
agent=agent.toLowerCase(Locale.ENGLISH);
if (!agent.contains("mozilla/5")) //$NON-NLS-1$
return "0"; //$NON-NLS-1$
@@ -389,14 +389,14 @@ public class UrlUtil {
public static boolean isOpera(String agent) {
if (agent==null)
- return false;
+ return false;
agent=agent.toLowerCase(Locale.ENGLISH);
return agent.contains("opera"); //$NON-NLS-1$
}
public static String getOperaVersion(String agent) {
if (agent==null)
- return "0"; //$NON-NLS-1$
+ return "0"; //$NON-NLS-1$
agent=agent.toLowerCase(Locale.ENGLISH);
final String OperaPrefix = "opera/"; //$NON-NLS-1$
int start = agent.indexOf(OperaPrefix) + OperaPrefix.length();
@@ -415,7 +415,7 @@ public class UrlUtil {
public static boolean isSafari(String agent) {
if (agent==null)
- return false;
+ return false;
agent=agent.toLowerCase(Locale.ENGLISH);
return agent.contains("safari/"); //$NON-NLS-1$
}
@@ -428,7 +428,7 @@ public class UrlUtil {
public static String getSafariVersion(String agent) {
String version = "0"; //$NON-NLS-1$
if (agent==null)
- return version;
+ return version;
agent=agent.toLowerCase(Locale.ENGLISH);
Matcher m = safariPattern.matcher(agent);
boolean matched = m.find();
@@ -580,12 +580,12 @@ public class UrlUtil {
// check if locale was passed earlier in this session
Cookie[] cookies = request.getCookies();
if (cookies != null) {
- for (Cookie cookie : cookies) {
- if ("lang".equals(cookie.getName())) { //$NON-NLS-1$
- forcedLocale = cookie.getValue();
- break;
- }
- }
+ for (Cookie cookie : cookies) {
+ if ("lang".equals(cookie.getName())) { //$NON-NLS-1$
+ forcedLocale = cookie.getValue();
+ break;
+ }
+ }
}
}
@@ -651,7 +651,7 @@ public class UrlUtil {
// if no locales from command line, get them from preferences
if (infocenterLocales.isEmpty()) {
String preferredLocales = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID, ("locales"), "", null); //$NON-NLS-1$ //$NON-NLS-2$
+ (HelpBasePlugin.PLUGIN_ID, ("locales"), "", null); //$NON-NLS-1$ //$NON-NLS-2$
StringTokenizer tokenizer = new StringTokenizer(preferredLocales,
" ,\t"); //$NON-NLS-1$
while (tokenizer.hasMoreTokens()) {
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/View.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/View.java
index 014540b55..4966ec1a8 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/View.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/View.java
@@ -19,7 +19,7 @@ import org.eclipse.help.internal.webapp.WebappResources;
import org.eclipse.help.webapp.AbstractView ;
public class View extends AbstractView {
- public static char NO_SHORTCUT = (char)0;
+ public static char NO_SHORTCUT = (char)0;
private String name;
private String url;
private String imageURL;
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetData.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetData.java
index 5aa3c3d81..8b5e6731a 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetData.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetData.java
@@ -195,7 +195,7 @@ public class WorkingSetData extends RequestData {
return name;
}
}
- return ""; //$NON-NLS-1$
+ return ""; //$NON-NLS-1$
}
public boolean isCriteriaScopeEnabled(){
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/service/AboutService.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/service/AboutService.java
index 2e72397fc..3bb7be752 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/service/AboutService.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/service/AboutService.java
@@ -187,17 +187,17 @@ public class AboutService extends AboutServlet {
Bundle[] bundles = HelpWebappPlugin.getContext().getBundles();
for (Bundle bundle : bundles) {
- plugins.add(pluginDetails(bundle));
- }
+ plugins.add(pluginDetails(bundle));
+ }
- Comparator<PluginDetails> pluginComparator = new PluginComparator(sortColumn);
+ Comparator<PluginDetails> pluginComparator = new PluginComparator(sortColumn);
Collections.sort(plugins, pluginComparator );
String[] headerColumns = new String[]{
- "provider", //$NON-NLS-1$
- "pluginName", //$NON-NLS-1$
- "version", //$NON-NLS-1$
- "pluginId" //$NON-NLS-1$
+ "provider", //$NON-NLS-1$
+ "pluginName", //$NON-NLS-1$
+ "version", //$NON-NLS-1$
+ "pluginId" //$NON-NLS-1$
};
for (String headerColumn : headerColumns) {
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/service/AdvancedSearchService.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/service/AdvancedSearchService.java
index 5e264fc32..2c167c56b 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/service/AdvancedSearchService.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/service/AdvancedSearchService.java
@@ -127,7 +127,7 @@ public class AdvancedSearchService extends HttpServlet {
}
}
- // Call after the catch.
+ // Call after the catch.
// An empty JSON is created if any Exception is thrown
// Else returns the complete JSON
return searchParser.toJSON();
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/BreadcrumbsFilter.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/BreadcrumbsFilter.java
index e6690b960..532e8c654 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/BreadcrumbsFilter.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/BreadcrumbsFilter.java
@@ -73,7 +73,7 @@ public class BreadcrumbsFilter implements IFilter {
if (pathParam != null && pathParam.length() > 0) {
breadcrumbPath = "/nav/" + pathParam; //$NON-NLS-1$
} else {
- breadcrumbPath= servletPath + pathInfo;
+ breadcrumbPath= servletPath + pathInfo;
}
int[] path = UrlUtil.getTopicPath(breadcrumbPath, locale );
if (path != null && path.length > 1) {
@@ -83,7 +83,7 @@ public class BreadcrumbsFilter implements IFilter {
String bodyContent = getBodyContent(path,
backpath, isNarrow, locale);
String headContent = HEAD_CONTENT1 + backpath + HEAD_CONTENT2 + backpath +
- HEAD_CONTENT3;
+ HEAD_CONTENT3;
return new FilterHTMLHeadAndBodyOutputStream(out, headContent
.getBytes(StandardCharsets.US_ASCII), bodyContent);
}
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ChildLinkInserter.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ChildLinkInserter.java
index eb73ee878..c3231ac00 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ChildLinkInserter.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ChildLinkInserter.java
@@ -47,11 +47,11 @@ public class ChildLinkInserter {
public void addContents(String encoding) throws IOException {
String path = req.getParameter(TocData.COMPLETE_PATH_PARAM);
- ITopic[] subtopics = getSubtopics();
- if (subtopics.length == 0) {
- return;
- }
- StringBuilder links = new StringBuilder("\n<ul class=\"childlinks\">\n"); //$NON-NLS-1$
+ ITopic[] subtopics = getSubtopics();
+ if (subtopics.length == 0) {
+ return;
+ }
+ StringBuilder links = new StringBuilder("\n<ul class=\"childlinks\">\n"); //$NON-NLS-1$
for (int i=0;i<subtopics.length;++i) {
if (ScopeUtils.showInTree(subtopics[i], scope)) {
links.append("\n<li><a href=\""); //$NON-NLS-1$
@@ -66,7 +66,7 @@ public class ChildLinkInserter {
else {
href = XMLGenerator.xmlEscape(href);
if (path != null && path.length() > 0) {
- href = TocFragmentServlet.fixupHref(href, path + '_' + i);
+ href = TocFragmentServlet.fixupHref(href, path + '_' + i);
}
}
links.append(getBackpath(req.getPathInfo()));
@@ -78,9 +78,9 @@ public class ChildLinkInserter {
String linkString = links.toString();
try {
if (encoding != null) {
- out.write(linkString.getBytes(encoding));
+ out.write(linkString.getBytes(encoding));
} else {
- out.write(linkString.getBytes(StandardCharsets.UTF_8));
+ out.write(linkString.getBytes(StandardCharsets.UTF_8));
}
} catch (UnsupportedEncodingException e) {
out.write(linkString.getBytes());
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/CookieUtil.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/CookieUtil.java
index d04ec18fe..f208dcf2a 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/CookieUtil.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/CookieUtil.java
@@ -103,8 +103,8 @@ public class CookieUtil {
Cookie cookie = new Cookie(name, ""); //$NON-NLS-1$
String requestURI = request.getRequestURI();
if (!(requestURI.startsWith(cookiePath) && requestURI.indexOf('/', cookiePath.length() + 1) == -1)) {
- cookie.setPath(cookiePath);
- }
+ cookie.setPath(cookiePath);
+ }
cookie.setMaxAge(0);
response.addCookie(cookie);
}
@@ -115,11 +115,11 @@ public class CookieUtil {
HashSet<String> cookiesToDelete = new HashSet<>();
if (cookies != null) {
for (Cookie cookie : cookies) {
- String name = cookie.getName();
- if (isObsoleteCookie(name) || cookiesToKeep.contains(name)) {
- cookiesToDelete.add(name);
- }
- cookiesToKeep.add(name);
+ String name = cookie.getName();
+ if (isObsoleteCookie(name) || cookiesToKeep.contains(name)) {
+ cookiesToDelete.add(name);
+ }
+ cookiesToKeep.add(name);
}
for (String name : cookiesToDelete) {
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/EclipseConnector.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/EclipseConnector.java
index e7aaf9bb1..dc44545ce 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/EclipseConnector.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/EclipseConnector.java
@@ -67,9 +67,9 @@ public class EclipseConnector {
private ServletContext context;
private static INotFoundCallout notFoundCallout = null; // For JUnit Testing
- public EclipseConnector(ServletContext context) {
+ public EclipseConnector(ServletContext context) {
this.context= context;
- }
+ }
public void transfer(HttpServletRequest req, HttpServletResponse resp)
@@ -86,7 +86,7 @@ public class EclipseConnector {
try {
- //System.out.println("Transfer " + url); //$NON-NLS-1$
+ //System.out.println("Transfer " + url); //$NON-NLS-1$
// Redirect if the request includes PLUGINS_ROOT and is not a content request
int index = url.lastIndexOf(HelpURLConnection.PLUGINS_ROOT);
if (index!= -1 && !url.contains("content/" + HelpURLConnection.PLUGINS_ROOT)) { //$NON-NLS-1$
@@ -125,39 +125,39 @@ public class EclipseConnector {
try {
is = con.getInputStream();
} catch (IOException ioe) {
- pageNotFound = true;
- if (notFoundCallout != null) {
- notFoundCallout.notFound(url);
- }
-
- boolean isRTopicPath = isRTopicPath(req.getServletPath());
-
- if (requiresErrorPage(lowerCaseuRL) && !isRTopicPath) {
-
- String errorPage = null;
- if (RemoteStatusData.isAnyRemoteHelpUnavailable()) {
- errorPage = '/'+HelpWebappPlugin.PLUGIN_ID+'/'+ MissingContentManager.MISSING_TOPIC_HREF;
- } else {
- errorPage = MissingContentManager.getInstance().getPageNotFoundPage(url, false);
- }
- if (errorPage != null && errorPage.length() > 0) {
+ pageNotFound = true;
+ if (notFoundCallout != null) {
+ notFoundCallout.notFound(url);
+ }
+
+ boolean isRTopicPath = isRTopicPath(req.getServletPath());
+
+ if (requiresErrorPage(lowerCaseuRL) && !isRTopicPath) {
+
+ String errorPage = null;
+ if (RemoteStatusData.isAnyRemoteHelpUnavailable()) {
+ errorPage = '/'+HelpWebappPlugin.PLUGIN_ID+'/'+ MissingContentManager.MISSING_TOPIC_HREF;
+ } else {
+ errorPage = MissingContentManager.getInstance().getPageNotFoundPage(url, false);
+ }
+ if (errorPage != null && errorPage.length() > 0) {
con = createConnection(req, resp, "help:" + errorPage); //$NON-NLS-1$
resp.setContentType("text/html"); //$NON-NLS-1$
try {
- is = con.getInputStream();
+ is = con.getInputStream();
} catch (IOException ioe2) {
// Cannot open error page
- resp.setStatus(HttpServletResponse.SC_NOT_FOUND);
+ resp.setStatus(HttpServletResponse.SC_NOT_FOUND);
return;
}
} else {
// Error page not defined
- resp.setStatus(HttpServletResponse.SC_NOT_FOUND);
+ resp.setStatus(HttpServletResponse.SC_NOT_FOUND);
return;
}
} else {
// Non HTML file
- resp.setStatus(HttpServletResponse.SC_NOT_FOUND);
+ resp.setStatus(HttpServletResponse.SC_NOT_FOUND);
return;
}
}
@@ -202,7 +202,7 @@ public class EclipseConnector {
transferContent(is, out);
try {
- out.close();
+ out.close();
} catch (IOException ioe) {
// Bug 314324 - do not report an error
}
@@ -229,7 +229,7 @@ public class EclipseConnector {
}
if (!contentType.startsWith("text")) { //$NON-NLS-1$
return false;
- }
+ }
if (contentType.equals("text/css")) { //$NON-NLS-1$
return false;
}
@@ -273,12 +273,12 @@ public class EclipseConnector {
private boolean useMimeType(HttpServletRequest req, String mimeType) {
if ( mimeType == null ) {
- return false;
- }
- if (mimeType.equals("application/xhtml+xml") && !UrlUtil.isMozilla(req)) { //$NON-NLS-1$
- return false;
- }
- return true;
+ return false;
+ }
+ if (mimeType.equals("application/xhtml+xml") && !UrlUtil.isMozilla(req)) { //$NON-NLS-1$
+ return false;
+ }
+ return true;
}
/**
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ExtraFilters.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ExtraFilters.java
index ce150b5c3..d27623afe 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ExtraFilters.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ExtraFilters.java
@@ -36,7 +36,7 @@ public class ExtraFilters implements IFilter {
public ExtraFilters() {
if (filters == null) {
- readFilters();
+ readFilters();
}
}
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/FilterHTMLHeadAndBodyOutputStream.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/FilterHTMLHeadAndBodyOutputStream.java
index 8a765ab39..a183499e8 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/FilterHTMLHeadAndBodyOutputStream.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/FilterHTMLHeadAndBodyOutputStream.java
@@ -199,8 +199,8 @@ public class FilterHTMLHeadAndBodyOutputStream extends FilterOutputStream {
String bodyRecoded = new String(bodyBytes, encoding);
if (bodyRecoded.equals(bodyContent)) {
out.write('\n');
- out.write(bodyBytes);
- out.write('\n');
+ out.write(bodyBytes);
+ out.write('\n');
} else {
// Some characters could not be encoded
// Write one character at a time using an entity if necessary
@@ -213,11 +213,11 @@ public class FilterHTMLHeadAndBodyOutputStream extends FilterOutputStream {
out.write(codedChar);
} else {
int value = bodyContent.charAt(i);
- String code = "&#" + value + ';'; //$NON-NLS-1$
- out.write(code.getBytes());
+ String code = "&#" + value + ';'; //$NON-NLS-1$
+ out.write(code.getBytes());
}
}
- out.write('\n');
+ out.write('\n');
}
}
areaState = STATE_DONE;
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/FramesetFilter.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/FramesetFilter.java
index 66672330b..4024abfea 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/FramesetFilter.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/FramesetFilter.java
@@ -29,8 +29,8 @@ import org.eclipse.help.webapp.IFilter;
*/
public class FramesetFilter implements IFilter {
private static final String scriptPart1 = "<script type=\"text/javascript\">\nif( self == top ){" //$NON-NLS-1$
- + "\n var anchorParam = location.hash.length > 0 ? '" //$NON-NLS-1$
- + UrlUtil.JavaScriptEncode("&") + "anchor=' + location.hash.substr(1) : '';" //$NON-NLS-1$ //$NON-NLS-2$
+ + "\n var anchorParam = location.hash.length > 0 ? '" //$NON-NLS-1$
+ + UrlUtil.JavaScriptEncode("&") + "anchor=' + location.hash.substr(1) : '';" //$NON-NLS-1$ //$NON-NLS-2$
+ "\n window.location.replace( \""; //$NON-NLS-1$
private static final String scriptPart3 = "\" + anchorParam);\n}\n</script>"; //$NON-NLS-1$
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexFragmentServlet.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexFragmentServlet.java
index 6b974628d..4655447f2 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexFragmentServlet.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexFragmentServlet.java
@@ -89,7 +89,7 @@ public class IndexFragmentServlet extends HttpServlet {
sizeParameter = req.getParameter(SIZE);
if (sizeParameter != null) {
try {
- size = Integer.parseInt(sizeParameter);
+ size = Integer.parseInt(sizeParameter);
} catch (NumberFormatException n) {
}
}
@@ -98,7 +98,7 @@ public class IndexFragmentServlet extends HttpServlet {
entryParameter = req.getParameter(ENTRY);
if (entryParameter != null) {
try {
- entry = Integer.parseInt(entryParameter);
+ entry = Integer.parseInt(entryParameter);
} catch (NumberFormatException n) {
}
}
@@ -226,10 +226,10 @@ public class IndexFragmentServlet extends HttpServlet {
}
int nextEntry = 0;
while (nextEntry < entries.length) {
- String keyword = entries[nextEntry].getKeyword().toLowerCase();
+ String keyword = entries[nextEntry].getKeyword().toLowerCase();
if (keyword != null) {
if (compare(startParameter, keyword) <= 0) {
- break;
+ break;
}
}
nextEntry++;
@@ -241,9 +241,9 @@ public class IndexFragmentServlet extends HttpServlet {
while (nextEntry < entries.length) {
int entrySize = enabledEntryCount(entries[nextEntry]);
if (remaining == size || remaining > entrySize) {
- entryList.add(Integer.valueOf(nextEntry));
- setFlags(nextEntry);
- remaining -= entrySize;
+ entryList.add(Integer.valueOf(nextEntry));
+ setFlags(nextEntry);
+ remaining -= entrySize;
} else {
break;
}
@@ -257,10 +257,10 @@ public class IndexFragmentServlet extends HttpServlet {
while (nextEntry >= 0) {
int entrySize = enabledEntryCount(entries[nextEntry]);
if (remaining == size || remaining > entrySize) {
- entryList.add(0, Integer.valueOf(nextEntry));
+ entryList.add(0, Integer.valueOf(nextEntry));
- setFlags(nextEntry);
- remaining -= entrySize;
+ setFlags(nextEntry);
+ remaining -= entrySize;
} else {
break;
}
@@ -284,10 +284,10 @@ public class IndexFragmentServlet extends HttpServlet {
return 0;
}
int count = 1;
- int topicCount = enabledTopicCount(entry);
+ int topicCount = enabledTopicCount(entry);
IIndexEntry[] subentries = entry.getSubentries();
- int subentryCount = 0;
+ int subentryCount = 0;
for (IIndexEntry subentrie : subentries) {
count += enabledEntryCount(subentrie);
}
@@ -305,17 +305,17 @@ public class IndexFragmentServlet extends HttpServlet {
}
count += subentryCount;
count += seeCount;
- return count;
+ return count;
}
private int enabledTopicCount(IIndexEntry entry) {
int topicCount = 0;
- ITopic[] topics = entry.getTopics();
- for (ITopic topic : topics) {
- if (scope.inScope(topic)) {
- topicCount++;
- }
- }
+ ITopic[] topics = entry.getTopics();
+ for (ITopic topic : topics) {
+ if (scope.inScope(topic)) {
+ topicCount++;
+ }
+ }
return topicCount;
}
@@ -353,8 +353,8 @@ public class IndexFragmentServlet extends HttpServlet {
String href;
if (singleTopic) {
href = UrlUtil.getHelpURL((topics[0]).getHref());
- buf.append('\n' + " href=\"" + //$NON-NLS-1$
- XMLGenerator.xmlEscape(href) + "\""); //$NON-NLS-1$
+ buf.append('\n' + " href=\"" + //$NON-NLS-1$
+ XMLGenerator.xmlEscape(href) + "\""); //$NON-NLS-1$
}
buf.append(">\n"); //$NON-NLS-1$
@@ -403,8 +403,8 @@ public class IndexFragmentServlet extends HttpServlet {
}
private void generateSees(IIndexSee[] sees) {
- for (IIndexSee see : sees) {
- if (ScopeUtils.showInTree(see, scope)) {
+ for (IIndexSee see : sees) {
+ if (ScopeUtils.showInTree(see, scope)) {
//
String key = see.isSeeAlso() ? "SeeAlso" : "See"; //$NON-NLS-1$ //$NON-NLS-2$
String seePrefix = WebappResources.getString(key, UrlUtil
@@ -428,8 +428,8 @@ public class IndexFragmentServlet extends HttpServlet {
+ XMLGenerator.xmlEscape(href) + "\""); //$NON-NLS-1$
buf.append(">\n"); //$NON-NLS-1$
buf.append("</node>\n"); //$NON-NLS-1$
- }
- }
+ }
+ }
}
}
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InfocenterWorkingSetManager.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InfocenterWorkingSetManager.java
index 857148aaf..d220d6d8a 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InfocenterWorkingSetManager.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InfocenterWorkingSetManager.java
@@ -180,7 +180,7 @@ public class InfocenterWorkingSetManager implements IHelpWorkingSetManager {
if (suffixStart > 0) {
previousToc = decodedName.substring(0, suffixStart);
} else if (suffixStart == 0) {
- decodedName = previousToc + decodedName;
+ decodedName = previousToc + decodedName;
}
elements[e] = getAdaptableTopic(decodedName);
}
@@ -211,14 +211,14 @@ public class InfocenterWorkingSetManager implements IHelpWorkingSetManager {
continue;
}
String name = URLCoder.decode(nameAndCriteria[0]);
- List<CriterionResource> criteriaResource = new ArrayList<>();
+ List<CriterionResource> criteriaResource = new ArrayList<>();
for (int j = 1; j < nameAndCriteria.length; ++j) {
String criterion = nameAndCriteria[j];
String[] keyAndValue = criterion.split("#", -1); //$NON-NLS-1$
if(keyAndValue.length != 2)
continue;
String key = URLCoder.decode(keyAndValue[0]);
- String value = URLCoder.decode(keyAndValue[1]);
+ String value = URLCoder.decode(keyAndValue[1]);
String[] criterionValues = value.split(",", -1); //$NON-NLS-1$
if(criterionValues.length < 1)
continue;
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InjectionFilter.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InjectionFilter.java
index 2bff3b92d..e9f4e53fd 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InjectionFilter.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InjectionFilter.java
@@ -80,8 +80,8 @@ public class InjectionFilter implements IFilter {
}
boolean enabled = isUnfiltered || isNav
- || HelpBasePlugin.getActivitySupport().isRoleEnabled(pathInfo)
- || isRemote;
+ || HelpBasePlugin.getActivitySupport().isRoleEnabled(pathInfo)
+ || isRemote;
if ("/ntopic".equals(req.getServletPath())) { //$NON-NLS-1$
addNarrow = true;
CssUtil.addCssFiles(NARROW_CSS, cssIncludes);
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/NavServlet.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/NavServlet.java
index b2a913226..ba611fa1b 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/NavServlet.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/NavServlet.java
@@ -84,25 +84,25 @@ public class NavServlet extends HttpServlet {
private void showPageNotFoundPage(HttpServletRequest req,
HttpServletResponse resp) {
String errorPage = MissingContentManager.getInstance().getPageNotFoundPage(req.getServletPath(), false);
- if (errorPage != null && errorPage.length() > 0) {
- String href = req.getRequestURL().toString();
- int navIndex = href.indexOf("/nav"); //$NON-NLS-1$
- if (navIndex >= 0 ) {
- href = href.substring(0, navIndex);
- href += "/nftopic"; //$NON-NLS-1$
- if (errorPage.charAt(0) != '/') {
- href += '/';
- }
- href += errorPage;
- try {
+ if (errorPage != null && errorPage.length() > 0) {
+ String href = req.getRequestURL().toString();
+ int navIndex = href.indexOf("/nav"); //$NON-NLS-1$
+ if (navIndex >= 0 ) {
+ href = href.substring(0, navIndex);
+ href += "/nftopic"; //$NON-NLS-1$
+ if (errorPage.charAt(0) != '/') {
+ href += '/';
+ }
+ href += errorPage;
+ try {
resp.sendRedirect(href);
return;
} catch (IOException e) {
// Fall through
}
- }
- }
- resp.setStatus(HttpServletResponse.SC_NOT_FOUND);
+ }
+ }
+ resp.setStatus(HttpServletResponse.SC_NOT_FOUND);
}
protected Locale getLocale (HttpServletRequest req, HttpServletResponse resp) {
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PluginsRootFilter.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PluginsRootFilter.java
index 12cebd93c..299d4cadd 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PluginsRootFilter.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PluginsRootFilter.java
@@ -27,11 +27,11 @@ import org.eclipse.help.webapp.IFilter;
*/
public class PluginsRootFilter implements IFilter {
- @Override
+ @Override
public OutputStream filter(HttpServletRequest req, OutputStream out) {
String pathPrefix = FilterUtils.getRelativePathPrefix(req);
if (pathPrefix.length() >= 3) {
- return new PluginsRootResolvingStream(out, req, pathPrefix.substring(0, pathPrefix.length() - 3));
+ return new PluginsRootResolvingStream(out, req, pathPrefix.substring(0, pathPrefix.length() - 3));
}
return out;
}
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PluginsRootResolvingStream.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PluginsRootResolvingStream.java
index b977ed1d7..4385c83d7 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PluginsRootResolvingStream.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PluginsRootResolvingStream.java
@@ -48,7 +48,7 @@ public class PluginsRootResolvingStream extends OutputStream {
private String pathPrefix;
private StringBuilder tag;
private ByteArrayOutputStream metaTagBuffer;
- private boolean tagRead;
+ private boolean tagRead;
private HttpServletRequest req;
private String charset;
@@ -61,17 +61,17 @@ public class PluginsRootResolvingStream extends OutputStream {
@Override
public void write(int b) throws IOException {
switch(state) {
- case INITIAL_STATE:
- if (b == '<') {
- state = IN_TAG;
- charsMatched = 0;
- tag = new StringBuilder();
- tagRead = false;
- } else {
- out.write(b);
- }
- break;
- case IN_TAG:
+ case INITIAL_STATE:
+ if (b == '<') {
+ state = IN_TAG;
+ charsMatched = 0;
+ tag = new StringBuilder();
+ tagRead = false;
+ } else {
+ out.write(b);
+ }
+ break;
+ case IN_TAG:
if (charsMatched == 0) {
if (b == '!') {
state = MAY_BE_INCLUDE;
@@ -86,96 +86,96 @@ public class PluginsRootResolvingStream extends OutputStream {
out.write('<');
}
}
- if (b == '>') {
- state = INITIAL_STATE;
- } else if (b == '"') {
- state = IN_QUOTE;
- charsMatched = 0;
- } else {
- charsMatched++;
- if (!tagRead) {
- if (b >= 0 && b < 128 && tag.length() < 20) {
- // ASCII
- char c = (char)b;
- if (Character.isLetter(c)) {
- tag.append(c);
- } else if (Character.isWhitespace(c)) {
- tagRead = true;
- if (tag.toString().equalsIgnoreCase("meta")) { //$NON-NLS-1$
- state = IN_METATAG;
- metaTagBuffer = new ByteArrayOutputStream(7);
- metaTagBuffer.write("<meta ".getBytes()); //$NON-NLS-1$
- }
- } else {
- tag.append(c);
- }
- }
- }
- }
- out.write(b);
- break;
- case IN_QUOTE_NOT_PLUGINS_ROOT:
- if (b == '>') {
- state = INITIAL_STATE;
- } else if (b == '"') {
- state = IN_TAG;
- charsMatched = 1;
- }
- out.write(b);
- break;
- case IN_QUOTE:
- // In a quote which may start with PLUGINS_ROOT
- if (b == PLUGINS_ROOT.charAt(charsMatched)) {
- charsMatched++;
- if (charsMatched == PLUGINS_ROOT.length()) {
- out.write(pathPrefix.getBytes());
- state = IN_QUOTE_NOT_PLUGINS_ROOT;
- }
- } else {
- // We just discovered that this is not "PLUGINS_ROOT/
- // flush out the characters
- state = IN_QUOTE_NOT_PLUGINS_ROOT;
- flushPluginsRootCharacters();
- out.write(b);
- }
- break;
- case MAY_BE_INCLUDE:
- // Compare against all possible keywords
- boolean canStillMatch = false;
- int perfectMatch = -1;
- for (int i = 0; i < keywords.length; i++) {
- if (possibleKeywordMatches[i]) {
- if (keywords[i].charAt(charsMatched) == b) {
- canStillMatch = true;
- lastKeywordMatch = i;
- if (keywords[i].length() == charsMatched + 1) {
- perfectMatch = i;
- }
- } else {
- possibleKeywordMatches[i] = false;
- }
- }
- }
- if (perfectMatch != -1) {
- insertBasedOnKeyword(perfectMatch);
- state=INITIAL_STATE;
- } else if (canStillMatch) {
- charsMatched++;
- } else {
- state = INITIAL_STATE;
- flushKeywordCharacters();
- out.write(b);
- }
- break;
- case IN_METATAG:
- out.write(b);
- metaTagBuffer.write(b);
+ if (b == '>') {
+ state = INITIAL_STATE;
+ } else if (b == '"') {
+ state = IN_QUOTE;
+ charsMatched = 0;
+ } else {
+ charsMatched++;
+ if (!tagRead) {
+ if (b >= 0 && b < 128 && tag.length() < 20) {
+ // ASCII
+ char c = (char)b;
+ if (Character.isLetter(c)) {
+ tag.append(c);
+ } else if (Character.isWhitespace(c)) {
+ tagRead = true;
+ if (tag.toString().equalsIgnoreCase("meta")) { //$NON-NLS-1$
+ state = IN_METATAG;
+ metaTagBuffer = new ByteArrayOutputStream(7);
+ metaTagBuffer.write("<meta ".getBytes()); //$NON-NLS-1$
+ }
+ } else {
+ tag.append(c);
+ }
+ }
+ }
+ }
+ out.write(b);
+ break;
+ case IN_QUOTE_NOT_PLUGINS_ROOT:
+ if (b == '>') {
+ state = INITIAL_STATE;
+ } else if (b == '"') {
+ state = IN_TAG;
+ charsMatched = 1;
+ }
+ out.write(b);
+ break;
+ case IN_QUOTE:
+ // In a quote which may start with PLUGINS_ROOT
+ if (b == PLUGINS_ROOT.charAt(charsMatched)) {
+ charsMatched++;
+ if (charsMatched == PLUGINS_ROOT.length()) {
+ out.write(pathPrefix.getBytes());
+ state = IN_QUOTE_NOT_PLUGINS_ROOT;
+ }
+ } else {
+ // We just discovered that this is not "PLUGINS_ROOT/
+ // flush out the characters
+ state = IN_QUOTE_NOT_PLUGINS_ROOT;
+ flushPluginsRootCharacters();
+ out.write(b);
+ }
+ break;
+ case MAY_BE_INCLUDE:
+ // Compare against all possible keywords
+ boolean canStillMatch = false;
+ int perfectMatch = -1;
+ for (int i = 0; i < keywords.length; i++) {
+ if (possibleKeywordMatches[i]) {
+ if (keywords[i].charAt(charsMatched) == b) {
+ canStillMatch = true;
+ lastKeywordMatch = i;
+ if (keywords[i].length() == charsMatched + 1) {
+ perfectMatch = i;
+ }
+ } else {
+ possibleKeywordMatches[i] = false;
+ }
+ }
+ }
+ if (perfectMatch != -1) {
+ insertBasedOnKeyword(perfectMatch);
+ state=INITIAL_STATE;
+ } else if (canStillMatch) {
+ charsMatched++;
+ } else {
+ state = INITIAL_STATE;
+ flushKeywordCharacters();
+ out.write(b);
+ }
+ break;
+ case IN_METATAG:
+ out.write(b);
+ metaTagBuffer.write(b);
if (b=='>') {
parseMetaTag(metaTagBuffer);
metaTagBuffer = null;
state = INITIAL_STATE;
}
- break;
+ break;
default:
out.write(b);
}
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PreferenceWriter.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PreferenceWriter.java
index 584902b5a..c41ddbd25 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PreferenceWriter.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PreferenceWriter.java
@@ -53,49 +53,49 @@ public class PreferenceWriter {
private void writePreference(String plugin) {
try {
- IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(plugin);
+ IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(plugin);
Set<String> keySet = new HashSet<>();
- prefs = DefaultScope.INSTANCE.getNode(plugin);
+ prefs = DefaultScope.INSTANCE.getNode(plugin);
keySet.addAll(Arrays.asList(prefs.keys()));
String[] allKeys = keySet.toArray(new String[keySet.size()]);
if (allKeys.length > 0) {
- Arrays.sort(allKeys);
+ Arrays.sort(allKeys);
- if (!isXML) {
- buf.append("\n<h3>"); //$NON-NLS-1$
- buf.append(plugin);
- buf.append("</h3>\n"); //$NON-NLS-1$
- buf.append("<table>"); //$NON-NLS-1$
- } else {
+ if (!isXML) {
+ buf.append("\n<h3>"); //$NON-NLS-1$
+ buf.append(plugin);
+ buf.append("</h3>\n"); //$NON-NLS-1$
+ buf.append("<table>"); //$NON-NLS-1$
+ } else {
buf.append("\n <plugin\n title=\""); //$NON-NLS-1$
buf.append(XMLGenerator.xmlEscape(plugin));
buf.append("\">"); //$NON-NLS-1$
- }
- for (String key : allKeys) {
- String value = Platform.getPreferencesService().getString
- (plugin, key, "", null); //$NON-NLS-1$
- if (!isXML) {
- buf.append("\n <tr>\n"); //$NON-NLS-1$
- buf.append(" <td>"); //$NON-NLS-1$
- buf.append(UrlUtil.htmlEncode(key));
- buf.append("</td>\n <td>"); //$NON-NLS-1$
+ }
+ for (String key : allKeys) {
+ String value = Platform.getPreferencesService().getString
+ (plugin, key, "", null); //$NON-NLS-1$
+ if (!isXML) {
+ buf.append("\n <tr>\n"); //$NON-NLS-1$
+ buf.append(" <td>"); //$NON-NLS-1$
+ buf.append(UrlUtil.htmlEncode(key));
+ buf.append("</td>\n <td>"); //$NON-NLS-1$
buf.append(UrlUtil.htmlEncode(value));
buf.append("</td>\n </tr>"); //$NON-NLS-1$
- } else {
- buf.append("\n <"); //$NON-NLS-1$
- buf.append(key);
- buf.append(">"); //$NON-NLS-1$
+ } else {
+ buf.append("\n <"); //$NON-NLS-1$
+ buf.append(key);
+ buf.append(">"); //$NON-NLS-1$
buf.append(value);
- buf.append("</"); //$NON-NLS-1$
- buf.append(key);
- buf.append(">"); //$NON-NLS-1$
- }
- }
- if (!isXML) {
- buf.append("\n</table>"); //$NON-NLS-1$
- } else {
- buf.append("\n </plugin>"); //$NON-NLS-1$
- }
+ buf.append("</"); //$NON-NLS-1$
+ buf.append(key);
+ buf.append(">"); //$NON-NLS-1$
+ }
+ }
+ if (!isXML) {
+ buf.append("\n</table>"); //$NON-NLS-1$
+ } else {
+ buf.append("\n </plugin>"); //$NON-NLS-1$
+ }
}
} catch (BackingStoreException e) {
buf.append(WebappResources.getString("badPreferences", locale)); //$NON-NLS-1$
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ServletPrintWriter.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ServletPrintWriter.java
index 92d842d8f..291163cd5 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ServletPrintWriter.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ServletPrintWriter.java
@@ -25,66 +25,66 @@ public class ServletPrintWriter extends PrintWriter{
buffer = new StringBuilder();
}
- /**
- * Writes a single character.
- * @param c int specifying a character to be written.
- */
- @Override
+ /**
+ * Writes a single character.
+ * @param c int specifying a character to be written.
+ */
+ @Override
public void write(int c) {
- synchronized (lock) {
- buffer.append((char)(c));
- }
- }
+ synchronized (lock) {
+ buffer.append((char)(c));
+ }
+ }
- /**
- * Writes A Portion of an array of characters.
- * @param buf Array of characters
- * @param off Offset from which to start writing characters
- * @param len Number of characters to write
- */
- @Override
+ /**
+ * Writes A Portion of an array of characters.
+ * @param buf Array of characters
+ * @param off Offset from which to start writing characters
+ * @param len Number of characters to write
+ */
+ @Override
public void write(char buf[], int off, int len) {
- synchronized (lock) {
- buffer.append(buf, off, len);
- }
- }
+ synchronized (lock) {
+ buffer.append(buf, off, len);
+ }
+ }
- /**
- * Writes an array of characters. This method cannot be inherited from the
- * Writer class because it must suppress I/O exceptions.
- * @param buf Array of characters to be written
- */
- @Override
+ /**
+ * Writes an array of characters. This method cannot be inherited from the
+ * Writer class because it must suppress I/O exceptions.
+ * @param buf Array of characters to be written
+ */
+ @Override
public void write(char buf[]) {
- write(buf, 0, buf.length);
- }
+ write(buf, 0, buf.length);
+ }
- /**
- * Writes a portion of a string.
- * @param s A String
- * @param off Offset from which to start writing characters
- * @param len Number of characters to write
- */
- @Override
+ /**
+ * Writes a portion of a string.
+ * @param s A String
+ * @param off Offset from which to start writing characters
+ * @param len Number of characters to write
+ */
+ @Override
public void write(String s, int off, int len) {
- synchronized (lock) {
- buffer.append(s.toCharArray(), off, off+len);
- }
- }
+ synchronized (lock) {
+ buffer.append(s.toCharArray(), off, off+len);
+ }
+ }
- /**
- * Writes a string. This method cannot be inherited from the Writer class
- * because it must suppress I/O exceptions.
- * @param s String to be written
- */
- @Override
+ /**
+ * Writes a string. This method cannot be inherited from the Writer class
+ * because it must suppress I/O exceptions.
+ * @param s String to be written
+ */
+ @Override
public void write(String s) {
write(s, 0, s.length());
- }
+ }
- @Override
+ @Override
public String toString()
- {
- return buffer.toString();
- }
+ {
+ return buffer.toString();
+ }
}
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocFragmentServlet.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocFragmentServlet.java
index c9712eeb5..99f95b800 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocFragmentServlet.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocFragmentServlet.java
@@ -59,9 +59,9 @@ public class TocFragmentServlet extends HttpServlet {
throws ServletException, IOException {
String locale = UrlUtil.getLocale(req, resp);
req.setCharacterEncoding("UTF-8"); //$NON-NLS-1$
- resp.setHeader("Cache-Control","no-cache"); //$NON-NLS-1$//$NON-NLS-2$
- resp.setHeader("Pragma","no-cache"); //$NON-NLS-1$ //$NON-NLS-2$
- resp.setDateHeader ("Expires", 0); //$NON-NLS-1$
+ resp.setHeader("Cache-Control","no-cache"); //$NON-NLS-1$//$NON-NLS-2$
+ resp.setHeader("Pragma","no-cache"); //$NON-NLS-1$ //$NON-NLS-2$
+ resp.setDateHeader ("Expires", 0); //$NON-NLS-1$
TocData data = new TocData(this.getServletContext(), req, resp);
readParameters(req);
@@ -120,7 +120,7 @@ public class TocFragmentServlet extends HttpServlet {
} else if (requestKind == REQUEST_SHOW_IN_TOC) {
generateNumericPath();
} else {
- serializeTocs();
+ serializeTocs();
}
buf.append("</tree_data>\n"); //$NON-NLS-1$
return buf.toString();
@@ -129,9 +129,9 @@ public class TocFragmentServlet extends HttpServlet {
private void generateNumericPath() {
int selectedToc = tocData.getSelectedToc();
- if (selectedToc < 0) {
- addError(WebappResources.getString("CannotSync", locale)); //$NON-NLS-1$
- } else {
+ if (selectedToc < 0) {
+ addError(WebappResources.getString("CannotSync", locale)); //$NON-NLS-1$
+ } else {
// Count the number of enabled tocs
int enabled = 0;
for (int i = 0; i <= selectedToc; i++) {
@@ -139,38 +139,38 @@ public class TocFragmentServlet extends HttpServlet {
enabled++;
}
}
- String fullNumericPath = "" + (enabled - 1); //$NON-NLS-1$
- String numericPath = tocData.getNumericPath();
+ String fullNumericPath = "" + (enabled - 1); //$NON-NLS-1$
+ String numericPath = tocData.getNumericPath();
if (numericPath != null) {
- fullNumericPath = fullNumericPath + '_' + numericPath;
- }
- buf.append("<numeric_path path=\"" + fullNumericPath + "\"/>\n"); //$NON-NLS-1$ //$NON-NLS-2$
- }
+ fullNumericPath = fullNumericPath + '_' + numericPath;
+ }
+ buf.append("<numeric_path path=\"" + fullNumericPath + "\"/>\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
}
private void addError(String message) {
if (!isErrorSuppress) {
- buf.append("<error>"); //$NON-NLS-1$
+ buf.append("<error>"); //$NON-NLS-1$
buf.append(XMLGenerator.xmlEscape(message));
buf.append("</error>"); //$NON-NLS-1$
}
}
private void serializeTocs() {
- ITopic[] topicPath = tocData.getTopicPath();
+ ITopic[] topicPath = tocData.getTopicPath();
int selectedToc = tocData.getSelectedToc();
// Iterate over all tocs - if there is a selected toc only generate that
// toc, otherwise generate the root of every toc.
for (int toc=0; toc< tocData.getTocCount(); toc++) {
boolean shouldLoad = requestKind == REQUEST_SHOW_TOCS || toc == selectedToc;
- if (shouldLoad) {
- boolean isSelected = false; // Should this node be selected in the tree
- if (requestKind == REQUEST_SHOW_TOCS) {
- isSelected = toc == 0;
- } else if (requestKind == REQUEST_SHOW_CHILDREN) {
- isSelected = tocData.getRootPath() == null;
- }
+ if (shouldLoad) {
+ boolean isSelected = false; // Should this node be selected in the tree
+ if (requestKind == REQUEST_SHOW_TOCS) {
+ isSelected = toc == 0;
+ } else if (requestKind == REQUEST_SHOW_CHILDREN) {
+ isSelected = tocData.getRootPath() == null;
+ }
serializeToc(tocData.getTocs()[toc], toc, topicPath, isSelected);
}
}
@@ -217,9 +217,9 @@ public class TocFragmentServlet extends HttpServlet {
}
private void serializeTopic(ITopic topic, ITopic[] topicPath, boolean isSelected, String parentPath) {
- ITopic[] subtopics = topic.getSubtopics();
- boolean isLeaf = !ScopeUtils.hasInScopeDescendent(topic, scope);
- buf.append("<node"); //$NON-NLS-1$
+ ITopic[] subtopics = topic.getSubtopics();
+ boolean isLeaf = !ScopeUtils.hasInScopeDescendent(topic, scope);
+ buf.append("<node"); //$NON-NLS-1$
if (topic.getLabel() != null) {
buf.append('\n' + " title=\"" + XMLGenerator.xmlEscape(topic.getLabel()) + '"'); //$NON-NLS-1$
}
@@ -250,11 +250,11 @@ public class TocFragmentServlet extends HttpServlet {
String icon = ((Toc) toc).getIcon();
if (IconFinder.isIconDefined(icon)) {
- String openIcon = IconFinder.getImagePathFromId(icon, IconFinder.TYPEICON_OPEN);
+ String openIcon = IconFinder.getImagePathFromId(icon, IconFinder.TYPEICON_OPEN);
String closedIcon = IconFinder.getImagePathFromId(icon, IconFinder.TYPEICON_CLOSED);
String imageTags = '\n' + " openImage=\"/"+ openIcon + "\""; //$NON-NLS-1$ //$NON-NLS-2$
if (!openIcon.equals(closedIcon)) {
- imageTags += '\n' + " closedImage=\"/" + closedIcon + "\""; //$NON-NLS-1$ //$NON-NLS-2$
+ imageTags += '\n' + " closedImage=\"/" + closedIcon + "\""; //$NON-NLS-1$ //$NON-NLS-2$
}
String altText = IconFinder.getIconAltFromId(icon);
if(altText != null) {
@@ -269,20 +269,20 @@ public class TocFragmentServlet extends HttpServlet {
private String createTopicImageTags(ITopic topic, boolean isLeaf) {
if (topic instanceof Topic) {
String icon = ((Topic) topic).getIcon();
- String altText = IconFinder.getIconAltFromId(icon);
+ String altText = IconFinder.getIconAltFromId(icon);
if (IconFinder.isIconDefined(icon)) {
String imageTags;
if (isLeaf) {
imageTags = '\n' + " openImage=\"/" +IconFinder.getImagePathFromId(icon, IconFinder.TYPEICON_LEAF) + "\""; //$NON-NLS-1$//$NON-NLS-2$
} else {
- String openIcon = IconFinder.getImagePathFromId(icon, IconFinder.TYPEICON_OPEN);
+ String openIcon = IconFinder.getImagePathFromId(icon, IconFinder.TYPEICON_OPEN);
String closedIcon = IconFinder.getImagePathFromId(icon, IconFinder.TYPEICON_CLOSED);
imageTags = '\n' + " openImage=\"/" + openIcon+ "\""; //$NON-NLS-1$ //$NON-NLS-2$
if (!openIcon.equals(closedIcon)) {
- imageTags += '\n' + " closedImage=\"/" + closedIcon + "\""; //$NON-NLS-1$ //$NON-NLS-2$
+ imageTags += '\n' + " closedImage=\"/" + closedIcon + "\""; //$NON-NLS-1$ //$NON-NLS-2$
}
- }
+ }
if(altText != null) {
imageTags += '\n' + " imageAlt=\""+ altText + "\""; //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -305,22 +305,22 @@ public class TocFragmentServlet extends HttpServlet {
if (parentIsSelected && requestKind == REQUEST_SHOW_CHILDREN) {
// Show the children of this node
for (int subtopic = 0; subtopic < childTopics.length; subtopic++) {
- ITopic childTopic = childTopics[subtopic];
- if (ScopeUtils.showInTree(childTopic, scope)) {
- serializeTopic(childTopic, null, false, addSuffix(parentPath, subtopic));
- }
+ ITopic childTopic = childTopics[subtopic];
+ if (ScopeUtils.showInTree(childTopic, scope)) {
+ serializeTopic(childTopic, null, false, addSuffix(parentPath, subtopic));
+ }
}
} else if (topicPath != null) {
for (int subtopic = 0; subtopic < childTopics.length; subtopic++) {
ITopic childTopic = childTopics[subtopic];
- if (ScopeUtils.showInTree(childTopic, scope)) {
+ if (ScopeUtils.showInTree(childTopic, scope)) {
if (topicPath[0].getLabel().equals(childTopic.getLabel())) {
ITopic[] newPath = null;
if (topicPath.length > 1) {
newPath = new ITopic[topicPath.length - 1];
System.arraycopy(topicPath, 1, newPath, 0, topicPath.length - 1);
}
- serializeTopic(childTopic, newPath, topicPath.length == 1, addSuffix(parentPath, subtopic));
+ serializeTopic(childTopic, newPath, topicPath.length == 1, addSuffix(parentPath, subtopic));
} else {
serializeTopic(childTopic, null, false, addSuffix(parentPath, subtopic));
}
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractButton.java b/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractButton.java
index ce1176231..a83a0e0b6 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractButton.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractButton.java
@@ -28,104 +28,104 @@ public abstract class AbstractButton implements Comparable<AbstractButton> {
* generated HTML
* @return a string that consists of alphanumeric characters only with no spaces
*/
- public abstract String getId();
-
- /**
- * @return a URL relative to /help which is the location
- * of the 16x16 image icon which will appear in the tab
- */
- public abstract String getImageURL();
-
- /**
- * A user visible description of the button which will appear in the tooltip
- * @param locale the locale of the client
- * @return the tooltip text to be used in this locale
- */
- public abstract String getTooltip(Locale locale);
-
- /**
- * a JavaScript function which will be called when the button is pressed
- * @return the name of a JavaScript function
- */
- public abstract String getAction();
-
- /**
- * The state of a button which is visible but not depressed
- */
- public final static String BUTTON_OUT = "off"; //$NON-NLS-1$
-
- /**
- * The state of a button which is visible and depressed
- */
- public final static String BUTTON_IN = "on"; //$NON-NLS-1$
-
- /**
- * The state of a button which is hidden
- */
- public final static String BUTTON_HIDDEN = "hidden"; //$NON-NLS-1$
-
- /**
- * Get the state of a button
- * @return one of <code>BUTTON_OUT</code>, <code>BUTTON_IN</code>, or
- * <code>BUTTON_HIDDEN</code>.
- */
- public String getState() {
- return BUTTON_OUT;
- }
-
- /**
- * Get the location of the a javascript file to be included in any
- * jsp file which uses this button
- * @return a URL path, relative to /help or <code>null</code> if there.
- */
- public String getJavaScriptURL() {
- return null;
- }
-
- /**
- * Toolbar name for the content pane, which shows help pages
- */
- public static final String CONTENT_TOOLBAR = "content"; //$NON-NLS-1$
-
- /**
- * Toolbar name for the table of contents
- */
- public static final String TOC_TOOLBAR = "toc"; //$NON-NLS-1$
-
- /**
- * Toolbar name for the keyword index
- */
- public static final String INDEX_TOOLBAR = "index"; //$NON-NLS-1$
-
- /**
- * Toolbar name for search results
- */
- public static final String SEARCH_TOOLBAR = "search"; //$NON-NLS-1$
-
- /**
- * Toolbar name for bookmarks
- */
- public static final String BOOKMARKS_TOOLBAR = "bookmarks"; //$NON-NLS-1$
-
- /**
- * Determines whether this button should be true if the button should be added
- * to particular toolbar
- * @param toolbarName Name of the toolbar.
- * @return true
- */
- public boolean isAddedToToolbar(String toolbarName) {
- return true;
- }
-
- /**
+ public abstract String getId();
+
+ /**
+ * @return a URL relative to /help which is the location
+ * of the 16x16 image icon which will appear in the tab
+ */
+ public abstract String getImageURL();
+
+ /**
+ * A user visible description of the button which will appear in the tooltip
+ * @param locale the locale of the client
+ * @return the tooltip text to be used in this locale
+ */
+ public abstract String getTooltip(Locale locale);
+
+ /**
+ * a JavaScript function which will be called when the button is pressed
+ * @return the name of a JavaScript function
+ */
+ public abstract String getAction();
+
+ /**
+ * The state of a button which is visible but not depressed
+ */
+ public final static String BUTTON_OUT = "off"; //$NON-NLS-1$
+
+ /**
+ * The state of a button which is visible and depressed
+ */
+ public final static String BUTTON_IN = "on"; //$NON-NLS-1$
+
+ /**
+ * The state of a button which is hidden
+ */
+ public final static String BUTTON_HIDDEN = "hidden"; //$NON-NLS-1$
+
+ /**
+ * Get the state of a button
+ * @return one of <code>BUTTON_OUT</code>, <code>BUTTON_IN</code>, or
+ * <code>BUTTON_HIDDEN</code>.
+ */
+ public String getState() {
+ return BUTTON_OUT;
+ }
+
+ /**
+ * Get the location of the a javascript file to be included in any
+ * jsp file which uses this button
+ * @return a URL path, relative to /help or <code>null</code> if there.
+ */
+ public String getJavaScriptURL() {
+ return null;
+ }
+
+ /**
+ * Toolbar name for the content pane, which shows help pages
+ */
+ public static final String CONTENT_TOOLBAR = "content"; //$NON-NLS-1$
+
+ /**
+ * Toolbar name for the table of contents
+ */
+ public static final String TOC_TOOLBAR = "toc"; //$NON-NLS-1$
+
+ /**
+ * Toolbar name for the keyword index
+ */
+ public static final String INDEX_TOOLBAR = "index"; //$NON-NLS-1$
+
+ /**
+ * Toolbar name for search results
+ */
+ public static final String SEARCH_TOOLBAR = "search"; //$NON-NLS-1$
+
+ /**
+ * Toolbar name for bookmarks
+ */
+ public static final String BOOKMARKS_TOOLBAR = "bookmarks"; //$NON-NLS-1$
+
+ /**
+ * Determines whether this button should be true if the button should be added
+ * to particular toolbar
+ * @param toolbarName Name of the toolbar.
+ * @return true
+ */
+ public boolean isAddedToToolbar(String toolbarName) {
+ return true;
+ }
+
+ /**
* @since 3.7
*/
- @Override
+ @Override
final public int compareTo(AbstractButton o) {
- if (o != null) {
- String objectName = o.getId();
+ if (o != null) {
+ String objectName = o.getId();
return (getId().compareTo(objectName));
- }
- return 0;
- }
+ }
+ return 0;
+ }
}
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractFrame.java b/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractFrame.java
index 8496719f7..20dcd4318 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractFrame.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractFrame.java
@@ -38,47 +38,47 @@ public abstract class AbstractFrame implements Comparable<AbstractFrame> {
*
* @return a non translated name which is the name of this frame
*/
- public abstract String getName();
+ public abstract String getName();
- /**
- * @return a URL path, relative to /help which is the
- * location of the jsp files in the advanced presentation
- */
- public abstract String getURL();
+ /**
+ * @return a URL path, relative to /help which is the
+ * location of the jsp files in the advanced presentation
+ */
+ public abstract String getURL();
- /**
- * @return a string which will be used in the rows or cols attribute of a
- * frameset in the html
- */
- public String getSize() {
- return "*"; //$NON-NLS-1$
- }
+ /**
+ * @return a string which will be used in the rows or cols attribute of a
+ * frameset in the html
+ */
+ public String getSize() {
+ return "*"; //$NON-NLS-1$
+ }
- /**
- * @return true if the frame should be shown in the advanced presentation
- */
- public boolean isVisible() {
- return true;
- }
+ /**
+ * @return true if the frame should be shown in the advanced presentation
+ */
+ public boolean isVisible() {
+ return true;
+ }
- /**
- * allows the attributes of this frame other than name and src to be specified
- * @return a list of attributes
- */
- public String getFrameAttributes() {
- return "\"marginwidth=\"1\" marginheight=\"1\" frameborder=\"1\" scrolling=\"no\""; //$NON-NLS-1$
- }
+ /**
+ * allows the attributes of this frame other than name and src to be specified
+ * @return a list of attributes
+ */
+ public String getFrameAttributes() {
+ return "\"marginwidth=\"1\" marginheight=\"1\" frameborder=\"1\" scrolling=\"no\""; //$NON-NLS-1$
+ }
- /**
+ /**
* @since 3.7
*/
- @Override
+ @Override
final public int compareTo(AbstractFrame o) {
- if (o != null) {
- String objectName = o.getName();
+ if (o != null) {
+ String objectName = o.getName();
return (getName().compareTo(objectName));
- }
- return 0;
- }
+ }
+ return 0;
+ }
}
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractView.java b/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractView.java
index 8e867ed65..5a31b50f2 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractView.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractView.java
@@ -30,67 +30,67 @@ public abstract class AbstractView {
* is toc the help system will look for the files tocView.jsp
* and tocToolbar.jsp
*/
- public abstract String getName();
+ public abstract String getName();
- /**
- * @return a URL path, relative to /help which is the
- * location of the jsp files in the advanced presentation
- */
- public abstract String getURL();
+ /**
+ * @return a URL path, relative to /help which is the
+ * location of the jsp files in the advanced presentation
+ */
+ public abstract String getURL();
- /**
- * @return a URL path, relative to /help which is the
- * location of the jsp files in the basic presentation
- * @deprecated Help webapp no longer has basic view.
- */
- @Deprecated
+ /**
+ * @return a URL path, relative to /help which is the
+ * location of the jsp files in the basic presentation
+ * @deprecated Help webapp no longer has basic view.
+ */
+ @Deprecated
public String getBasicURL() {
- return getURL();
- }
+ return getURL();
+ }
- /**
- * @return a URL relative to /help which is the location
- * of the 16x16 image icon which will appear in the tab
- */
- public abstract String getImageURL();
+ /**
+ * @return a URL relative to /help which is the location
+ * of the 16x16 image icon which will appear in the tab
+ */
+ public abstract String getImageURL();
- /**
- * @return a character which can be used as an accesskey to
- * navigate directly to this view, or (char)0 if no
- * acceskey is specified
- */
- public abstract char getKey();
+ /**
+ * @return a character which can be used as an accesskey to
+ * navigate directly to this view, or (char)0 if no
+ * acceskey is specified
+ */
+ public abstract char getKey();
- /**
- * Used to allow for views whose loading is deferred until
- * their contents are visible
- * @return true if this view has deferred loading
- */
- public boolean isDeferred() {
- return false;
- }
+ /**
+ * Used to allow for views whose loading is deferred until
+ * their contents are visible
+ * @return true if this view has deferred loading
+ */
+ public boolean isDeferred() {
+ return false;
+ }
- /**
- * A user visible title for the view which will appear in the tooltip
- * @param locale the locale of the client
- * @return the tooltip text to be used in this locale
- */
- public abstract String getTitle(Locale locale);
+ /**
+ * A user visible title for the view which will appear in the tooltip
+ * @param locale the locale of the client
+ * @return the tooltip text to be used in this locale
+ */
+ public abstract String getTitle(Locale locale);
- /**
- * @return true if the view should be shown in the advanced presentation
- */
- public boolean isVisible() {
- return true;
- }
+ /**
+ * @return true if the view should be shown in the advanced presentation
+ */
+ public boolean isVisible() {
+ return true;
+ }
- /**
- * @return true if the view should be shown in the basic presentation
- * @deprecated Help webapp no longer has basic view.
- */
- @Deprecated
+ /**
+ * @return true if the view should be shown in the basic presentation
+ * @deprecated Help webapp no longer has basic view.
+ */
+ @Deprecated
public boolean isVisibleBasic() {
- return true;
- }
+ return true;
+ }
}
diff --git a/org.eclipse.help/src/org/eclipse/help/ICriterionDefinition.java b/org.eclipse.help/src/org/eclipse/help/ICriterionDefinition.java
index 1b136455b..609480838 100644
--- a/org.eclipse.help/src/org/eclipse/help/ICriterionDefinition.java
+++ b/org.eclipse.help/src/org/eclipse/help/ICriterionDefinition.java
@@ -22,24 +22,24 @@ package org.eclipse.help;
*/
public interface ICriterionDefinition extends IUAElement{
- /**
- * Returns the id that this criterion definition is associated with
- *
- * @return the id
- */
- public String getId();
+ /**
+ * Returns the id that this criterion definition is associated with
+ *
+ * @return the id
+ */
+ public String getId();
- /**
- * Obtains the display name associated with this criterion definition.
- *
- * @return the name
- */
- public String getName();
+ /**
+ * Obtains the display name associated with this criterion definition.
+ *
+ * @return the name
+ */
+ public String getName();
- /**
- * Obtains the criterion value definitions contained in the criterion.
- *
- * @return array of ICriterionValueDefinition
- */
- public ICriterionValueDefinition[] getCriterionValueDefinitions();
+ /**
+ * Obtains the criterion value definitions contained in the criterion.
+ *
+ * @return array of ICriterionValueDefinition
+ */
+ public ICriterionValueDefinition[] getCriterionValueDefinitions();
}
diff --git a/org.eclipse.help/src/org/eclipse/help/ICriterionValueDefinition.java b/org.eclipse.help/src/org/eclipse/help/ICriterionValueDefinition.java
index 7051c73b6..bc859895d 100644
--- a/org.eclipse.help/src/org/eclipse/help/ICriterionValueDefinition.java
+++ b/org.eclipse.help/src/org/eclipse/help/ICriterionValueDefinition.java
@@ -22,17 +22,17 @@ package org.eclipse.help;
*/
public interface ICriterionValueDefinition extends IUAElement {
- /**
- * Returns the id that this criterion value
- *
- * @return the id
- */
- public String getId();
+ /**
+ * Returns the id that this criterion value
+ *
+ * @return the id
+ */
+ public String getId();
- /**
- * Obtains the display name associated with this criterion value.
- *
- * @return the name
- */
- public String getName();
+ /**
+ * Obtains the display name associated with this criterion value.
+ *
+ * @return the name
+ */
+ public String getName();
}
diff --git a/org.eclipse.help/src/org/eclipse/help/IIndexEntry.java b/org.eclipse.help/src/org/eclipse/help/IIndexEntry.java
index fa11800db..6cd378b8f 100644
--- a/org.eclipse.help/src/org/eclipse/help/IIndexEntry.java
+++ b/org.eclipse.help/src/org/eclipse/help/IIndexEntry.java
@@ -22,24 +22,24 @@ package org.eclipse.help;
*/
public interface IIndexEntry extends IUAElement {
- /**
- * Returns the keyword that this entry is associated with
- *
- * @return the keyword
- */
- public String getKeyword();
+ /**
+ * Returns the keyword that this entry is associated with
+ *
+ * @return the keyword
+ */
+ public String getKeyword();
- /**
- * Obtains topics assosiated with this index entry (i.e. keyword).
- *
- * @return array of ITopic
- */
- public ITopic[] getTopics();
+ /**
+ * Obtains topics assosiated with this index entry (i.e. keyword).
+ *
+ * @return array of ITopic
+ */
+ public ITopic[] getTopics();
- /**
- * Obtains the index subentries contained in the entry.
- *
- * @return the index subentries
- */
- public IIndexEntry[] getSubentries();
+ /**
+ * Obtains the index subentries contained in the entry.
+ *
+ * @return the index subentries
+ */
+ public IIndexEntry[] getSubentries();
}
diff --git a/org.eclipse.help/src/org/eclipse/help/IIndexEntry2.java b/org.eclipse.help/src/org/eclipse/help/IIndexEntry2.java
index 9b3c8013e..8bb18c023 100644
--- a/org.eclipse.help/src/org/eclipse/help/IIndexEntry2.java
+++ b/org.eclipse.help/src/org/eclipse/help/IIndexEntry2.java
@@ -20,11 +20,11 @@ package org.eclipse.help;
*/
public interface IIndexEntry2 extends IIndexEntry {
- /**
- * Obtains see references for this entry
- *
- * @return array of ITopic
- */
- public IIndexSee[] getSees();
+ /**
+ * Obtains see references for this entry
+ *
+ * @return array of ITopic
+ */
+ public IIndexSee[] getSees();
}
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/CachedEntityResolver.java b/org.eclipse.help/src/org/eclipse/help/internal/CachedEntityResolver.java
index 4e6162b86..4e3467b35 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/CachedEntityResolver.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/CachedEntityResolver.java
@@ -34,15 +34,15 @@ public class CachedEntityResolver implements EntityResolver {
@Override
public InputSource resolveEntity(String publicId, String systemId) {
- int index = systemId.lastIndexOf("/"); //$NON-NLS-1$
- File cachedCopy = null;
- if (index != -1) {
- cachedCopy = new File(HelpPlugin.getConfigurationDirectory(), "/DTDs"); //$NON-NLS-1$
- cachedCopy.mkdirs();
- cachedCopy = new File(cachedCopy, systemId.substring(index));
- }
- if (cachedCopy != null) {
- if (!cachedCopy.exists()) {
+ int index = systemId.lastIndexOf("/"); //$NON-NLS-1$
+ File cachedCopy = null;
+ if (index != -1) {
+ cachedCopy = new File(HelpPlugin.getConfigurationDirectory(), "/DTDs"); //$NON-NLS-1$
+ cachedCopy.mkdirs();
+ cachedCopy = new File(cachedCopy, systemId.substring(index));
+ }
+ if (cachedCopy != null) {
+ if (!cachedCopy.exists()) {
try {
URL system = new URL(systemId);
URLConnection sc = system.openConnection();
@@ -57,15 +57,15 @@ public class CachedEntityResolver implements EntityResolver {
}
} catch (IOException e) {
}
- }
- try {
- InputSource is = new InputSource(new FileReader(cachedCopy));
- is.setSystemId(systemId);
- is.setPublicId(publicId);
- return is;
- } catch (FileNotFoundException e) {}
- }
- return new InputSource(new StringReader("")); //$NON-NLS-1$
+ }
+ try {
+ InputSource is = new InputSource(new FileReader(cachedCopy));
+ is.setSystemId(systemId);
+ is.setPublicId(publicId);
+ return is;
+ } catch (FileNotFoundException e) {}
+ }
+ return new InputSource(new StringReader("")); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/HelpData.java b/org.eclipse.help/src/org/eclipse/help/internal/HelpData.java
index 0ac32123a..5b14dda0c 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/HelpData.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/HelpData.java
@@ -72,19 +72,19 @@ public class HelpData {
}
String helpDataFile = Platform.getPreferencesService().getString(HelpPlugin.PLUGIN_ID, HelpPlugin.HELP_DATA_KEY, "", null); //$NON-NLS-1$
if (helpDataFile.length() > 0) {
- if (helpDataFile.startsWith(PLUGINS_ROOT_SLASH)) {
- int nextSlash = helpDataFile.indexOf('/', PLUGINS_ROOT_SLASH.length());
- if (nextSlash > 0) {
- pluginId = helpDataFile.substring(PLUGINS_ROOT_SLASH.length(), nextSlash);
- helpDataFile = helpDataFile.substring(nextSlash + 1);
- }
+ if (helpDataFile.startsWith(PLUGINS_ROOT_SLASH)) {
+ int nextSlash = helpDataFile.indexOf('/', PLUGINS_ROOT_SLASH.length());
+ if (nextSlash > 0) {
+ pluginId = helpDataFile.substring(PLUGINS_ROOT_SLASH.length(), nextSlash);
+ helpDataFile = helpDataFile.substring(nextSlash + 1);
+ }
}
}
if (helpDataFile.length() > 0 && pluginId != null) {
Bundle bundle = Platform.getBundle(pluginId);
if (bundle != null) {
- URL helpDataUrl = bundle.getEntry(helpDataFile);
- productHelpData = new HelpData(helpDataUrl);
+ URL helpDataUrl = bundle.getEntry(helpDataFile);
+ productHelpData = new HelpData(helpDataUrl);
}
}
if (productHelpData == null) {
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/UAElement.java b/org.eclipse.help/src/org/eclipse/help/internal/UAElement.java
index 85d4614a0..ef37b0c19 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/UAElement.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/UAElement.java
@@ -52,13 +52,13 @@ public class UAElement implements IUAElement {
protected List<UAElement> children;
private Filter[] filters;
private Expression enablementExpression;
- private IUAElement src;
+ private IUAElement src;
private class Filter {
public Filter(String name, String value, boolean isNegated) {
- this.name = name;
- this.value = value;
- this.isNegated = isNegated;
+ this.name = name;
+ this.value = value;
+ this.isNegated = isNegated;
}
String name;
String value;
@@ -76,9 +76,9 @@ public class UAElement implements IUAElement {
public UAElement(String name, IUAElement src) {
this(name);
if (src instanceof UAElement) {
- copyFilters(src);
+ copyFilters(src);
} else {
- this.src = src;
+ this.src = src;
}
}
@@ -86,11 +86,11 @@ public class UAElement implements IUAElement {
UAElement sourceElement = (UAElement)src;
String filter = sourceElement.getAttribute(ATTRIBUTE_FILTER);
if (filter != null && filter.length() > 0) {
- this.setAttribute(ATTRIBUTE_FILTER, filter);
+ this.setAttribute(ATTRIBUTE_FILTER, filter);
}
filters = sourceElement.getFilterElements();
this.enablementExpression = sourceElement.enablementExpression;
- this.src = sourceElement.src;
+ this.src = sourceElement.src;
}
private Filter[] getFilterElements() {
@@ -237,7 +237,7 @@ public class UAElement implements IUAElement {
importElement(newChild);
element.insertBefore(newChild.element, refChild.element);
newChild.parent = this;
- getChildren();
+ getChildren();
if (children != null) {
int index = children.indexOf(refChild);
if (index < 0) {
@@ -267,19 +267,19 @@ public class UAElement implements IUAElement {
return false;
}
}
- if (enablementExpression != null) {
- try {
+ if (enablementExpression != null) {
+ try {
return enablementExpression.evaluate(context) == EvaluationResult.TRUE;
} catch (CoreException e) {
return false;
}
- }
+ }
return true;
}
public void removeChild(UAElement elementToRemove) {
- element.removeChild(elementToRemove.element);
+ element.removeChild(elementToRemove.element);
elementToRemove.parent = null;
if (children != null) {
@@ -299,11 +299,11 @@ public class UAElement implements IUAElement {
Document ownerDocument = element.getOwnerDocument();
if (!ownerDocument.equals(elementToImport.getOwnerDocument()) ) {
elementToImport = (Element)ownerDocument.importNode(elementToImport, true);
- uaElementToImport.children = null;
+ uaElementToImport.children = null;
} else {
if (elementToImport.getParentNode() != null) {
elementToImport = (Element)ownerDocument.importNode(elementToImport, true);
- uaElementToImport.children = null;
+ uaElementToImport.children = null;
} else {
}
}
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/context/Context.java b/org.eclipse.help/src/org/eclipse/help/internal/context/Context.java
index 4766a313d..633cf731c 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/context/Context.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/context/Context.java
@@ -49,7 +49,7 @@ public class Context extends UAElement implements IContext3 {
}
public void mergeContext(IContext src) {
- String text = src.getText();
+ String text = src.getText();
if (getText() == null || getText().length() == 0) {
setText(text);
}
@@ -149,9 +149,9 @@ public class Context extends UAElement implements IContext3 {
node = node.getNextSibling();
}
if (text != null) {
- Document document = getElement().getOwnerDocument();
- Node description = getElement().appendChild(document.createElement(ELEMENT_DESCRIPTION));
- description.appendChild(document.createTextNode(text));
+ Document document = getElement().getOwnerDocument();
+ Node description = getElement().appendChild(document.createElement(ELEMENT_DESCRIPTION));
+ description.appendChild(document.createTextNode(text));
}
}
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/context/ContextFileProvider.java b/org.eclipse.help/src/org/eclipse/help/internal/context/ContextFileProvider.java
index c6f8a3463..3e8b01766 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/context/ContextFileProvider.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/context/ContextFileProvider.java
@@ -103,10 +103,10 @@ public class ContextFileProvider extends AbstractContextProvider {
default:
// Merge the contexts - this is the least common case
Context newContext = new Context(matches.get(0), shortContextId);
- for (int i = 1; i < matches.size(); i++) {
- newContext.mergeContext(matches.get(i));
- }
- return newContext;
+ for (int i = 1; i < matches.size(); i++) {
+ newContext.mergeContext(matches.get(i));
+ }
+ return newContext;
}
}
@@ -197,11 +197,11 @@ public class ContextFileProvider extends AbstractContextProvider {
private Map<String, Context> loadContexts(ContextFile descriptor, String locale) {
// load the file
try (InputStream in = ResourceLocator.openFromPlugin(descriptor.getBundleId(), descriptor.getFile(), locale)) {
- if (in != null) {
+ if (in != null) {
return loadContextsFromInputStream(descriptor, locale, in);
} else {
- throw new FileNotFoundException();
- }
+ throw new FileNotFoundException();
+ }
} catch (Throwable t) {
String msg = "Error reading context-sensitive help file /\"" + getErrorPath(descriptor, locale) + "\" (skipping file)"; //$NON-NLS-1$ //$NON-NLS-2$
HelpPlugin.logError(msg, t);
@@ -238,7 +238,7 @@ public class ContextFileProvider extends AbstractContextProvider {
if (id != null) {
Object existingContext = contexts.get(id);
if (existingContext==null)
- contexts.put(id, context);
+ contexts.put(id, context);
else
{
((Context)existingContext).mergeContext(context);
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionDocumentReader.java b/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionDocumentReader.java
index 278a31680..62724014b 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionDocumentReader.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionDocumentReader.java
@@ -46,7 +46,7 @@ public class CriteriaDefinitionDocumentReader extends DocumentReader {
fixCriterionId((Element)node);
}
prune(node);
- node = node.getNextSibling();
+ node = node.getNextSibling();
} else {
node = node.getNextSibling();
}
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFile.java b/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFile.java
index f46a1f25f..43c801dee 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFile.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFile.java
@@ -21,32 +21,32 @@ import org.eclipse.help.internal.util.ResourceLocator;
public class CriteriaDefinitionFile {
- private String pluginId;
- private String file;
- private String locale;
-
- public CriteriaDefinitionFile(String pluginId, String file, String locale) {
- this.pluginId = pluginId;
- this.file = file;
- this.locale = locale;
- }
-
- public String getFile() {
- return file;
- }
-
- public String getLocale() {
- return locale;
- }
-
- public String getPluginId() {
- return pluginId;
- }
-
- public InputStream getInputStream() throws IOException {
- if (pluginId != null)
- return ResourceLocator.openFromPlugin(pluginId, file, locale);
- else
- return new FileInputStream(file);
- }
+ private String pluginId;
+ private String file;
+ private String locale;
+
+ public CriteriaDefinitionFile(String pluginId, String file, String locale) {
+ this.pluginId = pluginId;
+ this.file = file;
+ this.locale = locale;
+ }
+
+ public String getFile() {
+ return file;
+ }
+
+ public String getLocale() {
+ return locale;
+ }
+
+ public String getPluginId() {
+ return pluginId;
+ }
+
+ public InputStream getInputStream() throws IOException {
+ if (pluginId != null)
+ return ResourceLocator.openFromPlugin(pluginId, file, locale);
+ else
+ return new FileInputStream(file);
+ }
}
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFileParser.java b/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFileParser.java
index 9a1b4ab1a..eedef31fa 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFileParser.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFileParser.java
@@ -26,7 +26,7 @@ public class CriteriaDefinitionFileParser {
private DocumentReader reader;
- public CriteriaDefinitionContribution parse(CriteriaDefinitionFile criteriaDefinitionFile) throws IOException, SAXException, ParserConfigurationException {
+ public CriteriaDefinitionContribution parse(CriteriaDefinitionFile criteriaDefinitionFile) throws IOException, SAXException, ParserConfigurationException {
if (reader == null) {
reader = new CriteriaDefinitionDocumentReader();
}
@@ -34,13 +34,13 @@ public class CriteriaDefinitionFileParser {
if (in != null) {
CriteriaDefinition criteria = (CriteriaDefinition)reader.read(in);
CriteriaDefinitionContribution contrib = new CriteriaDefinitionContribution();
- contrib.setId('/' + criteriaDefinitionFile.getPluginId() + '/' + criteriaDefinitionFile.getFile());
+ contrib.setId('/' + criteriaDefinitionFile.getPluginId() + '/' + criteriaDefinitionFile.getFile());
contrib.setCriteriaDefinition(criteria);
contrib.setLocale(criteriaDefinitionFile.getLocale());
return contrib;
}
- else {
- throw new FileNotFoundException();
- }
- }
+ else {
+ throw new FileNotFoundException();
+ }
+ }
}
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFileProvider.java b/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFileProvider.java
index b2da5d762..7bd8b4e45 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFileProvider.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFileProvider.java
@@ -49,17 +49,17 @@ public class CriteriaDefinitionFileProvider extends AbstractCriteriaDefinitionPr
StringBuilder buffer = new StringBuilder(ERROR_READING_HELP_CRITERIA_DEFINITION_FILE);
buffer.append(getCriteriaDefinitionFilePath(criteriaDefinitionFile));
buffer.append("\" at line "); //$NON-NLS-1$
- buffer.append(spe.getLineNumber());
- buffer.append(". "); //$NON-NLS-1$
- buffer.append(spe.getMessage());
+ buffer.append(spe.getLineNumber());
+ buffer.append(". "); //$NON-NLS-1$
+ buffer.append(spe.getMessage());
- // Use the contained exception.
- Exception x = spe;
- if (spe.getException() != null)
- x = spe.getException();
- HelpPlugin.logError(buffer.toString(), x);
+ // Use the contained exception.
+ Exception x = spe;
+ if (spe.getException() != null)
+ x = spe.getException();
+ HelpPlugin.logError(buffer.toString(), x);
- }
+ }
catch (Throwable t) {
String msg = ERROR_READING_HELP_CRITERIA_DEFINITION_FILE + getCriteriaDefinitionFilePath(criteriaDefinitionFile) + "\" (skipping file)"; //$NON-NLS-1$
HelpPlugin.logError(msg, t);
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionManager.java b/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionManager.java
index 492703591..8eafad296 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionManager.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionManager.java
@@ -47,7 +47,7 @@ public class CriteriaDefinitionManager {
HelpPlugin.getTocManager().getTocs(locale);
long start = System.currentTimeMillis();
if (HelpPlugin.DEBUG_CRITERIA) {
- System.out.println("Start to update criteria definition for locale " + locale); //$NON-NLS-1$
+ System.out.println("Start to update criteria definition for locale " + locale); //$NON-NLS-1$
}
List<CriteriaDefinitionContribution> contributions = new ArrayList<>(
Arrays.asList(readCriteriaDefinitionContributions(locale)));
@@ -56,7 +56,7 @@ public class CriteriaDefinitionManager {
criteriaDefinitionsByLocale.put(locale, criteriaDefinition);
long stop = System.currentTimeMillis();
if (HelpPlugin.DEBUG_CRITERIA) {
- System.out.println("Milliseconds to update criteria definition for locale " + locale + " = " + (stop - start)); //$NON-NLS-1$ //$NON-NLS-2$
+ System.out.println("Milliseconds to update criteria definition for locale " + locale + " = " + (stop - start)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
return criteriaDefinition;
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriterionResource.java b/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriterionResource.java
index ddc017e89..d585a621d 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriterionResource.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriterionResource.java
@@ -86,8 +86,8 @@ public class CriterionResource {
continue outer;
}
}
- CriterionResource criterionResource = new CriterionResource(elementName, values);
- criteriaList.add(criterionResource);
+ CriterionResource criterionResource = new CriterionResource(elementName, values);
+ criteriaList.add(criterionResource);
}
}
}
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/dynamic/DocumentReader.java b/org.eclipse.help/src/org/eclipse/help/internal/dynamic/DocumentReader.java
index ef39d88ae..2993f2437 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/dynamic/DocumentReader.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/dynamic/DocumentReader.java
@@ -73,7 +73,7 @@ public class DocumentReader {
cachedBuilder = createManagedBuilder();
}
cachedBuilder.inUse = true;
- return cachedBuilder;
+ return cachedBuilder;
}
private ManagedBuilder createManagedBuilder() throws FactoryConfigurationError, ParserConfigurationException {
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/dynamic/DocumentWriter.java b/org.eclipse.help/src/org/eclipse/help/internal/dynamic/DocumentWriter.java
index 9fd270b8e..eee912796 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/dynamic/DocumentWriter.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/dynamic/DocumentWriter.java
@@ -39,17 +39,17 @@ public class DocumentWriter {
}
public String writeString(Element element, boolean xmlDecl) throws TransformerException, TransformerConfigurationException {
- byte[] bytes = writeBytes(element, xmlDecl);
- String encoding = transformer.getOutputProperty(OutputKeys.ENCODING);
- if (encoding == null) {
- encoding = "UTF-8"; //$NON-NLS-1$
- }
- try {
- return new String(bytes, encoding);
- }
- catch (UnsupportedEncodingException e) {
- return new String(bytes);
- }
+ byte[] bytes = writeBytes(element, xmlDecl);
+ String encoding = transformer.getOutputProperty(OutputKeys.ENCODING);
+ if (encoding == null) {
+ encoding = "UTF-8"; //$NON-NLS-1$
+ }
+ try {
+ return new String(bytes, encoding);
+ }
+ catch (UnsupportedEncodingException e) {
+ return new String(bytes);
+ }
}
public byte[] writeBytes(UAElement element, boolean xmlDecl) throws TransformerException, TransformerConfigurationException {
@@ -59,8 +59,8 @@ public class DocumentWriter {
public byte[] writeBytes(Element element, boolean xmlDecl) throws TransformerException, TransformerConfigurationException {
Document document = element.getOwnerDocument();
if (transformer == null) {
- TransformerFactory factory = TransformerFactory.newInstance();
- transformer = factory.newTransformer();
+ TransformerFactory factory = TransformerFactory.newInstance();
+ transformer = factory.newTransformer();
transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
}
DocumentType docType = document.getDoctype();
@@ -77,9 +77,9 @@ public class DocumentWriter {
transformer.setOutputProperties(props);
DOMSource source = new DOMSource(element);
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- StreamResult result = new StreamResult(out);
- transformer.transform(source, result);
- return out.toByteArray();
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ StreamResult result = new StreamResult(out);
+ transformer.transform(source, result);
+ return out.toByteArray();
}
}
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/entityresolver/LocalEntityResolver.java b/org.eclipse.help/src/org/eclipse/help/internal/entityresolver/LocalEntityResolver.java
index 070957d4d..8c7f434ae 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/entityresolver/LocalEntityResolver.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/entityresolver/LocalEntityResolver.java
@@ -33,20 +33,20 @@ public class LocalEntityResolver implements EntityResolver {
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
int index = systemId.lastIndexOf("/"); //$NON-NLS-1$
if (index >= 0) {
- Bundle helpBundle = HelpPlugin.getDefault().getBundle();
- String dtdPath = "dtds/internal" + systemId.substring(index); //$NON-NLS-1$
- URL dtdURL = FileLocator.find(helpBundle, new Path(dtdPath), null);
- if (dtdURL != null) {
- InputStream stream = dtdURL.openStream();
- if (stream != null) {
+ Bundle helpBundle = HelpPlugin.getDefault().getBundle();
+ String dtdPath = "dtds/internal" + systemId.substring(index); //$NON-NLS-1$
+ URL dtdURL = FileLocator.find(helpBundle, new Path(dtdPath), null);
+ if (dtdURL != null) {
+ InputStream stream = dtdURL.openStream();
+ if (stream != null) {
InputSource is = new InputSource(stream);
- is.setSystemId(systemId);
- is.setPublicId(publicId);
+ is.setSystemId(systemId);
+ is.setPublicId(publicId);
return is;
}
- }
+ }
}
- return new InputSource(new StringReader("")); //$NON-NLS-1$
+ return new InputSource(new StringReader("")); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/extension/ContentExtensionFileParser.java b/org.eclipse.help/src/org/eclipse/help/internal/extension/ContentExtensionFileParser.java
index b4beb61ef..e14a375cb 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/extension/ContentExtensionFileParser.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/extension/ContentExtensionFileParser.java
@@ -47,10 +47,10 @@ public class ContentExtensionFileParser extends DefaultHandler {
/*
* Parses the specified content extension XML file into model elements.
*/
- public ContentExtension[] parse(Bundle bundle, String path) throws IOException, SAXException, ParserConfigurationException {
- if (reader == null) {
- reader = new DocumentReader();
- }
+ public ContentExtension[] parse(Bundle bundle, String path) throws IOException, SAXException, ParserConfigurationException {
+ if (reader == null) {
+ reader = new DocumentReader();
+ }
URL url= FileLocator.find(bundle, new Path(path), null);
if (url != null) {
InputStream in = url.openStream();
@@ -64,12 +64,12 @@ public class ContentExtensionFileParser extends DefaultHandler {
IUAElement[] children = extension.getChildren();
ContentExtension[] result = new ContentExtension[children.length];
System.arraycopy(children, 0, result, 0, children.length);
- return result;
+ return result;
}
else {
throw new FileNotFoundException();
}
- }
+ }
private Map<String, String[]> getRequiredAttributes() {
if (requiredAttributes == null) {
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/index/IndexAssembler.java b/org.eclipse.help/src/org/eclipse/help/internal/index/IndexAssembler.java
index 490a3a711..c7b5d6930 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/index/IndexAssembler.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/index/IndexAssembler.java
@@ -221,7 +221,7 @@ public class IndexAssembler {
}
String title = element.getAttribute("title"); //$NON-NLS-1$
if (title != null) {
- topic.setLabel(title);
+ topic.setLabel(title);
}
}
return UNHANDLED;
@@ -240,9 +240,9 @@ public class IndexAssembler {
int c1 = getCategory(o1);
int c2 = getCategory(o2);
if (c1 == c2) {
- if (o1 instanceof IndexSee) {
- return ((IndexSee)o1).compareTo(o2);
- }
+ if (o1 instanceof IndexSee) {
+ return ((IndexSee)o1).compareTo(o2);
+ }
// same type of object; compare alphabetically
String s1 = getLabel(o1);
String s2 = getLabel(o2);
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/index/IndexDocumentReader.java b/org.eclipse.help/src/org/eclipse/help/internal/index/IndexDocumentReader.java
index a35976f73..f5d831456 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/index/IndexDocumentReader.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/index/IndexDocumentReader.java
@@ -42,7 +42,7 @@ public class IndexDocumentReader extends DocumentReader {
fixTopicAttributes((Element)node);
}
prune(node);
- node = node.getNextSibling();
+ node = node.getNextSibling();
} else {
node = node.getNextSibling();
}
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFile.java b/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFile.java
index d97febe73..2aca05fa7 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFile.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFile.java
@@ -22,32 +22,32 @@ import org.eclipse.help.internal.util.ResourceLocator;
public class IndexFile {
- private String pluginId;
- private String file;
- private String locale;
-
- public IndexFile(String pluginId, String file, String locale) {
- this.pluginId = pluginId;
- this.file = file;
- this.locale = locale;
- }
-
- public String getFile() {
- return file;
- }
-
- public String getLocale() {
- return locale;
- }
-
- public String getPluginId() {
- return pluginId;
- }
-
- public InputStream getInputStream() throws IOException {
- if (pluginId != null)
- return ResourceLocator.openFromPlugin(pluginId, file, locale);
- else
- return new FileInputStream(file);
- }
+ private String pluginId;
+ private String file;
+ private String locale;
+
+ public IndexFile(String pluginId, String file, String locale) {
+ this.pluginId = pluginId;
+ this.file = file;
+ this.locale = locale;
+ }
+
+ public String getFile() {
+ return file;
+ }
+
+ public String getLocale() {
+ return locale;
+ }
+
+ public String getPluginId() {
+ return pluginId;
+ }
+
+ public InputStream getInputStream() throws IOException {
+ if (pluginId != null)
+ return ResourceLocator.openFromPlugin(pluginId, file, locale);
+ else
+ return new FileInputStream(file);
+ }
}
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFileParser.java b/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFileParser.java
index 94440371c..ccdd18047 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFileParser.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFileParser.java
@@ -29,7 +29,7 @@ public class IndexFileParser {
private DocumentReader reader;
- public IndexContribution parse(IndexFile indexFile) throws IOException, SAXException, ParserConfigurationException {
+ public IndexContribution parse(IndexFile indexFile) throws IOException, SAXException, ParserConfigurationException {
if (reader == null) {
reader = new IndexDocumentReader();
}
@@ -45,5 +45,5 @@ public class IndexFileParser {
throw new FileNotFoundException();
}
}
- }
+ }
}
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFileProvider.java b/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFileProvider.java
index 5db130a5b..d08483f9a 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFileProvider.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFileProvider.java
@@ -49,17 +49,17 @@ public class IndexFileProvider extends AbstractIndexProvider {
StringBuilder buffer = new StringBuilder(ERROR_READING_HELP_KEYWORD_INDEX_FILE);
buffer.append(getIndexFilePath(indexFile));
buffer.append("\" at line "); //$NON-NLS-1$
- buffer.append(spe.getLineNumber());
- buffer.append(". "); //$NON-NLS-1$
- buffer.append(spe.getMessage());
+ buffer.append(spe.getLineNumber());
+ buffer.append(". "); //$NON-NLS-1$
+ buffer.append(spe.getMessage());
- // Use the contained exception.
- Exception x = spe;
- if (spe.getException() != null)
- x = spe.getException();
- HelpPlugin.logError(buffer.toString(), x);
+ // Use the contained exception.
+ Exception x = spe;
+ if (spe.getException() != null)
+ x = spe.getException();
+ HelpPlugin.logError(buffer.toString(), x);
- }
+ }
catch (Throwable t) {
String msg = ERROR_READING_HELP_KEYWORD_INDEX_FILE + getIndexFilePath(indexFile) + "\" (skipping file)"; //$NON-NLS-1$
HelpPlugin.logError(msg, t);
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/index/IndexManager.java b/org.eclipse.help/src/org/eclipse/help/internal/index/IndexManager.java
index 45e3adcd9..3e189fb6f 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/index/IndexManager.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/index/IndexManager.java
@@ -53,7 +53,7 @@ public class IndexManager {
HelpPlugin.getTocManager().getTocs(locale); // Ensure Tocs and index not built simultaneously
long start = System.currentTimeMillis();
if (HelpPlugin.DEBUG_INDEX) {
- System.out.println("Start to update keyword index for locale " + locale); //$NON-NLS-1$
+ System.out.println("Start to update keyword index for locale " + locale); //$NON-NLS-1$
}
List<IndexContribution> contributions = new ArrayList<>(Arrays.asList(readIndexContributions(locale)));
filterIndexContributions(contributions);
@@ -62,7 +62,7 @@ public class IndexManager {
indexesByLocale.put(locale, index);
long stop = System.currentTimeMillis();
if (HelpPlugin.DEBUG_INDEX) {
- System.out.println("Milliseconds to update keyword index for locale " + locale + " = " + (stop - start)); //$NON-NLS-1$ //$NON-NLS-2$
+ System.out.println("Milliseconds to update keyword index for locale " + locale + " = " + (stop - start)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
return index;
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/index/IndexSee.java b/org.eclipse.help/src/org/eclipse/help/internal/index/IndexSee.java
index a61729577..b8aef0232 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/index/IndexSee.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/index/IndexSee.java
@@ -79,9 +79,9 @@ public class IndexSee extends UAElement implements IIndexSee, Comparable<Object>
if (i >= targetPath.length) {
return 1;
}
- if (getCategory(path[i]) != getCategory(targetPath[i])) {
- return getCategory(path[i]) - getCategory(targetPath[i]);
- }
+ if (getCategory(path[i]) != getCategory(targetPath[i])) {
+ return getCategory(path[i]) - getCategory(targetPath[i]);
+ }
int result = collator.compare(path[i], targetPath[i]);
if (result != 0) {
return result;
@@ -105,7 +105,7 @@ public class IndexSee extends UAElement implements IIndexSee, Comparable<Object>
result += subpaths[i].getKeyword().hashCode();
}
return result;
- }
+ }
@Override
public boolean isSeeAlso() {
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/toc/TocAssembler.java b/org.eclipse.help/src/org/eclipse/help/internal/toc/TocAssembler.java
index ec267bc47..0cfcff221 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/toc/TocAssembler.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/toc/TocAssembler.java
@@ -104,15 +104,15 @@ public class TocAssembler {
boolean isLinkedId = linkedContributionIds.containsKey(contrib.getId());
if (!isValidLinkTo && !isLinkedId) {
if (contrib.isPrimary()) {
- books.add(contrib);
- if (HelpPlugin.DEBUG_TOC) {
+ books.add(contrib);
+ if (HelpPlugin.DEBUG_TOC) {
String msg = "Primary Toc Found: " + contrib.getId(); //$NON-NLS-1$
String linkTo = contrib.getLinkTo();
if (linkTo != null) {
msg += " - cannot find link to: "; //$NON-NLS-1$
msg += linkTo;
}
- System.out.println(msg);
+ System.out.println(msg);
}
} else {
if (HelpPlugin.DEBUG_TOC) {
@@ -171,7 +171,7 @@ public class TocAssembler {
try {
String id = contrib.getId();
if (!tocsToFilter.contains(id)) {
- processor.process((Toc)contrib.getToc(), id);
+ processor.process((Toc)contrib.getToc(), id);
}
}
catch (Throwable t) {
@@ -389,7 +389,7 @@ public class TocAssembler {
if (element instanceof Anchor) {
if (tocsToFilter.contains(id)) {
return UNHANDLED;
- }
+ }
Anchor anchor = (Anchor)element;
UAElement parent = anchor.getParentElement();
if (parent != null) {
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileParser.java b/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileParser.java
index 42231918e..5cb49fd22 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileParser.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileParser.java
@@ -47,5 +47,5 @@ public class TocFileParser extends DefaultHandler {
throw new FileNotFoundException();
}
}
- }
+ }
}
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileProvider.java b/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileProvider.java
index 6e8a4716f..fe992d1ba 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileProvider.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileProvider.java
@@ -53,7 +53,7 @@ public class TocFileProvider extends AbstractTocProvider {
if (t instanceof SAXParseException) {
SAXParseException spe = (SAXParseException) t;
locationInfo = " at line " + spe.getLineNumber() //$NON-NLS-1$
- + ", column " + spe.getColumnNumber(); //$NON-NLS-1$
+ + ", column " + spe.getColumnNumber(); //$NON-NLS-1$
}
String pluginId = tocFiles[i].getPluginId();
String file = tocFiles[i].getFile();
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/toc/TocManager.java b/org.eclipse.help/src/org/eclipse/help/internal/toc/TocManager.java
index a6138c769..d7f9a6631 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/toc/TocManager.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/toc/TocManager.java
@@ -65,7 +65,7 @@ public class TocManager {
if (tocs == null) {
long start = System.currentTimeMillis();
if (HelpPlugin.DEBUG_TOC) {
- System.out.println("Start to build toc for locale " + locale); //$NON-NLS-1$
+ System.out.println("Start to build toc for locale " + locale); //$NON-NLS-1$
}
Set<String> tocsToFilter = getIgnoredTocContributions();
TocContribution[] raw = getRootTocContributions(locale, tocsToFilter);
@@ -92,7 +92,7 @@ public class TocManager {
tocsByLocale.put(locale, tocs);
long stop = System.currentTimeMillis();
if (HelpPlugin.DEBUG_TOC) {
- System.out.println("Milliseconds to update toc for locale " + locale + " = " + (stop - start)); //$NON-NLS-1$ //$NON-NLS-2$
+ System.out.println("Milliseconds to update toc for locale " + locale + " = " + (stop - start)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
return tocs;
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/toc/TocSorter.java b/org.eclipse.help/src/org/eclipse/help/internal/toc/TocSorter.java
index 1583d1948..46f92a153 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/toc/TocSorter.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/toc/TocSorter.java
@@ -80,7 +80,7 @@ public class TocSorter {
}
map.put(key, toc.getToc().getLabel());
}
- return map;
+ return map;
}
/*
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/toc/TopicSorter.java b/org.eclipse.help/src/org/eclipse/help/internal/toc/TopicSorter.java
index d203cb9fd..333638c97 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/toc/TopicSorter.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/toc/TopicSorter.java
@@ -35,7 +35,7 @@ public class TopicSorter {
}
if (toc.isSorted()) {
sort(toc, toc.getTopics());
- }
+ }
ITopic[] childTopics = toc.getTopics();
for (int i = 0; i < childTopics.length; i++) {
sortChildren((Topic)childTopics[i]);
@@ -45,7 +45,7 @@ public class TopicSorter {
private void sortChildren(Topic topic) {
if (topic.isSorted()) {
sort(topic, topic.getSubtopics());
- }
+ }
ITopic[] childTopics = topic.getSubtopics();
for (int i = 0; i < childTopics.length; i++) {
sortChildren((Topic)childTopics[i]);
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/util/ProductPreferences.java b/org.eclipse.help/src/org/eclipse/help/internal/util/ProductPreferences.java
index 02728b239..3062c59b4 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/util/ProductPreferences.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/util/ProductPreferences.java
@@ -133,7 +133,7 @@ public class ProductPreferences {
int nextSlash = helpDataFile.indexOf('/', PLUGINS_ROOT_SLASH.length());
if (nextSlash > 0) {
helpDataPluginId = helpDataFile.substring(PLUGINS_ROOT_SLASH.length(), nextSlash);
- helpDataPath = helpDataFile.substring(nextSlash + 1);
+ helpDataPath = helpDataFile.substring(nextSlash + 1);
}
}
Bundle bundle = null;
@@ -141,9 +141,9 @@ public class ProductPreferences {
bundle = Platform.getBundle(helpDataPluginId);
}
if (bundle != null) {
- URL helpDataUrl = bundle.getEntry(helpDataPath);
- HelpData helpData = new HelpData(helpDataUrl);
- return helpData.getTocOrder();
+ URL helpDataUrl = bundle.getEntry(helpDataPath);
+ HelpData helpData = new HelpData(helpDataUrl);
+ return helpData.getTocOrder();
}
}
else {
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/util/ResourceLocator.java b/org.eclipse.help/src/org/eclipse/help/internal/util/ResourceLocator.java
index f8cf41923..4a57d21e1 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/util/ResourceLocator.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/util/ResourceLocator.java
@@ -152,7 +152,7 @@ public class ResourceLocator {
return null;
}
- checkForDuplicateExtensionElements(elements);
+ checkForDuplicateExtensionElements(elements);
for (int i = 0; i < elements.length; i++) {
IConfigurationElement element = elements[i];
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/util/URLCoder.java b/org.eclipse.help/src/org/eclipse/help/internal/util/URLCoder.java
index 97dd70c2e..b94b6d33b 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/util/URLCoder.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/util/URLCoder.java
@@ -47,7 +47,7 @@ public class URLCoder {
private static boolean isAlphaNumericOrDot(byte b) {
return (b >= '0' && b <= '9') || (b >= 'a' && b <= 'z') || ( b >= 'A' && b <= 'Z')
- || b == '.';
+ || b == '.';
}
private static byte[] urlDecode(String encodedURL) {
diff --git a/org.eclipse.ua.tests.doc/META-INF/MANIFEST.MF b/org.eclipse.ua.tests.doc/META-INF/MANIFEST.MF
index f4f3d7c6b..3cbb41688 100644
--- a/org.eclipse.ua.tests.doc/META-INF/MANIFEST.MF
+++ b/org.eclipse.ua.tests.doc/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Doc
Bundle-SymbolicName: org.eclipse.ua.tests.doc;singleton:=true
-Bundle-Version: 1.0.600.qualifier
+Bundle-Version: 1.0.700.qualifier
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.equinox.http.registry;bundle-version="1.0.200",
diff --git a/org.eclipse.ua.tests.doc/pom.xml b/org.eclipse.ua.tests.doc/pom.xml
index 781c9dc19..5c24c5d3f 100644
--- a/org.eclipse.ua.tests.doc/pom.xml
+++ b/org.eclipse.ua.tests.doc/pom.xml
@@ -19,7 +19,7 @@
</parent>
<groupId>org.eclipse.ua</groupId>
<artifactId>org.eclipse.ua.tests.doc</artifactId>
- <version>1.0.600-SNAPSHOT</version>
+ <version>1.0.700-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
diff --git a/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/actions/CheckLinkAction.java b/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/actions/CheckLinkAction.java
index 37cfd5092..7605b5f36 100644
--- a/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/actions/CheckLinkAction.java
+++ b/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/actions/CheckLinkAction.java
@@ -84,17 +84,17 @@ public class CheckLinkAction implements ILiveHelpAction {
if (!opened) {
String containingPage = links.get(next);
System.out.println("Cannot open link from " + trimPath(containingPage)
- + " to " + trimPath(next));
+ + " to " + trimPath(next));
}
}
//EclipseConnector.setNotFoundCallout(null);
- setPageNotFoundPreference(errorPage);
+ setPageNotFoundPreference(errorPage);
links = new HashMap<>();
System.out.println("End check links");
}
private String trimPath(String next) {
- String result = next;
+ String result = next;
int htIndex = result.indexOf(HELP_TOPIC);
if (htIndex > 0) {
result = result.substring(htIndex + HELP_TOPIC.length());
diff --git a/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/actions/CheckTocAction.java b/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/actions/CheckTocAction.java
index ae6674eb3..62cc9b4f7 100644
--- a/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/actions/CheckTocAction.java
+++ b/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/actions/CheckTocAction.java
@@ -32,11 +32,11 @@ public class CheckTocAction implements IWorkbenchWindowActionDelegate {
private IWorkbenchWindow window;
public static List<BrokenLink> errors = new ArrayList<>();
- public static void showErrors() {
- if (errors.size() == 0) {
- reportStatus("No errors detected in load");
- }
- for (int i = 0; i < errors.size(); i++) {
+ public static void showErrors() {
+ if (errors.size() == 0) {
+ reportStatus("No errors detected in load");
+ }
+ for (int i = 0; i < errors.size(); i++) {
BrokenLink link = errors.get(i);
reportStatus("Invalid link in \"" + link.getTocID() + "\": " + link.getHref());
}
@@ -67,7 +67,7 @@ public class CheckTocAction implements IWorkbenchWindowActionDelegate {
return;
}
Toc[] tocsToCheck = dlg.getTocsToCheck();
- checkTocFilesExist(tocsToCheck);
+ checkTocFilesExist(tocsToCheck);
}
diff --git a/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/actions/LoadTocAction.java b/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/actions/LoadTocAction.java
index ec5cd8803..f75f4ca4c 100644
--- a/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/actions/LoadTocAction.java
+++ b/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/actions/LoadTocAction.java
@@ -48,7 +48,7 @@ public class LoadTocAction implements IWorkbenchWindowActionDelegate {
private static List<String> errors = new ArrayList<>();
private String lastPage;
- private class MonitorThread extends Thread {
+ private class MonitorThread extends Thread {
String lastHref;
int timesSame = 0;
boolean isComplete = false;
@@ -77,7 +77,7 @@ public class LoadTocAction implements IWorkbenchWindowActionDelegate {
}
}
- public static void showErrors() {
+ public static void showErrors() {
if (errors == null) return;
if (errors.size() == 0) {
reportStatus("Testing complete, no errors found");
@@ -101,7 +101,7 @@ public class LoadTocAction implements IWorkbenchWindowActionDelegate {
@Override
public void notFound(String url) {
if (errors != null) {
- errors.add("Error opening " + lastPage + "\n cannot load " + url);
+ errors.add("Error opening " + lastPage + "\n cannot load " + url);
}
}
}
@@ -183,9 +183,9 @@ public class LoadTocAction implements IWorkbenchWindowActionDelegate {
firstHref = null;
topicList = new ArrayList<>();
for (Toc toc : tocsToCheck) {
- reportStatus("Test level = " + testKind + " testing " + toc.getTocContribution().getId());
- ITopic[] topics = toc.getTopics();
- addTopics(topics);
+ reportStatus("Test level = " + testKind + " testing " + toc.getTocContribution().getId());
+ ITopic[] topics = toc.getTopics();
+ addTopics(topics);
}
lastPage = "No pages read";
LinkProvider linkProvider = new LinkProvider(topicList);
@@ -194,7 +194,7 @@ public class LoadTocAction implements IWorkbenchWindowActionDelegate {
errors = new ArrayList<>();
if (linkProvider.hasNext()) {
firstHref = linkProvider.next();
- PlatformUI.getWorkbench().getHelpSystem().displayHelpResource(firstHref);
+ PlatformUI.getWorkbench().getHelpSystem().displayHelpResource(firstHref);
new MonitorThread().start();
} else {
reportStatus("No pages to check");
@@ -210,10 +210,10 @@ public class LoadTocAction implements IWorkbenchWindowActionDelegate {
private void addTopic(ITopic nextTopic) {
String href = nextTopic.getHref();
if (href != null && !isFiltered(href)) {
- if (firstHref == null) {
- firstHref = href;
- }
- topicList.add(href);
+ if (firstHref == null) {
+ firstHref = href;
+ }
+ topicList.add(href);
}
addTopics(nextTopic.getSubtopics());
}
diff --git a/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/dialogs/SelectTocDialog.java b/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/dialogs/SelectTocDialog.java
index 1a72904a3..248ae8d6e 100644
--- a/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/dialogs/SelectTocDialog.java
+++ b/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/dialogs/SelectTocDialog.java
@@ -99,7 +99,7 @@ public class SelectTocDialog extends Dialog {
public Toc[] getTocsToCheck() {
ArrayList<Toc> selected = new ArrayList<>();
for (int selectedToc : selectedTocs) {
- selected.add(tocs[selectedToc]);
+ selected.add(tocs[selectedToc]);
}
Toc[] tocsToCheck = selected.toArray(new Toc[0]) ;
return tocsToCheck;
diff --git a/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/linkchecker/OnLoadFilter.java b/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/linkchecker/OnLoadFilter.java
index 895605e78..e5cbdda47 100644
--- a/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/linkchecker/OnLoadFilter.java
+++ b/org.eclipse.ua.tests.doc/src/org/eclipse/ua/tests/doc/internal/linkchecker/OnLoadFilter.java
@@ -28,7 +28,7 @@ public class OnLoadFilter implements IFilter {
private static long uniqueId = 0;
- private class OutFilter extends OutputStream {
+ private class OutFilter extends OutputStream {
private OutputStream out;
@@ -45,41 +45,41 @@ public class OnLoadFilter implements IFilter {
state = 3;
} else if (state == 3 && (b == 'd' || b == 'D')) {
state = 4;
- } else if (state == 4 && (b == 'y' || b == 'Y')) {
- state = 20;
- out.write(b);
- if (linkProvider.hasNext()) {
- String location = linkProvider.next();
- String onload = getOnloadText(pathPrefix + location, testKind);
- out.write(onload.getBytes());
- //System.out.println("Onload = " + onload);
- } else {
- linkProvider = null;
- String announceComplete = getCompletionText(testKind);
- out.write(announceComplete.getBytes());
- //System.out.println("announceComplete = " + announceComplete);
- }
- } else if (state == 20 && b == '>') {
- state = 21;
- } else if (state == 1 && (b == 'h' || b == 'H')) {
+ } else if (state == 4 && (b == 'y' || b == 'Y')) {
+ state = 20;
+ out.write(b);
+ if (linkProvider.hasNext()) {
+ String location = linkProvider.next();
+ String onload = getOnloadText(pathPrefix + location, testKind);
+ out.write(onload.getBytes());
+ //System.out.println("Onload = " + onload);
+ } else {
+ linkProvider = null;
+ String announceComplete = getCompletionText(testKind);
+ out.write(announceComplete.getBytes());
+ //System.out.println("announceComplete = " + announceComplete);
+ }
+ } else if (state == 20 && b == '>') {
+ state = 21;
+ } else if (state == 1 && (b == 'h' || b == 'H')) {
state = 11;
- } else if (state == 11 && (b == 'e' || b == 'e')) {
+ } else if (state == 11 && (b == 'e' || b == 'e')) {
state = 12;
- } else if (state == 12 && (b == 'a' || b == 'a')) {
+ } else if (state == 12 && (b == 'a' || b == 'a')) {
state = 13;
- } else if (state == 13 && (b == 'm' || b == 'M')) {
+ } else if (state == 13 && (b == 'm' || b == 'M')) {
state = 14;
- } else if (state == 14 && (b == 'e' || b == 'E')) {
+ } else if (state == 14 && (b == 'e' || b == 'E')) {
state = 15;
- } else if (state == 15 && (b == 's' || b == 'S')) {
+ } else if (state == 15 && (b == 's' || b == 'S')) {
state = 16;
- } else if (state == 16 && (b == 'e' || b == 'E')) {
+ } else if (state == 16 && (b == 'e' || b == 'E')) {
state = 17;
- } else if (state == 17 && (b == 't' || b == 'T')) {
+ } else if (state == 17 && (b == 't' || b == 'T')) {
state = 20;
- } else if (state > 0 && state < 20) {
- state = 0;
- }
+ } else if (state > 0 && state < 20) {
+ state = 0;
+ }
}
private String getOnloadText(String location, int testKind) {
@@ -102,7 +102,7 @@ public class OnLoadFilter implements IFilter {
private String getCompletionText(int testKind) {
if (testKind == SelectTocDialog.FOLLOW_LINKS) {
- return " onload = \"ua_test_doc_check_links();\" ";
+ return " onload = \"ua_test_doc_check_links();\" ";
} else {
return " onload = \"ua_test_doc_complete();\" ";
}
@@ -117,7 +117,7 @@ public class OnLoadFilter implements IFilter {
public void write(int b) throws IOException {
updateState(b);
if (state != 20) {
- out.write(b);
+ out.write(b);
}
}
@@ -130,11 +130,11 @@ public class OnLoadFilter implements IFilter {
private int testKind;
- public OnLoadFilter(int testKind) {
- this.testKind = testKind;
- }
+ public OnLoadFilter(int testKind) {
+ this.testKind = testKind;
+ }
- private static Iterator<String> linkProvider;
+ private static Iterator<String> linkProvider;
protected String getCommentText() {
return "comment";
@@ -147,7 +147,7 @@ public class OnLoadFilter implements IFilter {
}
String pathPrefix = FilterUtils.getRelativePathPrefix(req);
if (pathPrefix.length() >= 4) {
- return new OutFilter(out, pathPrefix.substring(0, pathPrefix.length() - 4));
+ return new OutFilter(out, pathPrefix.substring(0, pathPrefix.length() - 4));
}
return new OutFilter(out, "PLUGINS_ROOT");
}
diff --git a/org.eclipse.ua.tests/base/org/eclipse/ua/tests/AllPerformanceTests.java b/org.eclipse.ua.tests/base/org/eclipse/ua/tests/AllPerformanceTests.java
index be483455f..b889a113f 100644
--- a/org.eclipse.ua.tests/base/org/eclipse/ua/tests/AllPerformanceTests.java
+++ b/org.eclipse.ua.tests/base/org/eclipse/ua/tests/AllPerformanceTests.java
@@ -36,7 +36,7 @@ public class AllPerformanceTests extends TestSuite {
*/
public AllPerformanceTests() {
addTest(AllCheatSheetPerformanceTests.suite());
- addTest(AllHelpPerformanceTests.suite());
+ addTest(AllHelpPerformanceTests.suite());
/*
* Disabled due to inability to backport test to 3.2. Internal
diff --git a/org.eclipse.ua.tests/base/org/eclipse/ua/tests/util/UATestContentProducer.java b/org.eclipse.ua.tests/base/org/eclipse/ua/tests/util/UATestContentProducer.java
index c86ad2519..9921b6163 100644
--- a/org.eclipse.ua.tests/base/org/eclipse/ua/tests/util/UATestContentProducer.java
+++ b/org.eclipse.ua.tests/base/org/eclipse/ua/tests/util/UATestContentProducer.java
@@ -42,7 +42,7 @@ public class UATestContentProducer implements IHelpContentProducer {
String result = "<head><title>";
result += filterNonAlpha(URLCoder.decode(title));
result += "</title></head><body>";
- result +=filterNonAlpha(URLCoder.decode(body));
+ result +=filterNonAlpha(URLCoder.decode(body));
result += "</body>";
return new ByteArrayInputStream(result.getBytes());
}
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCompositeParser.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCompositeParser.java
index 7c521db12..d23ba404c 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCompositeParser.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCompositeParser.java
@@ -43,12 +43,12 @@ public class TestCompositeParser {
@Before
public void setUp() throws Exception {
- parser = new CompositeCheatSheetParser();
+ parser = new CompositeCheatSheetParser();
}
private CompositeCheatSheetModel parseTestFile(String path) {
URL testURL = ResourceFinder.findFile(UserAssistanceTestPlugin.getDefault(),
- COMPOSITES_FOLDER + path);
+ COMPOSITES_FOLDER + path);
return parser.parseGuide(testURL);
}
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestMarkupParser.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestMarkupParser.java
index 80b3f8d73..ad109e629 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestMarkupParser.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestMarkupParser.java
@@ -35,7 +35,7 @@ public class TestMarkupParser {
StringReader reader = new StringReader(input);
InputSource source = new InputSource(reader);
- DocumentBuilder documentBuilder = CheatSheetPlugin.getPlugin()
+ DocumentBuilder documentBuilder = CheatSheetPlugin.getPlugin()
.getDocumentBuilder();
try {
return documentBuilder.parse(source);
@@ -84,7 +84,7 @@ public class TestMarkupParser {
@Test
public void testAttributes() {
assertEquals("a<b attr1 = \"true\" attr2 = \"false\">c</b>d<b>e</b>",
- parse("<root>a<b attr1 = \"true\" attr2=\"false\">c</b>d<b>e</b></root>"));
+ parse("<root>a<b attr1 = \"true\" attr2=\"false\">c</b>d<b>e</b></root>"));
}
@Test
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestPersistence.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestPersistence.java
index f251b4f5c..9d2158ec0 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestPersistence.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestPersistence.java
@@ -78,83 +78,83 @@ public class TestPersistence {
* mementos to different files and keep the contents distinct.
*/
@Test
- public void testMementoSaveMultipleFiles() {
- XMLMemento memento = XMLMemento.createWriteRoot(MEMENTO_TAG);
- memento.putString(KEY, DATA1);
- CheatSheetPlugin cheatSheetPlugin = CheatSheetPlugin.getPlugin();
+ public void testMementoSaveMultipleFiles() {
+ XMLMemento memento = XMLMemento.createWriteRoot(MEMENTO_TAG);
+ memento.putString(KEY, DATA1);
+ CheatSheetPlugin cheatSheetPlugin = CheatSheetPlugin.getPlugin();
IStatus status = cheatSheetPlugin.saveMemento(memento, PATH1);
- assertTrue(status.isOK());
- memento = XMLMemento.createWriteRoot(MEMENTO_TAG);
- memento.putString(KEY, DATA2);
- status = cheatSheetPlugin.saveMemento(memento, PATH2);
- assertTrue(status.isOK());
- memento = cheatSheetPlugin.readMemento(PATH1);
- assertEquals(DATA1, memento.getString(KEY));
- memento = cheatSheetPlugin.readMemento(PATH2);
- assertEquals(DATA2, memento.getString(KEY));
- }
+ assertTrue(status.isOK());
+ memento = XMLMemento.createWriteRoot(MEMENTO_TAG);
+ memento.putString(KEY, DATA2);
+ status = cheatSheetPlugin.saveMemento(memento, PATH2);
+ assertTrue(status.isOK());
+ memento = cheatSheetPlugin.readMemento(PATH1);
+ assertEquals(DATA1, memento.getString(KEY));
+ memento = cheatSheetPlugin.readMemento(PATH2);
+ assertEquals(DATA2, memento.getString(KEY));
+ }
@Test
- public void testSaveTaskState() {
- createCompositeCheatSheet();
- task1.setState(ICompositeCheatSheetTask.IN_PROGRESS);
- task2.setState(ICompositeCheatSheetTask.COMPLETED);
- helper.saveCompositeState(model, null);
-
- createCompositeCheatSheet();
- model.loadState(new Hashtable<String, String>());
- assertEquals(ICompositeCheatSheetTask.IN_PROGRESS, task1.getState());
- assertEquals(ICompositeCheatSheetTask.COMPLETED, task2.getState());
- }
-
- /**
- * Test that each task can save its state in a memento and that state
- * can be restored.
- */
+ public void testSaveTaskState() {
+ createCompositeCheatSheet();
+ task1.setState(ICompositeCheatSheetTask.IN_PROGRESS);
+ task2.setState(ICompositeCheatSheetTask.COMPLETED);
+ helper.saveCompositeState(model, null);
+
+ createCompositeCheatSheet();
+ model.loadState(new Hashtable<String, String>());
+ assertEquals(ICompositeCheatSheetTask.IN_PROGRESS, task1.getState());
+ assertEquals(ICompositeCheatSheetTask.COMPLETED, task2.getState());
+ }
+
+ /**
+ * Test that each task can save its state in a memento and that state
+ * can be restored.
+ */
@Test
- public void testSaveTaskMemento() {
- final String value1 = "13579";
- final String value2 = "AB24";
- createCompositeCheatSheet();
- // Start tasks with no memento
- task1.setState(ICompositeCheatSheetTask.COMPLETED);
- task2.setState(ICompositeCheatSheetTask.IN_PROGRESS);
- editor1.setInput(task1, null);
- editor2.setInput(task2, null);
- assertEquals(MockTaskEditor.NO_MEMENTO, editor1.getValue());
- assertEquals(MockTaskEditor.NO_MEMENTO, editor2.getValue());
-
- // Set the values to save in the memento
- editor1.setValue(value1);
- editor2.setValue(value2);
- task1.setState(ICompositeCheatSheetTask.COMPLETED);
- task2.setState(ICompositeCheatSheetTask.IN_PROGRESS);
- helper.saveCompositeState(model, null);
-
- createCompositeCheatSheet();
- model.loadState(new Hashtable<String, String>());
- editor1.setInput(task1, model.getTaskMemento(task1.getId()));
- editor2.setInput(task2, model.getTaskMemento(task2.getId()));
- assertEquals(value1, editor1.getValue());
- assertEquals(value2, editor2.getValue());
- }
-
- /**
- * Test that layout data is restored
- */
+ public void testSaveTaskMemento() {
+ final String value1 = "13579";
+ final String value2 = "AB24";
+ createCompositeCheatSheet();
+ // Start tasks with no memento
+ task1.setState(ICompositeCheatSheetTask.COMPLETED);
+ task2.setState(ICompositeCheatSheetTask.IN_PROGRESS);
+ editor1.setInput(task1, null);
+ editor2.setInput(task2, null);
+ assertEquals(MockTaskEditor.NO_MEMENTO, editor1.getValue());
+ assertEquals(MockTaskEditor.NO_MEMENTO, editor2.getValue());
+
+ // Set the values to save in the memento
+ editor1.setValue(value1);
+ editor2.setValue(value2);
+ task1.setState(ICompositeCheatSheetTask.COMPLETED);
+ task2.setState(ICompositeCheatSheetTask.IN_PROGRESS);
+ helper.saveCompositeState(model, null);
+
+ createCompositeCheatSheet();
+ model.loadState(new Hashtable<String, String>());
+ editor1.setInput(task1, model.getTaskMemento(task1.getId()));
+ editor2.setInput(task2, model.getTaskMemento(task2.getId()));
+ assertEquals(value1, editor1.getValue());
+ assertEquals(value2, editor2.getValue());
+ }
+
+ /**
+ * Test that layout data is restored
+ */
@Test
- public void testSaveLayoutData() {
- createCompositeCheatSheet();
+ public void testSaveLayoutData() {
+ createCompositeCheatSheet();
Map<String, String> values = new Hashtable<>();
- values.put("One", "1");
- values.put("Two", "2");
- helper.saveCompositeState(model, values);
+ values.put("One", "1");
+ values.put("Two", "2");
+ helper.saveCompositeState(model, values);
Map<String, String> restoredValues = new Hashtable<>();
- createCompositeCheatSheet();
- model.loadState(restoredValues);
- assertEquals(2, restoredValues.size());
- assertEquals("1", values.get("One"));
- assertEquals("2", values.get("Two"));
- }
+ createCompositeCheatSheet();
+ model.loadState(restoredValues);
+ assertEquals(2, restoredValues.size());
+ assertEquals("1", values.get("One"));
+ assertEquals("2", values.get("Two"));
+ }
}
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestSuccessors.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestSuccessors.java
index 4b44edd24..a26c4d75e 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestSuccessors.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestSuccessors.java
@@ -71,7 +71,7 @@ public class TestSuccessors {
SuccesorTaskFinder finder = new SuccesorTaskFinder(task);
ICompositeCheatSheetTask[] successors = finder.getRecommendedSuccessors();
assertEquals(1, successors.length);
- assertEquals(expectedSuccessor, successors[0]);
+ assertEquals(expectedSuccessor, successors[0]);
}
private void assertNoSuccessors(ICompositeCheatSheetTask task) {
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestTaskEvents.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestTaskEvents.java
index fc50fd438..d31914609 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestTaskEvents.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestTaskEvents.java
@@ -286,7 +286,7 @@ public class TestTaskEvents {
assertEquals(1, taskMap.getEventCount(task1B));
assertEquals(1, taskMap.getEventCount(group1));
assertEquals(4, taskMap.getTotalEventCount());
- }
+ }
@Test
public void testCompleteChoice() {
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/execution/ActionWithParameters.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/execution/ActionWithParameters.java
index eef32977f..a78cdb562 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/execution/ActionWithParameters.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/execution/ActionWithParameters.java
@@ -39,7 +39,7 @@ public class ActionWithParameters extends Action implements ICheatSheetAction {
@Override
public void run(String[] params, ICheatSheetManager manager) {
ActionEnvironment.setParams(params);
- ActionEnvironment.actionCompleted();
+ ActionEnvironment.actionCompleted();
}
}
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/execution/TestCommandExecution.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/execution/TestCommandExecution.java
index 50bbabae6..fef2863d3 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/execution/TestCommandExecution.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/execution/TestCommandExecution.java
@@ -56,8 +56,8 @@ public class TestCommandExecution {
private static final String COMMAND_ID =
"org.eclipse.ui.cheatsheets.tests.command1"; //$NON-NLS-1$
private static final String SERIALIZED_COMMAND = COMMAND_ID + '('
- + PARAM1_ID + '=' + PARAM1_VALUE + ','
- + PARAM2_ID + '=' + PARAM2_VALUE + ')';
+ + PARAM1_ID + '=' + PARAM1_VALUE + ','
+ + PARAM2_ID + '=' + PARAM2_VALUE + ')';
private static final String RETURN_STORE = "retData";
private static final String PARENT_RETURN_STORE = "parent.retData";
@@ -86,10 +86,10 @@ public class TestCommandExecution {
IWorkbench wb = PlatformUI.getWorkbench();
if (wb != null) {
Object serviceObject = wb.getAdapter(IHandlerService.class);
- if (serviceObject != null) {
- IHandlerService service = (IHandlerService)serviceObject;
- return service;
- }
+ if (serviceObject != null) {
+ IHandlerService service = (IHandlerService)serviceObject;
+ return service;
+ }
}
return null;
}
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/other/TestCheatSheetCategories.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/other/TestCheatSheetCategories.java
index c04e00bef..d7ddbd709 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/other/TestCheatSheetCategories.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/other/TestCheatSheetCategories.java
@@ -42,7 +42,7 @@ public class TestCheatSheetCategories {
CheatSheetRegistryReader.getInstance().getCheatSheets();
CheatSheetCollectionElement testCat = findChildCategory(cheatSheets, TEST_CATEGORY);
assertNotNull("Cannot find category org.eclipse.ua.tests.cheatsheet.cheatSheetsTestCat",
- testCat);
+ testCat);
}
@Test
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/other/TestCheatSheetCollection.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/other/TestCheatSheetCollection.java
index 400c3803a..ef7e90e50 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/other/TestCheatSheetCollection.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/other/TestCheatSheetCollection.java
@@ -51,14 +51,14 @@ public class TestCheatSheetCollection {
c2 = new CheatSheetCollectionElement("p2", "c2Id", "c2", root);
c11 = new CheatSheetCollectionElement("p11", "c11Id", "c11", c1);
c12 = new CheatSheetCollectionElement("p12", "c12Id", "c12", c1);
- root.add(c1);
- root.add(csA);
- root.add(csB);
- root.add(c2);
- c1.add(c11);
- c1.add(c12);
- c2.add(cs2A);
- c12.add(cs12A);
+ root.add(c1);
+ root.add(csA);
+ root.add(csB);
+ root.add(c2);
+ c1.add(c11);
+ c1.add(c12);
+ c2.add(cs2A);
+ c12.add(cs12A);
}
@Test
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/other/TestStatePersistence.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/other/TestStatePersistence.java
index 5c8632915..e5089e4fe 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/other/TestStatePersistence.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/other/TestStatePersistence.java
@@ -44,16 +44,16 @@ public class TestStatePersistence {
private static final String PATH = "ContentPath";
private class PropertySet {
- public String id;
- public int currentItem;
- public int button;
- public String contentPath;
- public List<String> completed;
- public List<String> expanded;
- public List<String> expandRestore;
- public Hashtable<String, String> subItemCompleted;
- public Hashtable<String, String> subItemSkipped;
- public CheatSheetManager manager;
+ public String id;
+ public int currentItem;
+ public int button;
+ public String contentPath;
+ public List<String> completed;
+ public List<String> expanded;
+ public List<String> expandRestore;
+ public Hashtable<String, String> subItemCompleted;
+ public Hashtable<String, String> subItemSkipped;
+ public CheatSheetManager manager;
}
private PropertySet propsToSave;
@@ -92,10 +92,10 @@ public class TestStatePersistence {
propertiesToSave.put(IParserTags.CONTENT_URL, propsToSave.contentPath);
}
if (propsToSave.subItemCompleted.size() > 0) {
- propertiesToSave.put(IParserTags.SUBITEMCOMPLETED, propsToSave.subItemCompleted);
+ propertiesToSave.put(IParserTags.SUBITEMCOMPLETED, propsToSave.subItemCompleted);
}
if (propsToSave.subItemSkipped.size() > 0) {
- propertiesToSave.put(IParserTags.SUBITEMSKIPPED, propsToSave.subItemSkipped);
+ propertiesToSave.put(IParserTags.SUBITEMSKIPPED, propsToSave.subItemSkipped);
}
helper.saveState(propertiesToSave, propsToSave.manager);
}
@@ -109,14 +109,14 @@ public class TestStatePersistence {
result.currentItem = Integer.parseInt(restored.getProperty(IParserTags.CURRENT));
result.completed = (ArrayList<String>) restored.get(IParserTags.COMPLETED);
result.contentPath = (String) restored.get(IParserTags.CONTENT_URL);
- result.expanded = (ArrayList<String>) restored.get(IParserTags.EXPANDED);
- result.expandRestore = (ArrayList<String>) restored.get(IParserTags.EXPANDRESTORE);
- result.subItemCompleted = (Hashtable<String, String>) restored.get(IParserTags.SUBITEMCOMPLETED);
- result.subItemSkipped = (Hashtable<String, String>) restored.get(IParserTags.SUBITEMSKIPPED);
- Hashtable<String, String> managerData = (Hashtable<String, String>) restored.get(IParserTags.MANAGERDATA);
+ result.expanded = (ArrayList<String>) restored.get(IParserTags.EXPANDED);
+ result.expandRestore = (ArrayList<String>) restored.get(IParserTags.EXPANDRESTORE);
+ result.subItemCompleted = (Hashtable<String, String>) restored.get(IParserTags.SUBITEMCOMPLETED);
+ result.subItemSkipped = (Hashtable<String, String>) restored.get(IParserTags.SUBITEMSKIPPED);
+ Hashtable<String, String> managerData = (Hashtable<String, String>) restored.get(IParserTags.MANAGERDATA);
CheatSheetElement csElement = new CheatSheetElement(id);
- result.manager = new CheatSheetManager(csElement);
- result.manager.setData(managerData);
+ result.manager = new CheatSheetManager(csElement);
+ result.manager.setData(managerData);
return result;
}
@@ -147,7 +147,7 @@ public class TestStatePersistence {
propsToSave.manager.setData(KEY1, VALUE1);
propsToSave.manager.setData(KEY2, VALUE2);
save();
- restore();
+ restore();
assertEquals(VALUE1, restored.manager.getData(KEY1));
assertEquals(VALUE2, restored.manager.getData(KEY2));
}
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/parser/InvalidCheatsheet.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/parser/InvalidCheatsheet.java
index 9af304cbe..b5e6bb251 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/parser/InvalidCheatsheet.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/parser/InvalidCheatsheet.java
@@ -36,12 +36,12 @@ public class InvalidCheatsheet {
@Before
public void setUp() throws Exception {
- parser = new CheatSheetParser();
+ parser = new CheatSheetParser();
}
private ICheatSheet parseTestFile(String path) {
URL testURL = ResourceFinder.findFile(UserAssistanceTestPlugin.getDefault(),
- INVALID_CHEATSHEET_FOLDER + path);
+ INVALID_CHEATSHEET_FOLDER + path);
return parser.parse(testURL, UserAssistanceTestPlugin.getPluginId(), CheatSheetParser.SIMPLE_ONLY);
}
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/parser/NoError.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/parser/NoError.java
index 0098c3b39..3e87f2eaa 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/parser/NoError.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/parser/NoError.java
@@ -40,12 +40,12 @@ public class NoError {
@Before
public void setUp() throws Exception {
- parser = new CheatSheetParser();
+ parser = new CheatSheetParser();
}
private ICheatSheet parseTestFile(String path) {
URL testURL = ResourceFinder.findFile(UserAssistanceTestPlugin.getDefault(),
- path);
+ path);
return parser.parse(testURL, UserAssistanceTestPlugin.getPluginId(), CheatSheetParser.SIMPLE_ONLY);
}
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/parser/ParseFromString.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/parser/ParseFromString.java
index c7df06c1b..ec5936d0c 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/parser/ParseFromString.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/parser/ParseFromString.java
@@ -35,16 +35,16 @@ public class ParseFromString {
private static final String VALID_CONTENT =
"<?xml version=\"1.0\" encoding=\"UTF-8\" ?> "
- + "<cheatsheet title=\"Title\">"
+ + "<cheatsheet title=\"Title\">"
+ "<intro><description>Simple test</description></intro>"
+ "<item title=\"Item\">"
+ "<description>description</description>"
- + "</item></cheatsheet>";
+ + "</item></cheatsheet>";
// INVALID_CONTENT has no items
private static final String INVALID_CONTENT =
"<?xml version=\"1.0\" encoding=\"UTF-8\" ?> "
- + "<cheatsheet title=\"Title\">"
+ + "<cheatsheet title=\"Title\">"
+ "<intro><description>Simple test</description></intro>"
+ "</cheatsheet>";
@@ -73,7 +73,7 @@ public class ParseFromString {
@Test
public void testUrlParserInput() {
URL testURL = ResourceFinder.findFile(UserAssistanceTestPlugin.getDefault(),
- "data/cheatsheet/valid/HelloWorld.xml");
+ "data/cheatsheet/valid/HelloWorld.xml");
ParserInput input = new ParserInput(testURL, UserAssistanceTestPlugin.getPluginId(), null);
assertNull(input.getXml());
assertTrue(testURL.equals(input.getUrl()));
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/util/MockTaskEditor.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/util/MockTaskEditor.java
index 28979f864..ef8a88c0c 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/util/MockTaskEditor.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/util/MockTaskEditor.java
@@ -43,7 +43,7 @@ public class MockTaskEditor extends TaskEditor {
setValue(NO_MEMENTO);
} else {
setValue(memento.getString(KEY));
- }
+ }
}
@Override
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/ParseTocWithCriteria.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/ParseTocWithCriteria.java
index 2bfb3afa8..64fa6614f 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/ParseTocWithCriteria.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/ParseTocWithCriteria.java
@@ -63,18 +63,18 @@ public class ParseTocWithCriteria {
IToc2 toc = parseToc("data/help/criteria/c1.xml");
Map<String, Set<String>> criteria = new HashMap<>();
CriteriaUtilities.addCriteriaToMap(criteria, toc.getCriteria());
- assertEquals(2, criteria.size());
- Set<String> versions = criteria.get("version");
- assertNotNull(versions);
- assertEquals(2, versions.size());
- assertTrue(versions.contains("1.0"));
- assertTrue(versions.contains("2.0"));
-
- Set<String> platforms = criteria.get("platform");
- assertNotNull(platforms);
- assertEquals(2, platforms.size());
- assertTrue(platforms.contains("linux"));
- assertTrue(platforms.contains("win32"));
+ assertEquals(2, criteria.size());
+ Set<String> versions = criteria.get("version");
+ assertNotNull(versions);
+ assertEquals(2, versions.size());
+ assertTrue(versions.contains("1.0"));
+ assertTrue(versions.contains("2.0"));
+
+ Set<String> platforms = criteria.get("platform");
+ assertNotNull(platforms);
+ assertEquals(2, platforms.size());
+ assertTrue(platforms.contains("linux"));
+ assertTrue(platforms.contains("win32"));
}
@Test
@@ -83,18 +83,18 @@ public class ParseTocWithCriteria {
Toc toc = new Toc(toc0);
Map<String, Set<String>> criteria = new HashMap<>();
CriteriaUtilities.addCriteriaToMap(criteria, toc.getCriteria());
- assertEquals(2, criteria.size());
- Set<String> versions = criteria.get("version");
- assertNotNull(versions);
- assertEquals(2, versions.size());
- assertTrue(versions.contains("1.0"));
- assertTrue(versions.contains("2.0"));
-
- Set<String> platforms = criteria.get("platform");
- assertNotNull(platforms);
- assertEquals(2, platforms.size());
- assertTrue(platforms.contains("linux"));
- assertTrue(platforms.contains("win32"));
+ assertEquals(2, criteria.size());
+ Set<String> versions = criteria.get("version");
+ assertNotNull(versions);
+ assertEquals(2, versions.size());
+ assertTrue(versions.contains("1.0"));
+ assertTrue(versions.contains("2.0"));
+
+ Set<String> platforms = criteria.get("platform");
+ assertNotNull(platforms);
+ assertEquals(2, platforms.size());
+ assertTrue(platforms.contains("linux"));
+ assertTrue(platforms.contains("win32"));
}
@Test
@@ -106,23 +106,23 @@ public class ParseTocWithCriteria {
Map<String, Set<String>> criteria = new HashMap<>();
assertTrue(topics[0] instanceof ITopic2);
CriteriaUtilities.addCriteriaToMap(criteria, ((ITopic2)topics[0]).getCriteria());
- assertEquals(2, criteria.size());
- Set<String> versions = criteria.get("version");
- assertNotNull(versions);
- assertEquals(1, versions.size());
- assertTrue(versions.contains("1.0"));
- assertFalse(versions.contains("2.0"));
+ assertEquals(2, criteria.size());
+ Set<String> versions = criteria.get("version");
+ assertNotNull(versions);
+ assertEquals(1, versions.size());
+ assertTrue(versions.contains("1.0"));
+ assertFalse(versions.contains("2.0"));
// Second topic
criteria = new HashMap<>();
assertTrue(topics[1] instanceof ITopic2);
CriteriaUtilities.addCriteriaToMap(criteria, ((ITopic2)topics[1]).getCriteria());
- versions = criteria.get("version");
- assertNotNull(versions);
- assertEquals(1, versions.size());
- assertTrue(versions.contains("2.0"));
- assertFalse(versions.contains("1.0"));
+ versions = criteria.get("version");
+ assertNotNull(versions);
+ assertEquals(1, versions.size());
+ assertTrue(versions.contains("2.0"));
+ assertFalse(versions.contains("1.0"));
}
@Test
@@ -194,11 +194,11 @@ public class ParseTocWithCriteria {
toc.addCriterion(criterion2);
ICriteria[] criteria = toc.getCriteria();
- assertEquals(2, criteria.length);
- assertEquals("version", criteria[0].getName());
- assertEquals("1.0", criteria[0].getValue());
- assertEquals("version", criteria[1].getName());
- assertEquals("2.0", criteria[1].getValue());
+ assertEquals(2, criteria.length);
+ assertEquals("version", criteria[0].getName());
+ assertEquals("1.0", criteria[0].getValue());
+ assertEquals("version", criteria[1].getName());
+ assertEquals("2.0", criteria[1].getValue());
}
@Test
@@ -212,11 +212,11 @@ public class ParseTocWithCriteria {
Toc copy = new Toc(toc);
ICriteria[] criteria = copy.getCriteria();
- assertEquals(2, criteria.length);
- assertEquals("version", criteria[0].getName());
- assertEquals("1.0", criteria[0].getValue());
- assertEquals("version", criteria[1].getName());
- assertEquals("2.0", criteria[1].getValue());
+ assertEquals(2, criteria.length);
+ assertEquals("version", criteria[0].getName());
+ assertEquals("1.0", criteria[0].getValue());
+ assertEquals("version", criteria[1].getName());
+ assertEquals("2.0", criteria[1].getValue());
}
@Test
@@ -230,11 +230,11 @@ public class ParseTocWithCriteria {
Topic copy = new Topic(topic);
ICriteria[] criteria = copy.getCriteria();
- assertEquals(2, criteria.length);
- assertEquals("version", criteria[0].getName());
- assertEquals("1.0", criteria[0].getValue());
- assertEquals("version", criteria[1].getName());
- assertEquals("2.0", criteria[1].getValue());
+ assertEquals(2, criteria.length);
+ assertEquals("version", criteria[0].getName());
+ assertEquals("1.0", criteria[0].getValue());
+ assertEquals("version", criteria[1].getName());
+ assertEquals("2.0", criteria[1].getValue());
}
@Test
@@ -245,11 +245,11 @@ public class ParseTocWithCriteria {
topic.addCriterion(criterion1);
topic.addCriterion(criterion2);
ICriteria[] criteria = topic.getCriteria();
- assertEquals(2, criteria.length);
- assertEquals("version", criteria[0].getName());
- assertEquals("1.0", criteria[0].getValue());
- assertEquals("version", criteria[1].getName());
- assertEquals("2.0", criteria[1].getValue());
+ assertEquals(2, criteria.length);
+ assertEquals("version", criteria[0].getName());
+ assertEquals("1.0", criteria[0].getValue());
+ assertEquals("version", criteria[1].getName());
+ assertEquals("2.0", criteria[1].getValue());
}
@Test
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/TestCriteriaProvider.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/TestCriteriaProvider.java
index f1a3292d5..ddea24dd2 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/TestCriteriaProvider.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/TestCriteriaProvider.java
@@ -41,17 +41,17 @@ public class TestCriteriaProvider {
Topic copy = new Topic(topic);
ICriteria[] nativeCriteria = copy.getCriteria();
- assertEquals(2, nativeCriteria.length);
- assertEquals("version", nativeCriteria[0].getName());
- assertEquals("1.0", nativeCriteria[0].getValue());
- assertEquals("version", nativeCriteria[1].getName());
- assertEquals("2.0", nativeCriteria[1].getValue());
-
- ICriteria[] allCriteria = CriteriaProviderRegistry.getInstance().getAllCriteria(copy);
- assertTrue(containsCriterion(allCriteria, "version", "2.0"));
- assertTrue(containsCriterion(allCriteria, "version", "1.0"));
- assertTrue(containsCriterion(allCriteria, "containsLetter", "c"));
- assertFalse(containsCriterion(allCriteria, "containsLetter", "k"));
+ assertEquals(2, nativeCriteria.length);
+ assertEquals("version", nativeCriteria[0].getName());
+ assertEquals("1.0", nativeCriteria[0].getValue());
+ assertEquals("version", nativeCriteria[1].getName());
+ assertEquals("2.0", nativeCriteria[1].getValue());
+
+ ICriteria[] allCriteria = CriteriaProviderRegistry.getInstance().getAllCriteria(copy);
+ assertTrue(containsCriterion(allCriteria, "version", "2.0"));
+ assertTrue(containsCriterion(allCriteria, "version", "1.0"));
+ assertTrue(containsCriterion(allCriteria, "containsLetter", "c"));
+ assertFalse(containsCriterion(allCriteria, "containsLetter", "k"));
}
@Test
@@ -65,17 +65,17 @@ public class TestCriteriaProvider {
Toc copy = new Toc(toc);
ICriteria[] nativeCriteria = copy.getCriteria();
- assertEquals(2, nativeCriteria.length);
- assertEquals("version", nativeCriteria[0].getName());
- assertEquals("1.0", nativeCriteria[0].getValue());
- assertEquals("version", nativeCriteria[1].getName());
- assertEquals("2.0", nativeCriteria[1].getValue());
-
- ICriteria[] allCriteria = CriteriaProviderRegistry.getInstance().getAllCriteria(copy);
- assertTrue(containsCriterion(allCriteria, "version", "2.0"));
- assertTrue(containsCriterion(allCriteria, "version", "1.0"));
- assertTrue(containsCriterion(allCriteria, "containsLetter", "c"));
- assertFalse(containsCriterion(allCriteria, "containsLetter", "k"));
+ assertEquals(2, nativeCriteria.length);
+ assertEquals("version", nativeCriteria[0].getName());
+ assertEquals("1.0", nativeCriteria[0].getValue());
+ assertEquals("version", nativeCriteria[1].getName());
+ assertEquals("2.0", nativeCriteria[1].getValue());
+
+ ICriteria[] allCriteria = CriteriaProviderRegistry.getInstance().getAllCriteria(copy);
+ assertTrue(containsCriterion(allCriteria, "version", "2.0"));
+ assertTrue(containsCriterion(allCriteria, "version", "1.0"));
+ assertTrue(containsCriterion(allCriteria, "containsLetter", "c"));
+ assertFalse(containsCriterion(allCriteria, "containsLetter", "k"));
}
@Test
@@ -96,17 +96,17 @@ public class TestCriteriaProvider {
//public void testWorkingSetScope() throws Exception {
// TODO write a test which creates a working set scope based on the
- // criteria which are generated by the criteria provider
+ // criteria which are generated by the criteria provider
//}
private boolean containsCriterion(ICriteria[] allCriteria,
String name, String value) {
- for (ICriteria element : allCriteria) {
- if (element.getName().equals(name) && element.getValue().equals(value)) {
- return true;
- }
- }
- return false;
+ for (ICriteria element : allCriteria) {
+ if (element.getName().equals(name) && element.getValue().equals(value)) {
+ return true;
+ }
+ }
+ return false;
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/DynamicXHTMLProcessorTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/DynamicXHTMLProcessorTest.java
index 3f67eae98..bd4cc9212 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/DynamicXHTMLProcessorTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/DynamicXHTMLProcessorTest.java
@@ -115,8 +115,8 @@ public class DynamicXHTMLProcessorTest {
@Test
public void testValidXML() throws Exception {
- String processed = process("data/help/dynamic/xhtml/emptyAnchor.xhtml");
- XMLUtil.assertParseableXML(processed);
+ String processed = process("data/help/dynamic/xhtml/emptyAnchor.xhtml");
+ XMLUtil.assertParseableXML(processed);
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/index/IndexAssemblerTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/index/IndexAssemblerTest.java
index 2a69667f9..f5bd8b9a7 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/index/IndexAssemblerTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/index/IndexAssemblerTest.java
@@ -64,9 +64,9 @@ public class IndexAssemblerTest {
IndexAssembler assembler = new IndexAssembler();
List<IndexContribution> contributions = new ArrayList<>(Arrays.asList(contrib));
Index index = assembler.assemble(contributions, Platform.getNL());
- IIndexEntry[] children = index.getEntries();
- assertEquals(2,children.length);
- IIndexEntry eclipseEntry = children[0];
+ IIndexEntry[] children = index.getEntries();
+ assertEquals(2,children.length);
+ IIndexEntry eclipseEntry = children[0];
assertEquals("eclipse", eclipseEntry.getKeyword());
IUAElement[] eclipseChildren = eclipseEntry.getChildren();
assertEquals(4, eclipseChildren.length);
@@ -78,11 +78,11 @@ public class IndexAssemblerTest {
IndexSee seeHeliosRelease = (IndexSee) eclipseChildren[3];
assertEquals(0, seeHelios.getSubpathElements().length);
assertEquals(1, seeHeliosRelease.getSubpathElements().length);
- IIndexEntry heliosEntry = children[1];
+ IIndexEntry heliosEntry = children[1];
assertEquals("helios", heliosEntry.getKeyword());
- IIndexSee[] heliosSees = ((IIndexEntry2)heliosEntry).getSees();
- assertEquals(1, heliosSees.length);
- assertEquals("eclipse", heliosSees[0].getKeyword());
+ IIndexSee[] heliosSees = ((IIndexEntry2)heliosEntry).getSees();
+ assertEquals(1, heliosSees.length);
+ assertEquals("eclipse", heliosSees[0].getKeyword());
}
@Test
@@ -92,14 +92,14 @@ public class IndexAssemblerTest {
IndexAssembler assembler = new IndexAssembler();
List<IndexContribution> contributions = new ArrayList<>(Arrays.asList(contrib));
Index index = assembler.assemble(contributions, Platform.getNL());
- IIndexEntry[] children = index.getEntries();
- assertEquals(1,children.length);
- assertEquals("keyword1", children[0].getKeyword());
- ITopic[] topics = children[0].getTopics();
- assertEquals(3, topics.length);
- assertEquals("topic0", topics[0].getLabel());
- assertEquals("topic1", topics[1].getLabel());
- assertEquals("topic2", topics[2].getLabel());
+ IIndexEntry[] children = index.getEntries();
+ assertEquals(1,children.length);
+ assertEquals("keyword1", children[0].getKeyword());
+ ITopic[] topics = children[0].getTopics();
+ assertEquals(3, topics.length);
+ assertEquals("topic0", topics[0].getLabel());
+ assertEquals("topic1", topics[1].getLabel());
+ assertEquals("topic2", topics[2].getLabel());
}
// Replaces white space between ">" and "<" by a single newline
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ConcurrentTocAccess.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ConcurrentTocAccess.java
index a79f0123f..b9f0bed5c 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ConcurrentTocAccess.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ConcurrentTocAccess.java
@@ -39,10 +39,10 @@ public class ConcurrentTocAccess {
this.dimensions = dimensions;
result = new StringBuilder();
result.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
- result.append("<?NLS TYPE=\"org.eclipse.help.toc\"?>\n");
- result.append("<toc label=\"Test Toc\" >\n");
- generateTopics(0);
- result.append("</toc>");
+ result.append("<?NLS TYPE=\"org.eclipse.help.toc\"?>\n");
+ result.append("<toc label=\"Test Toc\" >\n");
+ generateTopics(0);
+ result.append("</toc>");
return result.toString();
}
@@ -73,12 +73,12 @@ public class ConcurrentTocAccess {
@Override
public void run() {
- try {
+ try {
int result = traverseToc(toc);
setLeafCount(result);
} catch (Exception e) {
- setLeafCount(-1);
- this.exception = e;
+ setLeafCount(-1);
+ this.exception = e;
}
}
@@ -119,8 +119,8 @@ public class ConcurrentTocAccess {
}
for (int i = 0; i < numberOfThreads; i++) {
if (visitors[i].isAlive()) {
- complete = false;
- try {
+ complete = false;
+ try {
Thread.sleep(100);
} catch (InterruptedException e) {
fail("Interrupted Exception");
@@ -183,7 +183,7 @@ public class ConcurrentTocAccess {
Toc toc;
Document doc;
try {
- doc = DocumentCreator.createDocument(tocSource);
+ doc = DocumentCreator.createDocument(tocSource);
} catch (Exception e) {
fail("Exception creating TOC");
doc = null;
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextMergeTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextMergeTest.java
index b06a1711a..fff3efc06 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextMergeTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextMergeTest.java
@@ -29,7 +29,7 @@ import org.w3c.dom.Element;
public class ContextMergeTest {
private static final String ENABLEMENT_CHEATSHEETS = "<enablement><with variable=\"platform\">" +
- "<test property=\"org.eclipse.core.runtime.isBundleInstalled\" args=\"org.eclipse.ui.cheatsheets\"/>" +
+ "<test property=\"org.eclipse.core.runtime.isBundleInstalled\" args=\"org.eclipse.ui.cheatsheets\"/>" +
"</with></enablement>";
private static final String TOPIC_END = "</topic>";
private static final String TOPIC_HEAD_ECLIPSE = "<topic href=\"http://www.eclipse.org\" label=\"enabled\">";
@@ -44,7 +44,7 @@ public class ContextMergeTest {
Context context;
Document doc;
try {
- doc = DocumentCreator.createDocument(contextSource);
+ doc = DocumentCreator.createDocument(contextSource);
} catch (Exception e) {
fail("Caught Exception");
doc = null;
@@ -56,14 +56,14 @@ public class ContextMergeTest {
@Test
public void testContextMerge() {
final String contextSource1 = CONTEXT_HEAD +
- CONTEXT_DESCRIPTION +
- TOPIC_ECLIPSE +
- TOPIC_WITH_ENABLEMENT +
- END_CONTEXT;
+ CONTEXT_DESCRIPTION +
+ TOPIC_ECLIPSE +
+ TOPIC_WITH_ENABLEMENT +
+ END_CONTEXT;
final String contextSource2 = CONTEXT_HEAD +
- CONTEXT_DESCRIPTION +
- TOPIC_BUGZILLA +
- END_CONTEXT;
+ CONTEXT_DESCRIPTION +
+ TOPIC_BUGZILLA +
+ END_CONTEXT;
Context context1;
Context context2;
context1 = createContext(contextSource1);
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextTest.java
index 794090fde..4e75ed120 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextTest.java
@@ -36,16 +36,16 @@ import org.w3c.dom.Element;
public class ContextTest {
private static final String ENABLEMENT_CHEATSHEETS = "<enablement><with variable=\"platform\">" +
- "<test property=\"org.eclipse.core.runtime.isBundleInstalled\" args=\"org.eclipse.ui.cheatsheets\"/>" +
+ "<test property=\"org.eclipse.core.runtime.isBundleInstalled\" args=\"org.eclipse.ui.cheatsheets\"/>" +
"</with></enablement>";
private static final String ENABLEMENT_INVALID = "<enablement><with variable=\"platform\">" +
- "<test property=\"org.eclipse.core.runtime.isBundleInstalled\" args=\"org.eclipse.ui.invalid\"/>" +
+ "<test property=\"org.eclipse.core.runtime.isBundleInstalled\" args=\"org.eclipse.ui.invalid\"/>" +
"</with></enablement>";
private static final String FILTER_OUT = "<filter name = \"plugin\" value = \"org.eclipse.ua.invalid\"/>";
private static final String TOPIC_END = "</topic>";
private static final String TOPIC_HEAD_ECLIPSE = "<topic href=\"http://www.eclipse.org\" label=\"enabled\">";
private final String TOPIC_OLD_FILTER_DISABLED = "<topic filter=\"plugin=org.eclipse.ua.invalid\" href=\"www.eclipse.org\""
- + " label=\"Transformations and transformation configurations\"/>";
+ + " label=\"Transformations and transformation configurations\"/>";
private static final String CONTEXT_DESCRIPTION = "<description>Context Description</description>";
private static final String EMPTY_DESCRIPTION = "<description></description>";
private static final String CONTEXT_HEAD = "<context id=\"viewer\" title=\"Sample View\">";
@@ -54,7 +54,7 @@ public class ContextTest {
private final String TOPIC_WITH_ENABLEMENT = TOPIC_HEAD_ECLIPSE + ENABLEMENT_CHEATSHEETS + TOPIC_END;
private final String TOPIC_DISABLED = TOPIC_HEAD_ECLIPSE + ENABLEMENT_INVALID + TOPIC_END;
private final String TOPIC_FILTER_OUT = TOPIC_HEAD_ECLIPSE + FILTER_OUT + TOPIC_END;
- private final String END_CONTEXT = "</context>";
+ private final String END_CONTEXT = "</context>";
@Before
public void setUp() throws Exception {
@@ -66,7 +66,7 @@ public class ContextTest {
Context context;
Document doc;
try {
- doc = DocumentCreator.createDocument(contextSource);
+ doc = DocumentCreator.createDocument(contextSource);
} catch (Exception e) {
fail("Caught Exception");
doc = null;
@@ -78,9 +78,9 @@ public class ContextTest {
@Test
public void testSimpleContext() {
final String contextSource = CONTEXT_HEAD +
- CONTEXT_DESCRIPTION +
- TOPIC_ECLIPSE +
- END_CONTEXT;
+ CONTEXT_DESCRIPTION +
+ TOPIC_ECLIPSE +
+ END_CONTEXT;
Context context;
context = createContext(contextSource);
assertEquals("Sample View", context.getTitle());
@@ -93,9 +93,9 @@ public class ContextTest {
@Test
public void testContextWithEnablement() {
final String contextSource = CONTEXT_HEAD +
- CONTEXT_DESCRIPTION +
- TOPIC_WITH_ENABLEMENT +
- END_CONTEXT;
+ CONTEXT_DESCRIPTION +
+ TOPIC_WITH_ENABLEMENT +
+ END_CONTEXT;
Context context;
context = createContext(contextSource);
assertEquals("Sample View", context.getTitle());
@@ -113,9 +113,9 @@ public class ContextTest {
@Test
public void testCopyContext() {
final String contextSource = CONTEXT_HEAD +
- CONTEXT_DESCRIPTION +
- TOPIC_WITH_ENABLEMENT +
- END_CONTEXT;
+ CONTEXT_DESCRIPTION +
+ TOPIC_WITH_ENABLEMENT +
+ END_CONTEXT;
Context context = createContext(contextSource);
Context context2 = new Context(context, "new id");
Context context3 = new Context(context2, "new id2");
@@ -152,11 +152,11 @@ public class ContextTest {
@Test
public void testEnablement() {
final String contextSource = CONTEXT_HEAD +
- CONTEXT_DESCRIPTION +
- TOPIC_WITH_ENABLEMENT +
- TOPIC_DISABLED +
- TOPIC_OLD_FILTER_DISABLED +
- END_CONTEXT;
+ CONTEXT_DESCRIPTION +
+ TOPIC_WITH_ENABLEMENT +
+ TOPIC_DISABLED +
+ TOPIC_OLD_FILTER_DISABLED +
+ END_CONTEXT;
Context context = createContext(contextSource);
IHelpResource[] related = context.getRelatedTopics();
assertEquals(3, related.length);
@@ -168,10 +168,10 @@ public class ContextTest {
@Test
public void testOldStyleFilteringOfCopies() {
final String contextSource = CONTEXT_HEAD +
- CONTEXT_DESCRIPTION +
- TOPIC_WITH_ENABLEMENT +
- TOPIC_OLD_FILTER_DISABLED +
- END_CONTEXT;
+ CONTEXT_DESCRIPTION +
+ TOPIC_WITH_ENABLEMENT +
+ TOPIC_OLD_FILTER_DISABLED +
+ END_CONTEXT;
Context context1 = createContext(contextSource);
Context context2 = new Context(context1, "id");
Context context3 = new Context(context2, "id2");
@@ -195,10 +195,10 @@ public class ContextTest {
@Test
public void testOldStyleFilteringOfCopies2() {
final String contextSource = CONTEXT_HEAD +
- CONTEXT_DESCRIPTION +
- TOPIC_WITH_ENABLEMENT +
- TOPIC_OLD_FILTER_DISABLED +
- END_CONTEXT;
+ CONTEXT_DESCRIPTION +
+ TOPIC_WITH_ENABLEMENT +
+ TOPIC_OLD_FILTER_DISABLED +
+ END_CONTEXT;
Context context1 = createContext(contextSource);
Context context2 = new Context(context1, "id");
Context context3 = new Context(context1, "id2");
@@ -222,10 +222,10 @@ public class ContextTest {
@Test
public void testFilteringOfCopies() {
final String contextSource = CONTEXT_HEAD +
- CONTEXT_DESCRIPTION +
- TOPIC_WITH_ENABLEMENT +
- TOPIC_FILTER_OUT +
- END_CONTEXT;
+ CONTEXT_DESCRIPTION +
+ TOPIC_WITH_ENABLEMENT +
+ TOPIC_FILTER_OUT +
+ END_CONTEXT;
Context context1 = createContext(contextSource);
Context context2 = new Context(context1, "id");
Context context3 = new Context(context2, "id2");
@@ -248,10 +248,10 @@ public class ContextTest {
@Test
public void testFilteringOfCopies2() {
final String contextSource = CONTEXT_HEAD +
- CONTEXT_DESCRIPTION +
- TOPIC_WITH_ENABLEMENT +
- TOPIC_FILTER_OUT +
- END_CONTEXT;
+ CONTEXT_DESCRIPTION +
+ TOPIC_WITH_ENABLEMENT +
+ TOPIC_FILTER_OUT +
+ END_CONTEXT;
Context context1 = createContext(contextSource);
Context context2 = new Context(context1, "id");
Context context3 = new Context(context1, "id2");
@@ -275,10 +275,10 @@ public class ContextTest {
@Test
public void testEnablementOfCopies() {
final String contextSource = CONTEXT_HEAD +
- CONTEXT_DESCRIPTION +
- TOPIC_WITH_ENABLEMENT +
- TOPIC_DISABLED +
- END_CONTEXT;
+ CONTEXT_DESCRIPTION +
+ TOPIC_WITH_ENABLEMENT +
+ TOPIC_DISABLED +
+ END_CONTEXT;
Context context1 = createContext(contextSource);
Context context2 = new Context(context1, "id");
Context context3 = new Context(context2, "id2");
@@ -301,10 +301,10 @@ public class ContextTest {
@Test
public void testEnablementOfCopies2() {
final String contextSource = CONTEXT_HEAD +
- CONTEXT_DESCRIPTION +
- TOPIC_WITH_ENABLEMENT +
- TOPIC_DISABLED +
- END_CONTEXT;
+ CONTEXT_DESCRIPTION +
+ TOPIC_WITH_ENABLEMENT +
+ TOPIC_DISABLED +
+ END_CONTEXT;
Context context1 = createContext(contextSource);
Context context2 = new Context(context1, "id");
Context context3 = new Context(context1, "id2");
@@ -328,10 +328,10 @@ public class ContextTest {
@Test
public void testEnablementOfCopies3() {
final String contextSource = CONTEXT_HEAD +
- CONTEXT_DESCRIPTION +
- TOPIC_WITH_ENABLEMENT +
- TOPIC_DISABLED +
- END_CONTEXT;
+ CONTEXT_DESCRIPTION +
+ TOPIC_WITH_ENABLEMENT +
+ TOPIC_DISABLED +
+ END_CONTEXT;
Context context1 = createContext(contextSource);
Context context2 = new Context(context1, "id");
Context context3 = new Context(context1, "id2");
@@ -360,9 +360,9 @@ public class ContextTest {
@Test
public void testContextWithAttribute() {
final String contextSource = CONTEXT_HEAD_WITH_ATTRIBUTE +
- CONTEXT_DESCRIPTION +
- TOPIC_ECLIPSE +
- END_CONTEXT;
+ CONTEXT_DESCRIPTION +
+ TOPIC_ECLIPSE +
+ END_CONTEXT;
Context context;
context = createContext(contextSource);
assertEquals("abc", context.getAttribute("att"));
@@ -371,8 +371,8 @@ public class ContextTest {
@Test
public void testContextWithoutDescription() {
final String contextSource = CONTEXT_HEAD +
- TOPIC_ECLIPSE +
- END_CONTEXT;
+ TOPIC_ECLIPSE +
+ END_CONTEXT;
Context context;
context = createContext(contextSource);
assertNull(context.getText());
@@ -381,9 +381,9 @@ public class ContextTest {
@Test
public void testContextWithEmptyDescription() {
final String contextSource = CONTEXT_HEAD +
- EMPTY_DESCRIPTION +
- TOPIC_ECLIPSE +
- END_CONTEXT;
+ EMPTY_DESCRIPTION +
+ TOPIC_ECLIPSE +
+ END_CONTEXT;
Context context;
context = createContext(contextSource);
assertEquals("", context.getText());
@@ -392,8 +392,8 @@ public class ContextTest {
@Test
public void testContextWithoutDescriptionSelfCatenation() {
final String contextSource = CONTEXT_HEAD +
- TOPIC_ECLIPSE +
- END_CONTEXT;
+ TOPIC_ECLIPSE +
+ END_CONTEXT;
Context context1 = createContext(contextSource);
Context context2 = createContext(contextSource);
context1.mergeContext(context2);
@@ -403,12 +403,12 @@ public class ContextTest {
@Test
public void testContextWithoutDescriptionMixedCatenation() {
final String contextSourceEmpty = CONTEXT_HEAD +
- TOPIC_ECLIPSE +
- END_CONTEXT;
+ TOPIC_ECLIPSE +
+ END_CONTEXT;
final String contextSourceWithDesc = CONTEXT_HEAD +
- CONTEXT_DESCRIPTION +
- TOPIC_ECLIPSE +
- END_CONTEXT;
+ CONTEXT_DESCRIPTION +
+ TOPIC_ECLIPSE +
+ END_CONTEXT;
Context context1 = createContext(contextSourceEmpty);
Context context2 = createContext(contextSourceWithDesc);
context1.mergeContext(context2);
@@ -422,9 +422,9 @@ public class ContextTest {
/*
public void testCopyContextWithAttribute() {
final String contextSource = CONTEXT_HEAD_WITH_ATTRIBUTE +
- CONTEXT_DESCRIPTION +
- TOPIC_ECLIPSE +
- END_CONTEXT;
+ CONTEXT_DESCRIPTION +
+ TOPIC_ECLIPSE +
+ END_CONTEXT;
Context context1;
context1 = createContext(contextSource);
Context context2 = new Context(context1, "id");
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/DocumentReaderTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/DocumentReaderTest.java
index b84709768..8465a2b60 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/DocumentReaderTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/DocumentReaderTest.java
@@ -42,7 +42,7 @@ public class DocumentReaderTest {
@Test
public void testDocumentReader() throws IOException, SAXException, ParserConfigurationException {
- DocumentReader docReader = new DocumentReader();
+ DocumentReader docReader = new DocumentReader();
ResourceReader[] resReaders = new ResourceReader[3];
resReaders[0] = new ResourceReader(docReader,"data/help/index/assembler/a.xml");
resReaders[1] = new ResourceReader(docReader,"data/help/index/assembler/b.xml");
@@ -79,7 +79,7 @@ public class DocumentReaderTest {
public void run() {
try {
for (int i = 0; i < 10; i++) {
- readFile(reader, file);
+ readFile(reader, file);
}
status = SUCCESS;
} catch (Exception e) {
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/EntityResolutionTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/EntityResolutionTest.java
index 84be0774d..26cabee35 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/EntityResolutionTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/EntityResolutionTest.java
@@ -53,39 +53,39 @@ public class EntityResolutionTest {
}
@Test
- public void testFramset() throws Exception {
- resolve("http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd", true);
- }
+ public void testFramset() throws Exception {
+ resolve("http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd", true);
+ }
@Test
- public void testFlat() throws Exception {
- resolve("http://www.w3.org/TR/xhtml11/DTD/xhtml11-flat.dtd", true);
- }
+ public void testFlat() throws Exception {
+ resolve("http://www.w3.org/TR/xhtml11/DTD/xhtml11-flat.dtd", true);
+ }
@Test
- public void testStrict() throws Exception {
- resolve("http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd", true);
- }
+ public void testStrict() throws Exception {
+ resolve("http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd", true);
+ }
@Test
- public void testTransitional() throws Exception {
- resolve("http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd", true);
- }
+ public void testTransitional() throws Exception {
+ resolve("http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd", true);
+ }
@Test
- public void testLat1() throws Exception {
- resolve("http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent", true);
- }
+ public void testLat1() throws Exception {
+ resolve("http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent", true);
+ }
@Test
- public void testSpecial() throws Exception {
- resolve("http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent", true);
- }
+ public void testSpecial() throws Exception {
+ resolve("http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent", true);
+ }
@Test
- public void testResolveSymbol() throws Exception {
- resolve("http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent", true);
- }
+ public void testResolveSymbol() throws Exception {
+ resolve("http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent", true);
+ }
@Test
public void testUnsupportedDtds() throws Exception {
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexEntryTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexEntryTest.java
index f1a3be3b4..e5a9a7836 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexEntryTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexEntryTest.java
@@ -42,7 +42,7 @@ public class IndexEntryTest {
private static final String INVALID_INSTALLED = "<with variable=\"platform\">" +
"<test property=\"org.eclipse.core.runtime.isBundleInstalled\" args=\"org.eclipse.ui.invalid\"/></with>";
private static final String CS_INSTALLED = "<with variable=\"platform\">" +
- "<test property=\"org.eclipse.core.runtime.isBundleInstalled\" args=\"org.eclipse.ui.cheatsheets\"/></with>";
+ "<test property=\"org.eclipse.core.runtime.isBundleInstalled\" args=\"org.eclipse.ui.cheatsheets\"/></with>";
private static final String ENABLEMENT_CHEATSHEETS = "<enablement>" + CS_INSTALLED + "</enablement>";
private static final String ENABLEMENT_INVALID = "<enablement>" + INVALID_INSTALLED + "</enablement>";
private static final String FILTER_IN = "<filter name = \"plugin\" value = \"org.eclipse.ua.tests\"/>";
@@ -62,13 +62,13 @@ public class IndexEntryTest {
private final String ENTRY_FILTER_OUT = ENTRY_HEAD_ECLIPSE + FILTER_OUT + ENTRY_END;
private final String ENTRY_FILTER_MIXED = ENTRY_HEAD_ECLIPSE + FILTER_IN + FILTER_OUT + ENTRY_END;
private final String ENTRY_OLD_FILTER = "<entry filter=\"plugin=org.eclipse.ua.tests\" "
- + " keyword=\"Transformations and transformation configurations\"/>";
+ + " keyword=\"Transformations and transformation configurations\"/>";
private final String ENTRY_OLD_FILTER_DISABLED = "<entry filter=\"plugin=org.eclipse.ua.invalid\" "
- + " keyword=\"Transformations and transformation configurations\"/>";
+ + " keyword=\"Transformations and transformation configurations\"/>";
private final String ENTRY_OLD_FILTER_IN__NEGATED = "<entry filter=\"plugin!=org.eclipse.ua.tests\" "
- + " keyword=\"Transformations and transformation configurations\"/>";
+ + " keyword=\"Transformations and transformation configurations\"/>";
private final String ENTRY_OLD_FILTER_OUT_NEGATED = "<entry filter=\"plugin!=org.eclipse.ua.invalid\" "
- + " keyword=\"Transformations and transformation configurations\"/>";
+ + " keyword=\"Transformations and transformation configurations\"/>";
private final String ENTRY_WITH_CHILD = ENTRY_HEAD_ECLIPSE + ENTRY_BUGZILLA + ENTRY_END;
private final String ENTRY_WITH_TOPIC = ENTRY_HEAD_ECLIPSE + TOPIC_BUGZILLA + ENTRY_END;
private final String ENTRY_WITH_SEE = ENTRY_HEAD_ECLIPSE + SEE_ALSO_SDK + ENTRY_END;
@@ -82,7 +82,7 @@ public class IndexEntryTest {
IndexEntry element;
Document doc;
try {
- doc = DocumentCreator.createDocument(elementSource);
+ doc = DocumentCreator.createDocument(elementSource);
} catch (Exception e) {
fail("Caught Exception");
doc = null;
@@ -315,15 +315,15 @@ public class IndexEntryTest {
assertEquals(2, subentries.length);
assertEquals(1, sees.length);
assertEquals(3,topics.length);
- assertEquals("jdt", subentries[0].getKeyword());
- assertEquals("compiler", subentries[1].getKeyword());
- assertEquals("label1", topics[0].getLabel());
- assertEquals("label2", topics[1].getLabel());
- assertEquals("label3", topics[2].getLabel());
- assertEquals("href1", topics[0].getHref());
- assertEquals("href2", topics[1].getHref());
- assertEquals("href3", topics[2].getHref());
- assertEquals("beans", sees[0].getKeyword());
+ assertEquals("jdt", subentries[0].getKeyword());
+ assertEquals("compiler", subentries[1].getKeyword());
+ assertEquals("label1", topics[0].getLabel());
+ assertEquals("label2", topics[1].getLabel());
+ assertEquals("label3", topics[2].getLabel());
+ assertEquals("href1", topics[0].getHref());
+ assertEquals("href2", topics[1].getHref());
+ assertEquals("href3", topics[2].getHref());
+ assertEquals("beans", sees[0].getKeyword());
}
private void checkEntryChildEnablement(IIndexEntry2 entry) {
@@ -333,12 +333,12 @@ public class IndexEntryTest {
assertEquals(2, subentries.length);
assertEquals(1, sees.length);
assertEquals(3,topics.length);
- assertTrue(subentries[0].isEnabled(HelpEvaluationContext.getContext()));
- assertFalse(subentries[1].isEnabled(HelpEvaluationContext.getContext()));
- assertTrue(topics[0].isEnabled(HelpEvaluationContext.getContext()));
- assertFalse(topics[1].isEnabled(HelpEvaluationContext.getContext()));
- assertTrue(topics[2].isEnabled(HelpEvaluationContext.getContext()));
- assertTrue(sees[0].isEnabled(HelpEvaluationContext.getContext()));
+ assertTrue(subentries[0].isEnabled(HelpEvaluationContext.getContext()));
+ assertFalse(subentries[1].isEnabled(HelpEvaluationContext.getContext()));
+ assertTrue(topics[0].isEnabled(HelpEvaluationContext.getContext()));
+ assertFalse(topics[1].isEnabled(HelpEvaluationContext.getContext()));
+ assertTrue(topics[2].isEnabled(HelpEvaluationContext.getContext()));
+ assertTrue(sees[0].isEnabled(HelpEvaluationContext.getContext()));
}
private UserIndexEntry createUserEntry() {
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexSeeTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexSeeTest.java
index 1c42fbf0d..9b9043dfb 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexSeeTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexSeeTest.java
@@ -36,7 +36,7 @@ public class IndexSeeTest {
private static final String ECLIPSE = "eclipse";
private static final String SDK = "sdk";
private static final String VIEWS = "views";
- private static final String SEE_END = "</see>";
+ private static final String SEE_END = "</see>";
private static final String SEE_HEAD_ECLIPSE = "<see keyword=\"eclipse\">";
private static final String SEE_ECLIPSE = "<see keyword=\"eclipse\"/>";
private static final String SEE_SDK = "<see keyword=\"sdk\"/>";
@@ -44,11 +44,11 @@ public class IndexSeeTest {
private static final String SUBPATH_VIEWS = "<subpath keyword=\"views\">";
private static final String SUBPATH_END = "</subpath>";
private static final String SEE_ECLIPSE_SDK = SEE_HEAD_ECLIPSE +
- SUBPATH_SDK + SUBPATH_END + SEE_END;
+ SUBPATH_SDK + SUBPATH_END + SEE_END;
private static final String SEE_ECLIPSE_VIEWS = SEE_HEAD_ECLIPSE +
- SUBPATH_SDK + SUBPATH_END + SUBPATH_VIEWS + SUBPATH_END + SEE_END;
+ SUBPATH_SDK + SUBPATH_END + SUBPATH_VIEWS + SUBPATH_END + SEE_END;
private static final String SEE_ECLIPSE_SDK_VIEWS = SEE_HEAD_ECLIPSE +
- SUBPATH_SDK + SUBPATH_END + SUBPATH_VIEWS + SUBPATH_END + SEE_END;
+ SUBPATH_SDK + SUBPATH_END + SUBPATH_VIEWS + SUBPATH_END + SEE_END;
@Before
public void setUp() throws Exception {
@@ -59,7 +59,7 @@ public class IndexSeeTest {
IndexSee element;
Document doc;
try {
- doc = DocumentCreator.createDocument(elementSource);
+ doc = DocumentCreator.createDocument(elementSource);
} catch (Exception e) {
fail("Caught Exception");
doc = null;
@@ -73,7 +73,7 @@ public class IndexSeeTest {
Document doc;
String elementSource = "<see keyword=\"" + keyword + "\" />";
try {
- doc = DocumentCreator.createDocument(elementSource);
+ doc = DocumentCreator.createDocument(elementSource);
} catch (Exception e) {
fail("Caught Exception");
doc = null;
@@ -96,11 +96,11 @@ public class IndexSeeTest {
see1 = createSee(SEE_ECLIPSE);
IndexSee see2 = new IndexSee(see1);
assertEquals(ECLIPSE, see1.getKeyword());
- assertEquals(0, see1.getSubpathElements().length);
+ assertEquals(0, see1.getSubpathElements().length);
assertEquals(ECLIPSE, see1.getKeyword());
assertEquals(ECLIPSE, see2.getKeyword());
- assertEquals(0, see2.getSubpathElements().length);
+ assertEquals(0, see2.getSubpathElements().length);
assertEquals(ECLIPSE, see2.getKeyword());
}
@@ -231,30 +231,30 @@ public class IndexSeeTest {
@Test
public void testUserSee() {
- UserIndexSee u1;
- u1 = createUserSee();
- IndexSee see = new IndexSee(u1);
- checkCreatedSee(see);
+ UserIndexSee u1;
+ u1 = createUserSee();
+ IndexSee see = new IndexSee(u1);
+ checkCreatedSee(see);
}
@Test
public void testCopyUserSee() {
- UserIndexSee u1;
- u1 = createUserSee();
- IndexSee see = new IndexSee(u1);
- IndexSee see2 = new IndexSee(see);
- checkCreatedSee(see);
- checkCreatedSee(see2);
+ UserIndexSee u1;
+ u1 = createUserSee();
+ IndexSee see = new IndexSee(u1);
+ IndexSee see2 = new IndexSee(see);
+ checkCreatedSee(see);
+ checkCreatedSee(see2);
}
@Test
public void testCreateTwiceUserSee() {
- UserIndexSee u1;
- u1 = createUserSee();
- IndexSee see = new IndexSee(u1);
- IndexSee see2 = new IndexSee(u1);
- checkCreatedSee(see);
- checkCreatedSee(see2);
+ UserIndexSee u1;
+ u1 = createUserSee();
+ IndexSee see = new IndexSee(u1);
+ IndexSee see2 = new IndexSee(u1);
+ checkCreatedSee(see);
+ checkCreatedSee(see2);
}
@Test
@@ -299,19 +299,19 @@ public class IndexSeeTest {
private UserIndexSee createUserSee() {
UserIndexSee u1;
u1 = new UserIndexSee("eclipse", false);
- UserIndexSubpath u2 = new UserIndexSubpath("platform");
- UserIndexSubpath u3 = new UserIndexSubpath("ui");
- u1.addSubpath(u2);
- u1.addSubpath(u3);
+ UserIndexSubpath u2 = new UserIndexSubpath("platform");
+ UserIndexSubpath u3 = new UserIndexSubpath("ui");
+ u1.addSubpath(u2);
+ u1.addSubpath(u3);
return u1;
}
private void checkCreatedSee(IndexSee see) {
assertEquals("eclipse", see.getKeyword());
- IIndexSubpath[] subpath = see.getSubpathElements();
- assertEquals(2, subpath.length);
- assertEquals("platform", subpath[0].getKeyword());
- assertEquals("ui", subpath[1].getKeyword());
+ IIndexSubpath[] subpath = see.getSubpathElements();
+ assertEquals(2, subpath.length);
+ assertEquals("platform", subpath[0].getKeyword());
+ assertEquals("ui", subpath[1].getKeyword());
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TocObjectTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TocObjectTest.java
index 1eb73186a..c8f1ad608 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TocObjectTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TocObjectTest.java
@@ -34,9 +34,9 @@ public class TocObjectTest {
@Test
public void testLookupUnanchoredHref() {
- UserToc utoc = new UserToc(TITLE_1, null, true);
- UserTopic utopic = new UserTopic(TOPIC_LABEL_1, PATH, true);
- utoc.addTopic(utopic);
+ UserToc utoc = new UserToc(TITLE_1, null, true);
+ UserTopic utopic = new UserTopic(TOPIC_LABEL_1, PATH, true);
+ utoc.addTopic(utopic);
Toc toc = new Toc(utoc);
ITopic topic = toc.getTopic(PATH);
assertNotNull(topic);
@@ -45,9 +45,9 @@ public class TocObjectTest {
@Test
public void testLookupAnchoredHrefByAnchor() {
- UserToc utoc = new UserToc(TITLE_1, null, true);
- UserTopic utopic = new UserTopic(TOPIC_LABEL_1, PATH + ANCHOR1, true);
- utoc.addTopic(utopic);
+ UserToc utoc = new UserToc(TITLE_1, null, true);
+ UserTopic utopic = new UserTopic(TOPIC_LABEL_1, PATH + ANCHOR1, true);
+ utoc.addTopic(utopic);
Toc toc = new Toc(utoc);
ITopic topic = toc.getTopic(PATH + ANCHOR1);
assertNotNull(topic);
@@ -56,9 +56,9 @@ public class TocObjectTest {
@Test
public void testLookupAnchoredHref() {
- UserToc utoc = new UserToc(TITLE_1, null, true);
- UserTopic utopic = new UserTopic(TOPIC_LABEL_1, PATH + ANCHOR1, true);
- utoc.addTopic(utopic);
+ UserToc utoc = new UserToc(TITLE_1, null, true);
+ UserTopic utopic = new UserTopic(TOPIC_LABEL_1, PATH + ANCHOR1, true);
+ utoc.addTopic(utopic);
Toc toc = new Toc(utoc);
ITopic topic = toc.getTopic(PATH);
assertNotNull(topic);
@@ -67,13 +67,13 @@ public class TocObjectTest {
@Test
public void testUnanchoredFoundFirst() {
- UserToc utoc = new UserToc(TITLE_1, null, true);
- UserTopic utopic = new UserTopic(TOPIC_LABEL_1, PATH + ANCHOR1, true);
- utoc.addTopic(utopic);
- utopic = new UserTopic(TOPIC_LABEL_2, PATH, true);
- utoc.addTopic(utopic);
- utopic = new UserTopic(TOPIC_LABEL_3, PATH + ANCHOR2, true);
- utoc.addTopic(utopic);
+ UserToc utoc = new UserToc(TITLE_1, null, true);
+ UserTopic utopic = new UserTopic(TOPIC_LABEL_1, PATH + ANCHOR1, true);
+ utoc.addTopic(utopic);
+ utopic = new UserTopic(TOPIC_LABEL_2, PATH, true);
+ utoc.addTopic(utopic);
+ utopic = new UserTopic(TOPIC_LABEL_3, PATH + ANCHOR2, true);
+ utoc.addTopic(utopic);
Toc toc = new Toc(utoc);
ITopic topic = toc.getTopic(PATH);
assertNotNull(topic);
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TopicTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TopicTest.java
index a342c84b1..d9def5aea 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TopicTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TopicTest.java
@@ -39,7 +39,7 @@ public class TopicTest {
private static final String INVALID_INSTALLED = "<with variable=\"platform\">" +
"<test property=\"org.eclipse.core.runtime.isBundleInstalled\" args=\"org.eclipse.ui.invalid\"/></with>";
private static final String CS_INSTALLED = "<with variable=\"platform\">" +
- "<test property=\"org.eclipse.core.runtime.isBundleInstalled\" args=\"org.eclipse.ui.cheatsheets\"/></with>";
+ "<test property=\"org.eclipse.core.runtime.isBundleInstalled\" args=\"org.eclipse.ui.cheatsheets\"/></with>";
private static final String ENABLEMENT_CHEATSHEETS = "<enablement>" + CS_INSTALLED + "</enablement>";
private static final String ENABLEMENT_INVALID = "<enablement>" + INVALID_INSTALLED + "</enablement>";
private static final String FILTER_IN = "<filter name = \"plugin\" value = \"org.eclipse.ua.tests\"/>";
@@ -57,13 +57,13 @@ public class TopicTest {
private final String TOPIC_FILTER_OUT = TOPIC_HEAD_ECLIPSE + FILTER_OUT + TOPIC_END;
private final String TOPIC_FILTER_MIXED = TOPIC_HEAD_ECLIPSE + FILTER_IN + FILTER_OUT + TOPIC_END;
private final String TOPIC_OLD_FILTER = "<topic filter=\"plugin=org.eclipse.ua.tests\" href=\"www.eclipse.org\""
- + " label=\"Transformations and transformation configurations\"/>";
+ + " label=\"Transformations and transformation configurations\"/>";
private final String TOPIC_OLD_FILTER_DISABLED = "<topic filter=\"plugin=org.eclipse.ua.invalid\" href=\"www.eclipse.org\""
- + " label=\"Transformations and transformation configurations\"/>";
+ + " label=\"Transformations and transformation configurations\"/>";
private final String TOPIC_OLD_FILTER_IN__NEGATED = "<topic filter=\"plugin!=org.eclipse.ua.tests\" href=\"www.eclipse.org\""
- + " label=\"Transformations and transformation configurations\"/>";
+ + " label=\"Transformations and transformation configurations\"/>";
private final String TOPIC_OLD_FILTER_OUT_NEGATED = "<topic filter=\"plugin!=org.eclipse.ua.invalid\" href=\"www.eclipse.org\""
- + " label=\"Transformations and transformation configurations\"/>";
+ + " label=\"Transformations and transformation configurations\"/>";
private final String TOPIC_WITH_CHILD = TOPIC_HEAD_ECLIPSE + TOPIC_BUGZILLA + TOPIC_END;
private int mode;
@@ -84,7 +84,7 @@ public class TopicTest {
Topic topic;
Document doc;
try {
- doc = DocumentCreator.createDocument(topicSource);
+ doc = DocumentCreator.createDocument(topicSource);
} catch (Exception e) {
fail("Caught Exception");
doc = null;
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UAElementTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UAElementTest.java
index e4b5f37a1..e6e50e689 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UAElementTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UAElementTest.java
@@ -43,11 +43,11 @@ public class UAElementTest {
Object topicChildren = element.getChildren(Topic.class);
assertTrue(topicChildren instanceof Topic[]);
assertTrue(((Topic[])topicChildren).length == 0);
- assertNull(element.getParentElement());
- assertNull(element.getAttribute("a1"));
- assertTrue(element.equals(element));
- assertFalse(element.equals(null));
- assertFalse(element.equals("A string"));
+ assertNull(element.getParentElement());
+ assertNull(element.getAttribute("a1"));
+ assertTrue(element.equals(element));
+ assertFalse(element.equals(null));
+ assertFalse(element.equals("A string"));
}
@Test
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserCriterionDefinition.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserCriterionDefinition.java
index 285cab30a..6cfbb85d6 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserCriterionDefinition.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserCriterionDefinition.java
@@ -58,7 +58,7 @@ public class UserCriterionDefinition implements ICriterionDefinition {
@Override
public IUAElement[] getChildren() {
- return getCriterionValueDefinitions();
+ return getCriterionValueDefinitions();
}
@Override
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserCriterionValueDefinition.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserCriterionValueDefinition.java
index 7d42135bf..dd4af58c7 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserCriterionValueDefinition.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UserCriterionValueDefinition.java
@@ -45,7 +45,7 @@ public class UserCriterionValueDefinition implements ICriterionValueDefinition {
@Override
public IUAElement[] getChildren() {
- return new IUAElement[0];
+ return new IUAElement[0];
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/HelpServerTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/HelpServerTest.java
index fe3026e48..50381f6a4 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/HelpServerTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/HelpServerTest.java
@@ -51,7 +51,7 @@ public class HelpServerTest extends PerformanceTestCase {
for (int i=0; i < 100; ++i) {
boolean warmup = i < 2;
if (!warmup) {
- startMeasuring();
+ startMeasuring();
}
for (int j = 0; j <= 100; j++) {
@@ -59,8 +59,8 @@ public class HelpServerTest extends PerformanceTestCase {
}
if (!warmup) {
- stopMeasuring();
- }
+ stopMeasuring();
+ }
}
commitMeasurements();
@@ -75,14 +75,14 @@ public class HelpServerTest extends PerformanceTestCase {
boolean warmup = i < 2;
LoadServletUtil.stopServer();
if (!warmup) {
- startMeasuring();
+ startMeasuring();
}
LoadServletUtil.startServer();
if (!warmup) {
- stopMeasuring();
- }
+ stopMeasuring();
+ }
}
commitMeasurements();
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/IndexAssemblePerformanceTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/IndexAssemblePerformanceTest.java
index 1091be281..588c9fadc 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/IndexAssemblePerformanceTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/IndexAssemblePerformanceTest.java
@@ -55,14 +55,14 @@ public class IndexAssemblePerformanceTest extends PerformanceTestCase {
for (int i=0; i < 10; ++i) {
boolean warmup = i == 0;
if (!warmup) {
- startMeasuring();
+ startMeasuring();
}
assembleIndex();
if (!warmup) {
- stopMeasuring();
- }
+ stopMeasuring();
+ }
}
commitMeasurements();
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/LowIterationHelpServerTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/LowIterationHelpServerTest.java
index 8b990160a..7b956f5a1 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/LowIterationHelpServerTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/LowIterationHelpServerTest.java
@@ -51,7 +51,7 @@ public class LowIterationHelpServerTest extends PerformanceTestCase {
for (int i=0; i < 15; ++i) {
boolean warmup = i < 2;
if (!warmup) {
- startMeasuring();
+ startMeasuring();
}
for (int j = 0; j <= 20; j++) {
@@ -59,8 +59,8 @@ public class LowIterationHelpServerTest extends PerformanceTestCase {
}
if (!warmup) {
- stopMeasuring();
- }
+ stopMeasuring();
+ }
}
commitMeasurements();
@@ -75,14 +75,14 @@ public class LowIterationHelpServerTest extends PerformanceTestCase {
boolean warmup = i < 2;
LoadServletUtil.stopServer();
if (!warmup) {
- startMeasuring();
+ startMeasuring();
}
LoadServletUtil.startServer();
if (!warmup) {
- stopMeasuring();
- }
+ stopMeasuring();
+ }
}
commitMeasurements();
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/TocAssemblePerformanceTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/TocAssemblePerformanceTest.java
index 4c9549b11..e3efd43d0 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/TocAssemblePerformanceTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/performance/TocAssemblePerformanceTest.java
@@ -85,14 +85,14 @@ public class TocAssemblePerformanceTest extends PerformanceTestCase {
for (int i=0; i < 100; ++i) {
boolean warmup = i < 2;
if (!warmup) {
- startMeasuring();
+ startMeasuring();
}
for (int j = 0; j < 20; j++) {
- assembleToc();
+ assembleToc();
}
if (!warmup) {
- stopMeasuring();
- }
+ stopMeasuring();
+ }
}
commitMeasurements();
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/HelpDataTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/HelpDataTest.java
index 69ccb706c..1fd25a4f1 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/HelpDataTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/HelpDataTest.java
@@ -52,11 +52,11 @@ public class HelpDataTest {
@Before
public void setUp() throws Exception {
baseTocsPreference = Platform.getPreferencesService().getString
- (HelpPlugin.PLUGIN_ID, HelpPlugin.BASE_TOCS_KEY, "", null);
+ (HelpPlugin.PLUGIN_ID, HelpPlugin.BASE_TOCS_KEY, "", null);
ignoredTocsPreference = Platform.getPreferencesService().getString
- (HelpPlugin.PLUGIN_ID, HelpPlugin.IGNORED_TOCS_KEY, "", null);
+ (HelpPlugin.PLUGIN_ID, HelpPlugin.IGNORED_TOCS_KEY, "", null);
ignoredIndexesPreference = Platform.getPreferencesService().getString
- (HelpPlugin.PLUGIN_ID, HelpPlugin.IGNORED_INDEXES_KEY, "", null);
+ (HelpPlugin.PLUGIN_ID, HelpPlugin.IGNORED_INDEXES_KEY, "", null);
setBaseTocs("");
setIgnoredTocs("");
setIgnoredIndexes("");
@@ -70,18 +70,18 @@ public class HelpDataTest {
}
private void setBaseTocs(String value) {
- IEclipsePreferences pref = InstanceScope.INSTANCE.getNode(HelpPlugin.PLUGIN_ID);
- pref.put(HelpPlugin.BASE_TOCS_KEY, value);
+ IEclipsePreferences pref = InstanceScope.INSTANCE.getNode(HelpPlugin.PLUGIN_ID);
+ pref.put(HelpPlugin.BASE_TOCS_KEY, value);
}
private void setIgnoredTocs(String value) {
- IEclipsePreferences pref = InstanceScope.INSTANCE.getNode(HelpPlugin.PLUGIN_ID);
- pref.put(HelpPlugin.IGNORED_TOCS_KEY, value);
+ IEclipsePreferences pref = InstanceScope.INSTANCE.getNode(HelpPlugin.PLUGIN_ID);
+ pref.put(HelpPlugin.IGNORED_TOCS_KEY, value);
}
private void setIgnoredIndexes(String value) {
- IEclipsePreferences pref = InstanceScope.INSTANCE.getNode(HelpPlugin.PLUGIN_ID);
- pref.put(HelpPlugin.IGNORED_INDEXES_KEY, value);
+ IEclipsePreferences pref = InstanceScope.INSTANCE.getNode(HelpPlugin.PLUGIN_ID);
+ pref.put(HelpPlugin.IGNORED_INDEXES_KEY, value);
}
@Test
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ContentServletTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ContentServletTest.java
index ca97940fb..bb27b932b 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ContentServletTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ContentServletTest.java
@@ -45,7 +45,7 @@ public class ContentServletTest {
final String path = "/data/help/index/topic1.html";
String remoteContent = RemoteTestUtils.getRemoteContent(UA_TESTS, path, "en");
String localContent = RemoteTestUtils.getLocalContent(UA_TESTS, path);
- assertEquals(remoteContent, localContent);
+ assertEquals(remoteContent, localContent);
}
@Test
@@ -53,7 +53,7 @@ public class ContentServletTest {
final String path = "/data/help/manual/filter.xhtml";
String remoteContent = RemoteTestUtils.getRemoteContent(UA_TESTS, path, "en");
String localContent = RemoteTestUtils.getLocalContent(UA_TESTS, path);
- assertEquals(remoteContent, localContent);
+ assertEquals(remoteContent, localContent);
}
@Test
@@ -61,7 +61,7 @@ public class ContentServletTest {
final String path = "/data/help/search/testnl1.xhtml";
String remoteContent = RemoteTestUtils.getRemoteContent(UA_TESTS, path, "en");
String localContent = RemoteTestUtils.getLocalContent(UA_TESTS, path);
- assertEquals(remoteContent, localContent);
+ assertEquals(remoteContent, localContent);
}
@Test
@@ -70,8 +70,8 @@ public class ContentServletTest {
String remoteContent = RemoteTestUtils.getRemoteContent(UA_TESTS, path, "de");
String enLocalContent = RemoteTestUtils.getLocalContent(UA_TESTS, path);
String deLocalContent = RemoteTestUtils.getLocalContent(UA_TESTS, "/nl/de" + path);
- assertEquals(remoteContent, deLocalContent);
- assertFalse(remoteContent.equals(enLocalContent));
+ assertEquals(remoteContent, deLocalContent);
+ assertFalse(remoteContent.equals(enLocalContent));
}
@Test(expected = IOException.class)
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ContextServletTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ContextServletTest.java
index 753030a36..327793835 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ContextServletTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ContextServletTest.java
@@ -67,7 +67,7 @@ public class ContextServletTest {
@Test
public void testRemoteContextFoundDe() throws Exception {
Element[] topics = getContextsUsingLocale
- ("org.eclipse.ua.tests.test_cheatsheets", "de");
+ ("org.eclipse.ua.tests.test_cheatsheets", "de");
assertEquals(1, topics.length);
assertEquals("German Context", topics[0].getAttribute("label"));
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/GetContentUsingRemoteHelp.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/GetContentUsingRemoteHelp.java
index c945dccd3..5fcf061dc 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/GetContentUsingRemoteHelp.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/GetContentUsingRemoteHelp.java
@@ -37,8 +37,8 @@ public class GetContentUsingRemoteHelp {
@Before
public void setUp() throws Exception {
BaseHelpSystem.ensureWebappRunning();
- mode = BaseHelpSystem.getMode();
- RemotePreferenceStore.savePreferences();
+ mode = BaseHelpSystem.getMode();
+ RemotePreferenceStore.savePreferences();
RemotePreferenceStore.setMockRemoteServer();
RemotePreferenceStore.disableErrorPage();
BaseHelpSystem.setMode(BaseHelpSystem.MODE_INFOCENTER);
@@ -63,8 +63,8 @@ public class GetContentUsingRemoteHelp {
@Test
public void testContentFound() throws Exception {
- final String path = "/data/help/index/topic1.html";
- String remoteContent = getHelpContent("mock.toc", path, "en");
+ final String path = "/data/help/index/topic1.html";
+ String remoteContent = getHelpContent("mock.toc", path, "en");
int port = TestServerManager.getPort(0);
String expectedContent = RemoteTestUtils.createMockContent("mock.toc", path, "en", port);
assertEquals(expectedContent, remoteContent);
@@ -72,8 +72,8 @@ public class GetContentUsingRemoteHelp {
@Test
public void testContentFoundDe() throws Exception {
- final String path = "/data/help/index/topic2.html";
- String remoteContent = getHelpContent("mock.toc", path, "de");
+ final String path = "/data/help/index/topic2.html";
+ String remoteContent = getHelpContent("mock.toc", path, "de");
int port = TestServerManager.getPort(0);
String expectedContent = RemoteTestUtils.createMockContent("mock.toc", path, "de", port);
assertEquals(expectedContent, remoteContent);
@@ -81,8 +81,8 @@ public class GetContentUsingRemoteHelp {
@Test
public void testLocalBeatsRemote() throws Exception {
- final String path = "/doc/help_home.html";
- String plugin = "org.eclipse.help.base";
+ final String path = "/doc/help_home.html";
+ String plugin = "org.eclipse.help.base";
String helpContent = getHelpContent(plugin, path, "en");
String localContent = RemoteTestUtils.getLocalContent(plugin, path);
assertEquals(localContent, helpContent);
@@ -93,8 +93,8 @@ public class GetContentUsingRemoteHelp {
RemotePreferenceStore.setMockRemotePriority();
HelpPlugin.getTocManager().clearCache();
HelpPlugin.getTocManager().getTocs("en");
- final String path = "/doc/help_home.html";
- String plugin = "org.eclipse.help.base";
+ final String path = "/doc/help_home.html";
+ String plugin = "org.eclipse.help.base";
String helpContent = getHelpContent(plugin, path, "en");
int port = TestServerManager.getPort(0);
@@ -109,20 +109,20 @@ public class GetContentUsingRemoteHelp {
HelpPlugin.getTocManager().clearCache();
HelpPlugin.getTocManager().getTocs("en");
//Verify help coming from first one
- final String path = "/doc/help_home.html";
- String plugin = "org.eclipse.help.base";
- String helpContent = GetContentUsingRemoteHelp.getHelpContent(plugin, path, "en");
+ final String path = "/doc/help_home.html";
+ String plugin = "org.eclipse.help.base";
+ String helpContent = GetContentUsingRemoteHelp.getHelpContent(plugin, path, "en");
- //Get remote content from first one in prefs
+ //Get remote content from first one in prefs
- int port0 = TestServerManager.getPort(0);
- String remoteContent0 = RemoteTestUtils.createMockContent(plugin, path, "en", port0);
+ int port0 = TestServerManager.getPort(0);
+ String remoteContent0 = RemoteTestUtils.createMockContent(plugin, path, "en", port0);
- int port1 = TestServerManager.getPort(1);
- String remoteContent1 = RemoteTestUtils.createMockContent(plugin, path, "en", port1);
+ int port1 = TestServerManager.getPort(1);
+ String remoteContent1 = RemoteTestUtils.createMockContent(plugin, path, "en", port1);
- assertEquals(remoteContent0, helpContent);
- assertFalse(remoteContent1.equals(helpContent));
+ assertEquals(remoteContent0, helpContent);
+ assertFalse(remoteContent1.equals(helpContent));
}
@@ -133,21 +133,21 @@ public class GetContentUsingRemoteHelp {
HelpPlugin.getTocManager().clearCache();
HelpPlugin.getTocManager().getTocs("en");
//Verify help coming from first one
- final String path = "/doc/help_home.html";
- String plugin = "org.eclipse.help.base";
- String helpContent = GetContentUsingRemoteHelp.getHelpContent(plugin, path, "en");
+ final String path = "/doc/help_home.html";
+ String plugin = "org.eclipse.help.base";
+ String helpContent = GetContentUsingRemoteHelp.getHelpContent(plugin, path, "en");
- //Get remote content from second in prefs
+ //Get remote content from second in prefs
- int port0 = TestServerManager.getPort(0);
- String remoteContent0 = RemoteTestUtils.createMockContent(plugin, path, "en", port0);
+ int port0 = TestServerManager.getPort(0);
+ String remoteContent0 = RemoteTestUtils.createMockContent(plugin, path, "en", port0);
- int port1 = TestServerManager.getPort(1);
- String remoteContent1 = RemoteTestUtils.createMockContent(plugin, path, "en", port1);
+ int port1 = TestServerManager.getPort(1);
+ String remoteContent1 = RemoteTestUtils.createMockContent(plugin, path, "en", port1);
- assertEquals(remoteContent1, helpContent);
- assertFalse(remoteContent0.equals(helpContent));
+ assertEquals(remoteContent1, helpContent);
+ assertFalse(remoteContent0.equals(helpContent));
}
@@ -157,7 +157,7 @@ public class GetContentUsingRemoteHelp {
HelpPlugin.getTocManager().clearCache();
HelpPlugin.getTocManager().getTocs("en");
final String path = "/data/help/nonlocal.html";
- String plugin = "org.eclipse.help.base";
+ String plugin = "org.eclipse.help.base";
String remoteContent = getHelpContent(plugin, path, "en");
int port = TestServerManager.getPort(0);
String expectedContent = RemoteTestUtils.createMockContent(plugin, path, "en", port);
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/GetContextUsingRemoteHelp.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/GetContextUsingRemoteHelp.java
index b0818d852..a4c7b1a77 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/GetContextUsingRemoteHelp.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/GetContextUsingRemoteHelp.java
@@ -33,8 +33,8 @@ public class GetContextUsingRemoteHelp {
@Before
public void setUp() throws Exception {
- RemotePreferenceStore.savePreferences();
- mode = BaseHelpSystem.getMode();
+ RemotePreferenceStore.savePreferences();
+ mode = BaseHelpSystem.getMode();
RemotePreferenceStore.setMockRemoteServer();
BaseHelpSystem.setMode(BaseHelpSystem.MODE_INFOCENTER);
}
@@ -57,7 +57,7 @@ public class GetContextUsingRemoteHelp {
assertEquals("context_one_en", title);
RemotePreferenceStore.disableRemoteHelp();
context = HelpPlugin.getContextManager().getContext("org.eclipse.ua.tests.test_one", "en");
- assertNull(context);
+ assertNull(context);
}
@Test
@@ -79,7 +79,7 @@ public class GetContextUsingRemoteHelp {
@Test
public void testContextNotFound() throws Exception {
IContext context = HelpPlugin.getContextManager().getContext("org.eclipse.ua.tests.no_such_ctx", "en");
- assertNull(context);
+ assertNull(context);
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/IndexServletTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/IndexServletTest.java
index a4f2780c1..70fa9941b 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/IndexServletTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/IndexServletTest.java
@@ -56,70 +56,70 @@ public class IndexServletTest {
public void testIndexServletContainsSimpleWord() throws Exception {
Node root = getIndexContributions("en");
Element[] UARoot = findEntryInAllContributions(root, "xyz");
- assertEquals(1, UARoot.length);
+ assertEquals(1, UARoot.length);
}
@Test
public void testIndexServletContainsWordWithAccent() throws Exception {
Node root = getIndexContributions("en");
Element[] UARoot = findEntryInAllContributions(root, "\u00E1mbito");
- assertEquals(1, UARoot.length);
+ assertEquals(1, UARoot.length);
}
@Test
public void testIndexServletContainsWordWithGt() throws Exception {
Node root = getIndexContributions("en");
Element[] UARoot = findEntryInAllContributions(root, "character >");
- assertEquals(1, UARoot.length);
+ assertEquals(1, UARoot.length);
}
@Test
public void testIndexServletContainsWordWithLt() throws Exception {
Node root = getIndexContributions("en");
Element[] UARoot = findEntryInAllContributions(root, "character <");
- assertEquals(1, UARoot.length);
+ assertEquals(1, UARoot.length);
}
@Test
public void testIndexServletContainsWordWithAmp() throws Exception {
Node root = getIndexContributions("en");
Element[] UARoot = findEntryInAllContributions(root, "character &");
- assertEquals(1, UARoot.length);
+ assertEquals(1, UARoot.length);
}
@Test
public void testIndexServletContainsWordWithQuot() throws Exception {
Node root = getIndexContributions("en");
Element[] UARoot = findEntryInAllContributions(root, "character \"");
- assertEquals(1, UARoot.length);
+ assertEquals(1, UARoot.length);
}
@Test
public void testIndexServletContainsWordWithApostrophe() throws Exception {
Node root = getIndexContributions("en");
Element[] UARoot = findEntryInAllContributions(root, "character '");
- assertEquals(1, UARoot.length);
+ assertEquals(1, UARoot.length);
}
@Test
public void testDeWordNotInEnIndex() throws Exception {
Node root = getIndexContributions("en");
Element[] UARoot = findEntryInAllContributions(root, "munich");
- assertEquals(0, UARoot.length);
+ assertEquals(0, UARoot.length);
}
@Test
public void testWordInDeIndex() throws Exception {
Node root = getIndexContributions("de");
Element[] UARoot = findEntryInAllContributions(root, "munich");
- assertEquals(1, UARoot.length);
+ assertEquals(1, UARoot.length);
}
@Test
public void testWordNotInDeIndex() throws Exception {
Node root = getIndexContributions("de");
Element[] UARoot = findEntryInAllContributions(root, "xyz");
- assertEquals(0, UARoot.length);
+ assertEquals(0, UARoot.length);
}
private Element[] findEntryInAllContributions(Node parent, String keyword) {
@@ -131,7 +131,7 @@ public class IndexServletTest {
Element nextElement = (Element)next;
if ("indexContribution".equals(nextElement.getTagName())) {
findEntryInIndexContribution(nextElement, keyword, results);
- }
+ }
}
}
return results.toArray(new Element[results.size()]);
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/LoadIndexUsingRemoteHelp.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/LoadIndexUsingRemoteHelp.java
index 7297180db..56d18699a 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/LoadIndexUsingRemoteHelp.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/LoadIndexUsingRemoteHelp.java
@@ -33,8 +33,8 @@ public class LoadIndexUsingRemoteHelp {
@Before
public void setUp() throws Exception {
- RemotePreferenceStore.savePreferences();
- mode = BaseHelpSystem.getMode();
+ RemotePreferenceStore.savePreferences();
+ mode = BaseHelpSystem.getMode();
BaseHelpSystem.setMode(BaseHelpSystem.MODE_INFOCENTER);
}
@@ -71,7 +71,7 @@ public class LoadIndexUsingRemoteHelp {
HelpPlugin.getIndexManager().clearCache();
index = HelpPlugin.getIndexManager().getIndex(locale);
// Entry 1 has the same child on each remote server, Entry 2 has different children
- entry1 = matchingEntries(index, "entry1_" + locale);
+ entry1 = matchingEntries(index, "entry1_" + locale);
entry2 = matchingEntries(index, "entry2_" + locale);
assertEquals(1, entry1.length);
assertEquals(1, entry1[0].getTopics().length);
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/LoadTocUsingRemoteHelp.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/LoadTocUsingRemoteHelp.java
index 6219a48fb..9ea8d9c27 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/LoadTocUsingRemoteHelp.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/LoadTocUsingRemoteHelp.java
@@ -29,8 +29,8 @@ public class LoadTocUsingRemoteHelp {
@Before
public void setUp() throws Exception {
- RemotePreferenceStore.savePreferences();
- mode = BaseHelpSystem.getMode();
+ RemotePreferenceStore.savePreferences();
+ mode = BaseHelpSystem.getMode();
}
@After
@@ -53,7 +53,7 @@ public class LoadTocUsingRemoteHelp {
assertEquals(0, deTocs);
deTocs = matchingTocs(tocs, "Mock Toc 2 de");
assertEquals(0, deTocs);
- RemotePreferenceStore.disableRemoteHelp();
+ RemotePreferenceStore.disableRemoteHelp();
}
@Test
@@ -70,7 +70,7 @@ public class LoadTocUsingRemoteHelp {
assertEquals(1, deTocs);
deTocs = matchingTocs(tocs, "Mock Toc 2 de");
assertEquals(1, deTocs);
- RemotePreferenceStore.disableRemoteHelp();
+ RemotePreferenceStore.disableRemoteHelp();
}
@Test
@@ -83,7 +83,7 @@ public class LoadTocUsingRemoteHelp {
assertEquals(1, enTocs);
int deTocs = matchingTocs(tocs, "Mock Toc de");
assertEquals(0, deTocs);
- RemotePreferenceStore.disableRemoteHelp();
+ RemotePreferenceStore.disableRemoteHelp();
}
/*
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockContentServlet.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockContentServlet.java
index 8f334e8d3..6a5564cf3 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockContentServlet.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockContentServlet.java
@@ -46,8 +46,8 @@ public class MockContentServlet extends HttpServlet {
resp.setStatus(HttpServletResponse.SC_NOT_FOUND);
} else {
int port = req.getLocalPort();
- String response = RemoteTestUtils.createMockContent(plugin, file, locale, port);
- resp.getWriter().write(response);
+ String response = RemoteTestUtils.createMockContent(plugin, file, locale, port);
+ resp.getWriter().write(response);
}
callcount++;
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockSearchServlet.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockSearchServlet.java
index f2f9393ff..260243d56 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockSearchServlet.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockSearchServlet.java
@@ -46,8 +46,8 @@ public class MockSearchServlet extends HttpServlet {
0, null, null, null, false);
results.add(hit);
}
- String response = SearchServlet.serialize(results);
- resp.getWriter().write(response);
+ String response = SearchServlet.serialize(results);
+ resp.getWriter().write(response);
}
private boolean isSearchHit(String phrase, String locale) {
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockTocServlet.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockTocServlet.java
index 5df3acbcf..110d75200 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockTocServlet.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/MockTocServlet.java
@@ -46,10 +46,10 @@ public class MockTocServlet extends TocServlet {
UserTopic topic2 = new UserTopic("Topic_" + locale, "http://www.eclipse.org", true);
toc2.addTopic(topic2);
TocContribution contribution2 = createToc(toc2, "mock.toc", locale);
- String response;
+ String response;
try {
response = serialize(new TocContribution[] { contribution1, contribution2 }, locale);
- resp.getWriter().write(response);
+ resp.getWriter().write(response);
} catch (TransformerException e) {
resp.sendError(400);
}
@@ -62,10 +62,10 @@ public class MockTocServlet extends TocServlet {
contribution.setContributorId(id);
contribution.setExtraDocuments(new String[0]);
contribution.setLocale(locale);
- contribution.setPrimary(true);
- contribution.setSubToc(false);
+ contribution.setPrimary(true);
+ contribution.setSubToc(false);
contribution.setId(id);
- contribution.setToc(new Toc(toc));
+ contribution.setToc(new Toc(toc));
return contribution;
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ParallelSearchServletTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ParallelSearchServletTest.java
index a304a373f..9e927d168 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ParallelSearchServletTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ParallelSearchServletTest.java
@@ -89,24 +89,24 @@ public class ParallelSearchServletTest {
@Test
public void testNotFoundInParallel() {
ParallelTestSupport.testInParallel(new SearchServletTester[]
- { new SearchServletTester("duernfryehd", 0),
- new SearchServletTester("duernfryehd", 0)}, 100);
+ { new SearchServletTester("duernfryehd", 0),
+ new SearchServletTester("duernfryehd", 0)}, 100);
}
@Test
public void testFoundInParallel() {
ParallelTestSupport.testInParallel(new SearchServletTester[]
- { new SearchServletTester("jehcyqpfjs", 1),
- new SearchServletTester("jehcyqpfjs", 1)}, 100);
+ { new SearchServletTester("jehcyqpfjs", 1),
+ new SearchServletTester("jehcyqpfjs", 1)}, 100);
}
@Test
public void testMixedParallelSearches() {
ParallelTestSupport.testInParallel(new SearchServletTester[]
- { new SearchServletTester("jehcyqpfjs", 1),
+ { new SearchServletTester("jehcyqpfjs", 1),
new SearchServletTester("duernfryehd", 0),
- new SearchServletTester("jehcyqpfjs", 1),
- new SearchServletTester("duernfryehd", 0)}, 100);
+ new SearchServletTester("jehcyqpfjs", 1),
+ new SearchServletTester("duernfryehd", 0)}, 100);
}
private Node[] getSearchHitsFromServlet(String phrase)
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ParallelSearchUsingRemote.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ParallelSearchUsingRemote.java
index 19920e7eb..2450d316f 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ParallelSearchUsingRemote.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/ParallelSearchUsingRemote.java
@@ -44,8 +44,8 @@ public class ParallelSearchUsingRemote {
@Before
public void setUp() throws Exception {
- RemotePreferenceStore.savePreferences();
- mode = BaseHelpSystem.getMode();
+ RemotePreferenceStore.savePreferences();
+ mode = BaseHelpSystem.getMode();
}
@After
@@ -59,7 +59,7 @@ public class ParallelSearchUsingRemote {
BaseHelpSystem.setMode(BaseHelpSystem.MODE_INFOCENTER);
RemotePreferenceStore.setMockRemoteServer();
ParallelTestSupport.testSingleCase(new Searcher(), 100);
- RemotePreferenceStore.disableRemoteHelp();
+ RemotePreferenceStore.disableRemoteHelp();
}
@Test
@@ -71,7 +71,7 @@ public class ParallelSearchUsingRemote {
testCases[i] = new Searcher();
}
ParallelTestSupport.testInParallel(testCases, 100);
- RemotePreferenceStore.disableRemoteHelp();
+ RemotePreferenceStore.disableRemoteHelp();
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceStore.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceStore.java
index 5941a4bbb..dd6592147 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceStore.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceStore.java
@@ -34,36 +34,36 @@ public class RemotePreferenceStore {
private static String pageNotFound;
public static void savePreferences() throws Exception {
- namePreference = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_NAME,
- "", null);
- hostPreference = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_HOST,
- "", null);
+ namePreference = Platform.getPreferencesService().getString
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_NAME,
+ "", null);
+ hostPreference = Platform.getPreferencesService().getString
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_HOST,
+ "", null);
pathPreference = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PATH,
- "", null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PATH,
+ "", null);
protocolPreference = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PROTOCOL,
- "", null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PROTOCOL,
+ "", null);
portPreference = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PORT,
- "", null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PORT,
+ "", null);
icEnabledPreference = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ICEnabled,
- "", null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ICEnabled,
+ "", null);
defaultPort = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_DEFAULT_PORT,
- "", null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_DEFAULT_PORT,
+ "", null);
helpOn = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ON,
- "", null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ON,
+ "", null);
remoteHelpPreferred = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PREFERRED,
- "", null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PREFERRED,
+ "", null);
pageNotFound = Platform.getPreferencesService().getString
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_PAGE_NOT_FOUND,
- "", null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_PAGE_NOT_FOUND,
+ "", null);
}
public static void restorePreferences() throws Exception {
@@ -81,7 +81,7 @@ public class RemotePreferenceStore {
}
public static void setMockRemoteServer() throws Exception {
- TestServerManager.start("ua.test", 0);
+ TestServerManager.start("ua.test", 0);
RemotePreferenceTest.setPreference("remoteHelpOn", "true");
RemotePreferenceTest.setPreference("remoteHelpHost", "localhost");
RemotePreferenceTest.setPreference("remoteHelpPath", "/help");
@@ -94,8 +94,8 @@ public class RemotePreferenceStore {
}
public static void setTwoMockRemoteServers() throws Exception {
- TestServerManager.start("ua.test", 0);
- TestServerManager.start("ua.test2", 1);
+ TestServerManager.start("ua.test", 0);
+ TestServerManager.start("ua.test2", 1);
RemotePreferenceTest.setPreference("remoteHelpOn", "true");
RemotePreferenceTest.setPreference("remoteHelpHost", "localhost,localhost");
RemotePreferenceTest.setPreference("remoteHelpPath", "/help,/help");
@@ -108,8 +108,8 @@ public class RemotePreferenceStore {
RemotePreferenceTest.setPreference("remoteHelpICContributed", "false,false");
}
public static void setTwoMockRemoteServersReversePriority() throws Exception {
- TestServerManager.start("ua.test", 0);
- TestServerManager.start("ua.test2", 1);
+ TestServerManager.start("ua.test", 0);
+ TestServerManager.start("ua.test2", 1);
RemotePreferenceTest.setPreference("remoteHelpOn", "true");
RemotePreferenceTest.setPreference("remoteHelpHost", "localhost,localhost");
RemotePreferenceTest.setPreference("remoteHelpPath", "/help,/help");
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceTest.java
index 2bc431b73..81954be6f 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemotePreferenceTest.java
@@ -35,7 +35,7 @@ public class RemotePreferenceTest {
@Before
public void setUp() throws Exception {
- RemotePreferenceStore.savePreferences();
+ RemotePreferenceStore.savePreferences();
}
@After
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchIndexCreation.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchIndexCreation.java
index 55b783d58..2ffbecdab 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchIndexCreation.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchIndexCreation.java
@@ -37,8 +37,8 @@ public class SearchIndexCreation {
@Before
public void setUp() throws Exception {
BaseHelpSystem.ensureWebappRunning();
- mode = BaseHelpSystem.getMode();
- RemotePreferenceStore.savePreferences();
+ mode = BaseHelpSystem.getMode();
+ RemotePreferenceStore.savePreferences();
RemotePreferenceStore.setMockRemoteServer();
RemotePreferenceStore.disableErrorPage();
BaseHelpSystem.setMode(BaseHelpSystem.MODE_INFOCENTER);
@@ -103,7 +103,7 @@ public class SearchIndexCreation {
if (status.getException() != null) {
throw status.getException();
}
- fail(doc + " status = " + status.getMessage());
+ fail(doc + " status = " + status.getMessage());
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchUsingRemoteHelp.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchUsingRemoteHelp.java
index ec56f4c41..2c5c3b650 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchUsingRemoteHelp.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchUsingRemoteHelp.java
@@ -26,8 +26,8 @@ public class SearchUsingRemoteHelp {
@Before
public void setUp() throws Exception {
- RemotePreferenceStore.savePreferences();
- mode = BaseHelpSystem.getMode();
+ RemotePreferenceStore.savePreferences();
+ mode = BaseHelpSystem.getMode();
}
@After
@@ -42,8 +42,8 @@ public class SearchUsingRemoteHelp {
RemotePreferenceStore.setMockRemoteServer();
SearchTestUtils.searchOneLocale("endfdsadsads", new String[] { "http://www.eclipse.org" },
"en");
- RemotePreferenceStore.disableRemoteHelp();
- SearchTestUtils.searchOneLocale("endfdsadsads", new String[0], "en");
+ RemotePreferenceStore.disableRemoteHelp();
+ SearchTestUtils.searchOneLocale("endfdsadsads", new String[0], "en");
}
@Test
@@ -52,8 +52,8 @@ public class SearchUsingRemoteHelp {
RemotePreferenceStore.setTwoMockRemoteServers();
SearchTestUtils.searchOneLocale("endfdsadsads", new String[] { "http://www.eclipse.org" },
"en");
- RemotePreferenceStore.disableRemoteHelp();
- SearchTestUtils.searchOneLocale("endfdsadsads", new String[0], "en");
+ RemotePreferenceStore.disableRemoteHelp();
+ SearchTestUtils.searchOneLocale("endfdsadsads", new String[0], "en");
}
@Test
@@ -61,24 +61,24 @@ public class SearchUsingRemoteHelp {
BaseHelpSystem.setMode(BaseHelpSystem.MODE_INFOCENTER);
RemotePreferenceStore.setMockRemoteServer();
SearchTestUtils.searchOneLocale("dedfdsadsads", new String[] { "http://www.eclipse.org" }, "de");
- RemotePreferenceStore.disableRemoteHelp();
- SearchTestUtils.searchOneLocale("dedfdsadsads", new String[0], "de");
+ RemotePreferenceStore.disableRemoteHelp();
+ SearchTestUtils.searchOneLocale("dedfdsadsads", new String[0], "de");
}
@Test
public void testSearchEnWordInDeLocale() throws Exception {
BaseHelpSystem.setMode(BaseHelpSystem.MODE_INFOCENTER);
RemotePreferenceStore.setMockRemoteServer();
- SearchTestUtils.searchOneLocale("endfdsadsads", new String[0], "de");
- RemotePreferenceStore.disableRemoteHelp();
+ SearchTestUtils.searchOneLocale("endfdsadsads", new String[0], "de");
+ RemotePreferenceStore.disableRemoteHelp();
}
@Test
public void testSearchDeWordInEnLocale() throws Exception {
BaseHelpSystem.setMode(BaseHelpSystem.MODE_INFOCENTER);
RemotePreferenceStore.setMockRemoteServer();
- SearchTestUtils.searchOneLocale("dedfdsadsads", new String[0], "en");
- RemotePreferenceStore.disableRemoteHelp();
+ SearchTestUtils.searchOneLocale("dedfdsadsads", new String[0], "en");
+ RemotePreferenceStore.disableRemoteHelp();
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TestServerManager.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TestServerManager.java
index 1238f983a..2157f06f2 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TestServerManager.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TestServerManager.java
@@ -41,8 +41,8 @@ public class TestServerManager {
public static void stop(String webappName, int index) throws CoreException {
if (serverRunning[index]) {
- getHelpServer(index).stop(webappName);
- serverRunning[index] = false;
+ getHelpServer(index).stop(webappName);
+ serverRunning[index] = false;
}
}
@@ -51,7 +51,7 @@ public class TestServerManager {
}
public static String getHost(int index) {
- return getHelpServer(index).getHost();
+ return getHelpServer(index).getHost();
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TocServletTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TocServletTest.java
index 90f53d0b4..b7b094b14 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TocServletTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/TocServletTest.java
@@ -56,51 +56,51 @@ public class TocServletTest {
public void testTocServletContainsUAToc() throws Exception {
Node root = getTocContributions("en");
Element[] UARoot = findContributionById(root, "/org.eclipse.ua.tests/data/help/toc/root.xml");
- assertEquals(1, UARoot.length);
+ assertEquals(1, UARoot.length);
}
@Test
public void testTocServletContainsFilteredToc() throws Exception {
Node root = getTocContributions("en");
Element[] UARoot = findContributionById(root, "/org.eclipse.ua.tests/data/help/toc/filteredToc/toc.xml");
- assertEquals(1, UARoot.length);
+ assertEquals(1, UARoot.length);
}
@Test
public void testTocServletContainsUnlinkedToc() throws Exception {
Node root = getTocContributions("en");
Element[] UARoot = findContributionById(root, "/org.eclipse.ua.tests/data/help/toc/filteredToc/nonPrimaryToc.xml");
- assertEquals(1, UARoot.length);
+ assertEquals(1, UARoot.length);
}
@Test
public void testReadEnToc() throws Exception {
Node root = getTocContributions("en");
Element[] uaRoot = findContributionById(root, "/org.eclipse.ua.tests/data/help/search/toc.xml");
- assertEquals(1, uaRoot.length);
- Element[] toc = findChildren(uaRoot[0], "toc", "label", "search");
- assertEquals(1, toc.length);
- Element[] topicSearch = findChildren(toc[0], "topic", "label", "search");
- assertEquals(1, topicSearch.length);
- Element[] topicEn = findChildren(topicSearch[0], "topic", "label", "testen.html");
- assertEquals(1, topicEn.length);
- Element[] topicDe = findChildren(topicSearch[0], "topic", "label", "testde.html");
- assertEquals(0, topicDe.length);
+ assertEquals(1, uaRoot.length);
+ Element[] toc = findChildren(uaRoot[0], "toc", "label", "search");
+ assertEquals(1, toc.length);
+ Element[] topicSearch = findChildren(toc[0], "topic", "label", "search");
+ assertEquals(1, topicSearch.length);
+ Element[] topicEn = findChildren(topicSearch[0], "topic", "label", "testen.html");
+ assertEquals(1, topicEn.length);
+ Element[] topicDe = findChildren(topicSearch[0], "topic", "label", "testde.html");
+ assertEquals(0, topicDe.length);
}
@Test
public void testReadDeToc() throws Exception {
Node root = getTocContributions("de");
Element[] uaRoot = findContributionById(root, "/org.eclipse.ua.tests/data/help/search/toc.xml");
- assertEquals(1, uaRoot.length);
- Element[] toc = findChildren(uaRoot[0], "toc", "label", "search");
- assertEquals(1, toc.length);
- Element[] topicSearch = findChildren(toc[0], "topic", "label", "search");
- assertEquals(1, topicSearch.length);
- Element[] topicEn = findChildren(topicSearch[0], "topic", "label", "testen.html");
- assertEquals(0, topicEn.length);
- Element[] topicDe = findChildren(topicSearch[0], "topic", "label", "testde.html");
- assertEquals(1, topicDe.length);
+ assertEquals(1, uaRoot.length);
+ Element[] toc = findChildren(uaRoot[0], "toc", "label", "search");
+ assertEquals(1, toc.length);
+ Element[] topicSearch = findChildren(toc[0], "topic", "label", "search");
+ assertEquals(1, topicSearch.length);
+ Element[] topicEn = findChildren(topicSearch[0], "topic", "label", "testen.html");
+ assertEquals(0, topicEn.length);
+ Element[] topicDe = findChildren(topicSearch[0], "topic", "label", "testde.html");
+ assertEquals(1, topicDe.length);
}
private Element[] findContributionById(Node root, String id) {
@@ -116,7 +116,7 @@ public class TocServletTest {
Element nextElement = (Element)next;
if ( childKind.equals(nextElement.getTagName()) && attributeValue.equals(nextElement.getAttribute(attributeName))) {
- results.add(next);
+ results.add(next);
}
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/scope/IntersectionTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/scope/IntersectionTest.java
index c4e406d19..53400feaf 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/scope/IntersectionTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/scope/IntersectionTest.java
@@ -26,7 +26,7 @@ public class IntersectionTest {
private AbstractHelpScope createScope(char char1, char char2) {
AbstractHelpScope result = new IntersectionScope(
new AbstractHelpScope[]{new MockScope(char1, true),
- new MockScope(char2, true)});
+ new MockScope(char2, true)});
return result;
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/scope/UnionTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/scope/UnionTest.java
index 592a131c7..b5b5ae746 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/scope/UnionTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/scope/UnionTest.java
@@ -26,7 +26,7 @@ public class UnionTest {
private AbstractHelpScope createScope(char char1, char char2) {
AbstractHelpScope result = new UnionScope(
new AbstractHelpScope[]{new MockScope(char1, true),
- new MockScope(char2, true)});
+ new MockScope(char2, true)});
return result;
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/AnalyzerTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/AnalyzerTest.java
index 71b83b208..def6b987c 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/AnalyzerTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/AnalyzerTest.java
@@ -24,90 +24,90 @@ public class AnalyzerTest {
private final String[] supportedLanguages = { "en", "pt", "ja", "zh", "cs", "de", "el", "fr", "nl", "ru", "ar" };
@Test
- public void testEnglishAnalyzer() {
- checkAnalyzer("en", "en");
- }
+ public void testEnglishAnalyzer() {
+ checkAnalyzer("en", "en");
+ }
@Test
- public void testEnglishUsAnalyzer() {
- checkAnalyzer("en_us", "en");
- }
+ public void testEnglishUsAnalyzer() {
+ checkAnalyzer("en_us", "en");
+ }
@Test
- public void testGermanAnalyzer_de() {
- checkAnalyzer("de", "de");
- }
+ public void testGermanAnalyzer_de() {
+ checkAnalyzer("de", "de");
+ }
@Test
- public void testGermanAnalyzer_de_DE() {
- checkAnalyzer("de_DE", "de");
- }
+ public void testGermanAnalyzer_de_DE() {
+ checkAnalyzer("de_DE", "de");
+ }
@Test
- public void testJapaneseAnalyzer() {
- checkAnalyzer("ja", "ja");
- }
+ public void testJapaneseAnalyzer() {
+ checkAnalyzer("ja", "ja");
+ }
@Test
- public void testFrenchAnalyzer() {
- checkAnalyzer("fr", "fr");
- }
+ public void testFrenchAnalyzer() {
+ checkAnalyzer("fr", "fr");
+ }
@Test
- public void testChineseAnalyzer() {
- checkAnalyzer("zh", "zh");
- }
+ public void testChineseAnalyzer() {
+ checkAnalyzer("zh", "zh");
+ }
- // Korean and japanese share an analyzer
+ // Korean and japanese share an analyzer
@Test
- public void testKoreanAnalyzer() {
- checkAnalyzer("ko", "ja");
- }
+ public void testKoreanAnalyzer() {
+ checkAnalyzer("ko", "ja");
+ }
@Test
- public void testRussianAnalyzer() {
- checkAnalyzer("ru", "ru");
- }
+ public void testRussianAnalyzer() {
+ checkAnalyzer("ru", "ru");
+ }
@Test
- public void testGreekAnalyzer() {
- checkAnalyzer("el", "el");
- }
+ public void testGreekAnalyzer() {
+ checkAnalyzer("el", "el");
+ }
- // Uses default
+ // Uses default
@Test
- public void testSpanishAnalyzer() {
- checkAnalyzer("es", "ar");
- }
+ public void testSpanishAnalyzer() {
+ checkAnalyzer("es", "ar");
+ }
@Test
- public void testPortugueseAnalyzer() {
- checkAnalyzer("pt", "pt");
- }
+ public void testPortugueseAnalyzer() {
+ checkAnalyzer("pt", "pt");
+ }
@Test
- public void testDutchAnalyzer() {
- checkAnalyzer("nl", "nl");
- }
+ public void testDutchAnalyzer() {
+ checkAnalyzer("nl", "nl");
+ }
@Test
- public void testCzechAnalyzer() {
- checkAnalyzer("cs", "cs");
- }
+ public void testCzechAnalyzer() {
+ checkAnalyzer("cs", "cs");
+ }
- // Uses default
+ // Uses default
@Test
- public void testArabicAnalyzer() {
- checkAnalyzer("ar", "ar");
- }
+ public void testArabicAnalyzer() {
+ checkAnalyzer("ar", "ar");
+ }
- // Use default
+ // Use default
@Test
- public void testHebrewAnalyzer() {
- checkAnalyzer("il", "ar");
- }
+ public void testHebrewAnalyzer() {
+ checkAnalyzer("il", "ar");
+ }
- private void checkAnalyzer(String language, String analyzerKind) {
+ private void checkAnalyzer(String language, String analyzerKind) {
AnalyzerDescriptor an = new AnalyzerDescriptor(language);
for (String nextLocale : supportedLanguages) {
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/BasicTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/BasicTest.java
index 45d8ec7ba..3c3f6aab3 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/BasicTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/BasicTest.java
@@ -24,8 +24,8 @@ public class BasicTest {
// appears in both filtered and unfiltered parts of test1.xhtml
@Test
public void testSearchFilteredAndUnfiltered() {
- SearchTestUtils.searchAllLocales ("vkrhjewiwh", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml"});
- }
+ SearchTestUtils.searchAllLocales ("vkrhjewiwh", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml"});
+ }
// try OR'ing with a word that does't exist.. should find same result
@Test
@@ -60,70 +60,70 @@ public class BasicTest {
// word is in test3.xhtml and also included by test4.xhtml, contributed
// into test5.xhtml as an extension, and replaces a paragraph in test6.xhtml.
@Test
- public void testSearchInclusionAndExtension() {
+ public void testSearchInclusionAndExtension() {
SearchTestUtils.searchAllLocales("fuejnghqjs", new String[] {"/org.eclipse.ua.tests/data/help/search/test3.xhtml", "/org.eclipse.ua.tests/data/help/search/test4.xhtml", "/org.eclipse.ua.tests/data/help/search/test5.xhtml", "/org.eclipse.ua.tests/data/help/search/test6.xhtml" });
}
// only exists in paragraph in test6.xhtml that's replaced by another one
@Test
- public void testSearchInReplacedOut() {
+ public void testSearchInReplacedOut() {
SearchTestUtils.searchAllLocales("bheufnjefa", new String[0] /* no hits*/ );
}
- // Test replacement using ExtensionProvider
+ // Test replacement using ExtensionProvider
@Test
- public void testSearchInReplaceOutUsingProvider() {
- SearchTestUtils.searchAllLocales("ausjduehf", new String[] {"/org.eclipse.ua.tests/data/help/search/test6.xhtml" } );
- }
+ public void testSearchInReplaceOutUsingProvider() {
+ SearchTestUtils.searchAllLocales("ausjduehf", new String[] {"/org.eclipse.ua.tests/data/help/search/test6.xhtml" } );
+ }
- // Test replacement using ExtensionProvider
+ // Test replacement using ExtensionProvider
@Test
- public void testSearchInReplacemenTextUsingProvider() {
- SearchTestUtils.searchAllLocales("bheufnjefb", new String[0] /* no hits*/ );
- }
+ public void testSearchInReplacemenTextUsingProvider() {
+ SearchTestUtils.searchAllLocales("bheufnjefb", new String[0] /* no hits*/ );
+ }
// sanity test to make sure it finds things in XHTML content in .html file
@Test
- public void testSearchXhtmlInHtml() {
+ public void testSearchXhtmlInHtml() {
SearchTestUtils.searchAllLocales("kejehrgaqm", new String[] {"/org.eclipse.ua.tests/data/help/search/test7.html" });
- }
+ }
// same as above, but in a section that should never be filtered
@Test
- public void testSearchXhtmlNeverFiltered() {
+ public void testSearchXhtmlNeverFiltered() {
SearchTestUtils.searchAllLocales("opqmenhfjs", new String[] {"/org.eclipse.ua.tests/data/help/search/test7.html" });
- }
+ }
// only exists in a paragraph in test7.html that should be filtered out
// make sure this works for XHTML content inside .html file
@Test
- public void testSearchFilteredXhtmlInHtml() {
+ public void testSearchFilteredXhtmlInHtml() {
SearchTestUtils.searchAllLocales("hugftnhdtg", new String[] {"/org.eclipse.ua.tests/data/help/search/test7.html" });
- }
+ }
// this doc is listed in TOC several times, using slightly different paths
@Test
- public void testSearchMultipleTocReference() {
+ public void testSearchMultipleTocReference() {
SearchTestUtils.searchAllLocales("rqfedajhtg", new String[] {"/org.eclipse.ua.tests/data/help/search/test9.htm" });
- }
+ }
@Test
- public void testSearchMultipleNonadjacentWords() {
- SearchTestUtils.searchAllLocales("gsdduvfqnh riehguanil", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml" } );
- }
+ public void testSearchMultipleNonadjacentWords() {
+ SearchTestUtils.searchAllLocales("gsdduvfqnh riehguanil", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml" } );
+ }
@Test
- public void testSearchMultipleNonadjacentExactMatch() {
- SearchTestUtils.searchAllLocales("\"gsdduvfqnh riehguanil\"", new String[0]);
- }
+ public void testSearchMultipleNonadjacentExactMatch() {
+ SearchTestUtils.searchAllLocales("\"gsdduvfqnh riehguanil\"", new String[0]);
+ }
@Test
- public void testSearchMultipleAdjacentExactMatch() {
- SearchTestUtils.searchAllLocales("\"vkrhjewiwh riehguanil\"", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml"});
- }
+ public void testSearchMultipleAdjacentExactMatch() {
+ SearchTestUtils.searchAllLocales("\"vkrhjewiwh riehguanil\"", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml"});
+ }
@Test
- public void testSearchContentProducer() {
- SearchTestUtils.searchAllLocales("egrology", new String[] { "/org.eclipse.ua.tests/generated/Generated+Parent/Parent+page+with+searchable+word+egrology+.html"});
- }
+ public void testSearchContentProducer() {
+ SearchTestUtils.searchAllLocales("egrology", new String[] { "/org.eclipse.ua.tests/generated/Generated+Parent/Parent+page+with+searchable+word+egrology+.html"});
+ }
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/EncodedCharacterSearch.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/EncodedCharacterSearch.java
index 31398d5c3..a2b550832 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/EncodedCharacterSearch.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/EncodedCharacterSearch.java
@@ -17,30 +17,30 @@ import org.junit.Test;
public class EncodedCharacterSearch {
@Test
- public void testIso8859() {
- SearchTestUtils.searchOneLocale("\u00E1guilaxaxcs", new String[] {"/org.eclipse.ua.tests/data/help/search/testnl8859.htm" }, "en");
- }
+ public void testIso8859() {
+ SearchTestUtils.searchOneLocale("\u00E1guilaxaxcs", new String[] {"/org.eclipse.ua.tests/data/help/search/testnl8859.htm" }, "en");
+ }
@Test
- public void testIso8859AccentNotIgnored() {
- SearchTestUtils.searchOneLocale("aguilaxaxcs", new String[0], "en");
- }
+ public void testIso8859AccentNotIgnored() {
+ SearchTestUtils.searchOneLocale("aguilaxaxcs", new String[0], "en");
+ }
@Test
- public void testUtf8Accented() {
- SearchTestUtils.searchOneLocale("acfele\u00F3n", new String[] {"/org.eclipse.ua.tests/data/help/search/testnlUTF8.htm" }, "en");
- }
+ public void testUtf8Accented() {
+ SearchTestUtils.searchOneLocale("acfele\u00F3n", new String[] {"/org.eclipse.ua.tests/data/help/search/testnlUTF8.htm" }, "en");
+ }
@Test
- public void testUtf8Chinese() {
- SearchTestUtils.searchOneLocale("\u8FB2\u66C6\u65B0\u5E74", new String[] {"/org.eclipse.ua.tests/data/help/search/testnlUTF8.htm" }, "en");
- }
+ public void testUtf8Chinese() {
+ SearchTestUtils.searchOneLocale("\u8FB2\u66C6\u65B0\u5E74", new String[] {"/org.eclipse.ua.tests/data/help/search/testnlUTF8.htm" }, "en");
+ }
@Test
- public void testUtf8Hebrew() {
- SearchTestUtils.searchOneLocale("\u05D0\u05B7\u05E1\u05B0\u05D8\u05B0\u05E8\u05D5\u05B9\u05E0\u05D5\u05B9\u05DE"
- + "\u05B0\u05D9\u05B8\u05D4) \u05DC\u05B4\u05E7\u05BC\u05D5\u05BC\u05D9 (\u05D9\u05E8\u05D7 \u05D0\u05D5 \u05E9\u05DE\u05E9", new String[] {"/org.eclipse.ua.tests/data/help/search/testnlUTF8.htm" }, "en");
- }
+ public void testUtf8Hebrew() {
+ SearchTestUtils.searchOneLocale("\u05D0\u05B7\u05E1\u05B0\u05D8\u05B0\u05E8\u05D5\u05B9\u05E0\u05D5\u05B9\u05DE"
+ + "\u05B0\u05D9\u05B8\u05D4) \u05DC\u05B4\u05E7\u05BC\u05D5\u05BC\u05D9 (\u05D9\u05E8\u05D7 \u05D0\u05D5 \u05E9\u05DE\u05E9", new String[] {"/org.eclipse.ua.tests/data/help/search/testnlUTF8.htm" }, "en");
+ }
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/ExtraDirTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/ExtraDirTest.java
index c5e239838..254e991b6 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/ExtraDirTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/ExtraDirTest.java
@@ -47,8 +47,8 @@ public class ExtraDirTest {
@Test
public void testContainingScope()
{
- performSearch("iusazemhdv", "/org.eclipse.ua.tests/data/help/toc/root.xml", "/org.eclipse.ua.tests/data/help/search/test8.htm" );
- }
+ performSearch("iusazemhdv", "/org.eclipse.ua.tests/data/help/toc/root.xml", "/org.eclipse.ua.tests/data/help/search/test8.htm" );
+ }
// try with another toc's search scope; shouldn't find it
@Test
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/InfocenterWorkingSetManagerTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/InfocenterWorkingSetManagerTest.java
index 62b604396..86495e7a6 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/InfocenterWorkingSetManagerTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/InfocenterWorkingSetManagerTest.java
@@ -39,7 +39,7 @@ public class InfocenterWorkingSetManagerTest {
@Test
public void testIWSMWithToc() throws IOException {
InfocenterWorkingSetManager mgr = new InfocenterWorkingSetManager
- (new MockServletRequest(), new MockServletResponse(), "en");
+ (new MockServletRequest(), new MockServletResponse(), "en");
WorkingSet wset = new WorkingSet("test");
AdaptableToc toc = mgr.getAdaptableToc("/org.eclipse.ua.tests/data/help/toc/root.xml");
assertNotNull(toc);
@@ -90,7 +90,7 @@ public class InfocenterWorkingSetManagerTest {
assertEquals(1, resources.length);
Set<AdaptableTopic> topics = new HashSet<>();
topics.add(topic1);
- assertTrue(topics.contains(resources[0]));
+ assertTrue(topics.contains(resources[0]));
checkCookies(resp);
}
@@ -113,8 +113,8 @@ public class InfocenterWorkingSetManagerTest {
Set<AdaptableTopic> topics = new HashSet<>();
topics.add(topic1);
topics.add(topic3);
- assertTrue(topics.contains(resources[0]));
- assertTrue(topics.contains(resources[1]));
+ assertTrue(topics.contains(resources[0]));
+ assertTrue(topics.contains(resources[1]));
checkCookies(resp);
}
@@ -141,9 +141,9 @@ public class InfocenterWorkingSetManagerTest {
topics.add(topic1);
topics.add(topic3);
topics.add(topic5);
- assertTrue(topics.contains(resources[0]));
- assertTrue(topics.contains(resources[1]));
- assertTrue(topics.contains(resources[2]));
+ assertTrue(topics.contains(resources[0]));
+ assertTrue(topics.contains(resources[1]));
+ assertTrue(topics.contains(resources[2]));
checkCookies(resp);
}
@@ -169,7 +169,7 @@ public class InfocenterWorkingSetManagerTest {
assertEquals(1, resources.length);
Set<AdaptableTopic> topics = new HashSet<>();
topics.add(topic1);
- assertTrue(topics.contains(resources[0]));
+ assertTrue(topics.contains(resources[0]));
checkCookies(resp);
checkCookies(resp2);
}
@@ -198,8 +198,8 @@ public class InfocenterWorkingSetManagerTest {
Set<AdaptableTopic> topics = new HashSet<>();
topics.add(topic1);
topics.add(topic3);
- assertTrue(topics.contains(resources[0]));
- assertTrue(topics.contains(resources[1]));
+ assertTrue(topics.contains(resources[0]));
+ assertTrue(topics.contains(resources[1]));
checkCookies(resp);
checkCookies(resp2);
}
@@ -231,9 +231,9 @@ public class InfocenterWorkingSetManagerTest {
topics.add(topic1);
topics.add(topic3);
topics.add(topic5);
- assertTrue(topics.contains(resources[0]));
- assertTrue(topics.contains(resources[1]));
- assertTrue(topics.contains(resources[2]));
+ assertTrue(topics.contains(resources[0]));
+ assertTrue(topics.contains(resources[1]));
+ assertTrue(topics.contains(resources[2]));
checkCookies(resp);
checkCookies(resp2);
}
@@ -287,7 +287,7 @@ public class InfocenterWorkingSetManagerTest {
int length1 = cookieLength(resp1.getCookies());
int length2 = cookieLength(resp2.getCookies());
- assertEquals(length1 + 4, length2);
+ assertEquals(length1 + 4, length2);
checkCookies(resp1);
checkCookies(resp2);
}
@@ -414,7 +414,7 @@ public class InfocenterWorkingSetManagerTest {
CriterionResource[] criteria = createResourceWithTwoCriteria();
wset.setCriteria(criteria);
mgr.addWorkingSet(wset);
- MockServletRequest req2 = new MockServletRequest();
+ MockServletRequest req2 = new MockServletRequest();
MockServletResponse resp2 = new MockServletResponse();
req2.setCookies(resp.getCookies());
InfocenterWorkingSetManager mgr2 = new InfocenterWorkingSetManager(req2, resp2, "en");
@@ -462,7 +462,7 @@ public class InfocenterWorkingSetManagerTest {
String illegalChars = resp.getIllegalCharatersFound();
if (illegalChars.equals("") || illegalChars.equals("<")) {
return;
- }
+ }
fail("Cookie contains these illegal characters " + illegalChars + '"');
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/LocaleTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/LocaleTest.java
index 0476daa6d..fa0cc5faf 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/LocaleTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/LocaleTest.java
@@ -19,113 +19,113 @@ import org.junit.Test;
public class LocaleTest {
@Test
- public void testSearchWordInDefaultOnly() {
- SearchTestUtils.searchOneLocale("duejrnfjudshebn", new String[] { "/org.eclipse.ua.tests/data/help/search/testnl1.xhtml"}, "en");
- SearchTestUtils.searchOneLocale("duejrnfjudshebn", new String[0], "de");
- }
+ public void testSearchWordInDefaultOnly() {
+ SearchTestUtils.searchOneLocale("duejrnfjudshebn", new String[] { "/org.eclipse.ua.tests/data/help/search/testnl1.xhtml"}, "en");
+ SearchTestUtils.searchOneLocale("duejrnfjudshebn", new String[0], "de");
+ }
@Test
- public void testSearchWordInNonDefaultOnly() {
- SearchTestUtils.searchOneLocale("dkdskadksak", new String[] { "/org.eclipse.ua.tests/data/help/search/testnl1.xhtml"}, "de");
- SearchTestUtils.searchOneLocale("dkdskadksak", new String[0], "en");
- }
+ public void testSearchWordInNonDefaultOnly() {
+ SearchTestUtils.searchOneLocale("dkdskadksak", new String[] { "/org.eclipse.ua.tests/data/help/search/testnl1.xhtml"}, "de");
+ SearchTestUtils.searchOneLocale("dkdskadksak", new String[0], "en");
+ }
@Test
- public void testSearchExactMatchInDefaultOnly() {
- SearchTestUtils.searchOneLocale("\"fesaggresgf duejrnfjudshebn\"", new String[] { "/org.eclipse.ua.tests/data/help/search/testnl1.xhtml"}, "en");
- SearchTestUtils.searchOneLocale("\"fesaggresgf duejrnfjudshebn\"", new String[0], "de");
- }
+ public void testSearchExactMatchInDefaultOnly() {
+ SearchTestUtils.searchOneLocale("\"fesaggresgf duejrnfjudshebn\"", new String[] { "/org.eclipse.ua.tests/data/help/search/testnl1.xhtml"}, "en");
+ SearchTestUtils.searchOneLocale("\"fesaggresgf duejrnfjudshebn\"", new String[0], "de");
+ }
@Test
- public void testSearchExactMatchInNonDefaultOnly() {
- SearchTestUtils.searchOneLocale("\"dkdskadksak redfrewfdsa\"", new String[] { "/org.eclipse.ua.tests/data/help/search/testnl1.xhtml"}, "de");
- SearchTestUtils.searchOneLocale("\"dkdskadksak redfrewfdsa\"", new String[0], "en");
- }
+ public void testSearchExactMatchInNonDefaultOnly() {
+ SearchTestUtils.searchOneLocale("\"dkdskadksak redfrewfdsa\"", new String[] { "/org.eclipse.ua.tests/data/help/search/testnl1.xhtml"}, "de");
+ SearchTestUtils.searchOneLocale("\"dkdskadksak redfrewfdsa\"", new String[0], "en");
+ }
@Test
- public void testSearchWithWildcardInDefaultOnly() {
- SearchTestUtils.searchOneLocale("duejrnf?udshebn", new String[] { "/org.eclipse.ua.tests/data/help/search/testnl1.xhtml"}, "en");
- SearchTestUtils.searchOneLocale("duejrnf?udshebn", new String[0], "de");
- }
+ public void testSearchWithWildcardInDefaultOnly() {
+ SearchTestUtils.searchOneLocale("duejrnf?udshebn", new String[] { "/org.eclipse.ua.tests/data/help/search/testnl1.xhtml"}, "en");
+ SearchTestUtils.searchOneLocale("duejrnf?udshebn", new String[0], "de");
+ }
@Test
- public void testSearchWithWildcardInNonDefaultOnly() {
- SearchTestUtils.searchOneLocale("dkd?kadksak", new String[] { "/org.eclipse.ua.tests/data/help/search/testnl1.xhtml"}, "de");
- SearchTestUtils.searchOneLocale("dkd?kadksak", new String[0], "en");
- }
+ public void testSearchWithWildcardInNonDefaultOnly() {
+ SearchTestUtils.searchOneLocale("dkd?kadksak", new String[] { "/org.eclipse.ua.tests/data/help/search/testnl1.xhtml"}, "de");
+ SearchTestUtils.searchOneLocale("dkd?kadksak", new String[0], "en");
+ }
@Test
- public void testSearchPageNotInTocForLocale() {
- SearchTestUtils.searchOneLocale("undefgfdsgfds", new String[0], "de");
- SearchTestUtils.searchOneLocale("undefgfdsgfds", new String[0], "en");
- }
+ public void testSearchPageNotInTocForLocale() {
+ SearchTestUtils.searchOneLocale("undefgfdsgfds", new String[0], "de");
+ SearchTestUtils.searchOneLocale("undefgfdsgfds", new String[0], "en");
+ }
@Test
- public void testSearchPageOnlyInDefaultToc() {
- SearchTestUtils.searchOneLocale("idskrekfuej", new String[0], "de");
- SearchTestUtils.searchOneLocale("idskrekfuej", new String[] { "/org.eclipse.ua.tests/data/help/search/test_en.html"}, "en");
- }
+ public void testSearchPageOnlyInDefaultToc() {
+ SearchTestUtils.searchOneLocale("idskrekfuej", new String[0], "de");
+ SearchTestUtils.searchOneLocale("idskrekfuej", new String[] { "/org.eclipse.ua.tests/data/help/search/test_en.html"}, "en");
+ }
@Test
- public void testSearchPageOnlyInLocalToc() {
- SearchTestUtils.searchOneLocale("deuufjfu", new String[0], "en");
- SearchTestUtils.searchOneLocale("deuufjfu", new String[] { "/org.eclipse.ua.tests/data/help/search/test_de.html"}, "de");
- }
+ public void testSearchPageOnlyInLocalToc() {
+ SearchTestUtils.searchOneLocale("deuufjfu", new String[0], "en");
+ SearchTestUtils.searchOneLocale("deuufjfu", new String[] { "/org.eclipse.ua.tests/data/help/search/test_de.html"}, "de");
+ }
@Test
- public void testSearchEnglishStemming_ed() {
- SearchTestUtils.searchOneLocale("udjerufdjd", new String[0], "de");
- SearchTestUtils.searchOneLocale("udjerufdjd", new String[] { "/org.eclipse.ua.tests/data/help/search/test10.xhtml"}, "en");
- }
+ public void testSearchEnglishStemming_ed() {
+ SearchTestUtils.searchOneLocale("udjerufdjd", new String[0], "de");
+ SearchTestUtils.searchOneLocale("udjerufdjd", new String[] { "/org.eclipse.ua.tests/data/help/search/test10.xhtml"}, "en");
+ }
@Test
- public void testSearchEnglishStemming_ing() {
- SearchTestUtils.searchOneLocale("kjfdskajdfska", new String[0], "de");
- SearchTestUtils.searchOneLocale("kjfdskajdfska", new String[] { "/org.eclipse.ua.tests/data/help/search/test10.xhtml"}, "en");
- }
+ public void testSearchEnglishStemming_ing() {
+ SearchTestUtils.searchOneLocale("kjfdskajdfska", new String[0], "de");
+ SearchTestUtils.searchOneLocale("kjfdskajdfska", new String[] { "/org.eclipse.ua.tests/data/help/search/test10.xhtml"}, "en");
+ }
- // Prefixes are not matched by stemming
+ // Prefixes are not matched by stemming
@Test
- public void testSearchEnglishStemming_re() {
- SearchTestUtils.searchOneLocale("dhdsahkdshakjd", new String[0], "de");
- SearchTestUtils.searchOneLocale("dhdsahkdshakjd", new String[0], "en");
- }
-
- /**
- * Tests that the stemmer properly removes the German "e" suffix.
- */
+ public void testSearchEnglishStemming_re() {
+ SearchTestUtils.searchOneLocale("dhdsahkdshakjd", new String[0], "de");
+ SearchTestUtils.searchOneLocale("dhdsahkdshakjd", new String[0], "en");
+ }
+
+ /**
+ * Tests that the stemmer properly removes the German "e" suffix.
+ */
@Test
- public void testSearchGermanStemming_e() {
- SearchTestUtils.searchOneLocale("dfskajkfsafaisch", new String[] { "/org.eclipse.ua.tests/data/help/search/test10.xhtml"}, "de");
- }
+ public void testSearchGermanStemming_e() {
+ SearchTestUtils.searchOneLocale("dfskajkfsafaisch", new String[] { "/org.eclipse.ua.tests/data/help/search/test10.xhtml"}, "de");
+ }
- /**
- * Tests that the stemmer properly removes the German "en" suffix.
- */
+ /**
+ * Tests that the stemmer properly removes the German "en" suffix.
+ */
@Test
- public void testSearchGermanStemming_en() {
- SearchTestUtils.searchOneLocale("kirch", new String[] { "/org.eclipse.ua.tests/data/help/search/test10.xhtml"}, "de");
- SearchTestUtils.searchOneLocale("kirch", new String[0], "en");
- }
+ public void testSearchGermanStemming_en() {
+ SearchTestUtils.searchOneLocale("kirch", new String[] { "/org.eclipse.ua.tests/data/help/search/test10.xhtml"}, "de");
+ SearchTestUtils.searchOneLocale("kirch", new String[0], "en");
+ }
@Test
- public void testSearchQualifiedNames_en() {
- SearchTestUtils.searchOneLocale("usjenfdj.udjeudj.uejdhehj", new String[] { "/org.eclipse.ua.tests/data/help/search/test10.xhtml" },
- "en" );
- SearchTestUtils.searchOneLocale("uejdhehj", new String[] { "/org.eclipse.ua.tests/data/help/search/test10.xhtml" },
- "en" );
- }
-
- /*
- * FAILS - see bug Bug 219928
- public void testSearchQualifiedNames_de() {
- SearchTestUtils.searchOneLocale("usjenfdj.udjeudj.uejdhehj", new String[] { "/org.eclipse.ua.tests/data/help/search/test10.xhtml" },
- "de" );
- SearchTestUtils.searchOneLocale("uejdhehj", new String[] { "/org.eclipse.ua.tests/data/help/search/test10.xhtml" },
- "de" );
- }
-
- */
+ public void testSearchQualifiedNames_en() {
+ SearchTestUtils.searchOneLocale("usjenfdj.udjeudj.uejdhehj", new String[] { "/org.eclipse.ua.tests/data/help/search/test10.xhtml" },
+ "en" );
+ SearchTestUtils.searchOneLocale("uejdhehj", new String[] { "/org.eclipse.ua.tests/data/help/search/test10.xhtml" },
+ "en" );
+ }
+
+ /*
+ * FAILS - see bug Bug 219928
+ public void testSearchQualifiedNames_de() {
+ SearchTestUtils.searchOneLocale("usjenfdj.udjeudj.uejdhehj", new String[] { "/org.eclipse.ua.tests/data/help/search/test10.xhtml" },
+ "de" );
+ SearchTestUtils.searchOneLocale("uejdhehj", new String[] { "/org.eclipse.ua.tests/data/help/search/test10.xhtml" },
+ "de" );
+ }
+
+ */
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/MockSearchParticipant.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/MockSearchParticipant.java
index 6eb7f8a50..ea1ffaca9 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/MockSearchParticipant.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/MockSearchParticipant.java
@@ -45,7 +45,7 @@ public class MockSearchParticipant extends SearchParticipant {
String summary = isDoc1? "Summary1" : "Summary2";
String contents = isDoc1? "jkijkijkk frgeded" : "olhoykk lgktihku";
doc.setTitle(title);
- doc.setSummary(summary);
+ doc.setSummary(summary);
doc.addContents(contents);
return Status.OK_STATUS;
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/MockSearchParticipantXML.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/MockSearchParticipantXML.java
index bdc013688..ccbc8276e 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/MockSearchParticipantXML.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/MockSearchParticipantXML.java
@@ -48,7 +48,7 @@ public class MockSearchParticipantXML extends SearchParticipantXML {
}
String summary = attributes.getValue("summary");
if (summary != null) {
- data.addToSummary(summary);
+ data.addToSummary(summary);
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java
index 94b828a3f..01323cc4b 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java
@@ -223,9 +223,9 @@ public class PrebuiltIndexCompatibility {
assertFalse(index1.equals(index2));
}
- /*
- * Verifies that a prebuilt index can be searched
- */
+ /*
+ * Verifies that a prebuilt index can be searched
+ */
private void checkReadable(String indexPath) throws IOException,
CorruptIndexException {
Path path = new Path(indexPath);
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/WildcardTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/WildcardTest.java
index 5bd5da776..02d0a41b0 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/WildcardTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/WildcardTest.java
@@ -17,54 +17,54 @@ import org.junit.Test;
public class WildcardTest {
@Test
- public void testSearchWithStar() {
- SearchTestUtils.searchAllLocales("jehc*qpfjs", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml" });
- }
+ public void testSearchWithStar() {
+ SearchTestUtils.searchAllLocales("jehc*qpfjs", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml" });
+ }
@Test
- public void testSearchWithTwoStars() {
- SearchTestUtils.searchAllLocales("jehc*qp*js", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml" });
- }
+ public void testSearchWithTwoStars() {
+ SearchTestUtils.searchAllLocales("jehc*qp*js", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml" });
+ }
@Test
- public void testSearchWithStarReplacingThreeChars() {
- SearchTestUtils.searchAllLocales("jehc*fjs", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml" });
- }
+ public void testSearchWithStarReplacingThreeChars() {
+ SearchTestUtils.searchAllLocales("jehc*fjs", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml" });
+ }
- // Test that a star does not match spaces
+ // Test that a star does not match spaces
@Test
- public void testSearchWithStarReplacingSpace() {
- SearchTestUtils.searchAllLocales("jehcyqpfjs*vkrhjewiwh", new String[0]);
- }
+ public void testSearchWithStarReplacingSpace() {
+ SearchTestUtils.searchAllLocales("jehcyqpfjs*vkrhjewiwh", new String[0]);
+ }
@Test
- public void testSearchWithQuestionMark() {
- SearchTestUtils.searchAllLocales("jehc?qpfjs", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml" });
- }
+ public void testSearchWithQuestionMark() {
+ SearchTestUtils.searchAllLocales("jehc?qpfjs", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml" });
+ }
@Test
- public void testSearchWithTwoQuestionMarks() {
- SearchTestUtils.searchAllLocales("j?hc?qpfjs", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml" });
- }
+ public void testSearchWithTwoQuestionMarks() {
+ SearchTestUtils.searchAllLocales("j?hc?qpfjs", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml" });
+ }
@Test
- public void testSearchQuestionMarkCannotReplaceTwoChars() {
- SearchTestUtils.searchAllLocales("jehc?pfjs", new String[0] );
- }
+ public void testSearchQuestionMarkCannotReplaceTwoChars() {
+ SearchTestUtils.searchAllLocales("jehc?pfjs", new String[0] );
+ }
@Test
- public void testSearchSuccessiveQuestionMarks() {
- SearchTestUtils.searchAllLocales("jehc??pfjs", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml" } );
- }
+ public void testSearchSuccessiveQuestionMarks() {
+ SearchTestUtils.searchAllLocales("jehc??pfjs", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml" } );
+ }
@Test
- public void testSearchLeadingStar() {
- SearchTestUtils.searchAllLocales("*hcyqpfjs", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml" });
- }
+ public void testSearchLeadingStar() {
+ SearchTestUtils.searchAllLocales("*hcyqpfjs", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml" });
+ }
@Test
- public void testSearchLeadingQuestionMark() {
- SearchTestUtils.searchAllLocales("?ehcyqpfjs", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml" });
- }
+ public void testSearchLeadingQuestionMark() {
+ SearchTestUtils.searchAllLocales("?ehcyqpfjs", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml" });
+ }
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/WorkingSetManagerTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/WorkingSetManagerTest.java
index 90e4ec34f..61a726c86 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/WorkingSetManagerTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/WorkingSetManagerTest.java
@@ -61,7 +61,7 @@ public class WorkingSetManagerTest {
manager.removeWorkingSet(element);
}
for (WorkingSet workingSet : workingSets) {
- manager.addWorkingSet(workingSet);
+ manager.addWorkingSet(workingSet);
}
manager.saveState();
}
@@ -114,7 +114,7 @@ public class WorkingSetManagerTest {
mgr.addWorkingSet(wset);
WorkingSetScope scope = new WorkingSetScope("test", mgr, "scope");
for (int i = 1; i < tocs.length; i++) {
- assertFalse(scope.inScope(tocs[i]));
+ assertFalse(scope.inScope(tocs[i]));
}
}
@@ -130,9 +130,9 @@ public class WorkingSetManagerTest {
WorkingSetScope scope = new WorkingSetScope("test", mgr, "scope");
for (int i = 1; i < tocs.length; i++) {
ITopic[] topics = tocs[i].getTopics();
- for (ITopic topic : topics) {
- assertFalse(scope.inScope(topic));
- }
+ for (ITopic topic : topics) {
+ assertFalse(scope.inScope(topic));
+ }
}
}
@@ -190,7 +190,7 @@ public class WorkingSetManagerTest {
WorkingSetScope scope = new WorkingSetScope("test1", mgr, "scope");
Toc[] tocs = HelpPlugin.getTocManager().getTocs(Platform.getNL());
for (Toc toc : tocs) {
- assertTrue(scope.inScope(toc));
+ assertTrue(scope.inScope(toc));
}
}
@@ -203,7 +203,7 @@ public class WorkingSetManagerTest {
for (Toc toc : tocs) {;
ITopic[] topics = toc.getTopics();
for (ITopic topic : topics) {
- assertTrue(scope.inScope(topic));
+ assertTrue(scope.inScope(topic));
}
}
}
@@ -219,7 +219,7 @@ public class WorkingSetManagerTest {
for (ITopic topic : topics) {
ITopic[] subtopics = topic.getSubtopics();
for (ITopic subtopic : subtopics) {
- assertTrue(scope.inScope(subtopic));
+ assertTrue(scope.inScope(subtopic));
}
}
}
@@ -402,7 +402,7 @@ public class WorkingSetManagerTest {
CriterionResource[] criteria = createResourceWithTwoCriteria();
wset.setCriteria(criteria);
mgr.addWorkingSet(wset);
- mgr.saveState();
+ mgr.saveState();
WorkingSetManager mgr2 = new WorkingSetManager();
WorkingSet[] readWsets = mgr2.getWorkingSets();
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/EnabledTopicTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/EnabledTopicTest.java
index 2e3756d9d..39de08579 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/EnabledTopicTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/EnabledTopicTest.java
@@ -136,41 +136,41 @@ public class EnabledTopicTest {
@Test
public void testEnabledTopicsEmptyArray() throws Exception {
- ITopic[] enabled = EnabledTopicUtils.getEnabled(new ITopic[0]);
- assertTrue(enabled.length == 0);
+ ITopic[] enabled = EnabledTopicUtils.getEnabled(new ITopic[0]);
+ assertTrue(enabled.length == 0);
}
@Test
public void testEnabledTopicsAllEnabled() throws Exception {
- ITopic[] topics = new ITopic[2];
- topics[0] = new ETopic("T1", true);
- topics[1] = new ETopic("T2", true);
+ ITopic[] topics = new ITopic[2];
+ topics[0] = new ETopic("T1", true);
+ topics[1] = new ETopic("T2", true);
ITopic[] enabled = EnabledTopicUtils.getEnabled(topics);
- assertTrue(enabled.length == 2);
- assertTrue(topics[0].getLabel().equals("T1"));
- assertTrue(topics[1].getLabel().equals("T2"));
+ assertTrue(enabled.length == 2);
+ assertTrue(topics[0].getLabel().equals("T1"));
+ assertTrue(topics[1].getLabel().equals("T2"));
}
@Test
public void testEnabledTopicsAllDisabled() throws Exception {
ITopic[] topics = new ITopic[2];
- topics[0] = new ETopic("T1", false);
- topics[1] = new ETopic("T2", false);
+ topics[0] = new ETopic("T1", false);
+ topics[1] = new ETopic("T2", false);
ITopic[] enabled = EnabledTopicUtils.getEnabled(topics);
- assertTrue(enabled.length == 0);
+ assertTrue(enabled.length == 0);
}
@Test
public void testEnabledTopicsMix() throws Exception {
ITopic[] topics = new ITopic[4];
- topics[0] = new ETopic("T1", true);
- topics[1] = new ETopic("T2", false);
- topics[2] = new ETopic("T3", true);
- topics[3] = new ETopic("T4", false);
+ topics[0] = new ETopic("T1", true);
+ topics[1] = new ETopic("T2", false);
+ topics[2] = new ETopic("T3", true);
+ topics[3] = new ETopic("T4", false);
ITopic[] enabled = EnabledTopicUtils.getEnabled(topics);
- assertEquals(2, enabled.length);
- assertEquals("T1", enabled[0].getLabel());
- assertEquals("T3", enabled[1].getLabel());
+ assertEquals(2, enabled.length);
+ assertEquals("T1", enabled[0].getLabel());
+ assertEquals("T3", enabled[1].getLabel());
}
@Test
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/HelpData.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/HelpData.java
index 86b1afcb6..525d19b8c 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/HelpData.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/HelpData.java
@@ -24,33 +24,33 @@ public class HelpData {
@Test
public void testHelpDataInPlugin() {
List<String> result = ProductPreferences.getTocOrdering("org.eclipse.ua.tests", "data/help/toc/helpData.xml", "");
- assertEquals(2, result.size());
- assertEquals("/org.eclipse.platform.doc.user/toc.xml", result.get(0));
- assertEquals("/org.eclipse.platform.doc.isv/toc.xml", result.get(1));
+ assertEquals(2, result.size());
+ assertEquals("/org.eclipse.platform.doc.user/toc.xml", result.get(0));
+ assertEquals("/org.eclipse.platform.doc.isv/toc.xml", result.get(1));
}
@Test
public void testPluginsRoot() {
List<String> result = ProductPreferences.getTocOrdering("org.eclipse.sdk", "PLUGINS_ROOT/org.eclipse.ua.tests/data/help/toc/helpData.xml", "");
- assertEquals(2, result.size());
- assertEquals("/org.eclipse.platform.doc.user/toc.xml", result.get(0));
- assertEquals("/org.eclipse.platform.doc.isv/toc.xml", result.get(1));
+ assertEquals(2, result.size());
+ assertEquals("/org.eclipse.platform.doc.user/toc.xml", result.get(0));
+ assertEquals("/org.eclipse.platform.doc.isv/toc.xml", result.get(1));
}
@Test
public void testHelpDataOverridesBaseTocs() {
List<String> result = ProductPreferences.getTocOrdering("org.eclipse.ua.tests", "data/help/toc/helpData.xml", "org.eclipse.help");
- assertEquals(2, result.size());
- assertEquals("/org.eclipse.platform.doc.user/toc.xml", result.get(0));
- assertEquals("/org.eclipse.platform.doc.isv/toc.xml", result.get(1));
+ assertEquals(2, result.size());
+ assertEquals("/org.eclipse.platform.doc.user/toc.xml", result.get(0));
+ assertEquals("/org.eclipse.platform.doc.isv/toc.xml", result.get(1));
}
@Test
public void testBaseTocs() {
List<String> result = ProductPreferences.getTocOrdering("", "", "/org.eclipse.help/toc.xml,/org.eclipse.test/toc.xml");
- assertEquals(2, result.size());
- assertEquals("/org.eclipse.help/toc.xml", result.get(0));
- assertEquals("/org.eclipse.test/toc.xml", result.get(1));
+ assertEquals(2, result.size());
+ assertEquals("/org.eclipse.help/toc.xml", result.get(0));
+ assertEquals("/org.eclipse.test/toc.xml", result.get(1));
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocSortingTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocSortingTest.java
index 62d95e6c1..03ce7cb34 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocSortingTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocSortingTest.java
@@ -61,7 +61,7 @@ public class TocSortingTest {
@Override
public ITopic[] getTopics() {
- return new ITopic[0];
+ return new ITopic[0];
}
@Override
@@ -142,9 +142,9 @@ public class TocSortingTest {
@Before
public void setUp() throws Exception {
helpDataPreference = Platform.getPreferencesService().getString
- (HelpPlugin.HELP_DATA_KEY, HelpPlugin.HELP_DATA_KEY, "", null);
+ (HelpPlugin.HELP_DATA_KEY, HelpPlugin.HELP_DATA_KEY, "", null);
baseTocsPreference = Platform.getPreferencesService().getString
- (HelpPlugin.HELP_DATA_KEY, BASE_TOCS, "", null);
+ (HelpPlugin.HELP_DATA_KEY, BASE_TOCS, "", null);
HelpData.clearProductHelpData();
ProductPreferences.resetPrimaryTocOrdering();
setHelpData(EMPTY_XML);
@@ -165,8 +165,8 @@ public class TocSortingTest {
}
private void setBaseTocs(String value) {
- IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(HelpPlugin.PLUGIN_ID);
- prefs.put(BASE_TOCS, value);
+ IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(HelpPlugin.PLUGIN_ID);
+ prefs.put(BASE_TOCS, value);
}
private String toString(ITocContribution[] tocs) {
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TopicFinderTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TopicFinderTest.java
index 080df51ef..9fdee391b 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TopicFinderTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TopicFinderTest.java
@@ -158,7 +158,7 @@ public class TopicFinderTest {
TopicFinder finder = new TopicFinder(topic, tocs, new UniversalScope());
int selectedToc = finder.getSelectedToc();
String navPath = "http://127.0.0.1:1936/help/nav/" + selectedToc +
- '_' + index1 + '_' + index2;
+ '_' + index1 + '_' + index2;
TopicFinder finder2 = new TopicFinder(navPath, tocs, new UniversalScope());
assertEquals(selectedToc, finder2.getSelectedToc());
ITopic[] topicPath = finder2.getTopicPath();
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/DocumentCreator.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/DocumentCreator.java
index 72d33252f..325c21330 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/DocumentCreator.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/DocumentCreator.java
@@ -30,10 +30,10 @@ public class DocumentCreator {
StringReader reader = new StringReader(input);
InputSource source = new InputSource(reader);
- DocumentBuilder documentBuilder = CheatSheetPlugin.getPlugin()
+ DocumentBuilder documentBuilder = CheatSheetPlugin.getPlugin()
.getDocumentBuilder();
- return documentBuilder.parse(source);
+ return documentBuilder.parse(source);
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/LoadTestServlet.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/LoadTestServlet.java
index a7125072c..7916491da 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/LoadTestServlet.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/LoadTestServlet.java
@@ -40,7 +40,7 @@ public class LoadTestServlet extends HttpServlet {
String repeatParam = req.getParameter("repeat");
int repetitions = 200;
- try {
+ try {
repetitions = Integer.parseInt(repeatParam);
} catch (NumberFormatException e) {
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ParallelTestSupport.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ParallelTestSupport.java
index 07e57a2ac..cd1d81307 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ParallelTestSupport.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ParallelTestSupport.java
@@ -84,7 +84,7 @@ public class ParallelTestSupport {
this.repetitions = repetitions;
}
- public String failureReason = null;
+ public String failureReason = null;
@Override
public void run() {
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/ChildLinkInsertion.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/ChildLinkInsertion.java
index 09cd5759e..c5deb0b5a 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/ChildLinkInsertion.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/ChildLinkInsertion.java
@@ -52,120 +52,120 @@ public class ChildLinkInsertion {
@Test
public void testEmpty() {
- final String input = "";
+ final String input = "";
checkFilter(input, input);
}
@Test
public void testNoMatch() {
- final String input = "<HEAD><HEAD/>";
+ final String input = "<HEAD><HEAD/>";
checkFilter(input, input);
}
@Test
public void testPartialMatch1() {
- final String input = "<A href = \"PLUGINS\"><!--INSTRUCT-->";
+ final String input = "<A href = \"PLUGINS\"><!--INSTRUCT-->";
checkFilter(input, input);
}
@Test
public void testPartialMatch2() {
- final String input = "<A href = \"PLUGINS\"><!A -->";
+ final String input = "<A href = \"PLUGINS\"><!A -->";
checkFilter(input, input);
}
@Test
public void testPartialMatch3() {
- final String input = "<A href = \"PLUGINS\"><!-A -->";
+ final String input = "<A href = \"PLUGINS\"><!-A -->";
checkFilter(input, input);
}
@Test
public void testPartialMatch4() {
- final String input = "<A href = \"PLUGINS\"><!--A-->";
+ final String input = "<A href = \"PLUGINS\"><!--A-->";
checkFilter(input, input);
}
@Test
public void testEndsUnmatched() {
- final String input = "<A><!--INSTR";
+ final String input = "<A><!--INSTR";
checkFilter(input, input);
}
@Test
public void testNotAtStart() {
- final String input = "<A><!-- INSERT_CHILD_LINKS-->";
+ final String input = "<A><!-- INSERT_CHILD_LINKS-->";
checkFilter(input, input);
}
@Test
public void testSpaceBeforeEnd() {
- final String input = "<A><!-- INSERT_CHILD_LINKS -->";
+ final String input = "<A><!-- INSERT_CHILD_LINKS -->";
checkFilter(input, input);
}
@Test
public void testTooManyCharacters_1() {
- final String input = "<A><!--INSERT_CHILD_LINKSS-->";
+ final String input = "<A><!--INSERT_CHILD_LINKSS-->";
checkFilter(input, input);
}
@Test
public void testTooManyCharacters_2() {
- final String input = "<A><!--INSERT_CHILD_LINKS_STYLES-->";
+ final String input = "<A><!--INSERT_CHILD_LINKS_STYLES-->";
checkFilter(input, input);
}
@Test
public void testAtStart() {
- final String input = "<!--INSERT_CHILD_LINKS--><A>";
- final String expected = "<LINKS><A>";
+ final String input = "<!--INSERT_CHILD_LINKS--><A>";
+ final String expected = "<LINKS><A>";
checkFilter(input, expected);
}
@Test
public void testChildStyle() {
- final String input = "<!--INSERT_CHILD_LINK_STYLE--><A>";
- final String expected = "<STYLE><A>";
+ final String input = "<!--INSERT_CHILD_LINK_STYLE--><A>";
+ final String expected = "<STYLE><A>";
checkFilter(input, expected);
}
@Test
public void testDefaultEncoding() {
- final String input = "";
+ final String input = "";
checkEncoding(input, null);
}
@Test
public void testEncodingUtf8() {
- final String input =
- "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">";
+ final String input =
+ "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">";
checkEncoding(input, "utf-8");
}
@Test
public void testMetaNoEncoding() {
- final String input =
- "<meta http-equiv=\"Content-Type\" content=\"text/html\">";
+ final String input =
+ "<meta http-equiv=\"Content-Type\" content=\"text/html\">";
checkEncoding(input, null);
}
@Test
public void testMultiMeta() {
- final String input =
- "<meta name=\"test\" content=\"test\">" +
- "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">" +
- "<meta name=\"test\" content=\"test\">";
+ final String input =
+ "<meta name=\"test\" content=\"test\">" +
+ "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">" +
+ "<meta name=\"test\" content=\"test\">";
checkEncoding(input, "utf-8");
}
@Test
public void testMetaAndInsert() {
- final String metaInfo = "<meta name=\"test\" content=\"test\">" +
- "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">";
+ final String metaInfo = "<meta name=\"test\" content=\"test\">" +
+ "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">";
final String input =
- metaInfo + "<!--INSERT_CHILD_LINK_STYLE--><A>";
- final String expected = metaInfo + "<STYLE><A>";
+ metaInfo + "<!--INSERT_CHILD_LINK_STYLE--><A>";
+ final String expected = metaInfo + "<STYLE><A>";
checkFilter(input, expected);
checkEncoding(input, "utf-8");
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/CommentFilterOne.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/CommentFilterOne.java
index 834dc655b..b8509f0a0 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/CommentFilterOne.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/CommentFilterOne.java
@@ -19,8 +19,8 @@ package org.eclipse.ua.tests.help.webapp;
*/
public class CommentFilterOne extends CommentFilter {
- @Override
+ @Override
protected String getCommentText() {
- return "1";
- }
+ return "1";
+ }
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/CommentFilterThree.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/CommentFilterThree.java
index 2f1fbfe1e..cad31060d 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/CommentFilterThree.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/CommentFilterThree.java
@@ -20,8 +20,8 @@ package org.eclipse.ua.tests.help.webapp;
public class CommentFilterThree extends CommentFilter {
- @Override
+ @Override
protected String getCommentText() {
- return "3";
- }
+ return "3";
+ }
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/CommentFilterTwo.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/CommentFilterTwo.java
index 1f39e2be2..c220c32e8 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/CommentFilterTwo.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/CommentFilterTwo.java
@@ -20,8 +20,8 @@ package org.eclipse.ua.tests.help.webapp;
public class CommentFilterTwo extends CommentFilter {
- @Override
+ @Override
protected String getCommentText() {
- return "2";
- }
+ return "2";
+ }
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/FilterExtensionTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/FilterExtensionTest.java
index 707c08ee9..df05d8bcf 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/FilterExtensionTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/FilterExtensionTest.java
@@ -32,7 +32,7 @@ public class FilterExtensionTest {
@After
public void tearDown() throws Exception {
- ExtraFilters.setFilters(new PrioritizedFilter[0]);
+ ExtraFilters.setFilters(new PrioritizedFilter[0]);
}
@Test
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/FilterTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/FilterTest.java
index ef7444356..42aa1e9d3 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/FilterTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/FilterTest.java
@@ -186,13 +186,13 @@ public class FilterTest {
@Test
public void testCharsetUtf8Upper() {
InputStream is = new ByteArrayInputStream(CONTENT_TYPE_UTF8UC.getBytes());
- assertEquals("UTF-8", HTMLDocParser.getCharsetFromHTML(is));
+ assertEquals("UTF-8", HTMLDocParser.getCharsetFromHTML(is));
}
@Test
public void testCharsetISO_8859_UCUpper() {
InputStream is = new ByteArrayInputStream(CONTENT_TYPE_ISO_8859_1_UC.getBytes());
- assertEquals("ISO-8859-1", HTMLDocParser.getCharsetFromHTML(is));
+ assertEquals("ISO-8859-1", HTMLDocParser.getCharsetFromHTML(is));
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HelpServerBinding.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HelpServerBinding.java
index 5d1c7d7bb..509fa5ea2 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HelpServerBinding.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HelpServerBinding.java
@@ -52,14 +52,14 @@ public class HelpServerBinding {
}
private String getHostIP() throws UnknownHostException {
- InetAddress host = InetAddress.getLocalHost();
- byte[] ipAddr = host.getAddress();
- String result = "" + ipAddr[0];
- for (int i = 1; i < ipAddr.length; i++) {
- result += '.';
- result += ipAddr[i];
- }
- return result;
+ InetAddress host = InetAddress.getLocalHost();
+ byte[] ipAddr = host.getAddress();
+ String result = "" + ipAddr[0];
+ for (int i = 1; i < ipAddr.length; i++) {
+ result += '.';
+ result += ipAddr[i];
+ }
+ return result;
}
@Test
@@ -80,7 +80,7 @@ public class HelpServerBinding {
WebappManager.start("help");
assertTrue(canAccessServer("127.0.0.1"));
if (testUsingIP) {
- assertFalse(canAccessServer(getHostIP()));
+ assertFalse(canAccessServer(getHostIP()));
}
}
@@ -91,7 +91,7 @@ public class HelpServerBinding {
WebappManager.start("help");
assertTrue(canAccessServer("127.0.0.1"));
if (testUsingIP) {
- assertTrue(canAccessServer(getHostIP()));
+ assertTrue(canAccessServer(getHostIP()));
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HelpServerInterrupt.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HelpServerInterrupt.java
index 3a438e0cc..9cff567b3 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HelpServerInterrupt.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/HelpServerInterrupt.java
@@ -78,7 +78,7 @@ public class HelpServerInterrupt {
fail("Test did not complete within 10 seconds");
}
Thread.sleep(sleepTime);
- } while (starter.isAlive());
+ } while (starter.isAlive());
Exception exception = starter.getException();
if (exception != null) {
throw exception;
@@ -97,7 +97,7 @@ public class HelpServerInterrupt {
}
starter.interrupt();
Thread.sleep(sleepTime);
- } while (starter.isAlive());
+ } while (starter.isAlive());
Exception exception = starter.getException();
if (exception != null) {
throw exception;
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/ParallelServerAccessTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/ParallelServerAccessTest.java
index 20dcc8879..4c0fe904a 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/ParallelServerAccessTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/ParallelServerAccessTest.java
@@ -65,8 +65,8 @@ public class ParallelServerAccessTest {
}
for (int i = 0; i < numberOfThreads && complete; i++) {
if (readers[i].isAlive()) {
- complete = false;
- try {
+ complete = false;
+ try {
Thread.sleep(100);
} catch (InterruptedException e) {
fail("Interrupted Exception");
@@ -140,9 +140,9 @@ public class ParallelServerAccessTest {
}
} while (nextChar != '$');
}
- if (uniqueId != value) {
- throw new UnexpectedValueException(uniqueId, value);
- }
+ if (uniqueId != value) {
+ throw new UnexpectedValueException(uniqueId, value);
+ }
}
private synchronized long getReadOperations() {
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/PluginsRootReplacement.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/PluginsRootReplacement.java
index 123dac3ad..46e2b2870 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/PluginsRootReplacement.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/PluginsRootReplacement.java
@@ -36,52 +36,52 @@ import org.junit.Test;
public class PluginsRootReplacement {
@Test
public void testEmpty() {
- final String input = "";
+ final String input = "";
checkFilter(input, input);
}
@Test
public void testNoMatch() {
- final String input = "<HEAD><HEAD/>";
+ final String input = "<HEAD><HEAD/>";
checkFilter(input, input);
}
@Test
public void testPartialMatch() {
- final String input = "<A href = \"PLUGINS\">";
+ final String input = "<A href = \"PLUGINS\">";
checkFilter(input, input);
}
@Test
public void testEndsUnmatched() {
- final String input = "<A href = \"PLUGIN";
+ final String input = "<A href = \"PLUGIN";
checkFilter(input, input);
}
@Test
public void testNotAtStart() {
- final String input = "<A href = \"../PLUGINS_ROOT/plugin/a.html\">";
+ final String input = "<A href = \"../PLUGINS_ROOT/plugin/a.html\">";
checkFilter(input, input);
}
@Test
public void testAtStart() {
- final String input = "<A href = \"PLUGINS_ROOT/plugin/a.html\">";
- final String expected = "<A href = \"../plugin/a.html\">";
+ final String input = "<A href = \"PLUGINS_ROOT/plugin/a.html\">";
+ final String expected = "<A href = \"../plugin/a.html\">";
checkFilter(input, expected);
}
@Test
public void testSecondArg() {
- final String input = "<A alt=\"alt\" href = \"PLUGINS_ROOT/plugin/a.html\">";
- final String expected = "<A alt=\"alt\" href = \"../plugin/a.html\">";
+ final String input = "<A alt=\"alt\" href = \"PLUGINS_ROOT/plugin/a.html\">";
+ final String expected = "<A alt=\"alt\" href = \"../plugin/a.html\">";
checkFilter(input, expected);
}
@Test
public void testMultipleMatches() {
- final String input = "<A href = \"PLUGINS_ROOT/plugin/a.html\"><A href = \"PLUGINS_ROOT/plugin/b.html\">";
- final String expected = "<A href = \"../plugin/a.html\"><A href = \"../plugin/b.html\">";
+ final String input = "<A href = \"PLUGINS_ROOT/plugin/a.html\"><A href = \"PLUGINS_ROOT/plugin/b.html\">";
+ final String expected = "<A href = \"../plugin/a.html\"><A href = \"../plugin/b.html\">";
checkFilter(input, expected);
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/RestrictedTopicParameter.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/RestrictedTopicParameter.java
index 0c5665e04..a40f671aa 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/RestrictedTopicParameter.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/RestrictedTopicParameter.java
@@ -40,8 +40,8 @@ public class RestrictedTopicParameter {
@Before
public void setUp() throws Exception {
restrictTopic = Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, RESTRICT_TOPIC,
- false, null);
+ (HelpBasePlugin.PLUGIN_ID, RESTRICT_TOPIC,
+ false, null);
helpMode = BaseHelpSystem.getMode();
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/UrlCoderTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/UrlCoderTest.java
index 2aef8fb22..8546900c8 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/UrlCoderTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/UrlCoderTest.java
@@ -43,7 +43,7 @@ public class UrlCoderTest {
private boolean compactEncodingIsShorter(String value) {
String compactEncoded = URLCoder.compactEncode(value);
String encoded = URLCoder.encode(value);
- return compactEncoded.length() < encoded.length();
+ return compactEncoded.length() < encoded.length();
}
@Test
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/UrlUtilsTests.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/UrlUtilsTests.java
index 5d053b204..8a7e6cd12 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/UrlUtilsTests.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/UrlUtilsTests.java
@@ -58,7 +58,7 @@ public class UrlUtilsTests {
assertEquals(23, path[0]);
assertEquals(4, path[1]);
assertEquals(5, path[2]);
- }
+ }
@Test
public void testRelativePathUnrelated() {
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/ContentServiceTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/ContentServiceTest.java
index 2d9666bfc..83f88932a 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/ContentServiceTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/ContentServiceTest.java
@@ -31,7 +31,7 @@ public class ContentServiceTest extends ContentServletTest {
final String path = "/data/help/index/topic1.html";
String remoteContent = ServicesTestUtils.getRemoteContent(UA_TESTS, path, "en");
String localContent = ServicesTestUtils.getLocalContent(UA_TESTS, path);
- assertEquals(remoteContent, localContent);
+ assertEquals(remoteContent, localContent);
}
@Override
@@ -40,7 +40,7 @@ public class ContentServiceTest extends ContentServletTest {
final String path = "/data/help/manual/filter.xhtml";
String remoteContent = ServicesTestUtils.getRemoteContent(UA_TESTS, path, "en");
String localContent = ServicesTestUtils.getLocalContent(UA_TESTS, path);
- assertEquals(remoteContent, localContent);
+ assertEquals(remoteContent, localContent);
}
@Override
@@ -49,7 +49,7 @@ public class ContentServiceTest extends ContentServletTest {
final String path = "/data/help/search/testnl1.xhtml";
String remoteContent = ServicesTestUtils.getRemoteContent(UA_TESTS, path, "en");
String localContent = ServicesTestUtils.getLocalContent(UA_TESTS, path);
- assertEquals(remoteContent, localContent);
+ assertEquals(remoteContent, localContent);
}
@Override
@@ -59,8 +59,8 @@ public class ContentServiceTest extends ContentServletTest {
String remoteContent = ServicesTestUtils.getRemoteContent(UA_TESTS, path, "de");
String enLocalContent = ServicesTestUtils.getLocalContent(UA_TESTS, path);
String deLocalContent = ServicesTestUtils.getLocalContent(UA_TESTS, "/nl/de" + path);
- assertEquals(remoteContent, deLocalContent);
- assertFalse(remoteContent.equals(enLocalContent));
+ assertEquals(remoteContent, deLocalContent);
+ assertFalse(remoteContent.equals(enLocalContent));
}
@Override
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/ExtensionServiceTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/ExtensionServiceTest.java
index d2fadaca8..eab218672 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/ExtensionServiceTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/ExtensionServiceTest.java
@@ -57,7 +57,7 @@ public class ExtensionServiceTest {
Node root = getContentExtensions("en");
Element[] UARoot = findContributionByContent(root,
"/org.eclipse.ua.tests/data/help/dynamic/shared/doc2.xml#element.1");
- assertEquals(1, UARoot.length);
+ assertEquals(1, UARoot.length);
}
@Test
@@ -65,7 +65,7 @@ public class ExtensionServiceTest {
Node root = getContentExtensions("en");
Element[] UARoot = findContributionByContent(root,
"/org.eclipse.ua.tests/data/help/dynamic/shared/doc2.xml#element.3");
- assertEquals(1, UARoot.length);
+ assertEquals(1, UARoot.length);
}
@Test
@@ -73,7 +73,7 @@ public class ExtensionServiceTest {
Node root = getContentExtensions("en");
Element[] UARoot = findContributionByContent(root,
"/org.eclipse.ua.tests/data/help/dynamic/shared/doc2.xml#element.4");
- assertEquals(0, UARoot.length);
+ assertEquals(0, UARoot.length);
}
@Test
@@ -89,7 +89,7 @@ public class ExtensionServiceTest {
Node root = getContentExtensions("en");
Element[] UARoot = findReplacementByContent(root,
"/org.eclipse.ua.tests/data/help/dynamic/shared/doc2.xml#element.1");
- assertEquals(1, UARoot.length);
+ assertEquals(1, UARoot.length);
}
@Test
@@ -134,7 +134,7 @@ public class ExtensionServiceTest {
Element nextElement = (Element)next;
if ( childKind.equals(nextElement.getTagName()) && attributeValue.equals(nextElement.getAttribute(attributeName))) {
- results.add(next);
+ results.add(next);
}
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/TocFragmentServiceTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/TocFragmentServiceTest.java
index 3ce8db5a8..bb79011ac 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/TocFragmentServiceTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/TocFragmentServiceTest.java
@@ -63,7 +63,7 @@ public class TocFragmentServiceTest {
Node root = getTreeData(url);
Element[] UARoot = findNodeById(root,
"/org.eclipse.ua.tests/data/help/toc/root.xml");
- assertEquals(1, UARoot.length);
+ assertEquals(1, UARoot.length);
}
@Test
@@ -161,7 +161,7 @@ public class TocFragmentServiceTest {
if ( childKind.equals(nextElement.getTagName())
&& attributeValue.equals(nextElement.getAttribute(attributeName))) {
- results.add(next);
+ results.add(next);
}
}
}
@@ -182,13 +182,13 @@ public class TocFragmentServiceTest {
if ( childKind.equals(nextElement.getTagName()) ) {
String href = nextElement.getAttribute("href");
if (href != null) {
- int query = href.indexOf('?');
- if (query >= 0) {
- href = href.substring(0, query);
- }
- if (href.equals (attributeValue)) {
- results.add(next);
- }
+ int query = href.indexOf('?');
+ if (query >= 0) {
+ href = href.substring(0, query);
+ }
+ if (href.equals (attributeValue)) {
+ results.add(next);
+ }
}
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TestFrame.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TestFrame.java
index 37648f319..581538f8f 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TestFrame.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TestFrame.java
@@ -43,7 +43,7 @@ public class TestFrame extends AbstractFrame {
@Override
public boolean isVisible() {
return Platform.getPreferencesService().getBoolean
- (UserAssistanceTestPlugin.getPluginId(), "extraFrame", false, null);
+ (UserAssistanceTestPlugin.getPluginId(), "extraFrame", false, null);
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TestHelpToolbarFrame.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TestHelpToolbarFrame.java
index 1cacb65cb..917d352b3 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TestHelpToolbarFrame.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TestHelpToolbarFrame.java
@@ -40,15 +40,15 @@ public class TestHelpToolbarFrame extends AbstractFrame {
return "*";
}
- @Override
+ @Override
public String getFrameAttributes() {
- return "\"marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\" scrolling=\"no\""; //$NON-NLS-1$
- }
+ return "\"marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\" scrolling=\"no\""; //$NON-NLS-1$
+ }
@Override
public boolean isVisible() {
return Platform.getPreferencesService().getBoolean
- (UserAssistanceTestPlugin.getPluginId(), "extraFrame", false, null);
+ (UserAssistanceTestPlugin.getPluginId(), "extraFrame", false, null);
}
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TitleSearchButton.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TitleSearchButton.java
index 6e3d69f3f..aed494884 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TitleSearchButton.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TitleSearchButton.java
@@ -53,7 +53,7 @@ public class TitleSearchButton extends AbstractButton {
@Override
public boolean isAddedToToolbar(String toolbarName) {
boolean addButton = Platform.getPreferencesService().getBoolean
- (UserAssistanceTestPlugin.getPluginId(), "extraButton", false, null);
+ (UserAssistanceTestPlugin.getPluginId(), "extraButton", false, null);
return (addButton & toolbarName.equals(AbstractButton.CONTENT_TOOLBAR));
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TitleSearchView.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TitleSearchView.java
index 042023dd2..c3af179a1 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TitleSearchView.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webextension/TitleSearchView.java
@@ -58,13 +58,13 @@ public class TitleSearchView extends AbstractView {
@Override
public boolean isVisible() {
return Platform.getPreferencesService().getBoolean
- (UserAssistanceTestPlugin.getPluginId(), "extraView", false, null);
+ (UserAssistanceTestPlugin.getPluginId(), "extraView", false, null);
}
@Override
public boolean isVisibleBasic() {
return Platform.getPreferencesService().getBoolean
- (UserAssistanceTestPlugin.getPluginId(), "extraView", false, null);
+ (UserAssistanceTestPlugin.getPluginId(), "extraView", false, null);
}
}
diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/anchors/ExtensionReorderingTest.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/anchors/ExtensionReorderingTest.java
index ccadfbe51..3c5b9072a 100644
--- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/anchors/ExtensionReorderingTest.java
+++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/anchors/ExtensionReorderingTest.java
@@ -69,7 +69,7 @@ public class ExtensionReorderingTest {
/*
* Recursive test to test all permutations of integers 0-4 with no
* repeats.
- * @param next the next element that has not been filled in yet
+ * @param next the next element that has not been filled in yet
*/
private void tryAll(int next) {
for (int value = 0; value < numContributions; value++) {
@@ -89,8 +89,8 @@ public class ExtensionReorderingTest {
if (next + 1 == numContributions) {
count++;
if (count % cycle == 0) {
- testReordering(order);
- count = 0;
+ testReordering(order);
+ count = 0;
}
} else {
tryAll(next + 1);
@@ -126,67 +126,67 @@ public class ExtensionReorderingTest {
}
public void readIntroConfig() {
- IExtensionRegistry registry= Platform.getExtensionRegistry();
- IConfigurationElement[] configElements = registry
- .getConfigurationElementsFor("org.eclipse.ui.intro.config");
+ IExtensionRegistry registry= Platform.getExtensionRegistry();
+ IConfigurationElement[] configElements = registry
+ .getConfigurationElementsFor("org.eclipse.ui.intro.config");
- config = getConfigurationFromAttribute(
- configElements, "introId", "org.eclipse.ua.tests.intro.anchors");
+ config = getConfigurationFromAttribute(
+ configElements, "introId", "org.eclipse.ua.tests.intro.anchors");
- introConfigExtensions = null;
+ introConfigExtensions = null;
- introConfigExtensions = getIntroConfigExtensions(
- "configId", "org.eclipse.ua.tests.intro.config.anchors");
+ introConfigExtensions = getIntroConfigExtensions(
+ "configId", "org.eclipse.ua.tests.intro.config.anchors");
}
private IConfigurationElement getConfigurationFromAttribute(
- IConfigurationElement[] configElements, String attributeName,
- String attributeValue) {
-
- // find all configs with given attribute and attribute value.
- IConfigurationElement[] filteredConfigElements = getConfigurationsFromAttribute(
- configElements, attributeName, attributeValue);
- // now validate that we got only one.
- IConfigurationElement config = ModelLoaderUtil
- .validateSingleContribution(filteredConfigElements, attributeName);
- return config;
+ IConfigurationElement[] configElements, String attributeName,
+ String attributeValue) {
+
+ // find all configs with given attribute and attribute value.
+ IConfigurationElement[] filteredConfigElements = getConfigurationsFromAttribute(
+ configElements, attributeName, attributeValue);
+ // now validate that we got only one.
+ IConfigurationElement config = ModelLoaderUtil
+ .validateSingleContribution(filteredConfigElements, attributeName);
+ return config;
}
protected IConfigurationElement[] getConfigurationsFromAttribute(
- IConfigurationElement[] configElements, String attributeName,
- String attributeValue) {
+ IConfigurationElement[] configElements, String attributeName,
+ String attributeValue) {
- // find all configs with given attribute and attribute value.
+ // find all configs with given attribute and attribute value.
Vector<IConfigurationElement> elements = new Vector<>();
- for (IConfigurationElement configElement : configElements) {
- String currentAttributeValue = configElement
- .getAttribute(attributeName);
- if (currentAttributeValue != null
- && currentAttributeValue.equals(attributeValue))
- elements.add(configElement);
- }
-
- // now return array.
- IConfigurationElement[] filteredConfigElements = new IConfigurationElement[elements
- .size()];
- elements.copyInto(filteredConfigElements);
-
- return filteredConfigElements;
- }
+ for (IConfigurationElement configElement : configElements) {
+ String currentAttributeValue = configElement
+ .getAttribute(attributeName);
+ if (currentAttributeValue != null
+ && currentAttributeValue.equals(attributeValue))
+ elements.add(configElement);
+ }
+
+ // now return array.
+ IConfigurationElement[] filteredConfigElements = new IConfigurationElement[elements
+ .size()];
+ elements.copyInto(filteredConfigElements);
+
+ return filteredConfigElements;
+ }
protected IConfigurationElement[] getIntroConfigExtensions(
- String attrributeName, String attributeValue) {
+ String attrributeName, String attributeValue) {
IExtensionRegistry registry= Platform.getExtensionRegistry();
- IConfigurationElement[] configExtensionElements = registry
- .getConfigurationElementsFor("org.eclipse.ui.intro.configExtension");
+ IConfigurationElement[] configExtensionElements = registry
+ .getConfigurationElementsFor("org.eclipse.ui.intro.configExtension");
- IConfigurationElement[] configExtensions = getConfigurationsFromAttribute(
- configExtensionElements, attrributeName, attributeValue);
+ IConfigurationElement[] configExtensions = getConfigurationsFromAttribute(
+ configExtensionElements, attrributeName, attributeValue);
- return configExtensions;
- }
+ return configExtensions;
+ }
@Test
public void testOrder123456() {
@@ -216,28 +216,28 @@ public class ExtensionReorderingTest {
AbstractIntroElement p3link = extn1.findChild("page3link");
assertNotNull(p3link);
if (elements >= 4) {
- IntroPage extn4 = (IntroPage) model.findChild("page4");
- assertNotNull(extn4);
+ IntroPage extn4 = (IntroPage) model.findChild("page4");
+ assertNotNull(extn4);
AbstractIntroElement p4link = extn2.findChild("page4link");
assertNotNull(p4link);
- if (elements >= 5) {
- IntroPage extn5 = (IntroPage) model.findChild("page5");
- assertNotNull(extn5);
+ if (elements >= 5) {
+ IntroPage extn5 = (IntroPage) model.findChild("page5");
+ assertNotNull(extn5);
AbstractIntroElement p5link = extn4.findChild("page5link");
AbstractIntroElement p5linkR = extn4.findChild("page5linkR");
if (elements == 5) {
- assertNotNull(p5link);
- assertNull(p5linkR);
+ assertNotNull(p5link);
+ assertNull(p5linkR);
} else {
- assertNull(p5link);
- assertNotNull(p5linkR);
- }
- }
+ assertNull(p5link);
+ assertNotNull(p5linkR);
+ }
+ }
}
if (elements >= 6) {
IntroPage extn6 = (IntroPage) model.findChild("page6");
- assertNotNull(extn6);
- extn6.getChildren();
+ assertNotNull(extn6);
+ extn6.getChildren();
AbstractIntroElement actionlinks = extn6.findChild("action-links");
AbstractIntroElement p5linkR = extn6.findChild("page5linkR");
assertNotNull(actionlinks);
diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/performance/OpenIntroTest.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/performance/OpenIntroTest.java
index e06949544..10a305d50 100644
--- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/performance/OpenIntroTest.java
+++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/performance/OpenIntroTest.java
@@ -41,8 +41,8 @@ public class OpenIntroTest extends PerformanceTestCase {
super.setUp();
closeIntro();
// test extensions filter by this system property
- System.setProperty("org.eclipse.ua.tests.property.isTesting", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- ExtensionPointManager.getInst().setExtensionFilter(UserAssistanceTestPlugin.getPluginId());
+ System.setProperty("org.eclipse.ua.tests.property.isTesting", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+ ExtensionPointManager.getInst().setExtensionFilter(UserAssistanceTestPlugin.getPluginId());
}
@Override
@@ -50,8 +50,8 @@ public class OpenIntroTest extends PerformanceTestCase {
super.tearDown();
closeIntro();
// test extensions filter by this system property
- System.setProperty("org.eclipse.ua.tests.property.isTesting", "false"); //$NON-NLS-1$ //$NON-NLS-2$
- ExtensionPointManager.getInst().setExtensionFilter(null);
+ System.setProperty("org.eclipse.ua.tests.property.isTesting", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+ ExtensionPointManager.getInst().setExtensionFilter(null);
}
public void testOpenIntro() throws Exception {
diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializer.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializer.java
index ec1d1a200..293b327e7 100644
--- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializer.java
+++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializer.java
@@ -39,324 +39,324 @@ public class IntroModelSerializer {
private StringBuilder buffer;
- public IntroModelSerializer(IntroModelRoot root) {
+ public IntroModelSerializer(IntroModelRoot root) {
this.buffer = new StringBuilder();
- printModelRootInfo(root, buffer);
-
- // Root Page
- IntroHomePage rootPage = root.getRootPage();
- printHomePage(rootPage, buffer);
- printPageChildren(rootPage, buffer);
-
- IntroPage[] pages = root.getPages();
- printPages(pages, buffer);
-
- buffer.append("\n\n"); //$NON-NLS-1$
- printModelFlagTests(root, buffer);
- }
-
- /*
- * Removes any platform/machine-specific paths from the given URL. This is
- * used to remove absolute paths from the serialized model in order to compare
- * results in automated tests.
- */
- private String filterURL(String url) {
- if (url != null && url.startsWith("file:/")) {
- return "file:/" + "<filtered>" + url.substring(url.lastIndexOf('/'));
- }
- return url;
- }
+ printModelRootInfo(root, buffer);
+
+ // Root Page
+ IntroHomePage rootPage = root.getRootPage();
+ printHomePage(rootPage, buffer);
+ printPageChildren(rootPage, buffer);
+
+ IntroPage[] pages = root.getPages();
+ printPages(pages, buffer);
+
+ buffer.append("\n\n"); //$NON-NLS-1$
+ printModelFlagTests(root, buffer);
+ }
+
+ /*
+ * Removes any platform/machine-specific paths from the given URL. This is
+ * used to remove absolute paths from the serialized model in order to compare
+ * results in automated tests.
+ */
+ private String filterURL(String url) {
+ if (url != null && url.startsWith("file:/")) {
+ return "file:/" + "<filtered>" + url.substring(url.lastIndexOf('/'));
+ }
+ return url;
+ }
private void printModelRootInfo(IntroModelRoot model, StringBuilder text) {
- text.append("Intro Model Content:"); //$NON-NLS-1$
- text.append("\n======================"); //$NON-NLS-1$
- text.append("\n\nModel has valid config = " + model.hasValidConfig()); //$NON-NLS-1$
- text.append("\nPresentation type = " //$NON-NLS-1$
- + model.getPresentation().getType());
- text.append("\nHome page id = " //$NON-NLS-1$
- + model.getPresentation().getHomePageId());
- IntroHead headContent = model.getPresentation().getHead();
- if (headContent != null)
- text.append("\nPresentation Shared Head = " + headContent.getSrc()); //$NON-NLS-1$
- text.append("\nNumber of pages (not including Root Page) = " //$NON-NLS-1$
- + model.getPages().length);
- text.append("\nNumber of shared groups = " //$NON-NLS-1$
- + model.getChildrenOfType(AbstractIntroElement.GROUP).length);
- text
- .append("\nNumber of unresolved extensions = " //$NON-NLS-1$
- + model
- .getChildrenOfType(AbstractIntroElement.CONTAINER_EXTENSION).length);
- }
-
- /**
- * @param text
- * @param root
- */
+ text.append("Intro Model Content:"); //$NON-NLS-1$
+ text.append("\n======================"); //$NON-NLS-1$
+ text.append("\n\nModel has valid config = " + model.hasValidConfig()); //$NON-NLS-1$
+ text.append("\nPresentation type = " //$NON-NLS-1$
+ + model.getPresentation().getType());
+ text.append("\nHome page id = " //$NON-NLS-1$
+ + model.getPresentation().getHomePageId());
+ IntroHead headContent = model.getPresentation().getHead();
+ if (headContent != null)
+ text.append("\nPresentation Shared Head = " + headContent.getSrc()); //$NON-NLS-1$
+ text.append("\nNumber of pages (not including Root Page) = " //$NON-NLS-1$
+ + model.getPages().length);
+ text.append("\nNumber of shared groups = " //$NON-NLS-1$
+ + model.getChildrenOfType(AbstractIntroElement.GROUP).length);
+ text
+ .append("\nNumber of unresolved extensions = " //$NON-NLS-1$
+ + model
+ .getChildrenOfType(AbstractIntroElement.CONTAINER_EXTENSION).length);
+ }
+
+ /**
+ * @param text
+ * @param root
+ */
private void printHomePage(AbstractIntroPage rootPage, StringBuilder text) {
- text.append("\n\nHOME PAGE: "); //$NON-NLS-1$
- text.append("\n--------------"); //$NON-NLS-1$
- text
- .append("\n\tis dynamic= " + ((IntroModelRoot) rootPage.getParent()).isDynamic()); //$NON-NLS-1$
-
- text.append("\n\tid = " + rootPage.getId()); //$NON-NLS-1$
- text.append("\n\ttitle = " + rootPage.getTitle()); //$NON-NLS-1$
- text.append("\n\tstyle = " + filterURL(rootPage.getStyle())); //$NON-NLS-1$
- text.append("\n\talt-style = " + filterURL(rootPage.getAltStyle())); //$NON-NLS-1$
- text.append("\n\turl = " + filterURL(rootPage.getUrl())); //$NON-NLS-1$
- text.append("\n\tstyle-id = " + rootPage.getStyleId()); //$NON-NLS-1$
- printPageStyles(rootPage, text);
- }
+ text.append("\n\nHOME PAGE: "); //$NON-NLS-1$
+ text.append("\n--------------"); //$NON-NLS-1$
+ text
+ .append("\n\tis dynamic= " + ((IntroModelRoot) rootPage.getParent()).isDynamic()); //$NON-NLS-1$
+
+ text.append("\n\tid = " + rootPage.getId()); //$NON-NLS-1$
+ text.append("\n\ttitle = " + rootPage.getTitle()); //$NON-NLS-1$
+ text.append("\n\tstyle = " + filterURL(rootPage.getStyle())); //$NON-NLS-1$
+ text.append("\n\talt-style = " + filterURL(rootPage.getAltStyle())); //$NON-NLS-1$
+ text.append("\n\turl = " + filterURL(rootPage.getUrl())); //$NON-NLS-1$
+ text.append("\n\tstyle-id = " + rootPage.getStyleId()); //$NON-NLS-1$
+ printPageStyles(rootPage, text);
+ }
private void printPageStyles(AbstractIntroPage page, StringBuilder text) {
- text.append("\n\tpage styles are = "); //$NON-NLS-1$
- String[] styles = page.getStyles();
- for (String style : styles)
+ text.append("\n\tpage styles are = "); //$NON-NLS-1$
+ String[] styles = page.getStyles();
+ for (String style : styles)
text.append(filterURL(style + "\n\t\t\t")); //$NON-NLS-1$
- text.append("\n\tpage alt-styles are = "); //$NON-NLS-1$
+ text.append("\n\tpage alt-styles are = "); //$NON-NLS-1$
final Map<String, Bundle> altStylesHashtable = page.getAltStyles();
- if (altStylesHashtable == null)
- return;
-
- Set<String> set = altStylesHashtable.keySet();
- String[] sorted = new String[set.size()];
- set.toArray(sorted);
- for (int i=0;i<sorted.length;++i) {
- Bundle bundle = altStylesHashtable.get(sorted[i]);
- sorted[i] = filterURL(sorted[i]) + " from " + bundle.getSymbolicName(); //$NON-NLS-1$
- }
- Arrays.sort(sorted);
-
- for (String element : sorted) {
- text.append(element + "\n\t\t"); //$NON-NLS-1$
- }
- }
+ if (altStylesHashtable == null)
+ return;
+
+ Set<String> set = altStylesHashtable.keySet();
+ String[] sorted = new String[set.size()];
+ set.toArray(sorted);
+ for (int i=0;i<sorted.length;++i) {
+ Bundle bundle = altStylesHashtable.get(sorted[i]);
+ sorted[i] = filterURL(sorted[i]) + " from " + bundle.getSymbolicName(); //$NON-NLS-1$
+ }
+ Arrays.sort(sorted);
+
+ for (String element : sorted) {
+ text.append(element + "\n\t\t"); //$NON-NLS-1$
+ }
+ }
private void printPageChildren(AbstractIntroPage page, StringBuilder text) {
- text.append("\n\tpage children = " + page.getChildren().length); //$NON-NLS-1$
- text.append("\n"); //$NON-NLS-1$
- printContainerChildren(page, text, "\n\t\t"); //$NON-NLS-1$
+ text.append("\n\tpage children = " + page.getChildren().length); //$NON-NLS-1$
+ text.append("\n"); //$NON-NLS-1$
+ printContainerChildren(page, text, "\n\t\t"); //$NON-NLS-1$
- }
+ }
- private void printContainerChildren(AbstractIntroContainer container,
+ private void printContainerChildren(AbstractIntroContainer container,
StringBuilder text, String indent) {
- AbstractIntroElement[] children = container.getChildren();
- for (AbstractIntroElement element : children) {
- int childType = element.getType();
- switch (childType) {
- case AbstractIntroElement.ELEMENT:
- text.append("SHOULD NEVER BE HERE"); //$NON-NLS-1$
- break;
- case AbstractIntroElement.GROUP:
- printGroup(text, (IntroGroup) element, indent);
- break;
- case AbstractIntroElement.LINK:
- printLink(text, (IntroLink) element, indent);
- break;
- case AbstractIntroElement.TEXT:
- printText(text, (IntroText) element, indent);
- break;
- case AbstractIntroElement.IMAGE:
- printImage(text, (IntroImage) element, indent);
- break;
- case AbstractIntroElement.HTML:
- printHtml(text, (IntroHTML) element, indent);
- break;
- case AbstractIntroElement.INCLUDE:
- printInclude(text, (IntroInclude) element, indent);
- break;
- case AbstractIntroElement.HEAD:
- printHead(text, (IntroHead) element, indent);
- break;
- case AbstractIntroElement.PAGE_TITLE:
- printPageTitle(text, (IntroPageTitle) element, indent);
- break;
- case AbstractIntroElement.ANCHOR:
- printAnchor(text, (IntroAnchor) element, indent);
- break;
- case AbstractIntroElement.CONTENT_PROVIDER:
- printContentProvidor(text, (IntroContentProvider) element,
- indent);
- break;
-
- }
- }
- }
+ AbstractIntroElement[] children = container.getChildren();
+ for (AbstractIntroElement element : children) {
+ int childType = element.getType();
+ switch (childType) {
+ case AbstractIntroElement.ELEMENT:
+ text.append("SHOULD NEVER BE HERE"); //$NON-NLS-1$
+ break;
+ case AbstractIntroElement.GROUP:
+ printGroup(text, (IntroGroup) element, indent);
+ break;
+ case AbstractIntroElement.LINK:
+ printLink(text, (IntroLink) element, indent);
+ break;
+ case AbstractIntroElement.TEXT:
+ printText(text, (IntroText) element, indent);
+ break;
+ case AbstractIntroElement.IMAGE:
+ printImage(text, (IntroImage) element, indent);
+ break;
+ case AbstractIntroElement.HTML:
+ printHtml(text, (IntroHTML) element, indent);
+ break;
+ case AbstractIntroElement.INCLUDE:
+ printInclude(text, (IntroInclude) element, indent);
+ break;
+ case AbstractIntroElement.HEAD:
+ printHead(text, (IntroHead) element, indent);
+ break;
+ case AbstractIntroElement.PAGE_TITLE:
+ printPageTitle(text, (IntroPageTitle) element, indent);
+ break;
+ case AbstractIntroElement.ANCHOR:
+ printAnchor(text, (IntroAnchor) element, indent);
+ break;
+ case AbstractIntroElement.CONTENT_PROVIDER:
+ printContentProvidor(text, (IntroContentProvider) element,
+ indent);
+ break;
+
+ }
+ }
+ }
private void printGroup(StringBuilder text, IntroGroup group, String indent) {
- text.append(indent + "GROUP: id = " + group.getId()); //$NON-NLS-1$
- indent = indent + "\t\t"; //$NON-NLS-1$
- text.append(indent + "label = " + group.getLabel()); //$NON-NLS-1$
- text.append(indent + "children = " + group.getChildren().length); //$NON-NLS-1$
- text.append(indent + "style-id = " + group.getStyleId()); //$NON-NLS-1$
- printContainerChildren(group, text, indent + "\t\t"); //$NON-NLS-1$
- }
+ text.append(indent + "GROUP: id = " + group.getId()); //$NON-NLS-1$
+ indent = indent + "\t\t"; //$NON-NLS-1$
+ text.append(indent + "label = " + group.getLabel()); //$NON-NLS-1$
+ text.append(indent + "children = " + group.getChildren().length); //$NON-NLS-1$
+ text.append(indent + "style-id = " + group.getStyleId()); //$NON-NLS-1$
+ printContainerChildren(group, text, indent + "\t\t"); //$NON-NLS-1$
+ }
private void printLink(StringBuilder text, IntroLink link, String indent) {
- text.append(indent + "LINK: id = " + link.getId()); //$NON-NLS-1$
- indent = indent + "\t\t"; //$NON-NLS-1$
- text.append(indent + "label = " + link.getLabel()); //$NON-NLS-1$
- text.append(indent + "text = " + link.getText()); //$NON-NLS-1$
- text.append(indent + "url = " + link.getUrl()); //$NON-NLS-1$
- text.append(indent + "style-id = " + link.getStyleId()); //$NON-NLS-1$
- }
+ text.append(indent + "LINK: id = " + link.getId()); //$NON-NLS-1$
+ indent = indent + "\t\t"; //$NON-NLS-1$
+ text.append(indent + "label = " + link.getLabel()); //$NON-NLS-1$
+ text.append(indent + "text = " + link.getText()); //$NON-NLS-1$
+ text.append(indent + "url = " + link.getUrl()); //$NON-NLS-1$
+ text.append(indent + "style-id = " + link.getStyleId()); //$NON-NLS-1$
+ }
private void printText(StringBuilder text, IntroText introText, String indent) {
- text.append(indent + "TEXT: id = " + introText.getId()); //$NON-NLS-1$
- indent = indent + "\t\t"; //$NON-NLS-1$
- text.append(indent + "text = " + introText.getText()); //$NON-NLS-1$
- text.append(indent + "style-id = " + introText.getStyleId()); //$NON-NLS-1$
- }
+ text.append(indent + "TEXT: id = " + introText.getId()); //$NON-NLS-1$
+ indent = indent + "\t\t"; //$NON-NLS-1$
+ text.append(indent + "text = " + introText.getText()); //$NON-NLS-1$
+ text.append(indent + "style-id = " + introText.getStyleId()); //$NON-NLS-1$
+ }
private void printImage(StringBuilder text, IntroImage image, String indent) {
- text.append(indent + "IMAGE: id = " + image.getId()); //$NON-NLS-1$
- indent = indent + "\t\t"; //$NON-NLS-1$
- text.append(indent + "src = " + image.getSrc()); //$NON-NLS-1$
- text.append(indent + "alt = " + image.getAlt()); //$NON-NLS-1$
- text.append(indent + "style-id = " + image.getStyleId()); //$NON-NLS-1$
- }
+ text.append(indent + "IMAGE: id = " + image.getId()); //$NON-NLS-1$
+ indent = indent + "\t\t"; //$NON-NLS-1$
+ text.append(indent + "src = " + image.getSrc()); //$NON-NLS-1$
+ text.append(indent + "alt = " + image.getAlt()); //$NON-NLS-1$
+ text.append(indent + "style-id = " + image.getStyleId()); //$NON-NLS-1$
+ }
private void printHtml(StringBuilder text, IntroHTML html, String indent) {
- text.append(indent + "HTML: id = " + html.getId()); //$NON-NLS-1$
- indent = indent + "\t\t"; //$NON-NLS-1$
- text.append(indent + "src = " + html.getSrc()); //$NON-NLS-1$
- text.append(indent + "isInlined = " + html.isInlined()); //$NON-NLS-1$
- text.append(indent + "style-id = " + html.getStyleId()); //$NON-NLS-1$
- if (html.getIntroImage() != null)
- printImage(text, html.getIntroImage(), indent + "\t\t"); //$NON-NLS-1$
- if (html.getIntroText() != null)
- printText(text, html.getIntroText(), indent + "\t\t"); //$NON-NLS-1$
-
- }
+ text.append(indent + "HTML: id = " + html.getId()); //$NON-NLS-1$
+ indent = indent + "\t\t"; //$NON-NLS-1$
+ text.append(indent + "src = " + html.getSrc()); //$NON-NLS-1$
+ text.append(indent + "isInlined = " + html.isInlined()); //$NON-NLS-1$
+ text.append(indent + "style-id = " + html.getStyleId()); //$NON-NLS-1$
+ if (html.getIntroImage() != null)
+ printImage(text, html.getIntroImage(), indent + "\t\t"); //$NON-NLS-1$
+ if (html.getIntroText() != null)
+ printText(text, html.getIntroText(), indent + "\t\t"); //$NON-NLS-1$
+
+ }
private void printInclude(StringBuilder text, IntroInclude include,
- String indent) {
- text.append(indent + "INCLUDE: configId = " + include.getConfigId()); //$NON-NLS-1$
- indent = indent + "\t\t"; //$NON-NLS-1$
- text.append(indent + "path = " + include.getPath()); //$NON-NLS-1$
- text.append(indent + "merge-style = " + include.getMergeStyle()); //$NON-NLS-1$
- }
+ String indent) {
+ text.append(indent + "INCLUDE: configId = " + include.getConfigId()); //$NON-NLS-1$
+ indent = indent + "\t\t"; //$NON-NLS-1$
+ text.append(indent + "path = " + include.getPath()); //$NON-NLS-1$
+ text.append(indent + "merge-style = " + include.getMergeStyle()); //$NON-NLS-1$
+ }
private void printHead(StringBuilder text, IntroHead head, String indent) {
- text.append(indent + "HEAD: src = " + head.getSrc()); //$NON-NLS-1$
- }
+ text.append(indent + "HEAD: src = " + head.getSrc()); //$NON-NLS-1$
+ }
private void printPageTitle(StringBuilder text, IntroPageTitle title,
- String indent) {
- text.append(indent + "TITLE: id = " + title.getId()); //$NON-NLS-1$
- indent = indent + "\t\t"; //$NON-NLS-1$
- text.append(indent + "title = " + title.getTitle()); //$NON-NLS-1$
- text.append(indent + "style-id = " + title.getStyleId()); //$NON-NLS-1$
- }
+ String indent) {
+ text.append(indent + "TITLE: id = " + title.getId()); //$NON-NLS-1$
+ indent = indent + "\t\t"; //$NON-NLS-1$
+ text.append(indent + "title = " + title.getTitle()); //$NON-NLS-1$
+ text.append(indent + "style-id = " + title.getStyleId()); //$NON-NLS-1$
+ }
private void printAnchor(StringBuilder text, IntroAnchor anchor,
- String indent) {
- text.append(indent + "ANCHOR: id = " + anchor.getId()); //$NON-NLS-1$
- }
+ String indent) {
+ text.append(indent + "ANCHOR: id = " + anchor.getId()); //$NON-NLS-1$
+ }
private void printContentProvidor(StringBuilder text,
- IntroContentProvider provider, String indent) {
- text.append(indent + "CONTENT PROVIDER: id = " + provider.getId()); //$NON-NLS-1$
- indent = indent + "\t\t"; //$NON-NLS-1$
- text.append(indent + "class = " + provider.getClassName()); //$NON-NLS-1$
- text.append(indent + "pluginId = " + provider.getPluginId()); //$NON-NLS-1$
- if (provider.getIntroText() != null)
- printText(text, provider.getIntroText(), indent + "\t\t"); //$NON-NLS-1$
-
- }
-
- /**
- * Appends a given page's categories to the Text buffer.
- *
- * @param text
- */
+ IntroContentProvider provider, String indent) {
+ text.append(indent + "CONTENT PROVIDER: id = " + provider.getId()); //$NON-NLS-1$
+ indent = indent + "\t\t"; //$NON-NLS-1$
+ text.append(indent + "class = " + provider.getClassName()); //$NON-NLS-1$
+ text.append(indent + "pluginId = " + provider.getPluginId()); //$NON-NLS-1$
+ if (provider.getIntroText() != null)
+ printText(text, provider.getIntroText(), indent + "\t\t"); //$NON-NLS-1$
+
+ }
+
+ /**
+ * Appends a given page's categories to the Text buffer.
+ *
+ * @param text
+ */
private void printPages(IntroPage[] pages, StringBuilder text) {
- for (IntroPage page : pages) {
- text.append("\n\nPAGE id = " + page.getId()); //$NON-NLS-1$
- text.append("\n----------"); //$NON-NLS-1$
- text.append("\n\tti