Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-05-14 05:22:38 -0400
committerAlexander Kurtakov2018-05-14 06:08:45 -0400
commit05ed92cfe54925466c75fb1af5569c589c2bd54f (patch)
tree3b169abacd5466b3959996db4eabc50279cc6c9b
parent020ed039755c37f238f918492e858aad00ee853d (diff)
downloadorg.eclipse.linuxtools-05ed92cfe54925466c75fb1af5569c589c2bd54f.tar.gz
org.eclipse.linuxtools-05ed92cfe54925466c75fb1af5569c589c2bd54f.tar.xz
org.eclipse.linuxtools-05ed92cfe54925466c75fb1af5569c589c2bd54f.zip
Update rpm plugin license headers to EPL 2.0.
Change-Id: Ie9e7ba603f68b8e4a1aa72628b1457ead29a478e Signed-off-by: Alexander Kurtakov <akurtako@redhat.com> Reviewed-on: https://git.eclipse.org/r/122563 Tested-by: CI Bot
-rw-r--r--rpm/eclipse-rpm.metainfo.xml13
-rw-r--r--rpm/org.eclipse.linuxtools.rpm-feature/feature.xml18
-rw-r--r--rpm/org.eclipse.linuxtools.rpm-feature/pom.xml13
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/pom.xml11
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/AllTests.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/DownloadPrepareSourcesTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectCreatorTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectNatureTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/utils/tests/RPMQueryTest.java15
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/plugin.xml21
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/pom.xml11
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/FlatBuildConfiguration.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/Messages.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/RPMBuildConfiguration.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/RPMCoreInitializer.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/SpecfileVisitor.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/FileDownloadJob.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/Messages.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/RPM.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/RPMBuild.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IProjectConfiguration.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IRPMConstants.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProject.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectCreator.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectLayout.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectNature.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/BufferedProcessInputStream.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/DownloadJob.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/Messages.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPMQuery.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/Utils.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/pom.xml11
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/AllTests.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/ICreaterepoTestConstants.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/ImportRPMsPageTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/MetadataPageTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/RepoFormEditorTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/TestCreaterepoProject.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/TestUtils.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/listener/tests/CreaterepoResourceChangeListenerTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoDeltaPropertyPageTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoGeneralPropertyPageTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoPreferenceInitializerTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoPreferencePageTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoCommandCreatorTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoProjectCreatorTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoProjectTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoUtilsTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/tests/CreaterepoTreeCategoryTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/tests/CreaterepoTreeTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/tests/CreaterepoWizardTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/plugin.xml16
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/pom.xml11
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/Activator.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/Createrepo.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoCommandCreator.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoPreferenceConstants.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoProject.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoProjectCreator.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoProjectNature.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoUtils.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/ICreaterepoChecksums.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/ICreaterepoCompressionTypes.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/ICreaterepoConstants.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/IRepoFileConstants.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/Messages.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/dnd/ImportRPMDropListener.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/ImportRPMsPage.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/MetadataPage.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/RepoFormEditor.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/handler/CreaterepoCommandHandler.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/listener/CreaterepoResourceChangeListener.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoDeltaPropertyPage.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoGeneralPropertyPage.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPathEditor.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPreferenceInitializer.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPreferencePage.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPropertyPage.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoCategoryModel.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoTreeCategory.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoTreeContentProvider.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoTreeLabelProvider.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoNewWizardPageOne.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoNewWizardPageTwo.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoWizard.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/pom.xml11
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/Activator.java37
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/Messages.java30
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/RpmlintLog.java112
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/actions/Messages.java34
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/actions/RunRpmlintAction.java15
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/actions/ToggleRpmlintNatureAction.java15
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/Messages.java34
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintBuilder.java140
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintDeltaVisitor.java73
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintMarkerRemoveVisitor.java45
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintMarkerVisitor.java313
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintNature.java108
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintPreVisitor.java55
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/parser/RpmlintItem.java332
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/parser/RpmlintParser.java585
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/Messages.java36
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/PreferenceConstants.java36
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/PreferenceInitializer.java25
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/RpmlintPreferencePage.java65
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/AInsertLineResolution.java17
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/ARemoveLineResolution.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/AReplaceTextResolution.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/ARpmlintResolution.java68
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/HardcodedPackagerTag.java40
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/HardcodedPrefixTag.java39
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/MacroInChangelog.java57
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/Messages.java54
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/NoBuildSection.java68
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/NoInstallSection.java68
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/NoPrepSection.java70
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/PatchNotApplied.java40
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/RpmBuildrootUsage.java42
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/RpmlintMarkerResolutionGenerator.java144
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/SetupNotQuiet.java56
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/build-helper.xml18
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/plugin.xml19
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/pom.xml11
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/pom.xml11
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/tests/ActionsAllTests.java15
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/tests/SpecfileChangelogFormatterTest.java75
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/tests/SpecfileChangelogParserTest.java38
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/HyperlinkAllTests.java20
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/MailHyperlinkDetectorTest.java74
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/SourcesFileCreateHyperlinkTest.java39
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/SourcesFileHyperlinkDetectorTest.java166
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/SpecfileElementHyperlinkDetectorTest.java103
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/URLHyperlinkWithMacroDetectorTest.java44
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/ScannersAllTests.java16
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/SpecfileChangelogScannerTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/SpecfilePackagesScannerTest.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/SpecfileScannerTest.java200
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/AScannerTest.java77
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java24
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/EpochTagTest.java168
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/FileTestCase.java127
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/HeaderRecognitionTest.java232
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LabelProviderTest.java88
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LicenseTagTest.java25
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LinePositionTest.java72
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/NameTagTest.java136
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/PatchApplicationTest.java71
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/ReleaseTagTest.java124
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmMacroProposalsListTest.java156
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmPackageProposalsListTest.java99
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileCompletionProcessorTest.java14
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileTestFailure.java39
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileTestProject.java85
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/VersionTagTest.java148
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/ParserAllTests.java15
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SourceComparatorTest.java70
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileDefineTest.java261
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileTest.java126
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/plugin.xml19
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/pom.xml13
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/Activator.java15
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/ISpecfileColorConstants.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/ISpecfileSpecialSymbols.java45
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/Messages.java58
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RPMHandlerUtils.java151
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RPMUtils.java40
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmMacroOccurrencesUpdater.java48
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmMacroProposalsList.java378
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmPackageBuildProposalsJob.java20
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmPackageProposalsList.java16
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmSections.java42
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmTags.java71
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecCompletionProposal.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileCompletionProcessor.java135
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileConfiguration.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileDocumentProvider.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileDoubleClickStrategy.java240
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileEditor.java15
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileFoldingStructureProvider.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileHover.java16
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileLog.java157
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfilePrecentationReconciler.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileReconcilingStrategy.java112
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/UiUtils.java23
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/Messages.java58
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/SpecfileChangelogFormatter.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/SpecfileChangelogParser.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/SpecfileEditorDownloadSourcesActionDelegate.java108
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/SpecfileEditorOrganizePatchesActionDelegate.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/SpecfileEditorPrepareSourcesActionDelegate.java15
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/SpecfileEditorShowOutlineActionDelegate.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/SpecfileEditorToggleCommentActionDelegate.java15
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/compare/Messages.java32
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/compare/SpecMergeViewer.java18
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/compare/SpecMergeViewerCreator.java20
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/compare/SpecStructureCreator.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/compare/SpecStructureMergeViewerCreator.java24
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/detectors/IStrictWordDetector.java14
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/detectors/KeywordWordDetector.java28
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/detectors/MacroWordDetector.java28
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/detectors/PackageWordDetector.java28
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/detectors/PatchNumberDetector.java36
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/detectors/SuffixNumberDetector.java39
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/detectors/TagWordDetector.java28
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/MailHyperlink.java44
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/MailHyperlinkDetector.java400
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/Messages.java48
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/SourcesFileCreateHyperlink.java150
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/SourcesFileDownloadHyperlink.java159
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/SourcesFileHyperlink.java116
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/SourcesFileHyperlinkDetector.java148
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/SpecfileElementHyperlink.java104
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/SpecfileElementHyperlinkDetector.java257
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/URLHyperlinkWithMacroDetector.java67
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/outline/ContainsFilter.java70
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/outline/Messages.java32
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/outline/SpecOutlinePageAdapterFactory.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/outline/SpecfileContentOutlinePage.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/outline/SpecfileContentProvider.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/outline/SpecfileLabelProvider.java132
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/outline/SpecfileQuickOutlineDialog.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/parser/Messages.java35
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/parser/SourceComparator.java49
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/parser/SpecfileMacro.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/parser/SpecfileParseException.java103
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/parser/SpecfilePatchMacro.java42
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/parser/SpecfilePreamble.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/parser/SpecfileSource.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/parser/SpecfileTag.java171
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/preferences/MacroProposalsPreferencePage.java32
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/preferences/MainPreferencePage.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/preferences/Messages.java100
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/preferences/PreferenceConstants.java181
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/preferences/PreferenceInitializer.java103
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/preferences/RpmInformationsPreferencePage.java99
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/preferences/RpmProposalsPreferencePage.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/preferences/SpecTemplatePreferencePage.java66
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/preferences/TaskTagsPreferencePage.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/rules/AuthorEmailRule.java243
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/rules/CommentRule.java33
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/rules/MacroRule.java31
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/rules/SectionRule.java251
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/rules/StringWithEndingRule.java169
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/rules/VersionReleaseRule.java306
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/SpecfileChangelogScanner.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/SpecfilePackagesScanner.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/SpecfilePartitionScanner.java139
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/SpecfileScanner.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/wizards/NoExecutableWizardPage.java68
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/wizards/SpecfileNewWizard.java21
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileErrorHandler.java16
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileMarkerHandler.java89
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileTaskHandler.java129
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java593
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileDefine.java50
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileElement.java188
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePackage.java245
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePackageContainer.java180
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java29
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSection.java109
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/Messages.java86
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java27
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/templates/templates.xml19
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/plugin.xml19
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/pom.xml11
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/Activator.java87
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/BuildType.java44
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/CloseConsoleAction.java65
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/ErrorLineMatcher.java70
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/MainPage.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/Messages.java45
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/NewProjectCreationPage.java334
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/RPMDetailsPanel.java18
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/RPMNewProject.java89
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/RpmConsole.java328
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/RpmConsolePageParticipant.java63
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/SRPMImportPage.java405
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/SRPMImportWizard.java78
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/StopBuildAction.java61
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/handlers/SpecfileEditorRPMBuildHandler.java190
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/propertypage/AbstractRPMPropertyPage.java42
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/propertypage/ChangelogPage.java46
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/propertypage/InstallScriptsPage.java84
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/propertypage/Messages.java35
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/propertypage/ProvidesPage.java46
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/propertypage/SpecFileHeaderPage.java46
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/propertypage/TargetPage.java86
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportOperation.java163
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportOperation.java177
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/plugin.xml17
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/pom.xml11
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/AbstractGenerator.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/FeatureVisitor.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/StubbyEggGenerator.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/StubbyGemGenerator.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/StubbyGenerator.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/StubbyLog.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/StubbyMakefilePLGenerator.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/StubbyPlugin.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/StubbyPomGenerator.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/model/EggModel.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/model/FeatureModel.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/model/GemModel.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/model/PerlModel.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/model/PomModel.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/CommonMetaData.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/PerlMakefileParser.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/PythonEggParser.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/RubyGemParser.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/ValidLicenses.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/popup/actions/StubifyEggHandler.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/popup/actions/StubifyFeatureHandler.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/popup/actions/StubifyGemHandler.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/popup/actions/StubifyHandler.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/popup/actions/StubifyMakefilePLHandler.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/popup/actions/StubifyPomHandler.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/rpmstubby/Generator.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/rpmstubby/InputType.java12
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/rpmstubby/RPMStubbyUtils.java12
-rw-r--r--rpm/pom.xml25
322 files changed, 9200 insertions, 8937 deletions
diff --git a/rpm/eclipse-rpm.metainfo.xml b/rpm/eclipse-rpm.metainfo.xml
index 6a36c2414a..42076b0948 100644
--- a/rpm/eclipse-rpm.metainfo.xml
+++ b/rpm/eclipse-rpm.metainfo.xml
@@ -1,16 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2015, Red Hat, Inc.
+ Copyright (C) 2015, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<component type="addon">
<id>eclipse-rpm</id>
<metadata_license>CC-BY-SA-3.0</metadata_license>
- <project_license>EPL-1.0</project_license>
+ <project_license>EPL-2.0</project_license>
<extends>eclipse.desktop</extends>
<name>RPM Tools</name>
<summary>Linux Tools Eclipse plug-ins for building RPMs</summary>
diff --git a/rpm/org.eclipse.linuxtools.rpm-feature/feature.xml b/rpm/org.eclipse.linuxtools.rpm-feature/feature.xml
index 357f8185ce..8dede76c24 100644
--- a/rpm/org.eclipse.linuxtools.rpm-feature/feature.xml
+++ b/rpm/org.eclipse.linuxtools.rpm-feature/feature.xml
@@ -1,14 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2018 Red Hat, Inc.
+
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
- Contributors:
- Red Hat - initial API and implementation
- -->
+ Contributors:
+ Red Hat - initial API and implementation
+-->
<feature
id="org.eclipse.linuxtools.rpm"
label="%featureName"
diff --git a/rpm/org.eclipse.linuxtools.rpm-feature/pom.xml b/rpm/org.eclipse.linuxtools.rpm-feature/pom.xml
index ea2d17c389..92b1a80bf4 100644
--- a/rpm/org.eclipse.linuxtools.rpm-feature/pom.xml
+++ b/rpm/org.eclipse.linuxtools.rpm-feature/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011, Red Hat, Inc.
-
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (C) 2011, 2018 Red Hat, Inc.
+
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/pom.xml b/rpm/org.eclipse.linuxtools.rpm.core.tests/pom.xml
index 714b2e37b9..4a617414a3 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core.tests/pom.xml
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011, Red Hat, Inc.
+ Copyright (C) 2011, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/AllTests.java b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/AllTests.java
index 28d8aed82c..0744ec8a2d 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/AllTests.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/AllTests.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004, 2005, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/DownloadPrepareSourcesTest.java b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/DownloadPrepareSourcesTest.java
index 43b99f0a50..99f2a19a38 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/DownloadPrepareSourcesTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/DownloadPrepareSourcesTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013, 2016 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectCreatorTest.java b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectCreatorTest.java
index 208f18cd5d..a3d37cb064 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectCreatorTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectCreatorTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alexander Kurtakov - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectNatureTest.java b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectNatureTest.java
index ee5fe636e6..d3ecb6fba0 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectNatureTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectNatureTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectTest.java b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectTest.java
index 089d7a7aee..6ac651ea51 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/utils/tests/RPMQueryTest.java b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/utils/tests/RPMQueryTest.java
index 7a61239f8e..8387d389d0 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/utils/tests/RPMQueryTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/utils/tests/RPMQueryTest.java
@@ -1,16 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
*******************************************************************************/
package org.eclipse.linuxtools.rpm.core.utils.tests;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.linuxtools.rpm.core.utils.RPMQuery;
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/plugin.xml b/rpm/org.eclipse.linuxtools.rpm.core/plugin.xml
index 67271a1ae1..ff963cc837 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/plugin.xml
+++ b/rpm/org.eclipse.linuxtools.rpm.core/plugin.xml
@@ -1,14 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?><!--
- Copyright (c) 2009, 2013 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+<?eclipse version="3.0"?>
+<!--
+ Copyright (c) 2009, 2018 Red Hat, Inc.
+
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
- Contributors:
- Red Hat - initial API and implementation
- -->
+ Contributors:
+ Red Hat - initial API and implementation
+-->
<plugin>
<extension
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/pom.xml b/rpm/org.eclipse.linuxtools.rpm.core/pom.xml
index b2dfb46328..25f5e57ddb 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/pom.xml
+++ b/rpm/org.eclipse.linuxtools.rpm.core/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011, Red Hat, Inc.
+ Copyright (C) 2011, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/FlatBuildConfiguration.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/FlatBuildConfiguration.java
index 97137de83a..519e6b30e3 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/FlatBuildConfiguration.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/FlatBuildConfiguration.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2011, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/Messages.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/Messages.java
index e4b4817804..86c2cdf0c9 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/Messages.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/Messages.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/RPMBuildConfiguration.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/RPMBuildConfiguration.java
index 6d65b833e1..421fa76448 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/RPMBuildConfiguration.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/RPMBuildConfiguration.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2005, 2013 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2005, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/RPMCoreInitializer.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/RPMCoreInitializer.java
index 97935d84a7..2e231f00a7 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/RPMCoreInitializer.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/RPMCoreInitializer.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alexander Kurtakov - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/SpecfileVisitor.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/SpecfileVisitor.java
index cd8ed74498..c1422a73d2 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/SpecfileVisitor.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/SpecfileVisitor.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2011, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/FileDownloadJob.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/FileDownloadJob.java
index 476ebcca35..a210167c33 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/FileDownloadJob.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/FileDownloadJob.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2010, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alexander Kurtakov (Red Hat) - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/Messages.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/Messages.java
index d3c7b19aab..7c90a35d00 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/Messages.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/Messages.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2010, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alexander Kurtakov - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/RPM.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/RPM.java
index 68a89351e4..45f479c05e 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/RPM.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/RPM.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2005, 2010 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2005, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/RPMBuild.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/RPMBuild.java
index 9e49703747..91264bac4b 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/RPMBuild.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/internal/rpm/core/utils/RPMBuild.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2005-2010 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2005, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IProjectConfiguration.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IProjectConfiguration.java
index 40e5f5d379..03e5a7811c 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IProjectConfiguration.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IProjectConfiguration.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2011, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IRPMConstants.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IRPMConstants.java
index c50f279314..307830add8 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IRPMConstants.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IRPMConstants.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2005, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2005, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProject.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProject.java
index 3a73b579f8..aa00024e23 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProject.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProject.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2005, 2010 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2005, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectCreator.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectCreator.java
index 38058f2ff2..83d1477478 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectCreator.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectCreator.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2011, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectLayout.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectLayout.java
index 13a494e7e9..874146d47a 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectLayout.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectLayout.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2011, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectNature.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectNature.java
index 2c7f2ba296..68f2c33c47 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectNature.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectNature.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2005, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2005, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/BufferedProcessInputStream.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/BufferedProcessInputStream.java
index 602a0d3b0b..99153829e6 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/BufferedProcessInputStream.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/BufferedProcessInputStream.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2011 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2011, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/DownloadJob.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/DownloadJob.java
index 3b425cd1fa..6f05bd0427 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/DownloadJob.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/DownloadJob.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2010, 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2010, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alexander Kurtakov (Red Hat) - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/Messages.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/Messages.java
index 80962cd791..fdf3a439fe 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/Messages.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/Messages.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2012, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alexander Kurtakov - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPMQuery.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPMQuery.java
index f216732b31..def750d5f7 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPMQuery.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPMQuery.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2005, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2005, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/Utils.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/Utils.java
index b80c0f2045..69980d8d5e 100644
--- a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/Utils.java
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/Utils.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009, 2016 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/pom.xml b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/pom.xml
index 2c7acf59c6..0d5488e039 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/pom.xml
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2013 Red Hat, Inc.
+ Copyright (C) 2013, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/AllTests.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/AllTests.java
index 3293717d5f..bbeb1ae6f9 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/AllTests.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/AllTests.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/ICreaterepoTestConstants.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/ICreaterepoTestConstants.java
index d8029abcb8..2b9a745ac9 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/ICreaterepoTestConstants.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/ICreaterepoTestConstants.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/ImportRPMsPageTest.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/ImportRPMsPageTest.java
index 7f095cfffa..aa4f714c25 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/ImportRPMsPageTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/ImportRPMsPageTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/MetadataPageTest.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/MetadataPageTest.java
index f6f59cde81..d41cd38e8d 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/MetadataPageTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/MetadataPageTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/RepoFormEditorTest.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/RepoFormEditorTest.java
index 7870688991..8acdde97c5 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/RepoFormEditorTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/RepoFormEditorTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/TestCreaterepoProject.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/TestCreaterepoProject.java
index 7c4a408bae..10399977bd 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/TestCreaterepoProject.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/TestCreaterepoProject.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/TestUtils.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/TestUtils.java
index 9b1c5994e2..1383a5a654 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/TestUtils.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/tests/TestUtils.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2014 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2014, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/listener/tests/CreaterepoResourceChangeListenerTest.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/listener/tests/CreaterepoResourceChangeListenerTest.java
index 0cbd522043..14805c6ce9 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/listener/tests/CreaterepoResourceChangeListenerTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/listener/tests/CreaterepoResourceChangeListenerTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoDeltaPropertyPageTest.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoDeltaPropertyPageTest.java
index 6eaec4090f..653b358d41 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoDeltaPropertyPageTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoDeltaPropertyPageTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoGeneralPropertyPageTest.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoGeneralPropertyPageTest.java
index 970dcb79cf..c9d8fb3bdb 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoGeneralPropertyPageTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoGeneralPropertyPageTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoPreferenceInitializerTest.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoPreferenceInitializerTest.java
index 22bb5455b4..7122eebcae 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoPreferenceInitializerTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoPreferenceInitializerTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoPreferencePageTest.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoPreferencePageTest.java
index 989758bf1b..11de0b4dc8 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoPreferencePageTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/tests/CreaterepoPreferencePageTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoCommandCreatorTest.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoCommandCreatorTest.java
index b6e382cb7d..08316bd8af 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoCommandCreatorTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoCommandCreatorTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoProjectCreatorTest.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoProjectCreatorTest.java
index c575eed56d..7026b6815b 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoProjectCreatorTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoProjectCreatorTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoProjectTest.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoProjectTest.java
index 8909645e24..494a402deb 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoProjectTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoProjectTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoTest.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoTest.java
index 98961f6a9a..4ed78edd9a 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0s
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoUtilsTest.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoUtilsTest.java
index d11047572a..3e5a01a07b 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoUtilsTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tests/CreaterepoUtilsTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/tests/CreaterepoTreeCategoryTest.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/tests/CreaterepoTreeCategoryTest.java
index 8c0c8859e8..9d4f7cafd1 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/tests/CreaterepoTreeCategoryTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/tests/CreaterepoTreeCategoryTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/tests/CreaterepoTreeTest.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/tests/CreaterepoTreeTest.java
index a656a33e40..20940046a0 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/tests/CreaterepoTreeTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/tests/CreaterepoTreeTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/tests/CreaterepoWizardTest.java b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/tests/CreaterepoWizardTest.java
index c7650c547d..dbda4a3c39 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/tests/CreaterepoWizardTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo.tests/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/tests/CreaterepoWizardTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/plugin.xml b/rpm/org.eclipse.linuxtools.rpm.createrepo/plugin.xml
index 5cbe23ac4b..fa2d99f583 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/plugin.xml
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/plugin.xml
@@ -1,14 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<!--
- Copyright (c) 2013 Red Hat, Inc. and others.
- All rights reserved. This program andthe accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2013, 2018 Red Hat, Inc. and others.
+
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
- Contributors:
- Neil Guzman - initial API and implementation
+ Contributors:
+ Neil Guzman - initial API and implementation
-->
<plugin>
<extension
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/pom.xml b/rpm/org.eclipse.linuxtools.rpm.createrepo/pom.xml
index 6ccfad4486..8091da405a 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/pom.xml
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2013 Red Hat, Inc.
+ Copyright (C) 2013, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/Activator.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/Activator.java
index beaa65115c..6ba40f2151 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/Activator.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/Activator.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013, 2016 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/Createrepo.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/Createrepo.java
index 8bd87a4a48..0427d37382 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/Createrepo.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/Createrepo.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoCommandCreator.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoCommandCreator.java
index c130745136..eabc63251e 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoCommandCreator.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoCommandCreator.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoPreferenceConstants.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoPreferenceConstants.java
index cb4ef8b700..55a78945fe 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoPreferenceConstants.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoPreferenceConstants.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoProject.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoProject.java
index 3793c34fbc..9bccb739ad 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoProject.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoProject.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoProjectCreator.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoProjectCreator.java
index 633de37894..6e87d038ee 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoProjectCreator.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoProjectCreator.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoProjectNature.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoProjectNature.java
index 491a37534a..b0144f3da9 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoProjectNature.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoProjectNature.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoUtils.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoUtils.java
index 19ae17c312..4c4e024816 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoUtils.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/CreaterepoUtils.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/ICreaterepoChecksums.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/ICreaterepoChecksums.java
index 53a8eec714..728279041c 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/ICreaterepoChecksums.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/ICreaterepoChecksums.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/ICreaterepoCompressionTypes.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/ICreaterepoCompressionTypes.java
index 10f98c4ee9..7eb36849c4 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/ICreaterepoCompressionTypes.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/ICreaterepoCompressionTypes.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/ICreaterepoConstants.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/ICreaterepoConstants.java
index b48be86d38..b13e32055c 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/ICreaterepoConstants.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/ICreaterepoConstants.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/IRepoFileConstants.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/IRepoFileConstants.java
index 4df27652da..7f6d0f3669 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/IRepoFileConstants.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/IRepoFileConstants.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/Messages.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/Messages.java
index e461c0716a..efc17b1989 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/Messages.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/Messages.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/dnd/ImportRPMDropListener.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/dnd/ImportRPMDropListener.java
index 6e732d502c..9edc25a144 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/dnd/ImportRPMDropListener.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/dnd/ImportRPMDropListener.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/ImportRPMsPage.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/ImportRPMsPage.java
index b57594fe97..ecb05d7e50 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/ImportRPMsPage.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/ImportRPMsPage.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/MetadataPage.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/MetadataPage.java
index bdb7110879..5fdf33e72f 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/MetadataPage.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/MetadataPage.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013, 2017 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/RepoFormEditor.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/RepoFormEditor.java
index f08559b6b2..5846fa1020 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/RepoFormEditor.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/RepoFormEditor.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/handler/CreaterepoCommandHandler.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/handler/CreaterepoCommandHandler.java
index 3bb126badc..da2cb8c27b 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/handler/CreaterepoCommandHandler.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/handler/CreaterepoCommandHandler.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/listener/CreaterepoResourceChangeListener.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/listener/CreaterepoResourceChangeListener.java
index c957cc28b9..7f5ea64c48 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/listener/CreaterepoResourceChangeListener.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/listener/CreaterepoResourceChangeListener.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoDeltaPropertyPage.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoDeltaPropertyPage.java
index d7a172d334..37c7f76ca6 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoDeltaPropertyPage.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoDeltaPropertyPage.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoGeneralPropertyPage.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoGeneralPropertyPage.java
index 62f4c1b26e..41279f6004 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoGeneralPropertyPage.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoGeneralPropertyPage.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013, 2017 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPathEditor.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPathEditor.java
index 2074ac290a..ced8119578 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPathEditor.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPathEditor.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPreferenceInitializer.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPreferenceInitializer.java
index 27e6ad78b8..5d3e637ff4 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPreferenceInitializer.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPreferenceInitializer.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPreferencePage.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPreferencePage.java
index a3cdec5a6b..e0d337e6bd 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPreferencePage.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPreferencePage.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPropertyPage.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPropertyPage.java
index bd14c5e7f4..e402344550 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPropertyPage.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPropertyPage.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoCategoryModel.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoCategoryModel.java
index 36813c64f8..8a02a999c3 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoCategoryModel.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoCategoryModel.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoTreeCategory.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoTreeCategory.java
index 57a07bcc03..1fed49d879 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoTreeCategory.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoTreeCategory.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoTreeContentProvider.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoTreeContentProvider.java
index 21afd8b52b..6b01276710 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoTreeContentProvider.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoTreeContentProvider.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoTreeLabelProvider.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoTreeLabelProvider.java
index 999731e539..4560665299 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoTreeLabelProvider.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/tree/CreaterepoTreeLabelProvider.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoNewWizardPageOne.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoNewWizardPageOne.java
index 2763613efd..45ed8bd7be 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoNewWizardPageOne.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoNewWizardPageOne.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoNewWizardPageTwo.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoNewWizardPageTwo.java
index 5a4277590e..55b933e2f4 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoNewWizardPageTwo.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoNewWizardPageTwo.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoWizard.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoWizard.java
index 51dce24115..65460df0fb 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoWizard.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoWizard.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Neil Guzman - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/pom.xml b/rpm/org.eclipse.linuxtools.rpm.rpmlint/pom.xml
index 67d7ebcec3..9cae9b0a98 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/pom.xml
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011, Red Hat, Inc.
+ Copyright (C) 2011, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/Activator.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/Activator.java
index 9deacffecb..a9f957064d 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/Activator.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/Activator.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007 Alphonse Van Assche.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -11,25 +13,24 @@
package org.eclipse.linuxtools.internal.rpm.rpmlint;
-
/**
* The activator class controls the plug-in life cycle
*/
public class Activator {
- /**
- * The id of this plugin.
- */
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.rpm.rpmlint"; //$NON-NLS-1$
+ /**
+ * The id of this plugin.
+ */
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.rpm.rpmlint"; //$NON-NLS-1$
- /**
- * Specfile extension constant i.e. .spec files.
- */
- public static final String SPECFILE_EXTENSION = "spec"; //$NON-NLS-1$
+ /**
+ * Specfile extension constant i.e. .spec files.
+ */
+ public static final String SPECFILE_EXTENSION = "spec"; //$NON-NLS-1$
- /**
- * RPM extension constant, i.e. .rpm files.
- */
- public static final String RPMFILE_EXTENSION = "rpm"; //$NON-NLS-1$
+ /**
+ * RPM extension constant, i.e. .rpm files.
+ */
+ public static final String RPMFILE_EXTENSION = "rpm"; //$NON-NLS-1$
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/Messages.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/Messages.java
index 97b1eead5e..6cf76666ea 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/Messages.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/Messages.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -14,14 +16,14 @@ import org.eclipse.osgi.util.NLS;
@SuppressWarnings("javadoc")
public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.rpm.rpmlint.messages"; //$NON-NLS-1$
- public static String RpmlintLog_0;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.rpm.rpmlint.messages"; //$NON-NLS-1$
+ public static String RpmlintLog_0;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
- private Messages() {
- //should not be instantiated
- }
+ private Messages() {
+ // should not be instantiated
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/RpmlintLog.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/RpmlintLog.java
index c56ff87e52..32b93a563e 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/RpmlintLog.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/RpmlintLog.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007 Alphonse Van Assche.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -20,64 +22,54 @@ import org.eclipse.core.runtime.Status;
*/
public class RpmlintLog {
- /**
- * Log the specified error.
- *
- * @param exception A low-level exception.
- */
- public static void logError(Throwable exception) {
- log(IStatus.ERROR, IStatus.OK, Messages.RpmlintLog_0, exception);
- }
+ /**
+ * Log the specified error.
+ *
+ * @param exception A low-level exception.
+ */
+ public static void logError(Throwable exception) {
+ log(IStatus.ERROR, IStatus.OK, Messages.RpmlintLog_0, exception);
+ }
- /**
- * Log the specified information.
- *
- * @param severity The severity; one of the following:
- * <code>IStatus.OK</code>,
- * <code>IStatus.ERROR</code>,
- * <code>IStatus.INFO</code>, or
- * <code>IStatus.WARNING</code>.
- * @param code The plug-in-specific status code, or <code>OK</code>.
- * @param message A human-readable message, localized to the
- * current locale.
- * @param exception A low-level exception, or <code>null</code>
- * if not applicable.
- */
- private static void log(int severity, int code, String message,
- Throwable exception) {
+ /**
+ * Log the specified information.
+ *
+ * @param severity The severity; one of the following: <code>IStatus.OK</code>,
+ * <code>IStatus.ERROR</code>, <code>IStatus.INFO</code>, or
+ * <code>IStatus.WARNING</code>.
+ * @param code The plug-in-specific status code, or <code>OK</code>.
+ * @param message A human-readable message, localized to the current locale.
+ * @param exception A low-level exception, or <code>null</code> if not
+ * applicable.
+ */
+ private static void log(int severity, int code, String message, Throwable exception) {
- log(createStatus(severity, code, message, exception));
- }
+ log(createStatus(severity, code, message, exception));
+ }
- /**
- * Create a status object representing the specified information.
- *
- * @param severity The severity; one of the following:
- * <code>IStatus.OK</code>,
- * <code>IStatus.ERROR</code>,
- * <code>IStatus.INFO</code>, or
- * <code>IStatus.WARNING</code>.
- * @param code The plug-in-specific status code, or
- * <code>OK</code>.
- * @param message A human-readable message, localized to the
- * current locale.
- * @param exception A low-level exception, or <code>null</code>
- * if not applicable.
- * @return the status object (not <code>null</code>).
- */
- private static IStatus createStatus(int severity, int code,
- String message, Throwable exception) {
+ /**
+ * Create a status object representing the specified information.
+ *
+ * @param severity The severity; one of the following: <code>IStatus.OK</code>,
+ * <code>IStatus.ERROR</code>, <code>IStatus.INFO</code>, or
+ * <code>IStatus.WARNING</code>.
+ * @param code The plug-in-specific status code, or <code>OK</code>.
+ * @param message A human-readable message, localized to the current locale.
+ * @param exception A low-level exception, or <code>null</code> if not
+ * applicable.
+ * @return the status object (not <code>null</code>).
+ */
+ private static IStatus createStatus(int severity, int code, String message, Throwable exception) {
- return new Status(severity, Activator.PLUGIN_ID, code,
- message, exception);
- }
+ return new Status(severity, Activator.PLUGIN_ID, code, message, exception);
+ }
- /**
- * Log the given status.
- *
- * @param status The status to log.
- */
- private static void log(IStatus status) {
- Platform.getLog(Platform.getBundle(Activator.PLUGIN_ID)).log(status);
- }
+ /**
+ * Log the given status.
+ *
+ * @param status The status to log.
+ */
+ private static void log(IStatus status) {
+ Platform.getLog(Platform.getBundle(Activator.PLUGIN_ID)).log(status);
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/actions/Messages.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/actions/Messages.java
index 50296ee03a..b2c9169416 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/actions/Messages.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/actions/Messages.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -14,16 +16,16 @@ import org.eclipse.osgi.util.NLS;
@SuppressWarnings("javadoc")
public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.rpm.rpmlint.actions.messages"; //$NON-NLS-1$
- public static String RunRpmlintAction_0;
- public static String RunRpmlintAction_1;
- public static String RunRpmlintAction_2;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.rpm.rpmlint.actions.messages"; //$NON-NLS-1$
+ public static String RunRpmlintAction_0;
+ public static String RunRpmlintAction_1;
+ public static String RunRpmlintAction_2;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
- private Messages() {
- // don't allow instantiating
- }
+ private Messages() {
+ // don't allow instantiating
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/actions/RunRpmlintAction.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/actions/RunRpmlintAction.java
index bbaea9d1b2..024e7f32ff 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/actions/RunRpmlintAction.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/actions/RunRpmlintAction.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009, 2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -47,8 +49,7 @@ import org.eclipse.ui.preferences.ScopedPreferenceStore;
*/
public class RunRpmlintAction extends AbstractHandler {
/**
- * @param event
- * The execution event.
+ * @param event The execution event.
* @return Nothing.
*/
@Override
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/actions/ToggleRpmlintNatureAction.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/actions/ToggleRpmlintNatureAction.java
index 4ff9cd3327..d9e62b750e 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/actions/ToggleRpmlintNatureAction.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/actions/ToggleRpmlintNatureAction.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009, 2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -58,8 +60,7 @@ public class ToggleRpmlintNatureAction extends AbstractHandler {
/**
* Toggles rpmlint nature on a project.
*
- * @param project
- * The project on which to toggle the nature.
+ * @param project The project on which to toggle the nature.
*/
private static void toggleNature(IProject project) {
String rpmlintPath = new ScopedPreferenceStore(InstanceScope.INSTANCE, Activator.PLUGIN_ID)
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/Messages.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/Messages.java
index aedda47c58..911d70f052 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/Messages.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/Messages.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -14,16 +16,16 @@ import org.eclipse.osgi.util.NLS;
@SuppressWarnings("javadoc")
public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.rpm.rpmlint.builder.messages"; //$NON-NLS-1$
- public static String RpmlintBuilder_0;
- public static String RpmlintBuilder_1;
- public static String RpmlintBuilder_2;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.rpm.rpmlint.builder.messages"; //$NON-NLS-1$
+ public static String RpmlintBuilder_0;
+ public static String RpmlintBuilder_1;
+ public static String RpmlintBuilder_2;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
- private Messages() {
- // should not be instantiated
- }
+ private Messages() {
+ // should not be instantiated
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintBuilder.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintBuilder.java
index 9a84c60fe2..3f3e5b6950 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintBuilder.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintBuilder.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007 Alphonse Van Assche.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -29,78 +31,72 @@ import org.eclipse.linuxtools.internal.rpm.rpmlint.parser.RpmlintParser;
*/
public class RpmlintBuilder extends IncrementalProjectBuilder {
- /**
- * Total number of chunks to divede the work in.
- */
- public static final int MAX_WORKS = 100;
+ /**
+ * Total number of chunks to divede the work in.
+ */
+ public static final int MAX_WORKS = 100;
- /**
- * ID for this builder.
- */
- public static final String BUILDER_ID = Activator.PLUGIN_ID
- + ".rpmlintBuilder"; //$NON-NLS-1$
+ /**
+ * ID for this builder.
+ */
+ public static final String BUILDER_ID = Activator.PLUGIN_ID + ".rpmlintBuilder"; //$NON-NLS-1$
- /**
- * ID for rpmlint marker problems.
- */
- public static final String MARKER_ID = Activator.PLUGIN_ID
- + ".rpmlintProblem"; //$NON-NLS-1$
+ /**
+ * ID for rpmlint marker problems.
+ */
+ public static final String MARKER_ID = Activator.PLUGIN_ID + ".rpmlintProblem"; //$NON-NLS-1$
- @Override
- protected IProject[] build(int kind, Map<String, String> args,
- IProgressMonitor monitor) throws CoreException {
- // TODO: handle the monitor in a more clean way.
- monitor.beginTask(Messages.RpmlintBuilder_0, MAX_WORKS);
- monitor.worked(20);
- if (kind == FULL_BUILD) {
- fullBuild(monitor);
- } else {
- IResourceDelta delta = getDelta(getProject());
- if (delta == null) {
- fullBuild(monitor);
- } else {
- incrementalBuild(delta, monitor);
- }
- }
- return null;
- }
+ @Override
+ protected IProject[] build(int kind, Map<String, String> args, IProgressMonitor monitor) throws CoreException {
+ // TODO: handle the monitor in a more clean way.
+ monitor.beginTask(Messages.RpmlintBuilder_0, MAX_WORKS);
+ monitor.worked(20);
+ if (kind == FULL_BUILD) {
+ fullBuild(monitor);
+ } else {
+ IResourceDelta delta = getDelta(getProject());
+ if (delta == null) {
+ fullBuild(monitor);
+ } else {
+ incrementalBuild(delta, monitor);
+ }
+ }
+ return null;
+ }
- private void fullBuild(IProgressMonitor monitor) throws CoreException {
- RpmlintPreVisitor resourceVisitor = new RpmlintPreVisitor();
- getProject().accept(resourceVisitor);
- checkCancel(monitor);
- monitor.worked(50);
- monitor.setTaskName(Messages.RpmlintBuilder_1);
- List<RpmlintItem> rpmlintItems = RpmlintParser
- .parseVisisted(resourceVisitor.getVisitedPaths());
- visitAndMarkRpmlintItems(monitor, rpmlintItems);
- }
+ private void fullBuild(IProgressMonitor monitor) throws CoreException {
+ RpmlintPreVisitor resourceVisitor = new RpmlintPreVisitor();
+ getProject().accept(resourceVisitor);
+ checkCancel(monitor);
+ monitor.worked(50);
+ monitor.setTaskName(Messages.RpmlintBuilder_1);
+ List<RpmlintItem> rpmlintItems = RpmlintParser.parseVisisted(resourceVisitor.getVisitedPaths());
+ visitAndMarkRpmlintItems(monitor, rpmlintItems);
+ }
- private void incrementalBuild(IResourceDelta delta,
- IProgressMonitor monitor) throws CoreException {
- RpmlintDeltaVisitor deltaVisitor = new RpmlintDeltaVisitor();
- delta.accept(deltaVisitor);
- monitor.worked(50);
- monitor.setTaskName(Messages.RpmlintBuilder_1);
- List<RpmlintItem> rpmlintItems = RpmlintParser
- .parseVisisted(deltaVisitor.getVisitedPaths());
- visitAndMarkRpmlintItems(monitor, rpmlintItems);
- }
+ private void incrementalBuild(IResourceDelta delta, IProgressMonitor monitor) throws CoreException {
+ RpmlintDeltaVisitor deltaVisitor = new RpmlintDeltaVisitor();
+ delta.accept(deltaVisitor);
+ monitor.worked(50);
+ monitor.setTaskName(Messages.RpmlintBuilder_1);
+ List<RpmlintItem> rpmlintItems = RpmlintParser.parseVisisted(deltaVisitor.getVisitedPaths());
+ visitAndMarkRpmlintItems(monitor, rpmlintItems);
+ }
- private void visitAndMarkRpmlintItems(IProgressMonitor monitor,
- List<RpmlintItem> rpmlintItems) throws CoreException {
- if (rpmlintItems.size() > 0) {
- checkCancel(monitor);
- monitor.worked(70);
- monitor.setTaskName(Messages.RpmlintBuilder_2);
- getProject().accept(new RpmlintMarkerVisitor(rpmlintItems));
- monitor.worked(MAX_WORKS);
- }
- }
+ private void visitAndMarkRpmlintItems(IProgressMonitor monitor, List<RpmlintItem> rpmlintItems)
+ throws CoreException {
+ if (rpmlintItems.size() > 0) {
+ checkCancel(monitor);
+ monitor.worked(70);
+ monitor.setTaskName(Messages.RpmlintBuilder_2);
+ getProject().accept(new RpmlintMarkerVisitor(rpmlintItems));
+ monitor.worked(MAX_WORKS);
+ }
+ }
- private static void checkCancel(IProgressMonitor monitor) {
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
- }
+ private static void checkCancel(IProgressMonitor monitor) {
+ if (monitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintDeltaVisitor.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintDeltaVisitor.java
index 42cd58a08a..bbc780c98f 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintDeltaVisitor.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintDeltaVisitor.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007 Alphonse Van Assche and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -21,41 +23,42 @@ import org.eclipse.linuxtools.internal.rpm.rpmlint.Activator;
import org.eclipse.linuxtools.internal.rpm.rpmlint.parser.RpmlintParser;
/**
- * Visitor that checks whether the resource is a .spec or .rpm file and whether it's ADDED or CHANGED.
- * If both conditions are true it's stored for later usage.
+ * Visitor that checks whether the resource is a .spec or .rpm file and whether
+ * it's ADDED or CHANGED. If both conditions are true it's stored for later
+ * usage.
*
*/
public class RpmlintDeltaVisitor implements IResourceDeltaVisitor {
- private List<String> paths = new ArrayList<>();
+ private List<String> paths = new ArrayList<>();
- @Override
- public boolean visit(IResourceDelta delta) {
- IResource resource = delta.getResource();
- if (Activator.SPECFILE_EXTENSION.equals(resource.getFileExtension())
- || Activator.RPMFILE_EXTENSION.equals(resource
- .getFileExtension())) {
- switch (delta.getKind()) {
- // we first visiting resources to be able to run the rpmlint command
- // only once. That improve drastically the performance.
- case IResourceDelta.ADDED:
- paths.add(resource.getLocation().toOSString());
- break;
- case IResourceDelta.CHANGED:
- RpmlintParser.deleteMarkers(resource);
- paths.add(resource.getLocation().toOSString());
- break;
- }
- }
- return true;
- }
+ @Override
+ public boolean visit(IResourceDelta delta) {
+ IResource resource = delta.getResource();
+ if (Activator.SPECFILE_EXTENSION.equals(resource.getFileExtension())
+ || Activator.RPMFILE_EXTENSION.equals(resource.getFileExtension())) {
+ switch (delta.getKind()) {
+ // we first visiting resources to be able to run the rpmlint command
+ // only once. That improve drastically the performance.
+ case IResourceDelta.ADDED:
+ paths.add(resource.getLocation().toOSString());
+ break;
+ case IResourceDelta.CHANGED:
+ RpmlintParser.deleteMarkers(resource);
+ paths.add(resource.getLocation().toOSString());
+ break;
+ }
+ }
+ return true;
+ }
- /**
- * Returns the visited and marked paths.
- * @return The marked paths.
- */
- public List<String> getVisitedPaths() {
- return paths;
- }
+ /**
+ * Returns the visited and marked paths.
+ *
+ * @return The marked paths.
+ */
+ public List<String> getVisitedPaths() {
+ return paths;
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintMarkerRemoveVisitor.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintMarkerRemoveVisitor.java
index a834168637..8add9341e6 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintMarkerRemoveVisitor.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintMarkerRemoveVisitor.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007 Alphonse Van Assche and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -24,22 +26,19 @@ import org.eclipse.linuxtools.rpm.ui.editor.markers.SpecfileErrorHandler;
*/
public class RpmlintMarkerRemoveVisitor implements IResourceVisitor {
- /**
- * Removes all rpmlint markers for spec and rpm files.
- *
- * @see org.eclipse.core.resources.IResourceVisitor#visit(org.eclipse.core.resources.IResource)
- */
- @Override
- public boolean visit(IResource resource) throws CoreException {
- if (Activator.SPECFILE_EXTENSION.equals(resource.getFileExtension())
- || Activator.RPMFILE_EXTENSION.equals(resource
- .getFileExtension())) {
- RpmlintParser.deleteMarkers(resource);
- // remove internal marks
- resource.deleteMarkers(
- SpecfileErrorHandler.SPECFILE_ERROR_MARKER_ID, false,
- IResource.DEPTH_ZERO);
- }
- return true;
- }
+ /**
+ * Removes all rpmlint markers for spec and rpm files.
+ *
+ * @see org.eclipse.core.resources.IResourceVisitor#visit(org.eclipse.core.resources.IResource)
+ */
+ @Override
+ public boolean visit(IResource resource) throws CoreException {
+ if (Activator.SPECFILE_EXTENSION.equals(resource.getFileExtension())
+ || Activator.RPMFILE_EXTENSION.equals(resource.getFileExtension())) {
+ RpmlintParser.deleteMarkers(resource);
+ // remove internal marks
+ resource.deleteMarkers(SpecfileErrorHandler.SPECFILE_ERROR_MARKER_ID, false, IResource.DEPTH_ZERO);
+ }
+ return true;
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintMarkerVisitor.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintMarkerVisitor.java
index 2edc7f5e9f..6ffec698ba 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintMarkerVisitor.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintMarkerVisitor.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 Alphonse Van Assche and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -36,166 +38,145 @@ import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileParser;
*/
public class RpmlintMarkerVisitor implements IResourceVisitor {
- private List<RpmlintItem> rpmlintItems;
-
- private boolean firstWarningInResource;
- private SpecfileParser parser;
- private SpecfileErrorHandler errorHandler;
- private SpecfileTaskHandler taskHandler;
-
- /**
- * Creates a visitor for handling .rpm and .spec files and adding markers
- * for rpmlint warnings/errors.
- *
- * @param rpmlintItems
- * The rpmlint identified warnings and errors.
- */
- public RpmlintMarkerVisitor(List<RpmlintItem> rpmlintItems) {
- this.rpmlintItems = rpmlintItems;
- parser = new SpecfileParser();
- }
-
- @Override
- public boolean visit(IResource resource) throws CoreException {
- if (resource.getType() == IResource.FILE) {
- if (Activator.SPECFILE_EXTENSION
- .equals(resource.getFileExtension())) {
- firstWarningInResource = true;
- for (RpmlintItem item : rpmlintItems) {
- if (item.getFileName().equals(
- resource.getLocation().toOSString())) {
- IFile currentFile = ((IFile) resource);
- if (firstWarningInResource) {
- RpmlintParser.deleteMarkers(resource);
- // remove internal marks on the current resource
- currentFile
- .deleteMarkers(
- SpecfileErrorHandler.SPECFILE_ERROR_MARKER_ID,
- false, IResource.DEPTH_ZERO);
- firstWarningInResource = false;
- }
-
- String specContent = fileToString(currentFile);
- int lineNumber;
- // FIXME: workaround the wrong line number with
- // configure-without-libdir-spec
- if (item.getId()
- .equals("configure-without-libdir-spec")) { //$NON-NLS-1$
- item.setLineNbr(-1);
- lineNumber = RpmlintParser.getRealLineNbr(specContent, "./configure"); //$NON-NLS-1$
- if (lineNumber == -1) {
- lineNumber = RpmlintParser.getRealLineNbr(specContent,
- "%configure"); //$NON-NLS-1$
- }
- item.setLineNbr(lineNumber);
- }
-
- lineNumber = item.getLineNbr();
- if (lineNumber == -1) {
- lineNumber = RpmlintParser.getRealLineNbr(specContent,
- item.getRefferedContent());
- if (lineNumber == -1) {
- lineNumber = 1;
- }
- }
- lineNumber -= 1;
- // end workaround
-
- // BTW we mark specfile with the internal marker.
- parser.setErrorHandler(getSpecfileErrorHandler(
- currentFile, specContent));
- parser.setTaskHandler(getSpecfileTaskHandler(
- currentFile, specContent));
- parser.parse(specContent);
-
- IDocument document = new Document(specContent);
- int charStart = getLineOffset(document, lineNumber);
- int charEnd = charStart
- + getLineLength(document, lineNumber);
- RpmlintParser.addMarker(currentFile,
- item.getId() + ": " //$NON-NLS-1$
- + item.getMessage(), lineNumber,
- charStart, charEnd, item.getSeverity(),
- item.getId(), item.getRefferedContent());
- }
- }
- } else if (Activator.RPMFILE_EXTENSION.equals(resource
- .getFileExtension())) {
- firstWarningInResource = true;
- for (RpmlintItem item : rpmlintItems) {
- IFile currentFile = ((IFile) resource);
- if (firstWarningInResource) {
- RpmlintParser.deleteMarkers(resource);
- // remove internal marks on the current resource
- currentFile.deleteMarkers(
- SpecfileErrorHandler.SPECFILE_ERROR_MARKER_ID,
- false, IResource.DEPTH_ZERO);
- firstWarningInResource = false;
- }
-
- RpmlintParser.addMarker(currentFile,
- item.getId() + ": " //$NON-NLS-1$
- + item.getMessage(), item.getSeverity(),
- item.getId(), item.getRefferedContent());
- }
- }
- }
- return true;
- }
-
- private SpecfileErrorHandler getSpecfileErrorHandler(IFile file,
- String specContent) {
- if (errorHandler == null) {
- errorHandler = new SpecfileErrorHandler(file, new Document(
- specContent));
- } else {
- errorHandler.setFile(file);
- errorHandler.setDocument(new Document(specContent));
- }
- return errorHandler;
- }
-
- private SpecfileTaskHandler getSpecfileTaskHandler(IFile file,
- String specContent) {
- if (taskHandler == null) {
- taskHandler = new SpecfileTaskHandler(file, new Document(
- specContent));
- } else {
- taskHandler.setFile(file);
- taskHandler.setDocument(new Document(specContent));
- }
- return taskHandler;
- }
-
- private static int getLineOffset(IDocument document, int lineNumber) {
- try {
- return document.getLineOffset(lineNumber);
- } catch (BadLocationException e) {
- RpmlintLog.logError(e);
- return 1;
- }
- }
-
- private static int getLineLength(IDocument document, int lineNumber) {
- try {
- return document.getLineLength(lineNumber);
- } catch (BadLocationException e) {
- RpmlintLog.logError(e);
- return 1;
- }
- }
-
- private static String fileToString(IFile file) {
- String ret = ""; //$NON-NLS-1$
- try (InputStream in = file.getContents()) {
- int nbrOfByte = in.available();
- byte[] bytes = new byte[nbrOfByte];
- in.read(bytes);
- ret = new String(bytes);
- } catch (CoreException | IOException e) {
- RpmlintLog.logError(e);
- }
- return ret;
- }
+ private List<RpmlintItem> rpmlintItems;
+
+ private boolean firstWarningInResource;
+ private SpecfileParser parser;
+ private SpecfileErrorHandler errorHandler;
+ private SpecfileTaskHandler taskHandler;
+
+ /**
+ * Creates a visitor for handling .rpm and .spec files and adding markers for
+ * rpmlint warnings/errors.
+ *
+ * @param rpmlintItems The rpmlint identified warnings and errors.
+ */
+ public RpmlintMarkerVisitor(List<RpmlintItem> rpmlintItems) {
+ this.rpmlintItems = rpmlintItems;
+ parser = new SpecfileParser();
+ }
+
+ @Override
+ public boolean visit(IResource resource) throws CoreException {
+ if (resource.getType() == IResource.FILE) {
+ if (Activator.SPECFILE_EXTENSION.equals(resource.getFileExtension())) {
+ firstWarningInResource = true;
+ for (RpmlintItem item : rpmlintItems) {
+ if (item.getFileName().equals(resource.getLocation().toOSString())) {
+ IFile currentFile = ((IFile) resource);
+ if (firstWarningInResource) {
+ RpmlintParser.deleteMarkers(resource);
+ // remove internal marks on the current resource
+ currentFile.deleteMarkers(SpecfileErrorHandler.SPECFILE_ERROR_MARKER_ID, false,
+ IResource.DEPTH_ZERO);
+ firstWarningInResource = false;
+ }
+
+ String specContent = fileToString(currentFile);
+ int lineNumber;
+ // FIXME: workaround the wrong line number with
+ // configure-without-libdir-spec
+ if (item.getId().equals("configure-without-libdir-spec")) { //$NON-NLS-1$
+ item.setLineNbr(-1);
+ lineNumber = RpmlintParser.getRealLineNbr(specContent, "./configure"); //$NON-NLS-1$
+ if (lineNumber == -1) {
+ lineNumber = RpmlintParser.getRealLineNbr(specContent, "%configure"); //$NON-NLS-1$
+ }
+ item.setLineNbr(lineNumber);
+ }
+
+ lineNumber = item.getLineNbr();
+ if (lineNumber == -1) {
+ lineNumber = RpmlintParser.getRealLineNbr(specContent, item.getRefferedContent());
+ if (lineNumber == -1) {
+ lineNumber = 1;
+ }
+ }
+ lineNumber -= 1;
+ // end workaround
+
+ // BTW we mark specfile with the internal marker.
+ parser.setErrorHandler(getSpecfileErrorHandler(currentFile, specContent));
+ parser.setTaskHandler(getSpecfileTaskHandler(currentFile, specContent));
+ parser.parse(specContent);
+
+ IDocument document = new Document(specContent);
+ int charStart = getLineOffset(document, lineNumber);
+ int charEnd = charStart + getLineLength(document, lineNumber);
+ RpmlintParser.addMarker(currentFile, item.getId() + ": " //$NON-NLS-1$
+ + item.getMessage(), lineNumber, charStart, charEnd, item.getSeverity(), item.getId(),
+ item.getRefferedContent());
+ }
+ }
+ } else if (Activator.RPMFILE_EXTENSION.equals(resource.getFileExtension())) {
+ firstWarningInResource = true;
+ for (RpmlintItem item : rpmlintItems) {
+ IFile currentFile = ((IFile) resource);
+ if (firstWarningInResource) {
+ RpmlintParser.deleteMarkers(resource);
+ // remove internal marks on the current resource
+ currentFile.deleteMarkers(SpecfileErrorHandler.SPECFILE_ERROR_MARKER_ID, false,
+ IResource.DEPTH_ZERO);
+ firstWarningInResource = false;
+ }
+
+ RpmlintParser.addMarker(currentFile, item.getId() + ": " //$NON-NLS-1$
+ + item.getMessage(), item.getSeverity(), item.getId(), item.getRefferedContent());
+ }
+ }
+ }
+ return true;
+ }
+
+ private SpecfileErrorHandler getSpecfileErrorHandler(IFile file, String specContent) {
+ if (errorHandler == null) {
+ errorHandler = new SpecfileErrorHandler(file, new Document(specContent));
+ } else {
+ errorHandler.setFile(file);
+ errorHandler.setDocument(new Document(specContent));
+ }
+ return errorHandler;
+ }
+
+ private SpecfileTaskHandler getSpecfileTaskHandler(IFile file, String specContent) {
+ if (taskHandler == null) {
+ taskHandler = new SpecfileTaskHandler(file, new Document(specContent));
+ } else {
+ taskHandler.setFile(file);
+ taskHandler.setDocument(new Document(specContent));
+ }
+ return taskHandler;
+ }
+
+ private static int getLineOffset(IDocument document, int lineNumber) {
+ try {
+ return document.getLineOffset(lineNumber);
+ } catch (BadLocationException e) {
+ RpmlintLog.logError(e);
+ return 1;
+ }
+ }
+
+ private static int getLineLength(IDocument document, int lineNumber) {
+ try {
+ return document.getLineLength(lineNumber);
+ } catch (BadLocationException e) {
+ RpmlintLog.logError(e);
+ return 1;
+ }
+ }
+
+ private static String fileToString(IFile file) {
+ String ret = ""; //$NON-NLS-1$
+ try (InputStream in = file.getContents()) {
+ int nbrOfByte = in.available();
+ byte[] bytes = new byte[nbrOfByte];
+ in.read(bytes);
+ ret = new String(bytes);
+ } catch (CoreException | IOException e) {
+ RpmlintLog.logError(e);
+ }
+ return ret;
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintNature.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintNature.java
index 75ed7a38a4..f755e0a552 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintNature.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintNature.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009, 2013 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -17,61 +19,61 @@ import org.eclipse.core.resources.IProjectNature;
import org.eclipse.core.runtime.CoreException;
/**
- * Project nature determining whether rpmlint builder should be enabled for the given project.
+ * Project nature determining whether rpmlint builder should be enabled for the
+ * given project.
*/
public class RpmlintNature implements IProjectNature {
- /**
- * ID of this project nature
- */
- public static final String NATURE_ID = "org.eclipse.linuxtools.rpm.rpmlint.rpmlintNature"; //$NON-NLS-1$
+ /**
+ * ID of this project nature
+ */
+ public static final String NATURE_ID = "org.eclipse.linuxtools.rpm.rpmlint.rpmlintNature"; //$NON-NLS-1$
- private IProject project;
+ private IProject project;
- @Override
- public void configure() throws CoreException {
- IProjectDescription desc = project.getDescription();
- ICommand[] commands = desc.getBuildSpec();
- for (ICommand command : commands) {
- if (command.getBuilderName().equals(RpmlintBuilder.BUILDER_ID)) {
- return;
- }
- }
- ICommand[] newCommands = new ICommand[commands.length + 1];
- System.arraycopy(commands, 0, newCommands, 0, commands.length);
- ICommand command = desc.newCommand();
- command.setBuilderName(RpmlintBuilder.BUILDER_ID);
- newCommands[newCommands.length - 1] = command;
- desc.setBuildSpec(newCommands);
- project.setDescription(desc, null);
- }
+ @Override
+ public void configure() throws CoreException {
+ IProjectDescription desc = project.getDescription();
+ ICommand[] commands = desc.getBuildSpec();
+ for (ICommand command : commands) {
+ if (command.getBuilderName().equals(RpmlintBuilder.BUILDER_ID)) {
+ return;
+ }
+ }
+ ICommand[] newCommands = new ICommand[commands.length + 1];
+ System.arraycopy(commands, 0, newCommands, 0, commands.length);
+ ICommand command = desc.newCommand();
+ command.setBuilderName(RpmlintBuilder.BUILDER_ID);
+ newCommands[newCommands.length - 1] = command;
+ desc.setBuildSpec(newCommands);
+ project.setDescription(desc, null);
+ }
- @Override
- public void deconfigure() throws CoreException {
- IProjectDescription description = getProject().getDescription();
- ICommand[] commands = description.getBuildSpec();
- for (int i = 0; i < commands.length; ++i) {
- if (commands[i].getBuilderName().equals(RpmlintBuilder.BUILDER_ID)) {
- ICommand[] newCommands = new ICommand[commands.length - 1];
- System.arraycopy(commands, 0, newCommands, 0, i);
- System.arraycopy(commands, i + 1, newCommands, i,
- commands.length - i - 1);
- description.setBuildSpec(newCommands);
- // Remove rpmlint marks on all specfiles into the project.
- project.accept(new RpmlintMarkerRemoveVisitor());
- return;
- }
- }
- }
+ @Override
+ public void deconfigure() throws CoreException {
+ IProjectDescription description = getProject().getDescription();
+ ICommand[] commands = description.getBuildSpec();
+ for (int i = 0; i < commands.length; ++i) {
+ if (commands[i].getBuilderName().equals(RpmlintBuilder.BUILDER_ID)) {
+ ICommand[] newCommands = new ICommand[commands.length - 1];
+ System.arraycopy(commands, 0, newCommands, 0, i);
+ System.arraycopy(commands, i + 1, newCommands, i, commands.length - i - 1);
+ description.setBuildSpec(newCommands);
+ // Remove rpmlint marks on all specfiles into the project.
+ project.accept(new RpmlintMarkerRemoveVisitor());
+ return;
+ }
+ }
+ }
- @Override
- public IProject getProject() {
- return project;
- }
+ @Override
+ public IProject getProject() {
+ return project;
+ }
- @Override
- public void setProject(IProject project) {
- this.project = project;
- }
+ @Override
+ public void setProject(IProject project) {
+ this.project = project;
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintPreVisitor.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintPreVisitor.java
index ac6fa3757f..f22941a445 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintPreVisitor.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/builder/RpmlintPreVisitor.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007 Alphonse Van Assche and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -23,28 +25,27 @@ import org.eclipse.linuxtools.internal.rpm.rpmlint.Activator;
*/
public class RpmlintPreVisitor implements IResourceVisitor {
- private List<String> paths = new ArrayList<>();
+ private List<String> paths = new ArrayList<>();
- @Override
- public boolean visit(IResource resource) {
- if (Activator.SPECFILE_EXTENSION.equals(resource.getFileExtension())
- || Activator.RPMFILE_EXTENSION.equals(resource
- .getFileExtension())) {
- // we previsiting resource to be able to run rpmlint command
- // only once. That improve drasticaly the perfs.
- if (resource.getLocation()==null) {
- paths.add(resource.getLocationURI().toString());
- } else {
- paths.add(resource.getLocation().toOSString());
- }
- }
- return true;
- }
+ @Override
+ public boolean visit(IResource resource) {
+ if (Activator.SPECFILE_EXTENSION.equals(resource.getFileExtension())
+ || Activator.RPMFILE_EXTENSION.equals(resource.getFileExtension())) {
+ // we previsiting resource to be able to run rpmlint command
+ // only once. That improve drasticaly the perfs.
+ if (resource.getLocation() == null) {
+ paths.add(resource.getLocationURI().toString());
+ } else {
+ paths.add(resource.getLocation().toOSString());
+ }
+ }
+ return true;
+ }
- /**
- * @return List of the accepted paths.
- */
- public List<String> getVisitedPaths() {
- return paths;
- }
+ /**
+ * @return List of the accepted paths.
+ */
+ public List<String> getVisitedPaths() {
+ return paths;
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/parser/RpmlintItem.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/parser/RpmlintItem.java
index 1eaff5224a..fcc922dc24 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/parser/RpmlintItem.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/parser/RpmlintItem.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007 Alphonse Van Assche.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -17,161 +19,169 @@ import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileParser;
*/
public class RpmlintItem {
- private static final String[] SECTIONS = SpecfileParser.simpleSections;
-
- private int lineNbr;
-
- private int severity;
-
- private String id;
-
- private String refferedContent;
-
- private String message;
-
- private String fileName;
-
- /**
- * Returns the name of the file rpmlint gives warning for.
- *
- * @return The file name.
- */
- public String getFileName() {
- return fileName;
- }
-
- /**
- * Sets the name of the file rpmlint gives warning for.
- * @param file The File name.
- */
- public void setFileName(String file) {
- this.fileName = file;
- }
-
- /**
- * Returns the line number where the warning appears if rpmlint gives it.
- * @return The line number.
- */
- public int getLineNbr() {
- return lineNbr;
- }
-
- /**
- * Sets the line number where the warning appears if rpmlint gives it.
- * @param lineNbr The line number.
- */
- public void setLineNbr(int lineNbr) {
- this.lineNbr = lineNbr;
- }
-
- /**
- * The id of the warning.
- * @return The id.
- */
- public String getId() {
- return id;
- }
-
- /**
- * Sets the id of the warning.
- * @param id The id of the warning.
- */
- public void setId(String id) {
- this.id = id;
- }
-
- /**
- * Returns the message as rpmlint gives it.
- * @return The message.
- */
- public String getMessage() {
- return message;
- }
-
- /**
- * Sets the message as rpmlint gives it.
- * @param message The raw message.
- */
- public void setMessage(String message) {
- this.message = message;
- }
-
- /**
- * Returns the referred content - section, tag, etc.
- * @return The referred content.
- */
- public String getRefferedContent() {
- return refferedContent;
- }
-
- /**
- * Sets the referred content.
- * @param refferedContent The referred content.
- */
- public void setRefferedContent(String refferedContent) {
- for (int i = 0; i < SECTIONS.length; i++) {
- if (refferedContent.startsWith(SECTIONS[i])) {
- this.refferedContent = refferedContent.trim();
- if (this.refferedContent.equals("")) {//$NON-NLS-1$
- this.refferedContent = SECTIONS[i];
- }
- i = SECTIONS.length;
- } else {
- this.refferedContent = refferedContent;
- }
- }
- }
-
- /**
- * Returns the severity of the rpmlint item.
- *
- * @return The severity.
- */
- public int getSeverity() {
- return severity;
- }
-
- /**
- * Returns the severity of the rpmlint item.
- *
- * @param severity The severity of the rpmlint item.
- */
- public void setSeverity(String severity) {
- severity = severity.replaceAll(":", "").trim(); //$NON-NLS-1$ //$NON-NLS-2$
- switch (severity.charAt(0)) {
- case 'I':
- this.severity = 0;
- break;
- case 'W':
- this.severity = 1;
- break;
- case 'E':
- this.severity = 2;
- break;
- default:
- this.severity = 0;
- break;
- }
- }
-
- @Override
- public String toString() {
- StringBuilder stringBuilder = new StringBuilder();
- stringBuilder.append("line number: "); //$NON-NLS-1$
- stringBuilder.append(this.lineNbr);
- stringBuilder.append("\nfile name: "); //$NON-NLS-1$
- stringBuilder.append(this.fileName);
- stringBuilder.append("\nseverity: "); //$NON-NLS-1$
- stringBuilder.append(this.severity);
- stringBuilder.append("\nId: "); //$NON-NLS-1$
- stringBuilder.append(this.id);
- stringBuilder.append("\nrefered content: "); //$NON-NLS-1$
- stringBuilder.append(this.refferedContent);
- stringBuilder.append("\nmessage: "); //$NON-NLS-1$
- stringBuilder.append(this.getMessage());
- stringBuilder.append("\n"); //$NON-NLS-1$
- return stringBuilder.toString();
- }
-
+ private static final String[] SECTIONS = SpecfileParser.simpleSections;
+
+ private int lineNbr;
+
+ private int severity;
+
+ private String id;
+
+ private String refferedContent;
+
+ private String message;
+
+ private String fileName;
+
+ /**
+ * Returns the name of the file rpmlint gives warning for.
+ *
+ * @return The file name.
+ */
+ public String getFileName() {
+ return fileName;
+ }
+
+ /**
+ * Sets the name of the file rpmlint gives warning for.
+ *
+ * @param file The File name.
+ */
+ public void setFileName(String file) {
+ this.fileName = file;
+ }
+
+ /**
+ * Returns the line number where the warning appears if rpmlint gives it.
+ *
+ * @return The line number.
+ */
+ public int getLineNbr() {
+ return lineNbr;
+ }
+
+ /**
+ * Sets the line number where the warning appears if rpmlint gives it.
+ *
+ * @param lineNbr The line number.
+ */
+ public void setLineNbr(int lineNbr) {
+ this.lineNbr = lineNbr;
+ }
+
+ /**
+ * The id of the warning.
+ *
+ * @return The id.
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Sets the id of the warning.
+ *
+ * @param id The id of the warning.
+ */
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ * Returns the message as rpmlint gives it.
+ *
+ * @return The message.
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * Sets the message as rpmlint gives it.
+ *
+ * @param message The raw message.
+ */
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ /**
+ * Returns the referred content - section, tag, etc.
+ *
+ * @return The referred content.
+ */
+ public String getRefferedContent() {
+ return refferedContent;
+ }
+
+ /**
+ * Sets the referred content.
+ *
+ * @param refferedContent The referred content.
+ */
+ public void setRefferedContent(String refferedContent) {
+ for (int i = 0; i < SECTIONS.length; i++) {
+ if (refferedContent.startsWith(SECTIONS[i])) {
+ this.refferedContent = refferedContent.trim();
+ if (this.refferedContent.equals("")) {//$NON-NLS-1$
+ this.refferedContent = SECTIONS[i];
+ }
+ i = SECTIONS.length;
+ } else {
+ this.refferedContent = refferedContent;
+ }
+ }
+ }
+
+ /**
+ * Returns the severity of the rpmlint item.
+ *
+ * @return The severity.
+ */
+ public int getSeverity() {
+ return severity;
+ }
+
+ /**
+ * Returns the severity of the rpmlint item.
+ *
+ * @param severity The severity of the rpmlint item.
+ */
+ public void setSeverity(String severity) {
+ severity = severity.replaceAll(":", "").trim(); //$NON-NLS-1$ //$NON-NLS-2$
+ switch (severity.charAt(0)) {
+ case 'I':
+ this.severity = 0;
+ break;
+ case 'W':
+ this.severity = 1;
+ break;
+ case 'E':
+ this.severity = 2;
+ break;
+ default:
+ this.severity = 0;
+ break;
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder stringBuilder = new StringBuilder();
+ stringBuilder.append("line number: "); //$NON-NLS-1$
+ stringBuilder.append(this.lineNbr);
+ stringBuilder.append("\nfile name: "); //$NON-NLS-1$
+ stringBuilder.append(this.fileName);
+ stringBuilder.append("\nseverity: "); //$NON-NLS-1$
+ stringBuilder.append(this.severity);
+ stringBuilder.append("\nId: "); //$NON-NLS-1$
+ stringBuilder.append(this.id);
+ stringBuilder.append("\nrefered content: "); //$NON-NLS-1$
+ stringBuilder.append(this.refferedContent);
+ stringBuilder.append("\nmessage: "); //$NON-NLS-1$
+ stringBuilder.append(this.getMessage());
+ stringBuilder.append("\n"); //$NON-NLS-1$
+ return stringBuilder.toString();
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/parser/RpmlintParser.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/parser/RpmlintParser.java
index 1e44343f98..c36c808a24 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/parser/RpmlintParser.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/parser/RpmlintParser.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2016 Alphonse Van Assche.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -39,329 +41,288 @@ import org.eclipse.ui.preferences.ScopedPreferenceStore;
*/
public class RpmlintParser {
- private static final String COLON = ":"; //$NON-NLS-1$
- private static final String SPACE = " "; //$NON-NLS-1$
- private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+ private static final String COLON = ":"; //$NON-NLS-1$
+ private static final String SPACE = " "; //$NON-NLS-1$
+ private static final String EMPTY_STRING = ""; //$NON-NLS-1$
- /**
- * Parse visited resources.
- *
- * @param visitedResources
- * The list of resources to parse.
- *
- * @return a <code>RpmlintItem</code> ArrayList.
- */
- public static List<RpmlintItem> parseVisisted(List<String> visitedResources) {
- String rpmlintPath = new ScopedPreferenceStore(InstanceScope.INSTANCE,
- Activator.PLUGIN_ID)
- .getString(PreferenceConstants.P_RPMLINT_PATH);
- /*
- * It's fine to fail silently if rpmlint is not installed as the actual
- * user messages and etc. are displayed by the ui code and this is just
- * a guard if we have configuration changing or someone playing with the
- * project files.
- */
- if (visitedResources.isEmpty() || !Files.exists(Paths.get(rpmlintPath))) {
- return new ArrayList<>();
- }
- return parseRpmlintOutput(runRpmlintCommand(visitedResources));
- }
+ /**
+ * Parse visited resources.
+ *
+ * @param visitedResources The list of resources to parse.
+ *
+ * @return a <code>RpmlintItem</code> ArrayList.
+ */
+ public static List<RpmlintItem> parseVisisted(List<String> visitedResources) {
+ String rpmlintPath = new ScopedPreferenceStore(InstanceScope.INSTANCE, Activator.PLUGIN_ID)
+ .getString(PreferenceConstants.P_RPMLINT_PATH);
+ /*
+ * It's fine to fail silently if rpmlint is not installed as the actual user
+ * messages and etc. are displayed by the ui code and this is just a guard if we
+ * have configuration changing or someone playing with the project files.
+ */
+ if (visitedResources.isEmpty() || !Files.exists(Paths.get(rpmlintPath))) {
+ return new ArrayList<>();
+ }
+ return parseRpmlintOutput(runRpmlintCommand(visitedResources));
+ }
- /**
- * Adds a rpmlint marker.
- *
- * @param file
- * The file to create the marker for.
- * @param message
- * The marker message.
- * @param lineNumber
- * The line at which the marker appears.
- * @param charStart
- * The index of the starting char for the marker.
- * @param charEnd
- * The index of the ending char for the marker.
- * @param severity
- * The marker seveirty.
- * @param rpmlintID
- * The id of the rpmlint warning/error.
- * @param rpmlintrefferedContent
- * Additional content reffered by the marker.
- */
- public static void addMarker(IFile file, String message, int lineNumber,
- int charStart, int charEnd, int severity, String rpmlintID,
- String rpmlintrefferedContent) {
- try {
- IMarker marker = file.createMarker(RpmlintBuilder.MARKER_ID);
- marker.setAttribute(IMarker.LOCATION, file.getFullPath().toString());
- marker.setAttribute(IMarker.MESSAGE, message);
- marker.setAttribute(IMarker.SEVERITY, severity);
- marker.setAttribute(IMarker.LINE_NUMBER, lineNumber);
- marker.setAttribute(IMarker.CHAR_START, charStart);
- marker.setAttribute(IMarker.CHAR_END, charEnd);
- marker.setAttribute(
- RpmlintMarkerResolutionGenerator.RPMLINT_ERROR_ID,
- rpmlintID);
- marker.setAttribute(
- RpmlintMarkerResolutionGenerator.RPMLINT_REFFERED_CONTENT,
- rpmlintrefferedContent);
+ /**
+ * Adds a rpmlint marker.
+ *
+ * @param file The file to create the marker for.
+ * @param message The marker message.
+ * @param lineNumber The line at which the marker appears.
+ * @param charStart The index of the starting char for the marker.
+ * @param charEnd The index of the ending char for the marker.
+ * @param severity The marker seveirty.
+ * @param rpmlintID The id of the rpmlint warning/error.
+ * @param rpmlintrefferedContent Additional content reffered by the marker.
+ */
+ public static void addMarker(IFile file, String message, int lineNumber, int charStart, int charEnd, int severity,
+ String rpmlintID, String rpmlintrefferedContent) {
+ try {
+ IMarker marker = file.createMarker(RpmlintBuilder.MARKER_ID);
+ marker.setAttribute(IMarker.LOCATION, file.getFullPath().toString());
+ marker.setAttribute(IMarker.MESSAGE, message);
+ marker.setAttribute(IMarker.SEVERITY, severity);
+ marker.setAttribute(IMarker.LINE_NUMBER, lineNumber);
+ marker.setAttribute(IMarker.CHAR_START, charStart);
+ marker.setAttribute(IMarker.CHAR_END, charEnd);
+ marker.setAttribute(RpmlintMarkerResolutionGenerator.RPMLINT_ERROR_ID, rpmlintID);
+ marker.setAttribute(RpmlintMarkerResolutionGenerator.RPMLINT_REFFERED_CONTENT, rpmlintrefferedContent);
- } catch (CoreException e) {
- RpmlintLog.logError(e);
- }
- }
+ } catch (CoreException e) {
+ RpmlintLog.logError(e);
+ }
+ }
- /**
- * Adds a rpmlint marker.
- *
- * @param file
- * The file to create the marker for.
- * @param message
- * The marker message.
- * @param severity
- * The marker severity.
- * @param rpmlintID
- * The id of the rpmlint warning/error.
- * @param rpmlintrefferedContent
- * Additional content referred by the marker.
- */
- public static void addMarker(IFile file, String message, int severity,
- String rpmlintID, String rpmlintrefferedContent) {
- try {
- IMarker marker = file.createMarker(RpmlintBuilder.MARKER_ID);
- marker.setAttribute(IMarker.LOCATION, file.getFullPath().toString());
- marker.setAttribute(IMarker.MESSAGE, message);
- marker.setAttribute(IMarker.SEVERITY, severity);
- marker.setAttribute(
- RpmlintMarkerResolutionGenerator.RPMLINT_ERROR_ID,
- rpmlintID);
- marker.setAttribute(
- RpmlintMarkerResolutionGenerator.RPMLINT_REFFERED_CONTENT,
- rpmlintrefferedContent);
+ /**
+ * Adds a rpmlint marker.
+ *
+ * @param file The file to create the marker for.
+ * @param message The marker message.
+ * @param severity The marker severity.
+ * @param rpmlintID The id of the rpmlint warning/error.
+ * @param rpmlintrefferedContent Additional content referred by the marker.
+ */
+ public static void addMarker(IFile file, String message, int severity, String rpmlintID,
+ String rpmlintrefferedContent) {
+ try {
+ IMarker marker = file.createMarker(RpmlintBuilder.MARKER_ID);
+ marker.setAttribute(IMarker.LOCATION, file.getFullPath().toString());
+ marker.setAttribute(IMarker.MESSAGE, message);
+ marker.setAttribute(IMarker.SEVERITY, severity);
+ marker.setAttribute(RpmlintMarkerResolutionGenerator.RPMLINT_ERROR_ID, rpmlintID);
+ marker.setAttribute(RpmlintMarkerResolutionGenerator.RPMLINT_REFFERED_CONTENT, rpmlintrefferedContent);
- } catch (CoreException e) {
- RpmlintLog.logError(e);
- }
- }
+ } catch (CoreException e) {
+ RpmlintLog.logError(e);
+ }
+ }
- /**
- * Clear the rpmlint specific markers.
- *
- * @param resource
- * The resource for which to clean the marker.
- */
- public static void deleteMarkers(IResource resource) {
- try {
- resource.deleteMarkers(RpmlintBuilder.MARKER_ID, false,
- IResource.DEPTH_ZERO);
- } catch (CoreException e) {
- RpmlintLog.logError(e);
- }
- }
+ /**
+ * Clear the rpmlint specific markers.
+ *
+ * @param resource The resource for which to clean the marker.
+ */
+ public static void deleteMarkers(IResource resource) {
+ try {
+ resource.deleteMarkers(RpmlintBuilder.MARKER_ID, false, IResource.DEPTH_ZERO);
+ } catch (CoreException e) {
+ RpmlintLog.logError(e);
+ }
+ }
- /**
- * Parse a given rpmlint <code>InputStream</code>
- *
- * @param rpmlint
- * <code>InputStream</code> to parse.
- * @return a <code>RpmlintItem</code> ArrayList.
- */
- private static List<RpmlintItem> parseRpmlintOutput(BufferedInputStream in) {
- RpmlintItem item = new RpmlintItem();
- ArrayList<RpmlintItem> rpmlintItems = new ArrayList<>();
- LineNumberReader reader = new LineNumberReader(
- new InputStreamReader(in));
- String line;
- boolean isFirtItemLine = true;
- String[] lineItems;
- String description = EMPTY_STRING;
- try {
- while ((line = reader.readLine()) != null) {
- if (isFirtItemLine) {
- isFirtItemLine = false;
- lineItems = line.split(COLON, 4);
- item.setFileName(lineItems[0]);
- int lineNbr;
+ /**
+ * Parse a given rpmlint <code>InputStream</code>
+ *
+ * @param rpmlint <code>InputStream</code> to parse.
+ * @return a <code>RpmlintItem</code> ArrayList.
+ */
+ private static List<RpmlintItem> parseRpmlintOutput(BufferedInputStream in) {
+ RpmlintItem item = new RpmlintItem();
+ ArrayList<RpmlintItem> rpmlintItems = new ArrayList<>();
+ LineNumberReader reader = new LineNumberReader(new InputStreamReader(in));
+ String line;
+ boolean isFirtItemLine = true;
+ String[] lineItems;
+ String description = EMPTY_STRING;
+ try {
+ while ((line = reader.readLine()) != null) {
+ if (isFirtItemLine) {
+ isFirtItemLine = false;
+ lineItems = line.split(COLON, 4);
+ item.setFileName(lineItems[0]);
+ int lineNbr;
- // FIXME: last rpmlint version (0.83) contain a summary
- // line at the bottom of it output, so if we
- // detected this line we can safely return rpmlintItems,
- // maybe we can find a better way to detect this line.
- try {
- Integer.parseInt(line.split(SPACE)[0]);
- return rpmlintItems;
- } catch (NumberFormatException e) {
- // this line is not the summary
- }
+ // FIXME: last rpmlint version (0.83) contain a summary
+ // line at the bottom of it output, so if we
+ // detected this line we can safely return rpmlintItems,
+ // maybe we can find a better way to detect this line.
+ try {
+ Integer.parseInt(line.split(SPACE)[0]);
+ return rpmlintItems;
+ } catch (NumberFormatException e) {
+ // this line is not the summary
+ }
- // TODO: ask rpmlint upstream to display always the same
- // output.
- // at the moment the line number is not always displayed.
- // If the same output is always used, all the workarounds
- // for the line number can be
- // removed.
- try {
- lineNbr = Integer.parseInt(lineItems[1]);
- item.setSeverity(lineItems[2]);
- lineItems = lineItems[3].trim().split(SPACE, 2);
- } catch (NumberFormatException e) {
- // No line number showed for this rpmlint warning.
- lineItems = line.split(COLON, 3);
- lineNbr = -1;
- item.setSeverity(lineItems[1]);
- lineItems = lineItems[2].trim().split(SPACE, 2);
- }
- item.setLineNbr(lineNbr);
- item.setId(lineItems[0]);
- if (lineItems.length > 1) {
- // Maybe this error occur when rpmlint execute 'rpm -q
- // --qf=
- // --specfile file.spec' command
- RpmlintItem tmpItem = parseRpmOutput(item, lineItems[1]);
- if (tmpItem == null) {
- item.setRefferedContent(lineItems[1]);
- } else {
- item = tmpItem;
- }
- } else {
- item.setRefferedContent(EMPTY_STRING);
- }
- } else {
- description += line + '\n';
- }
+ // TODO: ask rpmlint upstream to display always the same
+ // output.
+ // at the moment the line number is not always displayed.
+ // If the same output is always used, all the workarounds
+ // for the line number can be
+ // removed.
+ try {
+ lineNbr = Integer.parseInt(lineItems[1]);
+ item.setSeverity(lineItems[2]);
+ lineItems = lineItems[3].trim().split(SPACE, 2);
+ } catch (NumberFormatException e) {
+ // No line number showed for this rpmlint warning.
+ lineItems = line.split(COLON, 3);
+ lineNbr = -1;
+ item.setSeverity(lineItems[1]);
+ lineItems = lineItems[2].trim().split(SPACE, 2);
+ }
+ item.setLineNbr(lineNbr);
+ item.setId(lineItems[0]);
+ if (lineItems.length > 1) {
+ // Maybe this error occur when rpmlint execute 'rpm -q
+ // --qf=
+ // --specfile file.spec' command
+ RpmlintItem tmpItem = parseRpmOutput(item, lineItems[1]);
+ if (tmpItem == null) {
+ item.setRefferedContent(lineItems[1]);
+ } else {
+ item = tmpItem;
+ }
+ } else {
+ item.setRefferedContent(EMPTY_STRING);
+ }
+ } else {
+ description += line + '\n';
+ }
- if (line.equals(EMPTY_STRING)) {
- if (item.getMessage() == null) {
- item.setMessage(description.substring(0,
- description.length() - 2));
- }
- int useOfTabsAndSpaces = getMixedUseOfTabsAndSpaces(item
- .getRefferedContent());
- if (useOfTabsAndSpaces != -1) {
- item.setLineNbr(useOfTabsAndSpaces);
- }
- rpmlintItems.add(item);
- item = new RpmlintItem();
+ if (line.equals(EMPTY_STRING)) {
+ if (item.getMessage() == null) {
+ item.setMessage(description.substring(0, description.length() - 2));
+ }
+ int useOfTabsAndSpaces = getMixedUseOfTabsAndSpaces(item.getRefferedContent());
+ if (useOfTabsAndSpaces != -1) {
+ item.setLineNbr(useOfTabsAndSpaces);
+ }
+ rpmlintItems.add(item);
+ item = new RpmlintItem();
- // Reinitialize parser for the next item
- isFirtItemLine = true;
- description = EMPTY_STRING;
- }
+ // Reinitialize parser for the next item
+ isFirtItemLine = true;
+ description = EMPTY_STRING;
+ }
- }
- // Close the input stream
- in.close();
- } catch (IOException e) {
- RpmlintLog.logError(e);
- }
- return rpmlintItems;
- }
+ }
+ // Close the input stream
+ in.close();
+ } catch (IOException e) {
+ RpmlintLog.logError(e);
+ }
+ return rpmlintItems;
+ }
- private static RpmlintItem parseRpmOutput(RpmlintItem item, String line) {
- String[] rpmErrorItems = line.split(COLON, 4);
- if (item.getId().equalsIgnoreCase("specfile-error")) { //$NON-NLS-1$
- // set severity
- item.setSeverity("E"); //$NON-NLS-1$
- } else {
- return null;
- }
- // set line number
- try {
- if (rpmErrorItems[1].matches(" line [0-9]+$")) { //$NON-NLS-1$
- item.setLineNbr(Integer.parseInt(rpmErrorItems[1].replace(
- " line ", ""))); //$NON-NLS-1$ //$NON-NLS-2$
- item.setMessage(rpmErrorItems[2]);
- item.setRefferedContent(rpmErrorItems[3]);
- } else {
- item.setLineNbr(-1);
- item.setMessage(rpmErrorItems[1]);
- item.setRefferedContent(""); //$NON-NLS-1$
- }
- } catch (NumberFormatException e) {
- return null;
- }
+ private static RpmlintItem parseRpmOutput(RpmlintItem item, String line) {
+ String[] rpmErrorItems = line.split(COLON, 4);
+ if (item.getId().equalsIgnoreCase("specfile-error")) { //$NON-NLS-1$
+ // set severity
+ item.setSeverity("E"); //$NON-NLS-1$
+ } else {
+ return null;
+ }
+ // set line number
+ try {
+ if (rpmErrorItems[1].matches(" line [0-9]+$")) { //$NON-NLS-1$
+ item.setLineNbr(Integer.parseInt(rpmErrorItems[1].replace(" line ", ""))); //$NON-NLS-1$ //$NON-NLS-2$
+ item.setMessage(rpmErrorItems[2]);
+ item.setRefferedContent(rpmErrorItems[3]);
+ } else {
+ item.setLineNbr(-1);
+ item.setMessage(rpmErrorItems[1]);
+ item.setRefferedContent(""); //$NON-NLS-1$
+ }
+ } catch (NumberFormatException e) {
+ return null;
+ }
- return item;
- }
+ return item;
+ }
- /**
- * Run rpmlint command on given visitedResources.
- *
- * @param specContent
- * The specfile content.
- * @return The rpmlint command <code>InputStream</code>.
- */
- private static BufferedInputStream runRpmlintCommand(
- List<String> visitedResources) {
- BufferedInputStream in = null;
- int i = 2;
- String[] cmd = new String[visitedResources.size() + i];
- cmd[0] = new ScopedPreferenceStore(InstanceScope.INSTANCE,
- Activator.PLUGIN_ID)
- .getString(PreferenceConstants.P_RPMLINT_PATH);
- cmd[1] = "-i"; //$NON-NLS-1$
- for (String resource : visitedResources) {
- cmd[i] = resource;
- i++;
- }
- try {
- in = Utils.runCommandToInputStream(cmd);
- } catch (IOException e) {
- // FIXME: rpmlint is not installed in the default place -> ask user
- // to open the prefs page.
- RpmlintLog.logError(e);
- }
- return in;
- }
+ /**
+ * Run rpmlint command on given visitedResources.
+ *
+ * @param specContent The specfile content.
+ * @return The rpmlint command <code>InputStream</code>.
+ */
+ private static BufferedInputStream runRpmlintCommand(List<String> visitedResources) {
+ BufferedInputStream in = null;
+ int i = 2;
+ String[] cmd = new String[visitedResources.size() + i];
+ cmd[0] = new ScopedPreferenceStore(InstanceScope.INSTANCE, Activator.PLUGIN_ID)
+ .getString(PreferenceConstants.P_RPMLINT_PATH);
+ cmd[1] = "-i"; //$NON-NLS-1$
+ for (String resource : visitedResources) {
+ cmd[i] = resource;
+ i++;
+ }
+ try {
+ in = Utils.runCommandToInputStream(cmd);
+ } catch (IOException e) {
+ // FIXME: rpmlint is not installed in the default place -> ask user
+ // to open the prefs page.
+ RpmlintLog.logError(e);
+ }
+ return in;
+ }
- /**
- *
- * Return the line number for given specContent and strToFind, it returns -1
- * if the string to find is not found.
- *
- * @param specContent
- * The content of the spec file.
- *
- * @param strToFind
- * The string we are looking for.
- * @return The line number.
- */
- public static int getRealLineNbr(String specContent, String strToFind) {
- int ret = -1;
- if (strToFind.isEmpty()) {
- return ret;
- }
- String line;
- LineNumberReader reader = new LineNumberReader(new StringReader(
- specContent));
- try {
- while ((line = reader.readLine()) != null) {
- if (line.replaceAll("\t| ", EMPTY_STRING).indexOf( //$NON-NLS-1$
- strToFind.replaceAll("\t| ", EMPTY_STRING)) > -1) { //$NON-NLS-1$
- ret = reader.getLineNumber();
- }
- }
- } catch (IOException e) {
- // return -1 if an I/O Exception occure.
- }
- return ret;
- }
+ /**
+ *
+ * Return the line number for given specContent and strToFind, it returns -1 if
+ * the string to find is not found.
+ *
+ * @param specContent The content of the spec file.
+ *
+ * @param strToFind The string we are looking for.
+ * @return The line number.
+ */
+ public static int getRealLineNbr(String specContent, String strToFind) {
+ int ret = -1;
+ if (strToFind.isEmpty()) {
+ return ret;
+ }
+ String line;
+ LineNumberReader reader = new LineNumberReader(new StringReader(specContent));
+ try {
+ while ((line = reader.readLine()) != null) {
+ if (line.replaceAll("\t| ", EMPTY_STRING).indexOf( //$NON-NLS-1$
+ strToFind.replaceAll("\t| ", EMPTY_STRING)) > -1) { //$NON-NLS-1$
+ ret = reader.getLineNumber();
+ }
+ }
+ } catch (IOException e) {
+ // return -1 if an I/O Exception occure.
+ }
+ return ret;
+ }
- private static int getMixedUseOfTabsAndSpaces(String refferedContent) {
- int lineNbr = -1;
- if (refferedContent.indexOf("(spaces: line") > -1) { //$NON-NLS-1$
- String tabsAndSpacesPref = new ScopedPreferenceStore(
- InstanceScope.INSTANCE, Activator.PLUGIN_ID)
- .getString(PreferenceConstants.P_RPMLINT_TABS_AND_SPACES);
- String[] spacesAndTabs = refferedContent.split("line"); //$NON-NLS-1$
- if (tabsAndSpacesPref == PreferenceConstants.P_RPMLINT_SPACES) {
- lineNbr = Integer
- .parseInt(spacesAndTabs[1].split(",")[0].trim()); //$NON-NLS-1$
- } else {
- lineNbr = Integer.parseInt(spacesAndTabs[2].replaceFirst(
- "\\)", EMPTY_STRING).trim()); //$NON-NLS-1$
- }
- }
- return lineNbr;
- }
+ private static int getMixedUseOfTabsAndSpaces(String refferedContent) {
+ int lineNbr = -1;
+ if (refferedContent.indexOf("(spaces: line") > -1) { //$NON-NLS-1$
+ String tabsAndSpacesPref = new ScopedPreferenceStore(InstanceScope.INSTANCE, Activator.PLUGIN_ID)
+ .getString(PreferenceConstants.P_RPMLINT_TABS_AND_SPACES);
+ String[] spacesAndTabs = refferedContent.split("line"); //$NON-NLS-1$
+ if (tabsAndSpacesPref == PreferenceConstants.P_RPMLINT_SPACES) {
+ lineNbr = Integer.parseInt(spacesAndTabs[1].split(",")[0].trim()); //$NON-NLS-1$
+ } else {
+ lineNbr = Integer.parseInt(spacesAndTabs[2].replaceFirst("\\)", EMPTY_STRING).trim()); //$NON-NLS-1$
+ }
+ }
+ return lineNbr;
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/Messages.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/Messages.java
index fc173bf172..ac618371c1 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/Messages.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/Messages.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -14,17 +16,17 @@ import org.eclipse.osgi.util.NLS;
@SuppressWarnings("javadoc")
public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.rpm.rpmlint.preferences.messages"; //$NON-NLS-1$
- public static String RpmlintPreferencePage_0;
- public static String RpmlintPreferencePage_1;
- public static String RpmlintPreferencePage_2;
- public static String RpmlintPreferencePage_3;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.rpm.rpmlint.preferences.messages"; //$NON-NLS-1$
+ public static String RpmlintPreferencePage_0;
+ public static String RpmlintPreferencePage_1;
+ public static String RpmlintPreferencePage_2;
+ public static String RpmlintPreferencePage_3;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
- private Messages() {
- // should not be instantiated
- }
+ private Messages() {
+ // should not be instantiated
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/PreferenceConstants.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/PreferenceConstants.java
index ca9a5495f4..83497522dc 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/PreferenceConstants.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/PreferenceConstants.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007 Alphonse Van Assche.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -15,17 +17,17 @@ package org.eclipse.linuxtools.internal.rpm.rpmlint.preferences;
* Constant definitions for rpmlint plug-in preferences
*/
public class PreferenceConstants {
- /** Path to rpmlint executable. */
- public static final String P_RPMLINT_PATH = "RpmlintPath"; //$NON-NLS-1$
- /** Preference to show warnings about using tabs. */
- public static final String P_RPMLINT_TABS = "RpmlintTab"; //$NON-NLS-1$
- /** Preference to show warnings about using spaces. */
- public static final String P_RPMLINT_SPACES = "RpmlintSpaces"; //$NON-NLS-1$
- /** Preference to show warnings about using tabs or spaces. */
- public static final String P_RPMLINT_TABS_AND_SPACES = P_RPMLINT_SPACES;
+ /** Path to rpmlint executable. */
+ public static final String P_RPMLINT_PATH = "RpmlintPath"; //$NON-NLS-1$
+ /** Preference to show warnings about using tabs. */
+ public static final String P_RPMLINT_TABS = "RpmlintTab"; //$NON-NLS-1$
+ /** Preference to show warnings about using spaces. */
+ public static final String P_RPMLINT_SPACES = "RpmlintSpaces"; //$NON-NLS-1$
+ /** Preference to show warnings about using tabs or spaces. */
+ public static final String P_RPMLINT_TABS_AND_SPACES = P_RPMLINT_SPACES;
- /**
- * Default path to rpmlint executable (/usr/bin/rpmlint).
- */
- public static final String DP_RPMLINT_PATH = "/usr/bin/rpmlint"; //$NON-NLS-1$
+ /**
+ * Default path to rpmlint executable (/usr/bin/rpmlint).
+ */
+ public static final String DP_RPMLINT_PATH = "/usr/bin/rpmlint"; //$NON-NLS-1$
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/PreferenceInitializer.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/PreferenceInitializer.java
index bb7b20a80b..ed4959cb44 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/PreferenceInitializer.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/PreferenceInitializer.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007 Alphonse Van Assche.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -17,18 +19,17 @@ import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.linuxtools.internal.rpm.rpmlint.Activator;
import org.eclipse.ui.preferences.ScopedPreferenceStore;
-
/**
* Class used to initialize default preference values.
*/
public class PreferenceInitializer extends AbstractPreferenceInitializer {
- @Override
- public void initializeDefaultPreferences() {
- IPreferenceStore store = new ScopedPreferenceStore(InstanceScope.INSTANCE,Activator.PLUGIN_ID);
- store.setDefault(PreferenceConstants.P_RPMLINT_PATH, PreferenceConstants.DP_RPMLINT_PATH);
- store.setDefault(PreferenceConstants.P_RPMLINT_TABS_AND_SPACES, PreferenceConstants.P_RPMLINT_SPACES);
+ @Override
+ public void initializeDefaultPreferences() {
+ IPreferenceStore store = new ScopedPreferenceStore(InstanceScope.INSTANCE, Activator.PLUGIN_ID);
+ store.setDefault(PreferenceConstants.P_RPMLINT_PATH, PreferenceConstants.DP_RPMLINT_PATH);
+ store.setDefault(PreferenceConstants.P_RPMLINT_TABS_AND_SPACES, PreferenceConstants.P_RPMLINT_SPACES);
- }
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/RpmlintPreferencePage.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/RpmlintPreferencePage.java
index 322612859b..663f78680c 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/RpmlintPreferencePage.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/preferences/RpmlintPreferencePage.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007 Alphonse Van Assche and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -23,38 +25,33 @@ import org.eclipse.ui.preferences.ScopedPreferenceStore;
/**
* Preference page for setting rpmlint specific preferences.
*/
-public class RpmlintPreferencePage extends FieldEditorPreferencePage implements
- IWorkbenchPreferencePage {
+public class RpmlintPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- /**
- * Default constructor.
- */
- public RpmlintPreferencePage() {
- super(GRID);
- setPreferenceStore(new ScopedPreferenceStore(InstanceScope.INSTANCE,Activator.PLUGIN_ID));
- }
+ /**
+ * Default constructor.
+ */
+ public RpmlintPreferencePage() {
+ super(GRID);
+ setPreferenceStore(new ScopedPreferenceStore(InstanceScope.INSTANCE, Activator.PLUGIN_ID));
+ }
- @Override
- protected void createFieldEditors() {
- FileFieldEditor rpmlintFileFieldEditor = new FileFieldEditor(
- PreferenceConstants.P_RPMLINT_PATH, Messages.RpmlintPreferencePage_0,
- getFieldEditorParent());
- addField(rpmlintFileFieldEditor);
- RadioGroupFieldEditor spacesAndTabsRadioGroup = new RadioGroupFieldEditor(
- PreferenceConstants.P_RPMLINT_TABS_AND_SPACES,
- Messages.RpmlintPreferencePage_1, 1, new String[][] {
- { Messages.RpmlintPreferencePage_2,
- PreferenceConstants.P_RPMLINT_SPACES },
- { Messages.RpmlintPreferencePage_3,
- PreferenceConstants.P_RPMLINT_TABS } },
- getFieldEditorParent(), true);
- addField(spacesAndTabsRadioGroup);
+ @Override
+ protected void createFieldEditors() {
+ FileFieldEditor rpmlintFileFieldEditor = new FileFieldEditor(PreferenceConstants.P_RPMLINT_PATH,
+ Messages.RpmlintPreferencePage_0, getFieldEditorParent());
+ addField(rpmlintFileFieldEditor);
+ RadioGroupFieldEditor spacesAndTabsRadioGroup = new RadioGroupFieldEditor(
+ PreferenceConstants.P_RPMLINT_TABS_AND_SPACES, Messages.RpmlintPreferencePage_1, 1,
+ new String[][] { { Messages.RpmlintPreferencePage_2, PreferenceConstants.P_RPMLINT_SPACES },
+ { Messages.RpmlintPreferencePage_3, PreferenceConstants.P_RPMLINT_TABS } },
+ getFieldEditorParent(), true);
+ addField(spacesAndTabsRadioGroup);
- }
+ }
- @Override
- public void init(IWorkbench workbench) {
- // Do nothing
- }
+ @Override
+ public void init(IWorkbench workbench) {
+ // Do nothing
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/AInsertLineResolution.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/AInsertLineResolution.java
index cc77efdf6e..d2801d8f07 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/AInsertLineResolution.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/AInsertLineResolution.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008, 2017 Alexander Kurtakov and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Alexander Kurtakov and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alexander Kurtakov - initial API and implementation
@@ -37,9 +39,8 @@ public abstract class AInsertLineResolution extends ARpmlintResolution {
/**
* Returns the number of the line, which will succeed the inserted line.
*
- * @param editor
- * The Specfile editor if it's needed for determining the correct
- * place.
+ * @param editor The Specfile editor if it's needed for determining the correct
+ * place.
* @return The number of the line following the inserted line.
*/
public abstract int getLineNumberForInsert(Specfile editor);
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/ARemoveLineResolution.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/ARemoveLineResolution.java
index fe6c0565a2..c388385eb1 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/ARemoveLineResolution.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/ARemoveLineResolution.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 Alphonse Van Assche and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/AReplaceTextResolution.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/AReplaceTextResolution.java
index 528546f13a..c5186807d2 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/AReplaceTextResolution.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/AReplaceTextResolution.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 Alphonse Van Assche and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/ARpmlintResolution.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/ARpmlintResolution.java
index ad405bd9c8..d3eb0f1708 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/ARpmlintResolution.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/ARpmlintResolution.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -26,34 +28,32 @@ import org.eclipse.ui.ide.IDE;
*/
public abstract class ARpmlintResolution implements IMarkerResolution2 {
+ /**
+ * No image for rpmlint resolutions for now.
+ *
+ * @see org.eclipse.ui.IMarkerResolution2#getImage()
+ */
+ @Override
+ public Image getImage() {
+ return null;
+ }
- /**
- * No image for rpmlint resolutions for now.
- *
- * @see org.eclipse.ui.IMarkerResolution2#getImage()
- */
- @Override
- public Image getImage() {
- return null;
- }
-
- /**
- * Returns the SpecfileEditor for the given IMarker if any.
- *
- * @param marker The marker to use for retrieving the editor.
- * @return The IEditorPart this marker is from or null.
- */
- protected IEditorPart getEditor(IMarker marker) {
- // Open or activate the editor.
- IWorkbenchPage page = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage();
- IEditorPart part;
- try {
- part = IDE.openEditor(page, marker);
- } catch (PartInitException e) {
- RpmlintLog.logError(e);
- return null;
- }
- return part;
- }
+ /**
+ * Returns the SpecfileEditor for the given IMarker if any.
+ *
+ * @param marker The marker to use for retrieving the editor.
+ * @return The IEditorPart this marker is from or null.
+ */
+ protected IEditorPart getEditor(IMarker marker) {
+ // Open or activate the editor.
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ IEditorPart part;
+ try {
+ part = IDE.openEditor(page, marker);
+ } catch (PartInitException e) {
+ RpmlintLog.logError(e);
+ return null;
+ }
+ return part;
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/HardcodedPackagerTag.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/HardcodedPackagerTag.java
index 591ff8cc20..03569310fc 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/HardcodedPackagerTag.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/HardcodedPackagerTag.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008, 2013 Alexander Kurtakov and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Alexander Kurtakov and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alexander Kurtakov - initial API and implementation
@@ -11,23 +13,23 @@
package org.eclipse.linuxtools.internal.rpm.rpmlint.resolutions;
/**
- * Quick fix for the hardcoded-packager-tag warning.
- * This is as simple as removing the line.
+ * Quick fix for the hardcoded-packager-tag warning. This is as simple as
+ * removing the line.
*
*/
public class HardcodedPackagerTag extends ARemoveLineResolution {
- /**
- * Rpmlint warning id.
- */
- public static final String ID = "hardcoded-packager-tag"; //$NON-NLS-1$
+ /**
+ * Rpmlint warning id.
+ */
+ public static final String ID = "hardcoded-packager-tag"; //$NON-NLS-1$
- @Override
- public String getDescription() {
- return Messages.HardcodedPackagerTag_0;
- }
+ @Override
+ public String getDescription() {
+ return Messages.HardcodedPackagerTag_0;
+ }
- @Override
- public String getLabel() {
- return ID;
- }
+ @Override
+ public String getLabel() {
+ return ID;
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/HardcodedPrefixTag.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/HardcodedPrefixTag.java
index 22cc67df61..6938951645 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/HardcodedPrefixTag.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/HardcodedPrefixTag.java
@@ -1,33 +1,34 @@
/*******************************************************************************
- * Copyright (c) 2008, 2013 Alexander Kurtakov.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Alexander Kurtakov.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alexander Kurtakov - initial API and implementation
*******************************************************************************/
package org.eclipse.linuxtools.internal.rpm.rpmlint.resolutions;
-
/**
* Quick fix for the hardcoded-prefix-tag warning.
*
*/
-public class HardcodedPrefixTag extends ARemoveLineResolution{
- /**
- * Rpmlint warning id.
- */
- public static final String ID = "hardcoded-prefix-tag"; //$NON-NLS-1$
+public class HardcodedPrefixTag extends ARemoveLineResolution {
+ /**
+ * Rpmlint warning id.
+ */
+ public static final String ID = "hardcoded-prefix-tag"; //$NON-NLS-1$
- @Override
- public String getDescription() {
- return Messages.HardcodedPrefixTag_0;
- }
+ @Override
+ public String getDescription() {
+ return Messages.HardcodedPrefixTag_0;
+ }
- @Override
- public String getLabel() {
- return ID;
- }
+ @Override
+ public String getLabel() {
+ return ID;
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/MacroInChangelog.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/MacroInChangelog.java
index afe333ea87..a8e3bc4587 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/MacroInChangelog.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/MacroInChangelog.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008, 2013 Alexander Kurtakov.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Alexander Kurtakov.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alexander Kurtakov - initial API and implementation
@@ -11,35 +13,34 @@
package org.eclipse.linuxtools.internal.rpm.rpmlint.resolutions;
/**
- * Resolution for "macro-in-%changelog" warning.
- * The resolution is to escape the macro.
+ * Resolution for "macro-in-%changelog" warning. The resolution is to escape the
+ * macro.
*
*/
public class MacroInChangelog extends AReplaceTextResolution {
- /**
- * The string ID of the rpmlint warning.
- */
- public static final String ID = "macro-in-%changelog"; //$NON-NLS-1$
+ /**
+ * The string ID of the rpmlint warning.
+ */
+ public static final String ID = "macro-in-%changelog"; //$NON-NLS-1$
- @Override
- public String getOriginalString() {
- return "%"; //$NON-NLS-1$
- }
+ @Override
+ public String getOriginalString() {
+ return "%"; //$NON-NLS-1$
+ }
- @Override
- public String getReplaceString() {
- return "%%"; //$NON-NLS-1$
- }
+ @Override
+ public String getReplaceString() {
+ return "%%"; //$NON-NLS-1$
+ }
- @Override
- public String getDescription() {
- return Messages.MacroInChangelog_0
- + Messages.MacroInChangelog_1;
- }
+ @Override
+ public String getDescription() {
+ return Messages.MacroInChangelog_0 + Messages.MacroInChangelog_1;
+ }
- @Override
- public String getLabel() {
- return ID;
- }
+ @Override
+ public String getLabel() {
+ return ID;
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/Messages.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/Messages.java
index 4dd0168606..424b1ef023 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/Messages.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/Messages.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -14,26 +16,26 @@ import org.eclipse.osgi.util.NLS;
@SuppressWarnings("javadoc")
public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.rpm.rpmlint.resolutions.messages"; //$NON-NLS-1$
- public static String HardcodedPackagerTag_0;
- public static String HardcodedPrefixTag_0;
- public static String MacroInChangelog_0;
- public static String MacroInChangelog_1;
- public static String NoBuildrootTag_0;
- public static String NoBuildSection_0;
- public static String NoCleaningOfBuildroot_0;
- public static String NoCleanSection_0;
- public static String NoInstallSection_0;
- public static String NoPrepSection_0;
- public static String PatchNotApplied_0;
- public static String RpmBuildrootUsage_0;
- public static String SetupNotQuiet_0;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.rpm.rpmlint.resolutions.messages"; //$NON-NLS-1$
+ public static String HardcodedPackagerTag_0;
+ public static String HardcodedPrefixTag_0;
+ public static String MacroInChangelog_0;
+ public static String MacroInChangelog_1;
+ public static String NoBuildrootTag_0;
+ public static String NoBuildSection_0;
+ public static String NoCleaningOfBuildroot_0;
+ public static String NoCleanSection_0;
+ public static String NoInstallSection_0;
+ public static String NoPrepSection_0;
+ public static String PatchNotApplied_0;
+ public static String RpmBuildrootUsage_0;
+ public static String SetupNotQuiet_0;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
- private Messages() {
- //should not be instantiated
- }
+ private Messages() {
+ // should not be instantiated
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/NoBuildSection.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/NoBuildSection.java
index d3a3694d09..53afaaed62 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/NoBuildSection.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/NoBuildSection.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008, 2017 Alexander Kurtakov.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Alexander Kurtakov.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alexander Kurtakov - initial API and implementation
@@ -16,39 +18,39 @@ import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSection;
/**
- * Resolution for the no-%build-section rpmlint warning.
- * Fix is to put an empty %build section.
+ * Resolution for the no-%build-section rpmlint warning. Fix is to put an empty
+ * %build section.
*
*/
public class NoBuildSection extends AInsertLineResolution {
- /**
- * The string ID of the rpmlint warning.
- */
- public static final String ID = "no-%build-section"; //$NON-NLS-1$
+ /**
+ * The string ID of the rpmlint warning.
+ */
+ public static final String ID = "no-%build-section"; //$NON-NLS-1$
- @Override
- public String getDescription() {
- return Messages.NoBuildSection_0;
- }
+ @Override
+ public String getDescription() {
+ return Messages.NoBuildSection_0;
+ }
- @Override
- public String getLabel() {
- return ID;
- }
+ @Override
+ public String getLabel() {
+ return ID;
+ }
- @Override
- public String getLineToInsert() {
- return "%build\n\n"; //$NON-NLS-1$
- }
+ @Override
+ public String getLineToInsert() {
+ return "%build\n\n"; //$NON-NLS-1$
+ }
- @Override
- public int getLineNumberForInsert(Specfile specfile) {
- List<SpecfileSection> sections = specfile.getSections();
- for (SpecfileSection section : sections) {
- if (section.getName().equals("install")) { //$NON-NLS-1$
- return section.getLineNumber();
- }
- }
- return 0;
- }
+ @Override
+ public int getLineNumberForInsert(Specfile specfile) {
+ List<SpecfileSection> sections = specfile.getSections();
+ for (SpecfileSection section : sections) {
+ if (section.getName().equals("install")) { //$NON-NLS-1$
+ return section.getLineNumber();
+ }
+ }
+ return 0;
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/NoInstallSection.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/NoInstallSection.java
index 1eb4d8f322..fb308b9b9f 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/NoInstallSection.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/NoInstallSection.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008, 2017 Alexander Kurtakov.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Alexander Kurtakov.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alexander Kurtakov - initial API and implementation
@@ -16,39 +18,39 @@ import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSection;
/**
- * Resolution for the "no-%install-section" warning.
- * Resolves by adding and empty %install section.
+ * Resolution for the "no-%install-section" warning. Resolves by adding and
+ * empty %install section.
*
*/
public class NoInstallSection extends AInsertLineResolution {
- /**
- * The string ID of the rpmlint warning.
- */
- public static final String ID = "no-%install-section"; //$NON-NLS-1$
+ /**
+ * The string ID of the rpmlint warning.
+ */
+ public static final String ID = "no-%install-section"; //$NON-NLS-1$
- @Override
- public String getDescription() {
- return Messages.NoInstallSection_0;
- }
+ @Override
+ public String getDescription() {
+ return Messages.NoInstallSection_0;
+ }
- @Override
- public String getLabel() {
- return ID;
- }
+ @Override
+ public String getLabel() {
+ return ID;
+ }
- @Override
- public String getLineToInsert() {
- return "%install\n\n"; //$NON-NLS-1$
- }
+ @Override
+ public String getLineToInsert() {
+ return "%install\n\n"; //$NON-NLS-1$
+ }
- @Override
- public int getLineNumberForInsert(Specfile specfile) {
- List<SpecfileSection> sections = specfile.getSections();
- for (SpecfileSection section : sections) {
- if (section.getName().equals("clean")) { //$NON-NLS-1$
- return section.getLineNumber();
- }
- }
- return 0;
- }
+ @Override
+ public int getLineNumberForInsert(Specfile specfile) {
+ List<SpecfileSection> sections = specfile.getSections();
+ for (SpecfileSection section : sections) {
+ if (section.getName().equals("clean")) { //$NON-NLS-1$
+ return section.getLineNumber();
+ }
+ }
+ return 0;
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/NoPrepSection.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/NoPrepSection.java
index da23008ee3..d8c939bd45 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/NoPrepSection.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/NoPrepSection.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008, 2017 Alexander Kurtakov.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Alexander Kurtakov.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alexander Kurtakov - initial API and implementation
@@ -16,39 +18,39 @@ import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSection;
/**
- * Resolution for the "no-%prep-section".
- * Resolves by adding an empty %prep section.
+ * Resolution for the "no-%prep-section". Resolves by adding an empty %prep
+ * section.
*
*/
-public class NoPrepSection extends AInsertLineResolution{
- /**
- * The rpmlint ID of the warning.
- */
- public static final String ID = "no-%prep-section"; //$NON-NLS-1$
+public class NoPrepSection extends AInsertLineResolution {
+ /**
+ * The rpmlint ID of the warning.
+ */
+ public static final String ID = "no-%prep-section"; //$NON-NLS-1$
- @Override
- public String getDescription() {
- return Messages.NoPrepSection_0;
- }
+ @Override
+ public String getDescription() {
+ return Messages.NoPrepSection_0;
+ }
- @Override
- public String getLabel() {
- return ID;
- }
+ @Override
+ public String getLabel() {
+ return ID;
+ }
- @Override
- public String getLineToInsert() {
- return "%prep\n\n"; //$NON-NLS-1$
- }
+ @Override
+ public String getLineToInsert() {
+ return "%prep\n\n"; //$NON-NLS-1$
+ }
- @Override
- public int getLineNumberForInsert(Specfile specfile) {
- List<SpecfileSection> sections = specfile.getSections();
- for (SpecfileSection section : sections) {
- if (section.getName().equals("build")) { //$NON-NLS-1$
- return section.getLineNumber();
- }
- }
- return 0;
- }
+ @Override
+ public int getLineNumberForInsert(Specfile specfile) {
+ List<SpecfileSection> sections = specfile.getSections();
+ for (SpecfileSection section : sections) {
+ if (section.getName().equals("build")) { //$NON-NLS-1$
+ return section.getLineNumber();
+ }
+ }
+ return 0;
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/PatchNotApplied.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/PatchNotApplied.java
index f2c4c399e9..12118e1402 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/PatchNotApplied.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/PatchNotApplied.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007 Alphonse Van Assche and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -12,25 +14,25 @@
package org.eclipse.linuxtools.internal.rpm.rpmlint.resolutions;
/**
- * Resolution for the "patch-not-applied" rpmlint warning.
- * Resolves by removing the patch definition.
+ * Resolution for the "patch-not-applied" rpmlint warning. Resolves by removing
+ * the patch definition.
*
*/
public class PatchNotApplied extends ARemoveLineResolution {
- /**
- * The rpmlint ID of the warning.
- */
- public static final String ID = "patch-not-applied"; //$NON-NLS-1$
+ /**
+ * The rpmlint ID of the warning.
+ */
+ public static final String ID = "patch-not-applied"; //$NON-NLS-1$
- @Override
- public String getDescription() {
- return Messages.PatchNotApplied_0;
- }
+ @Override
+ public String getDescription() {
+ return Messages.PatchNotApplied_0;
+ }
- @Override
- public String getLabel() {
- return ID;
- }
+ @Override
+ public String getLabel() {
+ return ID;
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/RpmBuildrootUsage.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/RpmBuildrootUsage.java
index 88c3d37152..08819be324 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/RpmBuildrootUsage.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/RpmBuildrootUsage.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008, 2013 Alexander Kurtakov.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Alexander Kurtakov.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alexander Kurtakov - initial API and implementation
@@ -11,23 +13,23 @@
package org.eclipse.linuxtools.internal.rpm.rpmlint.resolutions;
/**
- * Resolution for the "rpm-buildroot-usage" rpmlint warning.
- * Resolves by removing the offending line.
+ * Resolution for the "rpm-buildroot-usage" rpmlint warning. Resolves by
+ * removing the offending line.
*
*/
-public class RpmBuildrootUsage extends ARemoveLineResolution{
- /**
- * The rpmlint ID of the warning.
- */
- public static final String ID = "rpm-buildroot-usage"; //$NON-NLS-1$
+public class RpmBuildrootUsage extends ARemoveLineResolution {
+ /**
+ * The rpmlint ID of the warning.
+ */
+ public static final String ID = "rpm-buildroot-usage"; //$NON-NLS-1$
- @Override
- public String getDescription() {
- return Messages.RpmBuildrootUsage_0;
- }
+ @Override
+ public String getDescription() {
+ return Messages.RpmBuildrootUsage_0;
+ }
- @Override
- public String getLabel() {
- return ID;
- }
+ @Override
+ public String getLabel() {
+ return ID;
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/RpmlintMarkerResolutionGenerator.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/RpmlintMarkerResolutionGenerator.java
index 9221b9d5f7..706b2a6de2 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/RpmlintMarkerResolutionGenerator.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/RpmlintMarkerResolutionGenerator.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 Alphonse Van Assche and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -24,77 +26,77 @@ import org.eclipse.ui.IMarkerResolutionGenerator2;
*/
public class RpmlintMarkerResolutionGenerator implements IMarkerResolutionGenerator2 {
- /**
- * Rpmlint error id atribute name.
- */
- public static final String RPMLINT_ERROR_ID = "rpmlintErrorId"; //$NON-NLS-1$
+ /**
+ * Rpmlint error id atribute name.
+ */
+ public static final String RPMLINT_ERROR_ID = "rpmlintErrorId"; //$NON-NLS-1$
- /**
- * Rpmlint refered text
- */
- public static final String RPMLINT_REFFERED_CONTENT = "rpmlintrefferedContent"; //$NON-NLS-1$
+ /**
+ * Rpmlint refered text
+ */
+ public static final String RPMLINT_REFFERED_CONTENT = "rpmlintrefferedContent"; //$NON-NLS-1$
- @Override
- public boolean hasResolutions(IMarker marker) {
- String rpmlintErrorId = getRpmlintErrorId(marker);
- if (rpmlintErrorId.equals(SetupNotQuiet.ID)) {
- return true;
- } else if (rpmlintErrorId.equals(PatchNotApplied.ID)) {
- return true;
- } else if (rpmlintErrorId.equals(NoBuildSection.ID)){
- return true;
- } else if (rpmlintErrorId.equals(MacroInChangelog.ID)){
- return true;
- } else if (rpmlintErrorId.equals(RpmBuildrootUsage.ID)){
- return true;
- } else if (rpmlintErrorId.equals(HardcodedPrefixTag.ID)){
- return true;
- } else if (rpmlintErrorId.equals(HardcodedPackagerTag.ID)){
- return true;
- } else if (rpmlintErrorId.equals(NoPrepSection.ID)){
- return true;
- } else if (rpmlintErrorId.equals(NoInstallSection.ID)){
- return true;
- }
+ @Override
+ public boolean hasResolutions(IMarker marker) {
+ String rpmlintErrorId = getRpmlintErrorId(marker);
+ if (rpmlintErrorId.equals(SetupNotQuiet.ID)) {
+ return true;
+ } else if (rpmlintErrorId.equals(PatchNotApplied.ID)) {
+ return true;
+ } else if (rpmlintErrorId.equals(NoBuildSection.ID)) {
+ return true;
+ } else if (rpmlintErrorId.equals(MacroInChangelog.ID)) {
+ return true;
+ } else if (rpmlintErrorId.equals(RpmBuildrootUsage.ID)) {
+ return true;
+ } else if (rpmlintErrorId.equals(HardcodedPrefixTag.ID)) {
+ return true;
+ } else if (rpmlintErrorId.equals(HardcodedPackagerTag.ID)) {
+ return true;
+ } else if (rpmlintErrorId.equals(NoPrepSection.ID)) {
+ return true;
+ } else if (rpmlintErrorId.equals(NoInstallSection.ID)) {
+ return true;
+ }
- return false;
- }
+ return false;
+ }
- @Override
- public IMarkerResolution[] getResolutions(IMarker marker) {
- List<IMarkerResolution> resolutions = new ArrayList<>();
- String rpmlintErrorId = getRpmlintErrorId(marker);
- if (rpmlintErrorId.equals(SetupNotQuiet.ID)) {
- resolutions.add(new SetupNotQuiet());
- } else if (rpmlintErrorId.equals(PatchNotApplied.ID)) {
- resolutions.add(new PatchNotApplied());
- } else if (rpmlintErrorId.equals(NoBuildSection.ID)){
- resolutions.add(new NoBuildSection());
- } else if (rpmlintErrorId.equals(MacroInChangelog.ID)){
- resolutions.add(new MacroInChangelog());
- } else if (rpmlintErrorId.equals(RpmBuildrootUsage.ID)){
- resolutions.add(new RpmBuildrootUsage());
- } else if (rpmlintErrorId.equals(HardcodedPrefixTag.ID)){
- resolutions.add(new HardcodedPrefixTag());
- } else if (rpmlintErrorId.equals(HardcodedPackagerTag.ID)){
- resolutions.add(new HardcodedPackagerTag());
- } else if (rpmlintErrorId.equals(NoPrepSection.ID)){
- resolutions.add(new NoPrepSection());
- } else if (rpmlintErrorId.equals(NoInstallSection.ID)){
- resolutions.add(new NoInstallSection());
- }
+ @Override
+ public IMarkerResolution[] getResolutions(IMarker marker) {
+ List<IMarkerResolution> resolutions = new ArrayList<>();
+ String rpmlintErrorId = getRpmlintErrorId(marker);
+ if (rpmlintErrorId.equals(SetupNotQuiet.ID)) {
+ resolutions.add(new SetupNotQuiet());
+ } else if (rpmlintErrorId.equals(PatchNotApplied.ID)) {
+ resolutions.add(new PatchNotApplied());
+ } else if (rpmlintErrorId.equals(NoBuildSection.ID)) {
+ resolutions.add(new NoBuildSection());
+ } else if (rpmlintErrorId.equals(MacroInChangelog.ID)) {
+ resolutions.add(new MacroInChangelog());
+ } else if (rpmlintErrorId.equals(RpmBuildrootUsage.ID)) {
+ resolutions.add(new RpmBuildrootUsage());
+ } else if (rpmlintErrorId.equals(HardcodedPrefixTag.ID)) {
+ resolutions.add(new HardcodedPrefixTag());
+ } else if (rpmlintErrorId.equals(HardcodedPackagerTag.ID)) {
+ resolutions.add(new HardcodedPackagerTag());
+ } else if (rpmlintErrorId.equals(NoPrepSection.ID)) {
+ resolutions.add(new NoPrepSection());
+ } else if (rpmlintErrorId.equals(NoInstallSection.ID)) {
+ resolutions.add(new NoInstallSection());
+ }
- return resolutions.toArray(new IMarkerResolution[resolutions.size()]);
- }
+ return resolutions.toArray(new IMarkerResolution[resolutions.size()]);
+ }
- /**
- * Return the rpmlint error id attribute for the specified marker.
- *
- * @param marker The marker to check.
- * @return The rpmlint error id or <code>""</code> if none.
- */
- private static String getRpmlintErrorId(IMarker marker) {
- return marker.getAttribute(RPMLINT_ERROR_ID, ""); //$NON-NLS-1$
- }
+ /**
+ * Return the rpmlint error id attribute for the specified marker.
+ *
+ * @param marker The marker to check.
+ * @return The rpmlint error id or <code>""</code> if none.
+ */
+ private static String getRpmlintErrorId(IMarker marker) {
+ return marker.getAttribute(RPMLINT_ERROR_ID, ""); //$NON-NLS-1$
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/SetupNotQuiet.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/SetupNotQuiet.java
index 2cdd246792..5beda5da4c 100644
--- a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/SetupNotQuiet.java
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/SetupNotQuiet.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 Alphonse Van Assche and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -12,35 +14,35 @@
package org.eclipse.linuxtools.internal.rpm.rpmlint.resolutions;
/**
- * Resolution for the "setup-not-quied" rpmlint warning.
- * Resolves by adding <b>-q</b> parameter to the %setup call.
+ * Resolution for the "setup-not-quied" rpmlint warning. Resolves by adding
+ * <b>-q</b> parameter to the %setup call.
*
*/
public class SetupNotQuiet extends AReplaceTextResolution {
- /**
- * The rpmlint ID of the warning.
- */
- public static final String ID = "setup-not-quiet"; //$NON-NLS-1$
+ /**
+ * The rpmlint ID of the warning.
+ */
+ public static final String ID = "setup-not-quiet"; //$NON-NLS-1$
- @Override
- public String getOriginalString() {
- return "%setup"; //$NON-NLS-1$
- }
+ @Override
+ public String getOriginalString() {
+ return "%setup"; //$NON-NLS-1$
+ }
- @Override
- public String getReplaceString() {
- return "%setup -q"; //$NON-NLS-1$
- }
+ @Override
+ public String getReplaceString() {
+ return "%setup -q"; //$NON-NLS-1$
+ }
- @Override
- public String getDescription() {
- return Messages.SetupNotQuiet_0;
- }
+ @Override
+ public String getDescription() {
+ return Messages.SetupNotQuiet_0;
+ }
- @Override
- public String getLabel() {
- return ID;
- }
+ @Override
+ public String getLabel() {
+ return ID;
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/build-helper.xml b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/build-helper.xml
index a8ca360dd3..03e51820bf 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/build-helper.xml
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/build-helper.xml
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
- Contributors:
- Red Hat - initial API and implementation
+ Copyright (c) 2009, 2018 Red Hat, Inc.
+
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ Red Hat - initial API and implementation
-->
<project name="org.eclipse.linuxtools.rpm.ui.editor.doc" default="all">
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/plugin.xml b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/plugin.xml
index 2f6727353b..fb571ce03d 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/plugin.xml
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/plugin.xml
@@ -1,13 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?><!--
- Copyright (c) 2009 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+<?eclipse version="3.2"?>
+<!--
+ Copyright (c) 2009, 2018 Red Hat, Inc.
+
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
- Contributors:
- Red Hat - initial API and implementation
+ Contributors:
+ Red Hat - initial API and implementation
-->
<plugin>
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/pom.xml b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/pom.xml
index 7a6cde9dc7..e9620cefe2 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/pom.xml
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011, Red Hat, Inc.
+ Copyright (C) 2011, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/pom.xml b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/pom.xml
index e2c7efec3f..afa866b2b1 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/pom.xml
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011, Red Hat, Inc.
+ Copyright (C) 2011, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/tests/ActionsAllTests.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/tests/ActionsAllTests.java
index ec528c63fb..f0fda11a05 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/tests/ActionsAllTests.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/tests/ActionsAllTests.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -14,7 +16,6 @@ import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
-@Suite.SuiteClasses({ SpecfileChangelogFormatterTest.class,
- SpecfileChangelogParserTest.class })
+@Suite.SuiteClasses({ SpecfileChangelogFormatterTest.class, SpecfileChangelogParserTest.class })
public class ActionsAllTests {
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/tests/SpecfileChangelogFormatterTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/tests/SpecfileChangelogFormatterTest.java
index 4599d1cbbe..c4e8599b8d 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/tests/SpecfileChangelogFormatterTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/tests/SpecfileChangelogFormatterTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -28,42 +30,39 @@ import org.junit.Test;
public class SpecfileChangelogFormatterTest extends FileTestCase {
- private static final String USER_MAIL = "someone@redhat.com";
- private static final String USER_NAME = "Alexander Kurtakov";
- private SpecfileChangelogFormatter formatter;
- private IEditorPart editor;
- public final SimpleDateFormat SIMPLE_DATE_FORMAT = new SimpleDateFormat("EEE MMM d yyyy");
+ private static final String USER_MAIL = "someone@redhat.com";
+ private static final String USER_NAME = "Alexander Kurtakov";
+ private SpecfileChangelogFormatter formatter;
+ private IEditorPart editor;
+ public final SimpleDateFormat SIMPLE_DATE_FORMAT = new SimpleDateFormat("EEE MMM d yyyy");
- @Override
- @Before
- public void setUp() throws CoreException {
- super.setUp();
- newFile("%changelog");
- editor = IDE.openEditor(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage(), testFile,
- "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
- formatter = new SpecfileChangelogFormatter();
- }
+ @Override
+ @Before
+ public void setUp() throws CoreException {
+ super.setUp();
+ newFile("%changelog");
+ editor = IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), testFile,
+ "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
+ formatter = new SpecfileChangelogFormatter();
+ }
- @Override
- @After
- public void tearDown () {
- closeEditor(editor);
- }
+ @Override
+ @After
+ public void tearDown() {
+ closeEditor(editor);
+ }
- @Test
- public void testFormatDateLine() {
- String expectedLine = MessageFormat
- .format("* {0} {1} <{2}> {3}{4}-{5}", SIMPLE_DATE_FORMAT.format(new Date()), //$NON-NLS-1$
- USER_NAME, USER_MAIL, "", "0", "0");
- assertEquals(expectedLine,
- formatter.formatDateLine(USER_NAME, USER_MAIL));
- }
+ @Test
+ public void testFormatDateLine() {
+ String expectedLine = MessageFormat.format("* {0} {1} <{2}> {3}{4}-{5}", SIMPLE_DATE_FORMAT.format(new Date()), //$NON-NLS-1$
+ USER_NAME, USER_MAIL, "", "0", "0");
+ assertEquals(expectedLine, formatter.formatDateLine(USER_NAME, USER_MAIL));
+ }
- @Test
- public void testMergeChangelogStringStringStringIEditorPartStringString() {
- // TODO find how to test this
- formatter.mergeChangelog("proba", "", "", editor, "", "");
- }
+ @Test
+ public void testMergeChangelogStringStringStringIEditorPartStringString() {
+ // TODO find how to test this
+ formatter.mergeChangelog("proba", "", "", editor, "", "");
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/tests/SpecfileChangelogParserTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/tests/SpecfileChangelogParserTest.java
index 95ed4d6180..763f89e22d 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/tests/SpecfileChangelogParserTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/actions/tests/SpecfileChangelogParserTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009, 2016 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -18,21 +20,21 @@ import org.junit.Test;
public class SpecfileChangelogParserTest {
- private static SpecfileChangelogParser parser;
+ private static SpecfileChangelogParser parser;
- @BeforeClass
- public static void setUp() {
- parser = new SpecfileChangelogParser();
- }
+ @BeforeClass
+ public static void setUp() {
+ parser = new SpecfileChangelogParser();
+ }
- @Test
- public void testParseCurrentFunctionIEditorPart() {
- assertEquals("", parser.parseCurrentFunction(null));
- }
+ @Test
+ public void testParseCurrentFunctionIEditorPart() {
+ assertEquals("", parser.parseCurrentFunction(null));
+ }
- @Test
- public void testParseCurrentFunctionIEditorInputInt() {
- assertEquals("", parser.parseCurrentFunction(null, 0));
- }
+ @Test
+ public void testParseCurrentFunctionIEditorInputInt() {
+ assertEquals("", parser.parseCurrentFunction(null, 0));
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/HyperlinkAllTests.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/HyperlinkAllTests.java
index 6153abd8a3..d7f4cfcbdc 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/HyperlinkAllTests.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/HyperlinkAllTests.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009, 2013 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -14,10 +16,8 @@ import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
-@Suite.SuiteClasses({ MailHyperlinkDetectorTest.class,
- SourcesFileHyperlinkDetectorTest.class,
- SpecfileElementHyperlinkDetectorTest.class,
- URLHyperlinkWithMacroDetectorTest.class,
- SourcesFileCreateHyperlinkTest.class })
+@Suite.SuiteClasses({ MailHyperlinkDetectorTest.class, SourcesFileHyperlinkDetectorTest.class,
+ SpecfileElementHyperlinkDetectorTest.class, URLHyperlinkWithMacroDetectorTest.class,
+ SourcesFileCreateHyperlinkTest.class })
public class HyperlinkAllTests {
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/MailHyperlinkDetectorTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/MailHyperlinkDetectorTest.java
index 24cf03d0d6..f6ea3d8f51 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/MailHyperlinkDetectorTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/MailHyperlinkDetectorTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009, 2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -29,42 +31,38 @@ import org.junit.Test;
public class MailHyperlinkDetectorTest extends FileTestCase {
- @Test
- public void testDetectHyperlinks() throws PartInitException {
- String testText = "Version: 0.0\n" + "Release: 0\n" + "%changelog\n"
- + "* Fri Feb 27 2009 Test <someone@smth.com> 3.3.2.4-6\n-\n"
- + "* Fri Feb 27 2009 Test someone@smth.com 3.3.2.4-6\n-\n";
- newFile(testText);
+ @Test
+ public void testDetectHyperlinks() throws PartInitException {
+ String testText = "Version: 0.0\n" + "Release: 0\n" + "%changelog\n"
+ + "* Fri Feb 27 2009 Test <someone@smth.com> 3.3.2.4-6\n-\n"
+ + "* Fri Feb 27 2009 Test someone@smth.com 3.3.2.4-6\n-\n";
+ newFile(testText);
- IEditorPart openEditor = IDE.openEditor(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage(), testFile,
- "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
+ IEditorPart openEditor = IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(),
+ testFile, "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
- editor = (SpecfileEditor) openEditor;
- editor.doRevertToSaved();
- MailHyperlinkDetector elementDetector = new MailHyperlinkDetector();
- elementDetector.setEditor(editor);
- // test mail
- IRegion region = new Region(38, 0);
- IHyperlink[] returned = elementDetector.detectHyperlinks(
- editor.getSpecfileSourceViewer(), region, false);
- assertEquals(1, returned.length);
- assertTrue(returned[0] instanceof MailHyperlink);
+ editor = (SpecfileEditor) openEditor;
+ editor.doRevertToSaved();
+ MailHyperlinkDetector elementDetector = new MailHyperlinkDetector();
+ elementDetector.setEditor(editor);
+ // test mail
+ IRegion region = new Region(38, 0);
+ IHyperlink[] returned = elementDetector.detectHyperlinks(editor.getSpecfileSourceViewer(), region, false);
+ assertEquals(1, returned.length);
+ assertTrue(returned[0] instanceof MailHyperlink);
- region = new Region(124, 0);
- returned = elementDetector.detectHyperlinks(
- editor.getSpecfileSourceViewer(), region, false);
- assertEquals(1, returned.length);
- assertTrue(returned[0] instanceof MailHyperlink);
- }
+ region = new Region(124, 0);
+ returned = elementDetector.detectHyperlinks(editor.getSpecfileSourceViewer(), region, false);
+ assertEquals(1, returned.length);
+ assertTrue(returned[0] instanceof MailHyperlink);
+ }
- @Test
- public void testDetectHyperlinksNoRegionAndTextViewer() {
- MailHyperlinkDetector elementDetector = new MailHyperlinkDetector();
- elementDetector.setEditor(editor);
- IHyperlink[] returned = elementDetector.detectHyperlinks(null, null,
- false);
- assertNull(returned);
- }
+ @Test
+ public void testDetectHyperlinksNoRegionAndTextViewer() {
+ MailHyperlinkDetector elementDetector = new MailHyperlinkDetector();
+ elementDetector.setEditor(editor);
+ IHyperlink[] returned = elementDetector.detectHyperlinks(null, null, false);
+ assertNull(returned);
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/SourcesFileCreateHyperlinkTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/SourcesFileCreateHyperlinkTest.java
index 7aaac9dd41..2ff14cb563 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/SourcesFileCreateHyperlinkTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/SourcesFileCreateHyperlinkTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009, 2013 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -19,18 +21,19 @@ import org.junit.Before;
import org.junit.Test;
public class SourcesFileCreateHyperlinkTest extends FileTestCase {
- @Before
- public void init() throws CoreException {
- super.setUp();
- String testText = "Patch0: test\n";
- newFile(testText);
- }
+ @Before
+ public void init() throws CoreException {
+ super.setUp();
+ String testText = "Patch0: test\n";
+ newFile(testText);
+ }
- @Test
- public void testCreatePatch() {
- SourcesFileCreateHyperlink patchTest = new SourcesFileCreateHyperlink(testFile, specfile.getPatch(0).getFileName(), null);
- assertNotNull(patchTest);
- patchTest.open();
- assertNotNull(testFile.getProject().findMember("test"));
- }
+ @Test
+ public void testCreatePatch() {
+ SourcesFileCreateHyperlink patchTest = new SourcesFileCreateHyperlink(testFile,
+ specfile.getPatch(0).getFileName(), null);
+ assertNotNull(patchTest);
+ patchTest.open();
+ assertNotNull(testFile.getProject().findMember("test"));
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/SourcesFileHyperlinkDetectorTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/SourcesFileHyperlinkDetectorTest.java
index 86b10073f5..86d0182f15 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/SourcesFileHyperlinkDetectorTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/SourcesFileHyperlinkDetectorTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013, 2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -28,95 +30,85 @@ import org.junit.Before;
import org.junit.Test;
public class SourcesFileHyperlinkDetectorTest extends FileTestCase {
- @Before
- public void init() throws CoreException {
- super.setUp();
- String testText = "Source0: test.zip\n"
- + "Patch0: test.patch\n"
- + "Source1: www.example.com/test.zip\n"
- + "Source2: http://www.example.com/test.zip\n";
- newFile(testText);
- }
+ @Before
+ public void init() throws CoreException {
+ super.setUp();
+ String testText = "Source0: test.zip\n" + "Patch0: test.patch\n" + "Source1: www.example.com/test.zip\n"
+ + "Source2: http://www.example.com/test.zip\n";
+ newFile(testText);
+ }
- @Test
- public void testDetectHyperlinks() throws PartInitException {
- IEditorPart openEditor = IDE.openEditor(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage(), testFile,
- "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
+ @Test
+ public void testDetectHyperlinks() throws PartInitException {
+ IEditorPart openEditor = IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(),
+ testFile, "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
- editor = (SpecfileEditor) openEditor;
- editor.doRevertToSaved();
- SourcesFileHyperlinkDetector elementDetector = new SourcesFileHyperlinkDetector();
- elementDetector.setEditor(editor);
- // test source0 element
- IRegion region = new Region(10, 0);
- IHyperlink[] returned = elementDetector.detectHyperlinks(
- editor.getSpecfileSourceViewer(), region, false);
- // because test.zip does not exist, and is not a valid url
- // it should not have hyperlinks
- assertNull(returned);
- }
+ editor = (SpecfileEditor) openEditor;
+ editor.doRevertToSaved();
+ SourcesFileHyperlinkDetector elementDetector = new SourcesFileHyperlinkDetector();
+ elementDetector.setEditor(editor);
+ // test source0 element
+ IRegion region = new Region(10, 0);
+ IHyperlink[] returned = elementDetector.detectHyperlinks(editor.getSpecfileSourceViewer(), region, false);
+ // because test.zip does not exist, and is not a valid url
+ // it should not have hyperlinks
+ assertNull(returned);
+ }
- @Test
- public void testDetectHyperlinksInvalidURL() throws PartInitException {
- IEditorPart openEditor = IDE.openEditor(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage(), testFile,
- "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
+ @Test
+ public void testDetectHyperlinksInvalidURL() throws PartInitException {
+ IEditorPart openEditor = IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(),
+ testFile, "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
- editor = (SpecfileEditor) openEditor;
- editor.doRevertToSaved();
- SourcesFileHyperlinkDetector elementDetector = new SourcesFileHyperlinkDetector();
- elementDetector.setEditor(editor);
- // test source1 element
- IRegion region = new Region(47, 0);
- IHyperlink[] returned = elementDetector.detectHyperlinks(
- editor.getSpecfileSourceViewer(), region, false);
- // because the protocol is missing, it should not show any hyperlinks
- assertNull(returned);
- }
+ editor = (SpecfileEditor) openEditor;
+ editor.doRevertToSaved();
+ SourcesFileHyperlinkDetector elementDetector = new SourcesFileHyperlinkDetector();
+ elementDetector.setEditor(editor);
+ // test source1 element
+ IRegion region = new Region(47, 0);
+ IHyperlink[] returned = elementDetector.detectHyperlinks(editor.getSpecfileSourceViewer(), region, false);
+ // because the protocol is missing, it should not show any hyperlinks
+ assertNull(returned);
+ }
- @Test
- public void testDetectHyperlinksValidURL() throws PartInitException {
- IEditorPart openEditor = IDE.openEditor(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage(), testFile,
- "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
+ @Test
+ public void testDetectHyperlinksValidURL() throws PartInitException {
+ IEditorPart openEditor = IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(),
+ testFile, "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
- editor = (SpecfileEditor) openEditor;
- editor.doRevertToSaved();
- SourcesFileHyperlinkDetector elementDetector = new SourcesFileHyperlinkDetector();
- elementDetector.setEditor(editor);
- // test source2 element
- IRegion region = new Region(82, 0);
- IHyperlink[] returned = elementDetector.detectHyperlinks(
- editor.getSpecfileSourceViewer(), region, false);
- // 1 = Download from URL (Open in browser should not show up because URLHyperlinkWithMacroDetector detects that)
- assertEquals(1, returned.length);
- }
+ editor = (SpecfileEditor) openEditor;
+ editor.doRevertToSaved();
+ SourcesFileHyperlinkDetector elementDetector = new SourcesFileHyperlinkDetector();
+ elementDetector.setEditor(editor);
+ // test source2 element
+ IRegion region = new Region(82, 0);
+ IHyperlink[] returned = elementDetector.detectHyperlinks(editor.getSpecfileSourceViewer(), region, false);
+ // 1 = Download from URL (Open in browser should not show up because
+ // URLHyperlinkWithMacroDetector detects that)
+ assertEquals(1, returned.length);
+ }
- @Test
- public void testDetectNoPatchInProject() throws PartInitException {
- IEditorPart openEditor = IDE.openEditor(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage(), testFile,
- "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
+ @Test
+ public void testDetectNoPatchInProject() throws PartInitException {
+ IEditorPart openEditor = IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(),
+ testFile, "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
- editor = (SpecfileEditor) openEditor;
- editor.doRevertToSaved();
- SourcesFileHyperlinkDetector elementDetector = new SourcesFileHyperlinkDetector();
- elementDetector.setEditor(editor);
- // test patch element
- IRegion region = new Region(27, 0);
- IHyperlink[] returned = elementDetector.detectHyperlinks(
- editor.getSpecfileSourceViewer(), region, false);
- // 1 = Create test.patch because test.patch doesn't exist in current project
- assertEquals(1, returned.length);
- }
+ editor = (SpecfileEditor) openEditor;
+ editor.doRevertToSaved();
+ SourcesFileHyperlinkDetector elementDetector = new SourcesFileHyperlinkDetector();
+ elementDetector.setEditor(editor);
+ // test patch element
+ IRegion region = new Region(27, 0);
+ IHyperlink[] returned = elementDetector.detectHyperlinks(editor.getSpecfileSourceViewer(), region, false);
+ // 1 = Create test.patch because test.patch doesn't exist in current project
+ assertEquals(1, returned.length);
+ }
- @Test
- public void testDetectHyperlinksNoRegionAndTextViewer() {
- SourcesFileHyperlinkDetector elementDetector = new SourcesFileHyperlinkDetector();
- elementDetector.setEditor(editor);
- IHyperlink[] returned = elementDetector.detectHyperlinks(null, null,
- false);
- assertNull(returned);
- }
+ @Test
+ public void testDetectHyperlinksNoRegionAndTextViewer() {
+ SourcesFileHyperlinkDetector elementDetector = new SourcesFileHyperlinkDetector();
+ elementDetector.setEditor(editor);
+ IHyperlink[] returned = elementDetector.detectHyperlinks(null, null, false);
+ assertNull(returned);
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/SpecfileElementHyperlinkDetectorTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/SpecfileElementHyperlinkDetectorTest.java
index e4ccf0cd55..4b9ec7a722 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/SpecfileElementHyperlinkDetectorTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/SpecfileElementHyperlinkDetectorTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009, 2017 Red Hat Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -31,57 +33,52 @@ import org.junit.Test;
public class SpecfileElementHyperlinkDetectorTest extends FileTestCase {
- @Test
- public void testDetectHyperlinks() throws PartInitException {
- String testText = "%define smth other\nSource0: test.zip\nPatch0: first.patch\n"
- + "%build\n %{SOURCE0}\n%patch0\n%{smth}\n";
- newFile(testText);
- SpecfileElementHyperlinkDetector elementDetector = new SpecfileElementHyperlinkDetector();
- elementDetector.setSpecfile(specfile);
+ @Test
+ public void testDetectHyperlinks() throws PartInitException {
+ String testText = "%define smth other\nSource0: test.zip\nPatch0: first.patch\n"
+ + "%build\n %{SOURCE0}\n%patch0\n%{smth}\n";
+ newFile(testText);
+ SpecfileElementHyperlinkDetector elementDetector = new SpecfileElementHyperlinkDetector();
+ elementDetector.setSpecfile(specfile);
- IEditorPart openEditor = IDE.openEditor(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage(), testFile,
- "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
+ IEditorPart openEditor = IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(),
+ testFile, "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
- editor = (SpecfileEditor) openEditor;
- editor.doRevertToSaved();
- // test source element
- IRegion region = new Region(74, 0);
- IHyperlink[] returned = elementDetector.detectHyperlinks(
- editor.getSpecfileSourceViewer(), region, false);
- SpecfileElementHyperlink element = (SpecfileElementHyperlink) returned[0];
- assertTrue(element.getSource() instanceof SpecfileSource);
- SpecfileSource source = (SpecfileSource) element.getSource();
- assertEquals(source.getSourceType(), SpecfileSource.SourceType.SOURCE);
- assertEquals(source.getFileName(), "test.zip");
+ editor = (SpecfileEditor) openEditor;
+ editor.doRevertToSaved();
+ // test source element
+ IRegion region = new Region(74, 0);
+ IHyperlink[] returned = elementDetector.detectHyperlinks(editor.getSpecfileSourceViewer(), region, false);
+ SpecfileElementHyperlink element = (SpecfileElementHyperlink) returned[0];
+ assertTrue(element.getSource() instanceof SpecfileSource);
+ SpecfileSource source = (SpecfileSource) element.getSource();
+ assertEquals(source.getSourceType(), SpecfileSource.SourceType.SOURCE);
+ assertEquals(source.getFileName(), "test.zip");
- // test patch element
- region = new Region(83, 0);
- returned = elementDetector.detectHyperlinks(
- editor.getSpecfileSourceViewer(), region, false);
- element = (SpecfileElementHyperlink) returned[0];
- assertTrue(element.getSource() instanceof SpecfileSource);
- source = (SpecfileSource) element.getSource();
- assertEquals(source.getSourceType(), SpecfileSource.SourceType.PATCH);
- assertEquals(source.getFileName(), "first.patch");
+ // test patch element
+ region = new Region(83, 0);
+ returned = elementDetector.detectHyperlinks(editor.getSpecfileSourceViewer(), region, false);
+ element = (SpecfileElementHyperlink) returned[0];
+ assertTrue(element.getSource() instanceof SpecfileSource);
+ source = (SpecfileSource) element.getSource();
+ assertEquals(source.getSourceType(), SpecfileSource.SourceType.PATCH);
+ assertEquals(source.getFileName(), "first.patch");
- // test define
- region = new Region(89, 0);
- returned = elementDetector.detectHyperlinks(
- editor.getSpecfileSourceViewer(), region, false);
- element = (SpecfileElementHyperlink) returned[0];
- assertTrue(element.getSource() instanceof SpecfileDefine);
- SpecfileDefine define = (SpecfileDefine) element.getSource();
- assertEquals(define.getName(), "smth");
- assertEquals(define.getStringValue(), "other");
- }
+ // test define
+ region = new Region(89, 0);
+ returned = elementDetector.detectHyperlinks(editor.getSpecfileSourceViewer(), region, false);
+ element = (SpecfileElementHyperlink) returned[0];
+ assertTrue(element.getSource() instanceof SpecfileDefine);
+ SpecfileDefine define = (SpecfileDefine) element.getSource();
+ assertEquals(define.getName(), "smth");
+ assertEquals(define.getStringValue(), "other");
+ }
- @Test
- public void testDetectHyperlinksNoRegionAndTextViewer() {
- SpecfileElementHyperlinkDetector elementDetector = new SpecfileElementHyperlinkDetector();
- elementDetector.setSpecfile(specfile);
- IHyperlink[] returned = elementDetector.detectHyperlinks(null, null,
- false);
- assertNull(returned);
- }
+ @Test
+ public void testDetectHyperlinksNoRegionAndTextViewer() {
+ SpecfileElementHyperlinkDetector elementDetector = new SpecfileElementHyperlinkDetector();
+ elementDetector.setSpecfile(specfile);
+ IHyperlink[] returned = elementDetector.detectHyperlinks(null, null, false);
+ assertNull(returned);
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/URLHyperlinkWithMacroDetectorTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/URLHyperlinkWithMacroDetectorTest.java
index ad797cb6b7..83bcc3e47e 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/URLHyperlinkWithMacroDetectorTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/hyperlink/tests/URLHyperlinkWithMacroDetectorTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2006, 2017 Red Hat Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2006, 2018 Red Hat Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat Incorporated - initial API and implementation
@@ -27,22 +29,20 @@ import org.junit.Test;
public class URLHyperlinkWithMacroDetectorTest extends FileTestCase {
- @Test
- public void testDetectHyperlinks() throws PartInitException {
- String testText = "Name: eclipse\nURL: http://www.%{name}.org/";
- newFile(testText);
- URLHyperlinkWithMacroDetector macroDetector = new URLHyperlinkWithMacroDetector();
- macroDetector.setSpecfile(specfile);
- IRegion region = new Region(20, 0);
- IEditorPart openEditor = IDE.openEditor(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage(), testFile,
- "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
+ @Test
+ public void testDetectHyperlinks() throws PartInitException {
+ String testText = "Name: eclipse\nURL: http://www.%{name}.org/";
+ newFile(testText);
+ URLHyperlinkWithMacroDetector macroDetector = new URLHyperlinkWithMacroDetector();
+ macroDetector.setSpecfile(specfile);
+ IRegion region = new Region(20, 0);
+ IEditorPart openEditor = IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(),
+ testFile, "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
- editor = (SpecfileEditor) openEditor;
- editor.doRevertToSaved();
- IHyperlink[] returned = macroDetector.detectHyperlinks(
- editor.getSpecfileSourceViewer(), region, false);
- URLHyperlink url = (URLHyperlink) returned[0];
- assertEquals("http://www.eclipse.org/", url.getURLString());
- }
+ editor = (SpecfileEditor) openEditor;
+ editor.doRevertToSaved();
+ IHyperlink[] returned = macroDetector.detectHyperlinks(editor.getSpecfileSourceViewer(), region, false);
+ URLHyperlink url = (URLHyperlink) returned[0];
+ assertEquals("http://www.eclipse.org/", url.getURLString());
+ }
} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/ScannersAllTests.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/ScannersAllTests.java
index 5bd9ee55dd..c04d4f8757 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/ScannersAllTests.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/ScannersAllTests.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -14,7 +16,7 @@ import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
-@Suite.SuiteClasses({ SpecfileChangelogScannerTest.class,
- SpecfilePackagesScannerTest.class, SpecfileScannerTest.class })
+@Suite.SuiteClasses({ SpecfileChangelogScannerTest.class, SpecfilePackagesScannerTest.class,
+ SpecfileScannerTest.class })
public class ScannersAllTests {
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/SpecfileChangelogScannerTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/SpecfileChangelogScannerTest.java
index 4d3dc7b22e..e6bb4dcd00 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/SpecfileChangelogScannerTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/SpecfileChangelogScannerTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 Alphonse Van Assche and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/SpecfilePackagesScannerTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/SpecfilePackagesScannerTest.java
index fac57bc9e7..d6c5c27017 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/SpecfilePackagesScannerTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/SpecfilePackagesScannerTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 Alphonse Van Assche and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/SpecfileScannerTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/SpecfileScannerTest.java
index 49680e6e1f..1bc7e5045f 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/SpecfileScannerTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/internal/rpm/ui/editor/scanners/tests/SpecfileScannerTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 Alphonse Van Assche and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -27,99 +29,99 @@ import org.junit.Test;
public class SpecfileScannerTest extends AScannerTest {
- private IToken token;
-
- private TextAttribute ta;
-
- private static SpecfileScanner scanner;
- private static ColorRegistry colors;
-
- @BeforeClass
- public static void init() {
- scanner = new SpecfileScanner();
- colors = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
- }
-
- @Override
- protected String getContents() {
- return "# This is a comment\nName: test\n%prep\n%{name}\n%define\n%if\nName=test";
- }
-
- @Override
- protected RuleBasedScanner getScanner() {
- return scanner;
- }
-
- @Test
- public void testComment() {
- token = getNextToken();
- assertTrue(token instanceof Token);
- assertEquals(20, rulesBasedScanner.getTokenLength());
- assertEquals(0, rulesBasedScanner.getTokenOffset());
- ta = (TextAttribute) token.getData();
- assertEquals(colors.get(ISpecfileColorConstants.COMMENT), ta.getForeground());
- }
-
- @Test
- public void testTag() {
- token = getToken(2);
- assertTrue(token instanceof Token);
- assertEquals(5, rulesBasedScanner.getTokenLength());
- assertEquals(20, rulesBasedScanner.getTokenOffset());
- ta = (TextAttribute) token.getData();
- assertEquals(colors.get(ISpecfileColorConstants.TAGS), ta.getForeground());
- }
-
- @Test
- public void testSection() {
- token = getToken(9);
- assertTrue(token instanceof Token);
- assertEquals(5, rulesBasedScanner.getTokenLength());
- assertEquals(31, rulesBasedScanner.getTokenOffset());
- ta = (TextAttribute) token.getData();
- assertEquals(colors.get(ISpecfileColorConstants.SECTIONS), ta.getForeground());
- }
-
- @Test
- public void testMacro() {
- token = getToken(11);
- assertTrue(token instanceof Token);
- assertEquals(7, rulesBasedScanner.getTokenLength());
- assertEquals(37, rulesBasedScanner.getTokenOffset());
- ta = (TextAttribute) token.getData();
- assertEquals(colors.get(ISpecfileColorConstants.MACROS), ta.getForeground());
- }
-
- @Test
- public void testDefinedMacro() {
- token = getToken(13);
- assertTrue(token instanceof Token);
- assertEquals(7, rulesBasedScanner.getTokenLength());
- assertEquals(45, rulesBasedScanner.getTokenOffset());
- ta = (TextAttribute) token.getData();
- assertEquals(colors.get(ISpecfileColorConstants.MACROS), ta.getForeground());
- }
-
- @Test
- public void testKeyword() {
- token = getToken(15);
- assertTrue(token instanceof Token);
- assertEquals(3, rulesBasedScanner.getTokenLength());
- assertEquals(53, rulesBasedScanner.getTokenOffset());
- ta = (TextAttribute) token.getData();
- assertEquals(colors.get(ISpecfileColorConstants.KEYWORDS), ta.getForeground());
- }
-
- /**
- * Check that defines are correctly scanned. See bug:
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=182302 printscreen:
- * https://bugs.eclipse.org/bugs/attachment.cgi?id=63722
- */
- @Test
- public void testDefineCorreclyScanned() {
- token = getToken(17);
- assertTrue(token instanceof Token);
- assertEquals(1, rulesBasedScanner.getTokenLength());
- }
+ private IToken token;
+
+ private TextAttribute ta;
+
+ private static SpecfileScanner scanner;
+ private static ColorRegistry colors;
+
+ @BeforeClass
+ public static void init() {
+ scanner = new SpecfileScanner();
+ colors = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
+ }
+
+ @Override
+ protected String getContents() {
+ return "# This is a comment\nName: test\n%prep\n%{name}\n%define\n%if\nName=test";
+ }
+
+ @Override
+ protected RuleBasedScanner getScanner() {
+ return scanner;
+ }
+
+ @Test
+ public void testComment() {
+ token = getNextToken();
+ assertTrue(token instanceof Token);
+ assertEquals(20, rulesBasedScanner.getTokenLength());
+ assertEquals(0, rulesBasedScanner.getTokenOffset());
+ ta = (TextAttribute) token.getData();
+ assertEquals(colors.get(ISpecfileColorConstants.COMMENT), ta.getForeground());
+ }
+
+ @Test
+ public void testTag() {
+ token = getToken(2);
+ assertTrue(token instanceof Token);
+ assertEquals(5, rulesBasedScanner.getTokenLength());
+ assertEquals(20, rulesBasedScanner.getTokenOffset());
+ ta = (TextAttribute) token.getData();
+ assertEquals(colors.get(ISpecfileColorConstants.TAGS), ta.getForeground());
+ }
+
+ @Test
+ public void testSection() {
+ token = getToken(9);
+ assertTrue(token instanceof Token);
+ assertEquals(5, rulesBasedScanner.getTokenLength());
+ assertEquals(31, rulesBasedScanner.getTokenOffset());
+ ta = (TextAttribute) token.getData();
+ assertEquals(colors.get(ISpecfileColorConstants.SECTIONS), ta.getForeground());
+ }
+
+ @Test
+ public void testMacro() {
+ token = getToken(11);
+ assertTrue(token instanceof Token);
+ assertEquals(7, rulesBasedScanner.getTokenLength());
+ assertEquals(37, rulesBasedScanner.getTokenOffset());
+ ta = (TextAttribute) token.getData();
+ assertEquals(colors.get(ISpecfileColorConstants.MACROS), ta.getForeground());
+ }
+
+ @Test
+ public void testDefinedMacro() {
+ token = getToken(13);
+ assertTrue(token instanceof Token);
+ assertEquals(7, rulesBasedScanner.getTokenLength());
+ assertEquals(45, rulesBasedScanner.getTokenOffset());
+ ta = (TextAttribute) token.getData();
+ assertEquals(colors.get(ISpecfileColorConstants.MACROS), ta.getForeground());
+ }
+
+ @Test
+ public void testKeyword() {
+ token = getToken(15);
+ assertTrue(token instanceof Token);
+ assertEquals(3, rulesBasedScanner.getTokenLength());
+ assertEquals(53, rulesBasedScanner.getTokenOffset());
+ ta = (TextAttribute) token.getData();
+ assertEquals(colors.get(ISpecfileColorConstants.KEYWORDS), ta.getForeground());
+ }
+
+ /**
+ * Check that defines are correctly scanned. See bug:
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=182302 printscreen:
+ * https://bugs.eclipse.org/bugs/attachment.cgi?id=63722
+ */
+ @Test
+ public void testDefineCorreclyScanned() {
+ token = getToken(17);
+ assertTrue(token instanceof Token);
+ assertEquals(1, rulesBasedScanner.getTokenLength());
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/AScannerTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/AScannerTest.java
index d843476750..05acf58689 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/AScannerTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/AScannerTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 Alphonse Van Assche and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -21,37 +23,36 @@ import org.junit.Before;
public abstract class AScannerTest extends FileTestCase {
- protected RuleBasedScanner rulesBasedScanner;
-
- protected abstract String getContents();
-
- protected abstract RuleBasedScanner getScanner();
-
- public SpecfileEditor editor;
-
- @Override
- @Before
- public void setUp() throws CoreException {
- super.setUp();
- newFile(getContents());
- testProject.refresh();
- IEditorPart openEditor = IDE.openEditor(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage(), testFile,
- "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
- editor = (SpecfileEditor) openEditor;
- editor.doRevertToSaved();
- rulesBasedScanner = getScanner();
- rulesBasedScanner.setRange(testDocument, 0, getContents().length());
- }
-
- protected IToken getNextToken() {
- return rulesBasedScanner.nextToken();
- }
-
- protected IToken getToken(int nbrOfToken) {
- for (int i = 0; i < nbrOfToken - 1; i++) {
- rulesBasedScanner.nextToken();
- }
- return rulesBasedScanner.nextToken();
- }
+ protected RuleBasedScanner rulesBasedScanner;
+
+ protected abstract String getContents();
+
+ protected abstract RuleBasedScanner getScanner();
+
+ public SpecfileEditor editor;
+
+ @Override
+ @Before
+ public void setUp() throws CoreException {
+ super.setUp();
+ newFile(getContents());
+ testProject.refresh();
+ IEditorPart openEditor = IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(),
+ testFile, "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
+ editor = (SpecfileEditor) openEditor;
+ editor.doRevertToSaved();
+ rulesBasedScanner = getScanner();
+ rulesBasedScanner.setRange(testDocument, 0, getContents().length());
+ }
+
+ protected IToken getNextToken() {
+ return rulesBasedScanner.nextToken();
+ }
+
+ protected IToken getToken(int nbrOfToken) {
+ for (int i = 0; i < nbrOfToken - 1; i++) {
+ rulesBasedScanner.nextToken();
+ }
+ return rulesBasedScanner.nextToken();
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java
index 3f25a7081c..f195f1639a 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -19,12 +21,10 @@ import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
-@Suite.SuiteClasses({ EpochTagTest.class, ReleaseTagTest.class,
- NameTagTest.class, VersionTagTest.class, HeaderRecognitionTest.class,
- LicenseTagTest.class, PatchApplicationTest.class,
- LinePositionTest.class, RpmMacroProposalsListTest.class,
- RpmPackageProposalsListTest.class, ActionsAllTests.class,
- ScannersAllTests.class, ParserAllTests.class, HyperlinkAllTests.class,
- SpecfileCompletionProcessorTest.class, LabelProviderTest.class })
+@Suite.SuiteClasses({ EpochTagTest.class, ReleaseTagTest.class, NameTagTest.class, VersionTagTest.class,
+ HeaderRecognitionTest.class, LicenseTagTest.class, PatchApplicationTest.class, LinePositionTest.class,
+ RpmMacroProposalsListTest.class, RpmPackageProposalsListTest.class, ActionsAllTests.class,
+ ScannersAllTests.class, ParserAllTests.class, HyperlinkAllTests.class, SpecfileCompletionProcessorTest.class,
+ LabelProviderTest.class })
public class AllTests {
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/EpochTagTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/EpochTagTest.java
index 504b36f853..98835c09b5 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/EpochTagTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/EpochTagTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -18,95 +20,83 @@ import org.junit.Test;
public class EpochTagTest extends FileTestCase {
- @Test
- public void testEpochTag() {
- String testText = "Epoch: 1";
- newFile(testText);
- assertEquals(1, specfile.getEpoch());
- }
+ @Test
+ public void testEpochTag() {
+ String testText = "Epoch: 1";
+ newFile(testText);
+ assertEquals(1, specfile.getEpoch());
+ }
- @Test
- public void testEpochTag2() {
- String testText = "Epoch:\t1";
- newFile(testText);
- assertEquals(1, specfile.getEpoch());
- }
+ @Test
+ public void testEpochTag2() {
+ String testText = "Epoch:\t1";
+ newFile(testText);
+ assertEquals(1, specfile.getEpoch());
+ }
- @Test
- public void testNullEpochTag() {
- String testText = "Epoch:";
- newFile(testText);
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals(6, failure.getPosition().getLength());
- assertEquals(SpecfileErrorHandler.ANNOTATION_ERROR, failure
- .getAnnotation().getType());
- assertEquals("Epoch declaration without value.", failure
- .getAnnotation().getText());
- }
+ @Test
+ public void testNullEpochTag() {
+ String testText = "Epoch:";
+ newFile(testText);
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals(6, failure.getPosition().getLength());
+ assertEquals(SpecfileErrorHandler.ANNOTATION_ERROR, failure.getAnnotation().getType());
+ assertEquals("Epoch declaration without value.", failure.getAnnotation().getText());
+ }
- @Test
- public void testNullEpochTag2() {
- String testText = "Epoch:\t";
- newFile(testText);
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals(7, failure.getPosition().getLength());
- assertEquals(SpecfileErrorHandler.ANNOTATION_ERROR, failure
- .getAnnotation().getType());
- assertEquals("Epoch declaration without value.", failure
- .getAnnotation().getText());
- }
+ @Test
+ public void testNullEpochTag2() {
+ String testText = "Epoch:\t";
+ newFile(testText);
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals(7, failure.getPosition().getLength());
+ assertEquals(SpecfileErrorHandler.ANNOTATION_ERROR, failure.getAnnotation().getType());
+ assertEquals("Epoch declaration without value.", failure.getAnnotation().getText());
+ }
- @Test
- public void testMultipleEpochsTag() {
- String testText = "Epoch: 1 2";
- newFile(testText);
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals(10, failure.getPosition().getLength());
- assertEquals(SpecfileErrorHandler.ANNOTATION_ERROR, failure
- .getAnnotation().getType());
- assertEquals("Epoch cannot have multiple values.", failure
- .getAnnotation().getText());
- }
+ @Test
+ public void testMultipleEpochsTag() {
+ String testText = "Epoch: 1 2";
+ newFile(testText);
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals(10, failure.getPosition().getLength());
+ assertEquals(SpecfileErrorHandler.ANNOTATION_ERROR, failure.getAnnotation().getType());
+ assertEquals("Epoch cannot have multiple values.", failure.getAnnotation().getText());
+ }
- @Test
- public void testMultipleEpochsTag2() {
- String testText = "Epoch: \t1 2";
- newFile(testText);
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals(11, failure.getPosition().getLength());
- assertEquals(SpecfileErrorHandler.ANNOTATION_ERROR, failure
- .getAnnotation().getType());
- assertEquals("Epoch cannot have multiple values.", failure
- .getAnnotation().getText());
- }
+ @Test
+ public void testMultipleEpochsTag2() {
+ String testText = "Epoch: \t1 2";
+ newFile(testText);
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals(11, failure.getPosition().getLength());
+ assertEquals(SpecfileErrorHandler.ANNOTATION_ERROR, failure.getAnnotation().getType());
+ assertEquals("Epoch cannot have multiple values.", failure.getAnnotation().getText());
+ }
- @Test
- public void testNonIntegerEpoch() {
- String testText = "Epoch: blah";
- newFile(testText);
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals(11, failure.getPosition().getLength());
- assertEquals(SpecfileErrorHandler.ANNOTATION_ERROR, failure
- .getAnnotation().getType());
- assertEquals("Epoch cannot have non-integer value.", failure
- .getAnnotation().getText());
- }
+ @Test
+ public void testNonIntegerEpoch() {
+ String testText = "Epoch: blah";
+ newFile(testText);
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals(11, failure.getPosition().getLength());
+ assertEquals(SpecfileErrorHandler.ANNOTATION_ERROR, failure.getAnnotation().getType());
+ assertEquals("Epoch cannot have non-integer value.", failure.getAnnotation().getText());
+ }
- @Test
- public void testNonIntegerEpoch2() {
- String testText = "Epoch:\tblah";
- newFile(testText);
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals(11, failure.getPosition().getLength());
- assertEquals(SpecfileErrorHandler.ANNOTATION_ERROR, failure
- .getAnnotation().getType());
- assertEquals("Epoch cannot have non-integer value.", failure
- .getAnnotation().getText());
- }
+ @Test
+ public void testNonIntegerEpoch2() {
+ String testText = "Epoch:\tblah";
+ newFile(testText);
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals(11, failure.getPosition().getLength());
+ assertEquals(SpecfileErrorHandler.ANNOTATION_ERROR, failure.getAnnotation().getType());
+ assertEquals("Epoch cannot have non-integer value.", failure.getAnnotation().getText());
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/FileTestCase.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/FileTestCase.java
index e43de6b0d4..a750ff7669 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/FileTestCase.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/FileTestCase.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008, 2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -38,68 +40,65 @@ import org.junit.Before;
*/
public abstract class FileTestCase {
- protected SpecfileParser parser;
- protected Specfile specfile;
- protected IFile testFile;
- protected Document testDocument;
- SpecfileErrorHandler errorHandler;
- SpecfileTestProject testProject;
- FileEditorInput fei;
- protected SpecfileEditor editor;
+ protected SpecfileParser parser;
+ protected Specfile specfile;
+ protected IFile testFile;
+ protected Document testDocument;
+ SpecfileErrorHandler errorHandler;
+ SpecfileTestProject testProject;
+ FileEditorInput fei;
+ protected SpecfileEditor editor;
- @Before
- public void setUp() throws CoreException {
- testProject = new SpecfileTestProject();
- String fileName = "test" + this.getClass().getSimpleName() + ".spec";
- testFile = testProject.createFile(fileName);
- editor = new SpecfileEditor();
- parser = new SpecfileParser();
- specfile = new Specfile();
- }
+ @Before
+ public void setUp() throws CoreException {
+ testProject = new SpecfileTestProject();
+ String fileName = "test" + this.getClass().getSimpleName() + ".spec";
+ testFile = testProject.createFile(fileName);
+ editor = new SpecfileEditor();
+ parser = new SpecfileParser();
+ specfile = new Specfile();
+ }
- @After
- public void tearDown() throws CoreException {
- testProject.dispose();
- }
+ @After
+ public void tearDown() throws CoreException {
+ testProject.dispose();
+ }
- public static void closeEditor(final IEditorPart editor) {
- if (editor.getSite().getWorkbenchWindow().getActivePage() != null) {
- PlatformUI.getWorkbench().getDisplay().syncExec(() -> editor.getSite().getWorkbenchWindow().getActivePage()
- .closeEditor(editor, false));
- }
- }
+ public static void closeEditor(final IEditorPart editor) {
+ if (editor.getSite().getWorkbenchWindow().getActivePage() != null) {
+ PlatformUI.getWorkbench().getDisplay()
+ .syncExec(() -> editor.getSite().getWorkbenchWindow().getActivePage().closeEditor(editor, false));
+ }
+ }
- protected ArrayList<SpecfileTestFailure> getFailures() {
- ArrayList<SpecfileTestFailure> failures = new ArrayList<>();
- IAnnotationModel model = SpecfileEditor.getSpecfileDocumentProvider()
- .getAnnotationModel(fei);
- for (Iterator<Annotation> i = model.getAnnotationIterator(); i
- .hasNext();) {
- Annotation annotation = i.next();
- Position p = model.getPosition(annotation);
- SpecfileTestFailure t = new SpecfileTestFailure(annotation, p);
- failures.add(t);
- }
- return failures;
- }
+ protected ArrayList<SpecfileTestFailure> getFailures() {
+ ArrayList<SpecfileTestFailure> failures = new ArrayList<>();
+ IAnnotationModel model = SpecfileEditor.getSpecfileDocumentProvider().getAnnotationModel(fei);
+ for (Iterator<Annotation> i = model.getAnnotationIterator(); i.hasNext();) {
+ Annotation annotation = i.next();
+ Position p = model.getPosition(annotation);
+ SpecfileTestFailure t = new SpecfileTestFailure(annotation, p);
+ failures.add(t);
+ }
+ return failures;
+ }
- protected void newFile(String contents) {
- try {
- testFile.setContents(new ByteArrayInputStream(contents.getBytes()),
- false, false, null);
- } catch (CoreException e) {
- fail(e.getMessage());
- }
- testDocument = new Document(contents);
- fei = new FileEditorInput(testFile);
- try {
- SpecfileEditor.getSpecfileDocumentProvider().disconnect(fei);
- SpecfileEditor.getSpecfileDocumentProvider().connect(fei);
- } catch (CoreException e) {
- // let failures occur
- }
- errorHandler = new SpecfileErrorHandler(fei, testDocument);
- parser.setErrorHandler(errorHandler);
- specfile = parser.parse(testDocument);
- }
+ protected void newFile(String contents) {
+ try {
+ testFile.setContents(new ByteArrayInputStream(contents.getBytes()), false, false, null);
+ } catch (CoreException e) {
+ fail(e.getMessage());
+ }
+ testDocument = new Document(contents);
+ fei = new FileEditorInput(testFile);
+ try {
+ SpecfileEditor.getSpecfileDocumentProvider().disconnect(fei);
+ SpecfileEditor.getSpecfileDocumentProvider().connect(fei);
+ } catch (CoreException e) {
+ // let failures occur
+ }
+ errorHandler = new SpecfileErrorHandler(fei, testDocument);
+ parser.setErrorHandler(errorHandler);
+ specfile = parser.parse(testDocument);
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/HeaderRecognitionTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/HeaderRecognitionTest.java
index f5a6c237c4..5a26f86671 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/HeaderRecognitionTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/HeaderRecognitionTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -24,113 +26,115 @@ import org.junit.Test;
*/
public class HeaderRecognitionTest extends FileTestCase {
- @Test
- public void testGetSimpleSectionName() {
- String testText = "%prep";
- SpecfileElement element;
-
- newFile(testText);
- element = parser.parseLine(testText, specfile, 0);
- assertEquals(SpecfileSection.class, element.getClass());
- assertEquals(testText.substring(1), ((SpecfileSection) element)
- .getName());
- }
- @Test
- public void testGetComplexSectionName1() {
- String testText = "%post";
- SpecfileElement element;
-
- newFile(testText);
- element = parser.parseLine(testText, specfile, 0);
- assertEquals(SpecfileSection.class, element.getClass());
- SpecfileSection section = (SpecfileSection) element;
- assertEquals(testText.substring(1), section.getName());
- assertNull(section.getPackage());
- }
- @Test
- public void testGetComplexSectionName2() {
- String testText = "%post -n";
- newFile(testText);
- specfile = parser.parse(testDocument);
-
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals("No package name after -n in post section.",
- failure.getAnnotation().getText());
- assertEquals(testText.length(),
- failure.getPosition().getLength());
- }
- @Test
- public void testGetComplexSectionName3() {
- String testText = "%post -n name";
- String[] tokens = testText.split("\\s+");
- SpecfileElement element;
-
- newFile(testText);
- element = parser.parseLine(testText, specfile, 0);
- assertEquals(SpecfileSection.class, element.getClass());
- SpecfileSection section = (SpecfileSection) element;
- assertEquals(tokens[0].substring(1), section.getName());
- assertEquals(tokens[2], section.getPackage().getPackageName());
- }
- @Test
- public void testGetComplexSectionName4() {
- // FIXME: check for rest of line when -p is implemented
- // this should be an error case
- String testText = "%post -n name -p";
- String[] tokens = testText.split("\\s+");
- SpecfileElement element;
-
- newFile(testText);
- element = parser.parseLine(testText, specfile, 0);
- assertEquals(SpecfileSection.class, element.getClass());
- SpecfileSection section = (SpecfileSection) element;
- assertEquals(tokens[0].substring(1), section.getName());
- assertEquals(tokens[2], section.getPackage().getPackageName());
- }
- @Test
- public void testGetComplexSectionName5() {
- // FIXME: check for rest of line when -p is implemented
- // "blah bleh" should become the actual text of the section
- String testText = "%post -n name -p blah bleh";
- String[] tokens = testText.split("\\s+");
- SpecfileElement element;
-
- newFile(testText);
- element = parser.parseLine(testText, specfile, 0);
- assertEquals(SpecfileSection.class, element.getClass());
- SpecfileSection section = (SpecfileSection) element;
- assertEquals(tokens[0].substring(1), section.getName());
- assertEquals(tokens[2], section.getPackage().getPackageName());
- }
- @Test
- public void testGetComplexSectionName6() {
- String testText = "%post -p blah bleh";
- // FIXME: check for rest of line when -p is implemented
- // "blah bleh" should become the actual text of the section
-
- String[] tokens = testText.split("\\s+");
- SpecfileElement element;
-
- newFile(testText);
- element = parser.parseLine(testText, specfile, 0);
- assertEquals(SpecfileSection.class, element.getClass());
- SpecfileSection section = (SpecfileSection) element;
- assertEquals(tokens[0].substring(1), section.getName());
- assertNull(section.getPackage());
- }
- @Test
- public void testGetComplexSectionName7() {
- String testText = "%post -n -p blah";
-
- newFile(testText);
- specfile = parser.parse(testDocument);
-
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals("Package name must not start with '-': -p.",
- failure.getAnnotation().getText());
- assertEquals(testText.length(),
- failure.getPosition().getLength());
- }
+ @Test
+ public void testGetSimpleSectionName() {
+ String testText = "%prep";
+ SpecfileElement element;
+
+ newFile(testText);
+ element = parser.parseLine(testText, specfile, 0);
+ assertEquals(SpecfileSection.class, element.getClass());
+ assertEquals(testText.substring(1), ((SpecfileSection) element).getName());
+ }
+
+ @Test
+ public void testGetComplexSectionName1() {
+ String testText = "%post";
+ SpecfileElement element;
+
+ newFile(testText);
+ element = parser.parseLine(testText, specfile, 0);
+ assertEquals(SpecfileSection.class, element.getClass());
+ SpecfileSection section = (SpecfileSection) element;
+ assertEquals(testText.substring(1), section.getName());
+ assertNull(section.getPackage());
+ }
+
+ @Test
+ public void testGetComplexSectionName2() {
+ String testText = "%post -n";
+ newFile(testText);
+ specfile = parser.parse(testDocument);
+
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals("No package name after -n in post section.", failure.getAnnotation().getText());
+ assertEquals(testText.length(), failure.getPosition().getLength());
+ }
+
+ @Test
+ public void testGetComplexSectionName3() {
+ String testText = "%post -n name";
+ String[] tokens = testText.split("\\s+");
+ SpecfileElement element;
+
+ newFile(testText);
+ element = parser.parseLine(testText, specfile, 0);
+ assertEquals(SpecfileSection.class, element.getClass());
+ SpecfileSection section = (SpecfileSection) element;
+ assertEquals(tokens[0].substring(1), section.getName());
+ assertEquals(tokens[2], section.getPackage().getPackageName());
+ }
+
+ @Test
+ public void testGetComplexSectionName4() {
+ // FIXME: check for rest of line when -p is implemented
+ // this should be an error case
+ String testText = "%post -n name -p";
+ String[] tokens = testText.split("\\s+");
+ SpecfileElement element;
+
+ newFile(testText);
+ element = parser.parseLine(testText, specfile, 0);
+ assertEquals(SpecfileSection.class, element.getClass());
+ SpecfileSection section = (SpecfileSection) element;
+ assertEquals(tokens[0].substring(1), section.getName());
+ assertEquals(tokens[2], section.getPackage().getPackageName());
+ }
+
+ @Test
+ public void testGetComplexSectionName5() {
+ // FIXME: check for rest of line when -p is implemented
+ // "blah bleh" should become the actual text of the section
+ String testText = "%post -n name -p blah bleh";
+ String[] tokens = testText.split("\\s+");
+ SpecfileElement element;
+
+ newFile(testText);
+ element = parser.parseLine(testText, specfile, 0);
+ assertEquals(SpecfileSection.class, element.getClass());
+ SpecfileSection section = (SpecfileSection) element;
+ assertEquals(tokens[0].substring(1), section.getName());
+ assertEquals(tokens[2], section.getPackage().getPackageName());
+ }
+
+ @Test
+ public void testGetComplexSectionName6() {
+ String testText = "%post -p blah bleh";
+ // FIXME: check for rest of line when -p is implemented
+ // "blah bleh" should become the actual text of the section
+
+ String[] tokens = testText.split("\\s+");
+ SpecfileElement element;
+
+ newFile(testText);
+ element = parser.parseLine(testText, specfile, 0);
+ assertEquals(SpecfileSection.class, element.getClass());
+ SpecfileSection section = (SpecfileSection) element;
+ assertEquals(tokens[0].substring(1), section.getName());
+ assertNull(section.getPackage());
+ }
+
+ @Test
+ public void testGetComplexSectionName7() {
+ String testText = "%post -n -p blah";
+
+ newFile(testText);
+ specfile = parser.parse(testDocument);
+
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals("Package name must not start with '-': -p.", failure.getAnnotation().getText());
+ assertEquals(testText.length(), failure.getPosition().getLength());
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LabelProviderTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LabelProviderTest.java
index 422516267f..f6ed9166d5 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LabelProviderTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LabelProviderTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -19,52 +21,52 @@ import org.junit.Before;
import org.junit.Test;
/**
- * Test case to make sure that the label provider is filtering out
- * some macros (e.g., %{?scl_prefix}).
+ * Test case to make sure that the label provider is filtering out some macros
+ * (e.g., %{?scl_prefix}).
*/
public class LabelProviderTest extends FileTestCase {
- private SpecfileLabelProvider labelProvider;
- private String correctResult = "eclipse-plugin";
+ private SpecfileLabelProvider labelProvider;
+ private String correctResult = "eclipse-plugin";
- @Before
- public void initialize() {
- labelProvider = new SpecfileLabelProvider();
- }
+ @Before
+ public void initialize() {
+ labelProvider = new SpecfileLabelProvider();
+ }
- /**
- * Test to see if %{?...} macros will be shown. They should not.
- */
- @Test
- public void testLabelForUnresolvedMacro() {
- String testText = "%{?some_macro}eclipse-plugin";
- String result = labelProvider.getText(testText);
- assertEquals(result, correctResult);
+ /**
+ * Test to see if %{?...} macros will be shown. They should not.
+ */
+ @Test
+ public void testLabelForUnresolvedMacro() {
+ String testText = "%{?some_macro}eclipse-plugin";
+ String result = labelProvider.getText(testText);
+ assertEquals(result, correctResult);
- testText = "eclipse-plugin%{?some_macro}";
- result = labelProvider.getText(testText);
- assertEquals(result, correctResult);
+ testText = "eclipse-plugin%{?some_macro}";
+ result = labelProvider.getText(testText);
+ assertEquals(result, correctResult);
- testText = "%{?some_macro}eclipse-plugin%{?some_macro}";
- result = labelProvider.getText(testText);
- assertEquals(result, correctResult);
- }
+ testText = "%{?some_macro}eclipse-plugin%{?some_macro}";
+ result = labelProvider.getText(testText);
+ assertEquals(result, correctResult);
+ }
- /**
- * Test for incorrect labels.
- */
- @Test
- public void testLabelForIncorrectString() {
- // for sake of test, this is just to show that the filterMacros
- // method would not filter %{...} regular macros.
- // It is the job of SpecfileDefine to do that.
- String testText = "%{no_question_mark}eclipse-plugin";
- String result = labelProvider.getText(testText);
- assertNotEquals(result, correctResult);
+ /**
+ * Test for incorrect labels.
+ */
+ @Test
+ public void testLabelForIncorrectString() {
+ // for sake of test, this is just to show that the filterMacros
+ // method would not filter %{...} regular macros.
+ // It is the job of SpecfileDefine to do that.
+ String testText = "%{no_question_mark}eclipse-plugin";
+ String result = labelProvider.getText(testText);
+ assertNotEquals(result, correctResult);
- testText = "{?no_percent_sign}eclipse-plugin";
- result = labelProvider.getText(testText);
- assertNotEquals(result, correctResult);
- }
+ testText = "{?no_percent_sign}eclipse-plugin";
+ result = labelProvider.getText(testText);
+ assertNotEquals(result, correctResult);
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LicenseTagTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LicenseTagTest.java
index f1bcb637ac..e5cda8d7df 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LicenseTagTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LicenseTagTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -14,11 +16,12 @@ package org.eclipse.linuxtools.rpm.ui.editor.tests;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
+
public class LicenseTagTest extends FileTestCase {
- @Test
- public void testSingleLicenseTag() {
- String testText = "License: EPL";
- newFile(testText);
- assertEquals("EPL", specfile.getLicense());
- }
+ @Test
+ public void testSingleLicenseTag() {
+ String testText = "License: EPL";
+ newFile(testText);
+ assertEquals("EPL", specfile.getLicense());
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LinePositionTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LinePositionTest.java
index a373a36e5e..51408e922d 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LinePositionTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LinePositionTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -20,35 +22,35 @@ import org.eclipse.linuxtools.internal.rpm.ui.editor.parser.SpecfileSource;
import org.junit.Test;
public class LinePositionTest extends FileTestCase {
- @Test
- public void testLineNumber() {
- String specText = "Patch3: somefilesomewhere.patch" + "\n"
- + "Patch2: someotherfile.patch";
-
- newFile(specText);
- Collection<SpecfileSource> patches = specfile.getPatches();
- for (SpecfileSource patch : patches) {
- if (patch.getNumber() == 2)
- assertEquals(1, patch.getLineNumber());
- else if (patch.getNumber() == 3)
- assertEquals(0, patch.getLineNumber());
- else
- fail("Found patch with number different from the expected numbers (2 or 3).");
- }
- }
- @Test
- public void testLineNumber2() {
- String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
-
- newFile(specText);
- Collection<SpecfileSource> patches = specfile.getPatches();
- for (SpecfileSource patch : patches) {
- if (patch.getNumber() == 3) {
- assertEquals(0, patch.getLineNumber());
- assertEquals(1, patch.getLinesUsed().get(0).intValue());
- } else
- fail("Found patch with number different from the expected 3.");
- }
- }
+ @Test
+ public void testLineNumber() {
+ String specText = "Patch3: somefilesomewhere.patch" + "\n" + "Patch2: someotherfile.patch";
+
+ newFile(specText);
+ Collection<SpecfileSource> patches = specfile.getPatches();
+ for (SpecfileSource patch : patches) {
+ if (patch.getNumber() == 2)
+ assertEquals(1, patch.getLineNumber());
+ else if (patch.getNumber() == 3)
+ assertEquals(0, patch.getLineNumber());
+ else
+ fail("Found patch with number different from the expected numbers (2 or 3).");
+ }
+ }
+
+ @Test
+ public void testLineNumber2() {
+ String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
+
+ newFile(specText);
+ Collection<SpecfileSource> patches = specfile.getPatches();
+ for (SpecfileSource patch : patches) {
+ if (patch.getNumber() == 3) {
+ assertEquals(0, patch.getLineNumber());
+ assertEquals(1, patch.getLinesUsed().get(0).intValue());
+ } else
+ fail("Found patch with number different from the expected 3.");
+ }
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/NameTagTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/NameTagTest.java
index 5f4aa9a1cd..952f6d6ba9 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/NameTagTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/NameTagTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -16,75 +18,71 @@ import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class NameTagTest extends FileTestCase {
- @Test
- public void testResolvedNameTag() {
- String testText = "%define blah notblah\nName: %{blah}";
- newFile(testText);
- assertEquals("notblah", specfile.getName());
- }
+ @Test
+ public void testResolvedNameTag() {
+ String testText = "%define blah notblah\nName: %{blah}";
+ newFile(testText);
+ assertEquals("notblah", specfile.getName());
+ }
- @Test
- public void testResolvedSetName() {
- String testText = "%define blah notblah\nName: %{blah}";
- newFile(testText);
- assertEquals("notblah", specfile.getName());
- }
+ @Test
+ public void testResolvedSetName() {
+ String testText = "%define blah notblah\nName: %{blah}";
+ newFile(testText);
+ assertEquals("notblah", specfile.getName());
+ }
- @Test
- public void testNameTag() {
- String testText = "Name: blah";
- newFile(testText);
- assertEquals("blah", specfile.getName());
- }
+ @Test
+ public void testNameTag() {
+ String testText = "Name: blah";
+ newFile(testText);
+ assertEquals("blah", specfile.getName());
+ }
- @Test
- public void testNameTag2() {
- String testText = "Name: blah";
- newFile(testText);
- assertEquals("blah", specfile.getName());
- }
+ @Test
+ public void testNameTag2() {
+ String testText = "Name: blah";
+ newFile(testText);
+ assertEquals("blah", specfile.getName());
+ }
- @Test
- public void testNullNameTag() {
- String testText = "Name: ";
- newFile(testText);
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals(testText.length(), failure.getPosition().getLength());
- assertEquals("Name declaration without value.", failure.getAnnotation()
- .getText());
- }
+ @Test
+ public void testNullNameTag() {
+ String testText = "Name: ";
+ newFile(testText);
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals(testText.length(), failure.getPosition().getLength());
+ assertEquals("Name declaration without value.", failure.getAnnotation().getText());
+ }
- @Test
- public void testNullNameTag2() {
- String testText = "Name: ";
- newFile(testText);
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals(testText.length(), failure.getPosition().getLength());
- assertEquals("Name declaration without value.", failure.getAnnotation()
- .getText());
- }
+ @Test
+ public void testNullNameTag2() {
+ String testText = "Name: ";
+ newFile(testText);
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals(testText.length(), failure.getPosition().getLength());
+ assertEquals("Name declaration without value.", failure.getAnnotation().getText());
+ }
- @Test
- public void testMultipleNamesTag() {
- String testText = "Name: blah bleh";
- newFile(testText);
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals(testText.length(), failure.getPosition().getLength());
- assertEquals("Name cannot have multiple values.", failure
- .getAnnotation().getText());
- }
+ @Test
+ public void testMultipleNamesTag() {
+ String testText = "Name: blah bleh";
+ newFile(testText);
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals(testText.length(), failure.getPosition().getLength());
+ assertEquals("Name cannot have multiple values.", failure.getAnnotation().getText());
+ }
- @Test
- public void testMultipleNamesTag2() {
- String testText = "Name: blah bleh";
- newFile(testText);
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals(testText.length(), failure.getPosition().getLength());
- assertEquals("Name cannot have multiple values.", failure
- .getAnnotation().getText());
- }
+ @Test
+ public void testMultipleNamesTag2() {
+ String testText = "Name: blah bleh";
+ newFile(testText);
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals(testText.length(), failure.getPosition().getLength());
+ assertEquals("Name cannot have multiple values.", failure.getAnnotation().getText());
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/PatchApplicationTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/PatchApplicationTest.java
index cefeb133ea..e26b18c1e3 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/PatchApplicationTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/PatchApplicationTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -22,33 +24,34 @@ import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileElement;
import org.junit.Test;
public class PatchApplicationTest extends FileTestCase {
- @Test
- public void testParsePatchApplication() {
- String specText = "Patch3: somefilesomewhere.patch\n%patch3";
- String testText = "%patch3";
- newFile(specText);
- SpecfileElement element = parser.parseLine(testText, specfile, 1);
- assertEquals(SpecfilePatchMacro.class, element.getClass());
- assertEquals(3, ((SpecfilePatchMacro) element).getPatchNumber());
- }
- @Test
- public void testPatchLineNumber() {
- String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
- newFile(specText);
- SpecfileSource thisPatch = specfile.getPatch(3);
- List<Integer> usedList = new ArrayList<>(1);
- usedList.add(Integer.valueOf(1));
- assertEquals(thisPatch.getLinesUsed(), usedList);
- }
- @Test
- public void testMultiplePatchLineNumbers() {
- String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3"
- + "\n" + "blah" + "\n" + "%patch3";
- newFile(specText);
- SpecfileSource thisPatch = specfile.getPatch(3);
- List<Integer> usedList = new ArrayList<>(2);
- usedList.add(Integer.valueOf(1));
- usedList.add(Integer.valueOf(3));
- assertEquals(thisPatch.getLinesUsed(), usedList);
- }
+ @Test
+ public void testParsePatchApplication() {
+ String specText = "Patch3: somefilesomewhere.patch\n%patch3";
+ String testText = "%patch3";
+ newFile(specText);
+ SpecfileElement element = parser.parseLine(testText, specfile, 1);
+ assertEquals(SpecfilePatchMacro.class, element.getClass());
+ assertEquals(3, ((SpecfilePatchMacro) element).getPatchNumber());
+ }
+
+ @Test
+ public void testPatchLineNumber() {
+ String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
+ newFile(specText);
+ SpecfileSource thisPatch = specfile.getPatch(3);
+ List<Integer> usedList = new ArrayList<>(1);
+ usedList.add(Integer.valueOf(1));
+ assertEquals(thisPatch.getLinesUsed(), usedList);
+ }
+
+ @Test
+ public void testMultiplePatchLineNumbers() {
+ String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3" + "\n" + "blah" + "\n" + "%patch3";
+ newFile(specText);
+ SpecfileSource thisPatch = specfile.getPatch(3);
+ List<Integer> usedList = new ArrayList<>(2);
+ usedList.add(Integer.valueOf(1));
+ usedList.add(Integer.valueOf(3));
+ assertEquals(thisPatch.getLinesUsed(), usedList);
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/ReleaseTagTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/ReleaseTagTest.java
index ede3b28ec8..b6d2e33405 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/ReleaseTagTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/ReleaseTagTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -16,68 +18,64 @@ import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class ReleaseTagTest extends FileTestCase {
- @Test
- public void testResolvedSetRelease() {
- String testText = "%define blah notblah\nRelease: %{blah}";
- newFile(testText);
- assertEquals("notblah", specfile.getRelease());
- }
+ @Test
+ public void testResolvedSetRelease() {
+ String testText = "%define blah notblah\nRelease: %{blah}";
+ newFile(testText);
+ assertEquals("notblah", specfile.getRelease());
+ }
- @Test
- public void testReleaseTag() {
- String testText = "Release: blah";
- newFile(testText);
- assertEquals("blah", specfile.getRelease());
- }
+ @Test
+ public void testReleaseTag() {
+ String testText = "Release: blah";
+ newFile(testText);
+ assertEquals("blah", specfile.getRelease());
+ }
- @Test
- public void testReleaseTag2() {
- String testText = "Release: blah";
- newFile(testText);
- assertEquals("blah", specfile.getRelease());
- }
+ @Test
+ public void testReleaseTag2() {
+ String testText = "Release: blah";
+ newFile(testText);
+ assertEquals("blah", specfile.getRelease());
+ }
- @Test
- public void testNullReleaseTag() {
- String testText = "Release: ";
- newFile(testText);
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals(testText.length(), failure.getPosition().getLength());
- assertEquals("Release declaration without value.", failure
- .getAnnotation().getText());
- }
+ @Test
+ public void testNullReleaseTag() {
+ String testText = "Release: ";
+ newFile(testText);
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals(testText.length(), failure.getPosition().getLength());
+ assertEquals("Release declaration without value.", failure.getAnnotation().getText());
+ }
- @Test
- public void testNullReleaseTag2() {
- String testText = "Release: ";
- newFile(testText);
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals(testText.length(), failure.getPosition().getLength());
- assertEquals("Release declaration without value.", failure
- .getAnnotation().getText());
- }
+ @Test
+ public void testNullReleaseTag2() {
+ String testText = "Release: ";
+ newFile(testText);
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals(testText.length(), failure.getPosition().getLength());
+ assertEquals("Release declaration without value.", failure.getAnnotation().getText());
+ }
- @Test
- public void testMultipleReleasesTag() {
- String testText = "Release: blah bleh";
- newFile(testText);
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals(testText.length(), failure.getPosition().getLength());
- assertEquals("Release cannot have multiple values.", failure
- .getAnnotation().getText());
- }
+ @Test
+ public void testMultipleReleasesTag() {
+ String testText = "Release: blah bleh";
+ newFile(testText);
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals(testText.length(), failure.getPosition().getLength());
+ assertEquals("Release cannot have multiple values.", failure.getAnnotation().getText());
+ }
- @Test
- public void testMultipleReleasesTag2() {
- String testText = "Release: blah bleh";
- newFile(testText);
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals(testText.length(), failure.getPosition().getLength());
- assertEquals("Release cannot have multiple values.", failure
- .getAnnotation().getText());
- }
+ @Test
+ public void testMultipleReleasesTag2() {
+ String testText = "Release: blah bleh";
+ newFile(testText);
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals(testText.length(), failure.getPosition().getLength());
+ assertEquals("Release cannot have multiple values.", failure.getAnnotation().getText());
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmMacroProposalsListTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmMacroProposalsListTest.java
index e74d217b63..78723d399a 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmMacroProposalsListTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmMacroProposalsListTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2016 Alphonse Van Assche.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -23,78 +25,76 @@ import org.junit.Test;
public class RpmMacroProposalsListTest {
- RpmMacroProposalsList macroProposalsList;
-
- @Before
- public void setUp() {
- macroProposalsList = new RpmMacroProposalsList();
- }
-
- @Test
- public final void testBuildMacroList() {
- macroProposalsList.buildMacroList();
- if (!macroProposalsList.findKey("%_libdir"))
- fail("buildMacroList faild, %_libdir macro was not found!");
- }
-
- /**
- * Configure is the most common macro that is multi-line so it tests our parsing of multiline macros.
- */
- @Test
- public final void buildMacroListMultiLineMacro() {
- macroProposalsList.buildMacroList();
- if (!macroProposalsList.findKey("%configure")) {
- fail("buildMacroList faild, %configure macro was not found!");
- }
- }
-
- @Test
- public final void testGetProposals() {
- Map<String, String> proposals = macroProposalsList
- .getProposals("%_libdir");
- if (proposals.size() < 1) {
- fail("getProposals faild, %_libdir macro was retrive as proposals");
- }
- }
-
- @Test
- public final void testGetProposals2() {
- Map<String, String> proposals = macroProposalsList
- .getProposals("%_unexistingmacro");
- if (proposals.size() != 0) {
- fail("getProposals faild, %_unexistingmacro don't can exist");
- }
- }
-
- @Test
- public final void testGetValue() {
- if (macroProposalsList.getValue("_libdir").indexOf("lib") == -1) {
- fail("getValue faild, %_libdir value don't end with '%{_lib}'");
- }
- }
-
- @Test
- public final void testGetValue2() {
- if (macroProposalsList.getValue("_unexistingmacro") != null) {
- fail("getValue faild, %_libdir value don't end with '%{_lib}'");
- }
- }
-
- @Test
- public final void testGetMacroEval() {
- if (Files.exists(Paths.get("/bin/rpm"))) {
- if (RpmMacroProposalsList.getMacroEval("%_libdir").indexOf("lib") == -1) {
- fail("getMacroEval faild, eval don't end with 'lib'");
- }
- }
- }
-
- @Test
- public final void testGetMacroEval2() {
- if (!RpmMacroProposalsList.getMacroEval("%_unexistingmacro").equals(
- "%_unexistingmacro")) {
- fail("getMacroEval faild, eval don't contain %_unexistingmacro macro name");
- }
- }
+ RpmMacroProposalsList macroProposalsList;
+
+ @Before
+ public void setUp() {
+ macroProposalsList = new RpmMacroProposalsList();
+ }
+
+ @Test
+ public final void testBuildMacroList() {
+ macroProposalsList.buildMacroList();
+ if (!macroProposalsList.findKey("%_libdir"))
+ fail("buildMacroList faild, %_libdir macro was not found!");
+ }
+
+ /**
+ * Configure is the most common macro that is multi-line so it tests our parsing
+ * of multiline macros.
+ */
+ @Test
+ public final void buildMacroListMultiLineMacro() {
+ macroProposalsList.buildMacroList();
+ if (!macroProposalsList.findKey("%configure")) {
+ fail("buildMacroList faild, %configure macro was not found!");
+ }
+ }
+
+ @Test
+ public final void testGetProposals() {
+ Map<String, String> proposals = macroProposalsList.getProposals("%_libdir");
+ if (proposals.size() < 1) {
+ fail("getProposals faild, %_libdir macro was retrive as proposals");
+ }
+ }
+
+ @Test
+ public final void testGetProposals2() {
+ Map<String, String> proposals = macroProposalsList.getProposals("%_unexistingmacro");
+ if (proposals.size() != 0) {
+ fail("getProposals faild, %_unexistingmacro don't can exist");
+ }
+ }
+
+ @Test
+ public final void testGetValue() {
+ if (macroProposalsList.getValue("_libdir").indexOf("lib") == -1) {
+ fail("getValue faild, %_libdir value don't end with '%{_lib}'");
+ }
+ }
+
+ @Test
+ public final void testGetValue2() {
+ if (macroProposalsList.getValue("_unexistingmacro") != null) {
+ fail("getValue faild, %_libdir value don't end with '%{_lib}'");
+ }
+ }
+
+ @Test
+ public final void testGetMacroEval() {
+ if (Files.exists(Paths.get("/bin/rpm"))) {
+ if (RpmMacroProposalsList.getMacroEval("%_libdir").indexOf("lib") == -1) {
+ fail("getMacroEval faild, eval don't end with 'lib'");
+ }
+ }
+ }
+
+ @Test
+ public final void testGetMacroEval2() {
+ if (!RpmMacroProposalsList.getMacroEval("%_unexistingmacro").equals("%_unexistingmacro")) {
+ fail("getMacroEval faild, eval don't contain %_unexistingmacro macro name");
+ }
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmPackageProposalsListTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmPackageProposalsListTest.java
index 2d5625c16b..d3f9a73d54 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmPackageProposalsListTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmPackageProposalsListTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2016 Alphonse Van Assche.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -26,56 +28,53 @@ import org.junit.Test;
public class RpmPackageProposalsListTest {
- private RpmPackageProposalsList packageProposalsList;
+ private RpmPackageProposalsList packageProposalsList;
- @Before
- public void setUp() throws IOException {
- Activator.getDefault().getPreferenceStore().setValue(
- PreferenceConstants.P_RPM_LIST_FILEPATH, "/tmp/pkglist");
- Files.write(Paths.get("/tmp/pkglist"), "setup\ntest\nrpm\n".getBytes());
- packageProposalsList = new RpmPackageProposalsList();
- }
+ @Before
+ public void setUp() throws IOException {
+ Activator.getDefault().getPreferenceStore().setValue(PreferenceConstants.P_RPM_LIST_FILEPATH, "/tmp/pkglist");
+ Files.write(Paths.get("/tmp/pkglist"), "setup\ntest\nrpm\n".getBytes());
+ packageProposalsList = new RpmPackageProposalsList();
+ }
- @Test
- public final void testGetProposals() {
- List<String[]> proposals = packageProposalsList.getProposals("setup");
- if (!(proposals.size() == 1)) {
- fail("getProposals failed, setup package was retrieve as proposals!");
- }
- }
+ @Test
+ public final void testGetProposals() {
+ List<String[]> proposals = packageProposalsList.getProposals("setup");
+ if (!(proposals.size() == 1)) {
+ fail("getProposals failed, setup package was retrieve as proposals!");
+ }
+ }
- @Test
- public final void testGetValue() {
- if (Files.exists(Paths.get("/bin/rpm"))) {
- if (!packageProposalsList.getValue("rpm").startsWith(
- "<b>Name: </b>rpm")) {
- fail("getValue failed, rpm package info doesn't start with '<b>Name:<b> rpm'");
- }
- }
- }
+ @Test
+ public final void testGetValue() {
+ if (Files.exists(Paths.get("/bin/rpm"))) {
+ if (!packageProposalsList.getValue("rpm").startsWith("<b>Name: </b>rpm")) {
+ fail("getValue failed, rpm package info doesn't start with '<b>Name:<b> rpm'");
+ }
+ }
+ }
- @Test
- public final void testGetValue2() {
- if (packageProposalsList.getValue("test").indexOf("test") == -1) {
- fail("getValue failed, test package info doesn't contain 'test'");
- }
- }
+ @Test
+ public final void testGetValue2() {
+ if (packageProposalsList.getValue("test").indexOf("test") == -1) {
+ fail("getValue failed, test package info doesn't contain 'test'");
+ }
+ }
- @Test
- public final void testGetRpmInfo() {
- if (Files.exists(Paths.get("/bin/rpm"))) {
- if (!packageProposalsList.getRpmInfo("rpm").startsWith(
- "<b>Name: </b>rpm")) {
- fail("getRpmInfo failed, rpm package info doesn't start with '<b>Name:<b> rpm'");
- }
- }
- }
+ @Test
+ public final void testGetRpmInfo() {
+ if (Files.exists(Paths.get("/bin/rpm"))) {
+ if (!packageProposalsList.getRpmInfo("rpm").startsWith("<b>Name: </b>rpm")) {
+ fail("getRpmInfo failed, rpm package info doesn't start with '<b>Name:<b> rpm'");
+ }
+ }
+ }
- @Test
- public final void testGetRpmInfo2() {
- if (packageProposalsList.getValue("test").indexOf("test") == -1) {
- fail("getRpmInfo failed, test package info doesn't contain 'test'");
- }
- }
+ @Test
+ public final void testGetRpmInfo2() {
+ if (packageProposalsList.getValue("test").indexOf("test") == -1) {
+ fail("getRpmInfo failed, test package info doesn't contain 'test'");
+ }
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileCompletionProcessorTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileCompletionProcessorTest.java
index 0a109aa56e..ff6f9f37d8 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileCompletionProcessorTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileCompletionProcessorTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008, 2017 Red Hat Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -160,7 +162,7 @@ public class SpecfileCompletionProcessorTest extends FileTestCase {
/**
* Set the potential rpm package list to the given list. Useful for testing
* package proposals.
- *
+ *
* @param packages
*/
private void setPackageList(String[] packages) {
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileTestFailure.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileTestFailure.java
index 8436b6c646..9f6174a97f 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileTestFailure.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileTestFailure.java
@@ -1,32 +1,35 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2010, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
- *******************************************************************************/package org.eclipse.linuxtools.rpm.ui.editor.tests;
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.editor.tests;
import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.source.Annotation;
public class SpecfileTestFailure {
- private Position position;
- private Annotation annotation;
+ private Position position;
+ private Annotation annotation;
- public SpecfileTestFailure(Annotation annotation, Position position) {
- this.annotation = annotation;
- this.position = position;
- }
+ public SpecfileTestFailure(Annotation annotation, Position position) {
+ this.annotation = annotation;
+ this.position = position;
+ }
- public Annotation getAnnotation() {
- return annotation;
- }
+ public Annotation getAnnotation() {
+ return annotation;
+ }
- public Position getPosition() {
- return position;
- }
+ public Position getPosition() {
+ return position;
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileTestProject.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileTestProject.java
index cfc144f218..7bf55a4abe 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileTestProject.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileTestProject.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -23,41 +25,40 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.linuxtools.rpm.core.utils.Utils;
public class SpecfileTestProject {
- private IProject project;
-
- public SpecfileTestProject() throws CoreException {
- IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
- project = workspaceRoot.getProject("TestSpecfileProject");
- if (!project.exists()) {
- project.create(null);
- }
- project.open(null);
- }
-
- public void dispose() throws CoreException {
- project.delete(true, true, null);
- try {
- Utils.runCommandToInputStream("rm", "-f", "/tmp/pkglist");
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- public IFile createFile(String filename) throws CoreException {
- IFile testSpecfile = project.getFile(filename);
- if (!testSpecfile.exists()) {
- testSpecfile.create(null, true, null);
- }
- return testSpecfile;
- }
-
- protected IMarker[] getFailureMarkers() throws CoreException {
- return project.findMarkers(
- "org.eclipse.linuxtools.rpm.ui.editor.specfileerror", false,
- IResource.DEPTH_INFINITE);
- }
-
- public void refresh() throws CoreException {
- project.refreshLocal(IResource.DEPTH_INFINITE, null);
- }
+ private IProject project;
+
+ public SpecfileTestProject() throws CoreException {
+ IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+ project = workspaceRoot.getProject("TestSpecfileProject");
+ if (!project.exists()) {
+ project.create(null);
+ }
+ project.open(null);
+ }
+
+ public void dispose() throws CoreException {
+ project.delete(true, true, null);
+ try {
+ Utils.runCommandToInputStream("rm", "-f", "/tmp/pkglist");
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public IFile createFile(String filename) throws CoreException {
+ IFile testSpecfile = project.getFile(filename);
+ if (!testSpecfile.exists()) {
+ testSpecfile.create(null, true, null);
+ }
+ return testSpecfile;
+ }
+
+ protected IMarker[] getFailureMarkers() throws CoreException {
+ return project.findMarkers("org.eclipse.linuxtools.rpm.ui.editor.specfileerror", false,
+ IResource.DEPTH_INFINITE);
+ }
+
+ public void refresh() throws CoreException {
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/VersionTagTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/VersionTagTest.java
index 977f87f666..b5954dcb7f 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/VersionTagTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/VersionTagTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -16,75 +18,71 @@ import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class VersionTagTest extends FileTestCase {
- @Test
- public void testResolvedSetVersion() {
- String testText = "%define blah notblah\nVersion: %{blah}";
- newFile(testText);
- assertEquals("notblah", specfile.getVersion());
- }
-
- @Test
- public void testVersionTag() {
- String testText = "Version: blah";
- newFile(testText);
- assertEquals("blah", specfile.getVersion());
- }
-
- @Test
- public void testVersionTag2() {
- String testText = "Version: blah";
- newFile(testText);
- assertEquals("blah", specfile.getVersion());
- }
-
- @Test
- public void testNullVersionTag() {
- String testText = "Version: ";
- newFile(testText);
-
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals(testText.length(), failure.getPosition().getLength());
- assertEquals("Version declaration without value.", failure
- .getAnnotation().getText());
- }
-
- @Test
- public void testNullVersionTag2() {
- String testText = "Version: ";
-
- newFile(testText);
-
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals(testText.length(), failure.getPosition().getLength());
- assertEquals("Version declaration without value.", failure
- .getAnnotation().getText());
- }
-
- @Test
- public void testMultipleVersionsTag() {
- String testText = "Version: blah bleh";
- newFile(testText);
-
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals(testText.length(), failure.getPosition().getLength());
- assertEquals("Version cannot have multiple values.", failure
- .getAnnotation().getText());
- }
-
- @Test
- public void testMultipleVersionsTag2() {
- String testText = "Version: blah bleh";
-
- newFile(testText);
-
- SpecfileTestFailure failure = getFailures().get(0);
- assertEquals(0, failure.getPosition().getOffset());
- assertEquals(testText.length(), failure.getPosition().getLength());
- assertEquals("Version cannot have multiple values.", failure
- .getAnnotation().getText());
- }
+ @Test
+ public void testResolvedSetVersion() {
+ String testText = "%define blah notblah\nVersion: %{blah}";
+ newFile(testText);
+ assertEquals("notblah", specfile.getVersion());
+ }
+
+ @Test
+ public void testVersionTag() {
+ String testText = "Version: blah";
+ newFile(testText);
+ assertEquals("blah", specfile.getVersion());
+ }
+
+ @Test
+ public void testVersionTag2() {
+ String testText = "Version: blah";
+ newFile(testText);
+ assertEquals("blah", specfile.getVersion());
+ }
+
+ @Test
+ public void testNullVersionTag() {
+ String testText = "Version: ";
+ newFile(testText);
+
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals(testText.length(), failure.getPosition().getLength());
+ assertEquals("Version declaration without value.", failure.getAnnotation().getText());
+ }
+
+ @Test
+ public void testNullVersionTag2() {
+ String testText = "Version: ";
+
+ newFile(testText);
+
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals(testText.length(), failure.getPosition().getLength());
+ assertEquals("Version declaration without value.", failure.getAnnotation().getText());
+ }
+
+ @Test
+ public void testMultipleVersionsTag() {
+ String testText = "Version: blah bleh";
+ newFile(testText);
+
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals(testText.length(), failure.getPosition().getLength());
+ assertEquals("Version cannot have multiple values.", failure.getAnnotation().getText());
+ }
+
+ @Test
+ public void testMultipleVersionsTag2() {
+ String testText = "Version: blah bleh";
+
+ newFile(testText);
+
+ SpecfileTestFailure failure = getFailures().get(0);
+ assertEquals(0, failure.getPosition().getOffset());
+ assertEquals(testText.length(), failure.getPosition().getLength());
+ assertEquals("Version cannot have multiple values.", failure.getAnnotation().getText());
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/ParserAllTests.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/ParserAllTests.java
index 79d7869093..5bb2e121f9 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/ParserAllTests.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/ParserAllTests.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -14,7 +16,6 @@ import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
-@Suite.SuiteClasses({ SourceComparatorTest.class, SpecfileDefineTest.class,
- SpecfileTest.class })
+@Suite.SuiteClasses({ SourceComparatorTest.class, SpecfileDefineTest.class, SpecfileTest.class })
public class ParserAllTests {
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SourceComparatorTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SourceComparatorTest.java
index b04d575b8b..bfa9f661ce 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SourceComparatorTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SourceComparatorTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -23,34 +25,32 @@ import org.junit.Test;
public class SourceComparatorTest extends FileTestCase {
- @Test
- public void testPatchComparator() {
- String specText = "Patch3: somefilesomewhere.patch" + "\n"
- + "Patch2: someotherfile.patch";
-
- newFile(specText);
- Collection<SpecfileSource> patches = specfile.getPatches();
- int i = 1;
- for (SpecfileSource patch : patches) {
- i++;
- if (i == 2) {
- assertEquals(2, patch.getNumber());
- } else if (i == 3) {
- assertEquals(3, patch.getNumber());
- } else {
- fail();
- }
- }
- }
-
- @Test
- public void testPatchComparator2() {
- String specText = "Patch3: somefilesomewhere.patch" + "\n"
- + "Patch2: someotherfile.patch";
-
- newFile(specText);
- List<SpecfileSource> patches = specfile.getPatches();
- assertEquals(2, patches.get(0).getNumber());
- assertEquals(3, patches.get(1).getNumber());
- }
+ @Test
+ public void testPatchComparator() {
+ String specText = "Patch3: somefilesomewhere.patch" + "\n" + "Patch2: someotherfile.patch";
+
+ newFile(specText);
+ Collection<SpecfileSource> patches = specfile.getPatches();
+ int i = 1;
+ for (SpecfileSource patch : patches) {
+ i++;
+ if (i == 2) {
+ assertEquals(2, patch.getNumber());
+ } else if (i == 3) {
+ assertEquals(3, patch.getNumber());
+ } else {
+ fail();
+ }
+ }
+ }
+
+ @Test
+ public void testPatchComparator2() {
+ String specText = "Patch3: somefilesomewhere.patch" + "\n" + "Patch2: someotherfile.patch";
+
+ newFile(specText);
+ List<SpecfileSource> patches = specfile.getPatches();
+ assertEquals(2, patches.get(0).getNumber());
+ assertEquals(3, patches.get(1).getNumber());
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileDefineTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileDefineTest.java
index 099cf5d21c..c1df85787d 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileDefineTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileDefineTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -27,132 +29,127 @@ import org.junit.Test;
public class SpecfileDefineTest extends FileTestCase {
- private String testSpec =
- // Characters 0 through 17
- "%define blah bleh" + "\n" +
- // Characters 18 through 36
- "%define blah2\tbleh\n" +
- // Characters 37 through 52
- "%define blah3\t1\n" +
- // Characters 53 through 69
- "%define blah4\t\t1\n" +
- // Characters 70 through 83
- "%define blah5" + "\n" +
- // Characters 84 through 95
- "%define 1 2" + "\n" +
- // Characters 96 through 109
- "%define -n -p" + "\n" +
- // Characters 110 through 144
- "%define __find_requires %{SOURCE3}" + "\n" +
- // Characters 145 through 180
- "%global version_suffix 201302130906" + "\n" +
- // Characters 181 through 195
- "Version: 2.3.0" + "\n";
-
- @Override
- @Before
- public void setUp() throws CoreException {
- super.setUp();
- newFile(testSpec);
- specfile = parser.parse(testDocument);
- }
-
- @Test
- public void testResolve() {
- SpecfileDefine define1 = new SpecfileDefine("name", "testspec",
- specfile, specfile.getPackages().getPackage(specfile.getName()));
- specfile.addDefine(define1);
- assertEquals("testspec", ((SpecfileElement) define1).resolve("%{name}"));
- }
-
- @Test
- public void testDefine() {
- SpecfileDefine blahDefine = specfile.getDefine("blah");
- assertEquals(SpecfileDefine.class, blahDefine.getClass());
- assertEquals("blah", blahDefine.getName());
- assertEquals("bleh", blahDefine.getStringValue());
- }
-
- @Test
- public void testDefine2() {
- SpecfileDefine blahDefine = specfile.getDefine("blah2");
- assertEquals(SpecfileDefine.class, blahDefine.getClass());
- assertEquals("blah2", blahDefine.getName());
- assertEquals("bleh", blahDefine.getStringValue());
- }
-
- @Test
- public void testDefine3() {
- SpecfileDefine blahDefine = specfile.getDefine("blah3");
- assertEquals(SpecfileDefine.class, blahDefine.getClass());
- assertEquals("blah3", blahDefine.getName());
- assertEquals(1, blahDefine.getIntValue());
- }
-
- @Test
- public void testDefine4() {
- SpecfileDefine blahDefine = specfile.getDefine("blah4");
- assertEquals(SpecfileDefine.class, blahDefine.getClass());
- assertEquals("blah4", blahDefine.getName());
- assertEquals(1, blahDefine.getIntValue());
- }
-
- @Test
- public void testNonLetterDefinitionName() {
- boolean fail = true;
- for (SpecfileTestFailure failure : getFailures()) {
- if ((failure.getPosition().getOffset() == 84)
- && (failure.getPosition().getLength() == 11)) {
- assertEquals(SpecfileErrorHandler.ANNOTATION_ERROR,
- failure.getAnnotation().getType());
- assertEquals(
- "Definition lvalue must begin with a letter or an underscore.",
- failure.getAnnotation().getText());
- fail = false;
- }
- }
- if (fail) {
- fail();
- }
- }
- @Test
- public void testNonLetterDefinitionName2() {
- boolean fail = true;
- for (SpecfileTestFailure failure : getFailures()) {
- if ((failure.getPosition().getOffset() == 96)
- && (failure.getPosition().getLength() == 13)) {
- assertEquals(SpecfileErrorHandler.ANNOTATION_ERROR,
- failure.getAnnotation().getType());
- assertEquals(
- "Definition lvalue must begin with a letter or an underscore.",
- failure.getAnnotation().getText());
- fail = false;
- }
- }
- if (fail) {
- fail();
- }
- }
-
- @Test
- public void testUnderscoreDefine() {
- SpecfileDefine blahDefine = specfile.getDefine("__find_requires");
- assertEquals(SpecfileDefine.class, blahDefine.getClass());
- assertEquals("__find_requires", blahDefine.getName());
- assertEquals("%{SOURCE3}", blahDefine.getStringValue());
- }
-
- @Test
- public void testWholeWordResolveDefine() {
- String testResolve = UiUtils.resolveDefines(specfile, "%{version}.%{version_suffix}");
- assertEquals(testResolve, "2.3.0.201302130906");
- }
-
- @Test
- public void testResolveSCLMacro() throws CoreException {
- String specText = "Name: %{?scl_prefix}eclipse-jgit" + "\n" + "%{name}";
- newFile(specText);
- assertEquals("eclipse-jgit", RPMQuery.eval(specfile.getName()).trim());
- }
+ private String testSpec =
+ // Characters 0 through 17
+ "%define blah bleh" + "\n" +
+ // Characters 18 through 36
+ "%define blah2\tbleh\n" +
+ // Characters 37 through 52
+ "%define blah3\t1\n" +
+ // Characters 53 through 69
+ "%define blah4\t\t1\n" +
+ // Characters 70 through 83
+ "%define blah5" + "\n" +
+ // Characters 84 through 95
+ "%define 1 2" + "\n" +
+ // Characters 96 through 109
+ "%define -n -p" + "\n" +
+ // Characters 110 through 144
+ "%define __find_requires %{SOURCE3}" + "\n" +
+ // Characters 145 through 180
+ "%global version_suffix 201302130906" + "\n" +
+ // Characters 181 through 195
+ "Version: 2.3.0" + "\n";
+
+ @Override
+ @Before
+ public void setUp() throws CoreException {
+ super.setUp();
+ newFile(testSpec);
+ specfile = parser.parse(testDocument);
+ }
+
+ @Test
+ public void testResolve() {
+ SpecfileDefine define1 = new SpecfileDefine("name", "testspec", specfile,
+ specfile.getPackages().getPackage(specfile.getName()));
+ specfile.addDefine(define1);
+ assertEquals("testspec", ((SpecfileElement) define1).resolve("%{name}"));
+ }
+
+ @Test
+ public void testDefine() {
+ SpecfileDefine blahDefine = specfile.getDefine("blah");
+ assertEquals(SpecfileDefine.class, blahDefine.getClass());
+ assertEquals("blah", blahDefine.getName());
+ assertEquals("bleh", blahDefine.getStringValue());
+ }
+
+ @Test
+ public void testDefine2() {
+ SpecfileDefine blahDefine = specfile.getDefine("blah2");
+ assertEquals(SpecfileDefine.class, blahDefine.getClass());
+ assertEquals("blah2", blahDefine.getName());
+ assertEquals("bleh", blahDefine.getStringValue());
+ }
+
+ @Test
+ public void testDefine3() {
+ SpecfileDefine blahDefine = specfile.getDefine("blah3");
+ assertEquals(SpecfileDefine.class, blahDefine.getClass());
+ assertEquals("blah3", blahDefine.getName());
+ assertEquals(1, blahDefine.getIntValue());
+ }
+
+ @Test
+ public void testDefine4() {
+ SpecfileDefine blahDefine = specfile.getDefine("blah4");
+ assertEquals(SpecfileDefine.class, blahDefine.getClass());
+ assertEquals("blah4", blahDefine.getName());
+ assertEquals(1, blahDefine.getIntValue());
+ }
+
+ @Test
+ public void testNonLetterDefinitionName() {
+ boolean fail = true;
+ for (SpecfileTestFailure failure : getFailures()) {
+ if ((failure.getPosition().getOffset() == 84) && (failure.getPosition().getLength() == 11)) {
+ assertEquals(SpecfileErrorHandler.ANNOTATION_ERROR, failure.getAnnotation().getType());
+ assertEquals("Definition lvalue must begin with a letter or an underscore.",
+ failure.getAnnotation().getText());
+ fail = false;
+ }
+ }
+ if (fail) {
+ fail();
+ }
+ }
+
+ @Test
+ public void testNonLetterDefinitionName2() {
+ boolean fail = true;
+ for (SpecfileTestFailure failure : getFailures()) {
+ if ((failure.getPosition().getOffset() == 96) && (failure.getPosition().getLength() == 13)) {
+ assertEquals(SpecfileErrorHandler.ANNOTATION_ERROR, failure.getAnnotation().getType());
+ assertEquals("Definition lvalue must begin with a letter or an underscore.",
+ failure.getAnnotation().getText());
+ fail = false;
+ }
+ }
+ if (fail) {
+ fail();
+ }
+ }
+
+ @Test
+ public void testUnderscoreDefine() {
+ SpecfileDefine blahDefine = specfile.getDefine("__find_requires");
+ assertEquals(SpecfileDefine.class, blahDefine.getClass());
+ assertEquals("__find_requires", blahDefine.getName());
+ assertEquals("%{SOURCE3}", blahDefine.getStringValue());
+ }
+
+ @Test
+ public void testWholeWordResolveDefine() {
+ String testResolve = UiUtils.resolveDefines(specfile, "%{version}.%{version_suffix}");
+ assertEquals(testResolve, "2.3.0.201302130906");
+ }
+
+ @Test
+ public void testResolveSCLMacro() throws CoreException {
+ String specText = "Name: %{?scl_prefix}eclipse-jgit" + "\n" + "%{name}";
+ newFile(specText);
+ assertEquals("eclipse-jgit", RPMQuery.eval(specfile.getName()).trim());
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileTest.java
index b18d82c82f..796e59c721 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileTest.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileTest.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -22,60 +24,64 @@ import org.eclipse.linuxtools.rpm.ui.editor.tests.FileTestCase;
import org.junit.Test;
public class SpecfileTest extends FileTestCase {
- @Test
- public void testGetLine() throws BadLocationException {
- String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
- newFile(specText);
- assertEquals("%patch3", specfile.getLine(1));
- }
- @Test
- public void testChangeLine() throws BadLocationException {
- String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
- newFile(specText);
- assertEquals("%patch3", specfile.getLine(1));
- specfile.changeLine(1, "%patch4");
- assertEquals("%patch4", specfile.getLine(1));
- }
- @Test
- public void testChangeLine2() throws BadLocationException {
- String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
- newFile(specText);
- assertEquals("Patch3: somefilesomewhere.patch", specfile.getLine(0));
- specfile.changeLine(0, "Patch4: somefilesomewhere.patch");
- assertEquals("Patch4: somefilesomewhere.patch", specfile.getLine(0));
- }
- @Test
- public void testChangeLine3() throws BadLocationException {
- String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
- newFile(specText);
- assertEquals("Patch3: somefilesomewhere.patch", specfile.getLine(0));
- specfile.changeLine(0, "andrew");
- assertEquals("andrew", specfile.getLine(0));
- }
- @Test
- public void testOrganizePatches() throws BadLocationException {
- String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
- newFile(specText);
- assertEquals("Patch3: somefilesomewhere.patch", specfile.getLine(0));
- assertEquals("%patch3", specfile.getLine(1));
- assertEquals(0, specfile.getPatch(3).getLineNumber());
- SpecfileSource patch = specfile.getPatch(3);
- List<Integer> linesUsed = patch.getLinesUsed();
- assertEquals(1, linesUsed.size());
- Integer lineUsedNumber = linesUsed.get(0);
- assertEquals(1, lineUsedNumber.intValue());
- specfile.organizePatches();
- assertEquals("Patch0: somefilesomewhere.patch", specfile.getLine(0));
- assertEquals("%patch0", specfile.getLine(1));
- assertEquals(0, specfile.getPatch(0).getLineNumber());
- patch = specfile.getPatch(3);
- assertNull(patch);
- patch = specfile.getPatch(0);
- assertEquals(0, patch.getNumber());
- linesUsed = patch.getLinesUsed();
- assertEquals(1, linesUsed.size());
- lineUsedNumber = linesUsed.get(0);
- assertEquals(1, lineUsedNumber.intValue());
- }
+ @Test
+ public void testGetLine() throws BadLocationException {
+ String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
+ newFile(specText);
+ assertEquals("%patch3", specfile.getLine(1));
+ }
+
+ @Test
+ public void testChangeLine() throws BadLocationException {
+ String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
+ newFile(specText);
+ assertEquals("%patch3", specfile.getLine(1));
+ specfile.changeLine(1, "%patch4");
+ assertEquals("%patch4", specfile.getLine(1));
+ }
+
+ @Test
+ public void testChangeLine2() throws BadLocationException {
+ String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
+ newFile(specText);
+ assertEquals("Patch3: somefilesomewhere.patch", specfile.getLine(0));
+ specfile.changeLine(0, "Patch4: somefilesomewhere.patch");
+ assertEquals("Patch4: somefilesomewhere.patch", specfile.getLine(0));
+ }
+
+ @Test
+ public void testChangeLine3() throws BadLocationException {
+ String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
+ newFile(specText);
+ assertEquals("Patch3: somefilesomewhere.patch", specfile.getLine(0));
+ specfile.changeLine(0, "andrew");
+ assertEquals("andrew", specfile.getLine(0));
+ }
+
+ @Test
+ public void testOrganizePatches() throws BadLocationException {
+ String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
+ newFile(specText);
+ assertEquals("Patch3: somefilesomewhere.patch", specfile.getLine(0));
+ assertEquals("%patch3", specfile.getLine(1));
+ assertEquals(0, specfile.getPatch(3).getLineNumber());
+ SpecfileSource patch = specfile.getPatch(3);
+ List<Integer> linesUsed = patch.getLinesUsed();
+ assertEquals(1, linesUsed.size());
+ Integer lineUsedNumber = linesUsed.get(0);
+ assertEquals(1, lineUsedNumber.intValue());
+ specfile.organizePatches();
+ assertEquals("Patch0: somefilesomewhere.patch", specfile.getLine(0));
+ assertEquals("%patch0", specfile.getLine(1));
+ assertEquals(0, specfile.getPatch(0).getLineNumber());
+ patch = specfile.getPatch(3);
+ assertNull(patch);
+ patch = specfile.getPatch(0);
+ assertEquals(0, patch.getNumber());
+ linesUsed = patch.getLinesUsed();
+ assertEquals(1, linesUsed.size());
+ lineUsedNumber = linesUsed.get(0);
+ assertEquals(1, lineUsedNumber.intValue());
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/plugin.xml b/rpm/org.eclipse.linuxtools.rpm.ui.editor/plugin.xml
index 2d46afe592..290cd4fa4c 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/plugin.xml
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/plugin.xml
@@ -1,13 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?><!--
- Copyright (c) 2009, 2017 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+<?eclipse version="3.2"?>
+<!--
+ Copyright (c) 2009, 2018 Red Hat, Inc.
+
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
- Contributors:
- Red Hat - initial API and implementation
+ Contributors:
+ Red Hat - initial API and implementation
-->
<plugin>
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/pom.xml b/rpm/org.eclipse.linuxtools.rpm.ui.editor/pom.xml
index 63d49c9c73..233960fdb1 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/pom.xml
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011, 2017 Red Hat, Inc.
-
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (C) 2011, 2018 Red Hat, Inc.
+
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/Activator.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/Activator.java
index 5cc1153b84..d4b5cd253b 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/Activator.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/Activator.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2016 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -161,8 +163,7 @@ public class Activator extends AbstractUIPlugin {
/**
* Get a <code>Image</code> object for the given relative path.
*
- * @param imageRelativePath
- * The relative path to the image.
+ * @param imageRelativePath The relative path to the image.
* @return a <code>Image</code>
*/
public Image getImage(String imageRelativePath) {
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/ISpecfileColorConstants.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/ISpecfileColorConstants.java
index 0c63306317..09cc412069 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/ISpecfileColorConstants.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/ISpecfileColorConstants.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/ISpecfileSpecialSymbols.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/ISpecfileSpecialSymbols.java
index d462aeb295..77b5416460 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/ISpecfileSpecialSymbols.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/ISpecfileSpecialSymbols.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -15,22 +17,21 @@ package org.eclipse.linuxtools.internal.rpm.ui.editor;
*
*/
public interface ISpecfileSpecialSymbols {
- /**
- * Identifier for macro start - long one.
- */
- String MACRO_START_LONG = "%{"; //$NON-NLS-1$
- /**
- * Identifier for macro end - long one.
- */
- String MACRO_END_LONG = "}"; //$NON-NLS-1$
+ /**
+ * Identifier for macro start - long one.
+ */
+ String MACRO_START_LONG = "%{"; //$NON-NLS-1$
+ /**
+ * Identifier for macro end - long one.
+ */
+ String MACRO_END_LONG = "}"; //$NON-NLS-1$
- /**
- * Identifier for macro start - short one.
- */
- String MACRO_START_SHORT = "%"; //$NON-NLS-1$
- /**
- * Identifier for comment start. Comment is from this symbol till the line
- * end.
- */
- String COMMENT_START = "#"; //$NON-NLS-1$
+ /**
+ * Identifier for macro start - short one.
+ */
+ String MACRO_START_SHORT = "%"; //$NON-NLS-1$
+ /**
+ * Identifier for comment start. Comment is from this symbol till the line end.
+ */
+ String COMMENT_START = "#"; //$NON-NLS-1$
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/Messages.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/Messages.java
index 027a3c0704..07114bff0e 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/Messages.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/Messages.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -13,28 +15,28 @@ package org.eclipse.linuxtools.internal.rpm.ui.editor;
import org.eclipse.osgi.util.NLS;
public final class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.rpm.ui.editor.messages"; //$NON-NLS-1$
- public static String RpmMacroProposalsList_0;
- public static String RpmPackageBuildProposalsJob_0;
- public static String RpmPackageBuildProposalsJob_1;
- public static String RpmPackageBuildProposalsJob_2;
- public static String RpmPackageBuildProposalsJob_3;
- public static String RpmPackageBuildProposalsJob_NonZeroReturn;
- public static String RpmPackageProposalsList_0;
- public static String RpmPackageProposalsList_1;
- public static String RpmPackageProposalsList_2;
- public static String RpmPackageProposalsList_3;
- public static String SpecfileConfiguration_0;
- public static String SpecfileEditor_0;
- public static String SpecfileEditor_1;
- public static String SpecfileEditor_2;
- public static String SpecfileLog_0;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.rpm.ui.editor.messages"; //$NON-NLS-1$
+ public static String RpmMacroProposalsList_0;
+ public static String RpmPackageBuildProposalsJob_0;
+ public static String RpmPackageBuildProposalsJob_1;
+ public static String RpmPackageBuildProposalsJob_2;
+ public static String RpmPackageBuildProposalsJob_3;
+ public static String RpmPackageBuildProposalsJob_NonZeroReturn;
+ public static String RpmPackageProposalsList_0;
+ public static String RpmPackageProposalsList_1;
+ public static String RpmPackageProposalsList_2;
+ public static String RpmPackageProposalsList_3;
+ public static String SpecfileConfiguration_0;
+ public static String SpecfileEditor_0;
+ public static String SpecfileEditor_1;
+ public static String SpecfileEditor_2;
+ public static String SpecfileLog_0;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
- private Messages() {
- super();
- }
+ private Messages() {
+ super();
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RPMHandlerUtils.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RPMHandlerUtils.java
index 75d7c6793f..cfd341334b 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RPMHandlerUtils.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RPMHandlerUtils.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -36,76 +38,79 @@ import org.eclipse.ui.part.EditorPart;
*/
public class RPMHandlerUtils {
- /**
- * Utility classes should not have a public or default constructor.
- */
- private RPMHandlerUtils() {}
+ /**
+ * Utility classes should not have a public or default constructor.
+ */
+ private RPMHandlerUtils() {
+ }
- /**
- * Extract the IResource that was selected when the event was fired.
- * @param event The fired execution event.
- * @return The resource that was selected.
- */
- public static IResource getResource(ExecutionEvent event) {
- IWorkbenchPart part = HandlerUtil.getActivePart(event);
- if (part == null) {
- return null;
- }
- if (part instanceof EditorPart) {
- IEditorInput input = ((EditorPart) part).getEditorInput();
- if (input instanceof IFileEditorInput) {
- return ((IFileEditorInput) input).getFile();
- }
- return null;
- }
- IWorkbenchSite site = part.getSite();
- if (site == null) {
- return null;
- }
- ISelectionProvider provider = site.getSelectionProvider();
- if (provider == null) {
- return null;
- }
- ISelection selection = provider.getSelection();
- if (selection instanceof IStructuredSelection) {
- Object element = ((IStructuredSelection) selection)
- .getFirstElement();
- if (element instanceof IResource) {
- return (IResource) element;
- } else if (element instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable) element;
- return adaptable.getAdapter(IResource.class);
- } else {
- return null;
- }
- }
- return null;
- }
+ /**
+ * Extract the IResource that was selected when the event was fired.
+ *
+ * @param event The fired execution event.
+ * @return The resource that was selected.
+ */
+ public static IResource getResource(ExecutionEvent event) {
+ IWorkbenchPart part = HandlerUtil.getActivePart(event);
+ if (part == null) {
+ return null;
+ }
+ if (part instanceof EditorPart) {
+ IEditorInput input = ((EditorPart) part).getEditorInput();
+ if (input instanceof IFileEditorInput) {
+ return ((IFileEditorInput) input).getFile();
+ }
+ return null;
+ }
+ IWorkbenchSite site = part.getSite();
+ if (site == null) {
+ return null;
+ }
+ ISelectionProvider provider = site.getSelectionProvider();
+ if (provider == null) {
+ return null;
+ }
+ ISelection selection = provider.getSelection();
+ if (selection instanceof IStructuredSelection) {
+ Object element = ((IStructuredSelection) selection).getFirstElement();
+ if (element instanceof IResource) {
+ return (IResource) element;
+ } else if (element instanceof IAdaptable) {
+ IAdaptable adaptable = (IAdaptable) element;
+ return adaptable.getAdapter(IResource.class);
+ } else {
+ return null;
+ }
+ }
+ return null;
+ }
- /**
- * Get an RPMProject for the resource creating a new instance to an RPMProject.
- * @param resource The resource to check its parent project.
- * @return The RPMProject of the resource passed in.
- */
- public static RPMProject getRPMProject(IResource resource) {
- RPMProject rc = null;
+ /**
+ * Get an RPMProject for the resource creating a new instance to an RPMProject.
+ *
+ * @param resource The resource to check its parent project.
+ * @return The RPMProject of the resource passed in.
+ */
+ public static RPMProject getRPMProject(IResource resource) {
+ RPMProject rc = null;
- try {
- IProject parentProject = resource.getProject();
+ try {
+ IProject parentProject = resource.getProject();
- // determine if project selected is an RPMProject
- if (parentProject.hasNature(IRPMConstants.RPM_NATURE_ID)) {
- if (parentProject.getPersistentProperty(new QualifiedName(IRPMConstants.RPM_CORE_ID, IRPMConstants.SPECS_FOLDER)) != null){
- rc = new RPMProject(parentProject, RPMProjectLayout.RPMBUILD);
- } else {
- rc = new RPMProject(parentProject, RPMProjectLayout.FLAT);
- }
- } else {
- rc = new RPMProject(parentProject, RPMProjectLayout.FLAT);
- }
- } catch (CoreException e) {
- SpecfileLog.logError(Messages.RPMHandlerUtils_cannotCreateRPMProject, e);
- }
- return rc;
- }
+ // determine if project selected is an RPMProject
+ if (parentProject.hasNature(IRPMConstants.RPM_NATURE_ID)) {
+ if (parentProject.getPersistentProperty(
+ new QualifiedName(IRPMConstants.RPM_CORE_ID, IRPMConstants.SPECS_FOLDER)) != null) {
+ rc = new RPMProject(parentProject, RPMProjectLayout.RPMBUILD);
+ } else {
+ rc = new RPMProject(parentProject, RPMProjectLayout.FLAT);
+ }
+ } else {
+ rc = new RPMProject(parentProject, RPMProjectLayout.FLAT);
+ }
+ } catch (CoreException e) {
+ SpecfileLog.logError(Messages.RPMHandlerUtils_cannotCreateRPMProject, e);
+ }
+ return rc;
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RPMUtils.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RPMUtils.java
index 6598c80b7e..0f065c328f 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RPMUtils.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RPMUtils.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013, 2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -42,12 +44,9 @@ public class RPMUtils {
/**
* Show an error dialog.
*
- * @param shell
- * A valid shell
- * @param title
- * The error dialog title
- * @param message
- * The message to be displayed.
+ * @param shell A valid shell
+ * @param title The error dialog title
+ * @param message The message to be displayed.
*/
public static void showErrorDialog(final Shell shell, final String title, final String message) {
PlatformUI.getWorkbench().getDisplay().asyncExec(() -> MessageDialog.openError(shell, title, message));
@@ -56,8 +55,7 @@ public class RPMUtils {
/**
* Check if the line passed in is a valid URL.
*
- * @param line
- * The line to check if is a valid URL.
+ * @param line The line to check if is a valid URL.
* @return True if valid URL, false otherwise.
*/
public static boolean isValidUrl(String line) {
@@ -72,8 +70,7 @@ public class RPMUtils {
/**
* Get the file from the URL if any.
*
- * @param url
- * The URL to get the file from.
+ * @param url The URL to get the file from.
* @return Return the filename.
*/
public static String getURLFilename(String url) {
@@ -92,15 +89,12 @@ public class RPMUtils {
}
/**
- * Check if the file exists within the current project. It will first check
- * the root of the project and then the sources. If the file cannot be found
- * in either, return false. An empty file name would immediately return
- * false.
+ * Check if the file exists within the current project. It will first check the
+ * root of the project and then the sources. If the file cannot be found in
+ * either, return false. An empty file name would immediately return false.
*
- * @param original
- * A file in the project.
- * @param fileName
- * The file name being searched.
+ * @param original A file in the project.
+ * @param fileName The file name being searched.
*
* @return True if the file exists.
*/
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmMacroOccurrencesUpdater.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmMacroOccurrencesUpdater.java
index 5ac29eddec..46b6ee3d6f 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmMacroOccurrencesUpdater.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmMacroOccurrencesUpdater.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 Alphonse Van Assche and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -39,8 +41,7 @@ public class RpmMacroOccurrencesUpdater implements ISelectionChangedListener {
/**
* Creates a new instance on editor <code>specfileEditor</code>.
*
- * @param specfileEditor
- * The editor to mark occurrences on.
+ * @param specfileEditor The editor to mark occurrences on.
*/
public RpmMacroOccurrencesUpdater(SpecfileEditor specfileEditor) {
((IPostSelectionProvider) specfileEditor.getSelectionProvider()).addPostSelectionChangedListener(this);
@@ -55,8 +56,7 @@ public class RpmMacroOccurrencesUpdater implements ISelectionChangedListener {
/**
* Updates the drawn annotations.
*
- * @param viewer
- * The viewer to get the document and annotation model from
+ * @param viewer The viewer to get the document and annotation model from
*/
public void update(ISourceViewer viewer) {
try {
@@ -100,8 +100,7 @@ public class RpmMacroOccurrencesUpdater implements ISelectionChangedListener {
/**
* Removes the previous set of annotations from the annotation model.
*
- * @param model
- * the annotation model
+ * @param model the annotation model
*/
private void removeOldAnnotations(IAnnotationModel model) {
for (Annotation annotation : fOldAnnotations) {
@@ -113,8 +112,7 @@ public class RpmMacroOccurrencesUpdater implements ISelectionChangedListener {
/**
* Checks if <code>word</code> is an macro.
*
- * @param word
- * the word to check
+ * @param word the word to check
*
* @return <code>true</code> if <code>word</code> is an macro,
* <code>false</code> otherwise
@@ -154,10 +152,8 @@ public class RpmMacroOccurrencesUpdater implements ISelectionChangedListener {
* Returns <code>true</code> if <code>macro</code> equals the word
* <code>current</code>.
*
- * @param macro
- * the <code>macro</code> to check
- * @param current
- * the word to look for
+ * @param macro the <code>macro</code> to check
+ * @param current the word to look for
*
* @return <code>true</code> if <code>macro</code> contains the word
* <code>current</code>,<code>false</code> if not
@@ -169,14 +165,11 @@ public class RpmMacroOccurrencesUpdater implements ISelectionChangedListener {
/**
* Returns the word at the current selection / caret position.
*
- * @param selection
- * the selection
- * @param document
- * the document
+ * @param selection the selection
+ * @param document the document
* @return the currently selected text, or the word at the caret if the
* selection has length 0
- * @throws BadLocationException
- * if accessing the document fails
+ * @throws BadLocationException if accessing the document fails
*/
private String getWordAtSelection(ISelection selection, IDocument document) throws BadLocationException {
String word;
@@ -213,12 +206,9 @@ public class RpmMacroOccurrencesUpdater implements ISelectionChangedListener {
* document. Also stores the created annotations in
* <code>fOldAnnotations</code>.
*
- * @param macro
- * the word to look for
- * @param document
- * the document
- * @param model
- * the annotation model
+ * @param macro the word to look for
+ * @param document the document
+ * @param model the annotation model
*/
private void createNewAnnotations(String macro, String hoverContent, IDocument document, IAnnotationModel model) {
String content = document.get().toLowerCase();
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmMacroProposalsList.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmMacroProposalsList.java
index bc63312579..24275e2f95 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmMacroProposalsList.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmMacroProposalsList.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007 Alphonse Van Assche.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -25,196 +27,188 @@ import org.eclipse.linuxtools.internal.rpm.ui.editor.scanners.SpecfileScanner;
import org.eclipse.linuxtools.rpm.core.utils.Utils;
/**
- * This class is used to retrieve and manage the RPM macro
- * proposals list.
+ * This class is used to retrieve and manage the RPM macro proposals list.
*
*/
public class RpmMacroProposalsList {
- private static final String EMPTY_STRING = ""; //$NON-NLS-1$
-
- private Map<String, String> macroMap = new HashMap<>();
-
- private String toStringStr;
-
- /**
- * Default contructor
- */
- public RpmMacroProposalsList() {
- buildMacroList();
- }
-
- /**
- * Build the macro list.
- */
- public final void buildMacroList() {
- for (String definedMacro: SpecfileScanner.DEFINED_MACROS){
- macroMap.put(definedMacro, Messages.RpmMacroProposalsList_0);
- //TODO find way to provide info about buildin macros.
- }
- String macroProposalsPaths = Activator.getDefault()
- .getPreferenceStore().getString(
- PreferenceConstants.P_MACRO_PROPOSALS_FILESPATH);
- String[] paths = macroProposalsPaths.split(";"); //$NON-NLS-1$
- // paths must be reversed because the last value added
- // into a Map overwrites the first.
- paths = reverseStringArray(paths);
- for (String path : paths) {
- if (!path.equals(EMPTY_STRING)) {
- File pathFile = new File(path);
- if (pathFile.exists()) {
- if (pathFile.isDirectory()) {
- File[] macrosFiles = pathFile.listFiles();
- for (File macrosFile : macrosFiles) {
- addMacroToMap(macrosFile.getAbsolutePath());
- }
- } else {
- addMacroToMap(path);
- }
- }
- }
- }
- }
-
- /**
- * Add macro definition to the map
- *
- * @param filename
- * macro file definition.
- */
- private void addMacroToMap(String filename) {
- String line = EMPTY_STRING;
- try (BufferedReader reader = new BufferedReader(new InputStreamReader(
- new FileInputStream(filename)))){
- line = reader.readLine();
- String key = EMPTY_STRING, value = EMPTY_STRING;
- while (line != null) {
- if (line.startsWith("%")) { //$NON-NLS-1$
- String[] item = line.split("\t+| ", 2); //$NON-NLS-1$
- try {
- // Get values on more than one line
- if (line.trim().endsWith("\\")) { //$NON-NLS-1$
- value = "\n"; //$NON-NLS-1$
- boolean isKeyLine = true;
- while (line.trim().endsWith("\\")) { //$NON-NLS-1$
- if (isKeyLine) {
- isKeyLine = false;
- key = item[0];
- if (item.length > 1) {
- value += item[1].replaceAll("\\\\", "\n\n"); //$NON-NLS-1$//$NON-NLS-2$
- }
- } else {
- value += line.substring(0,
- line.length() - 1).trim()
- + "\n\t"; //$NON-NLS-1$
- }
- line = reader.readLine();
- }
- } else {
- key = item[0];
- value = item[1];
- }
- key = key.trim();
- value = value.trim();
- macroMap.put(key, value);
- toStringStr += key + ": " + value + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
- } catch (Exception e) {
- line = reader.readLine();
- continue;
- }
- value = EMPTY_STRING;
- key = EMPTY_STRING;
- }
- line = reader.readLine();
- }
- } catch (IOException e) {
- SpecfileLog.logError(e);
- }
- }
-
- /**
- * Reverse a <code>String</code> array.
- *
- * @param stringArrayToReverse
- * the string array to reverse.
- * @return the reversed <code>String</code> array.
- */
- private String[] reverseStringArray(String[] stringArrayToReverse) {
- int left = 0;
- int right = stringArrayToReverse.length - 1;
- while (left < right) {
- String tmp = stringArrayToReverse[left];
- stringArrayToReverse[left] = stringArrayToReverse[right];
- stringArrayToReverse[right] = tmp;
- left++;
- right--;
- }
- return stringArrayToReverse;
- }
-
- /**
- * Get proposals for a given prefix
- *
- * @param prefix The prefix to search.
- * @return a <code>Map</code> of proposals.
- */
- public Map<String, String> getProposals(String prefix) {
- Map<String, String> proposalsMap = new HashMap<>(macroMap.size());
- for (Map.Entry<String, String> entry: macroMap.entrySet()) {
- // Get proposals for macro begin with { char too.
- if (entry.getKey().startsWith(prefix.replaceFirst("\\{", EMPTY_STRING))) { //$NON-NLS-1$
- proposalsMap.put(entry.getKey(), entry.getValue());
- }
- }
- // Sort proposals
- return new TreeMap<>(proposalsMap);
- }
-
- /**
- * Get the value for a given macro.
- *
- * @param key Key to retrieve value.
- * @return a string representation of the value
- */
- public String getValue(String key) {
- String value = macroMap.get("%" + key); //$NON-NLS-1$
- // get proposals for macro contain ? too.
- if (value == null) {
- value = macroMap.get(("%" + key).replaceFirst("\\?", EMPTY_STRING)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return value;
- }
-
- /**
- * Find a key in the macroMap
- *
- * @param keyToFind The key to find.
- * @return return the value
- */
- public boolean findKey(String keyToFind) {
- return macroMap.containsKey(keyToFind);
- }
-
- /**
- * Return the ouput of the <code>rpm --eval</code> command for a given
- * macro.
- *
- * @param macroName The macro name to eval.
- * @return the resolved macro content.
- */
- public static String getMacroEval(String macroName) {
- String eval = EMPTY_STRING;
- try {
- eval = Utils.runCommandToString( "rpm", "--eval", macroName); //$NON-NLS-1$//$NON-NLS-2$
- } catch (IOException e) {
- SpecfileLog.logError(e);
- }
- return eval.trim();
- }
-
- @Override
- public String toString() {
- return toStringStr;
- }
+ private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+ private Map<String, String> macroMap = new HashMap<>();
+
+ private String toStringStr;
+
+ /**
+ * Default contructor
+ */
+ public RpmMacroProposalsList() {
+ buildMacroList();
+ }
+
+ /**
+ * Build the macro list.
+ */
+ public final void buildMacroList() {
+ for (String definedMacro : SpecfileScanner.DEFINED_MACROS) {
+ macroMap.put(definedMacro, Messages.RpmMacroProposalsList_0);
+ // TODO find way to provide info about buildin macros.
+ }
+ String macroProposalsPaths = Activator.getDefault().getPreferenceStore()
+ .getString(PreferenceConstants.P_MACRO_PROPOSALS_FILESPATH);
+ String[] paths = macroProposalsPaths.split(";"); //$NON-NLS-1$
+ // paths must be reversed because the last value added
+ // into a Map overwrites the first.
+ paths = reverseStringArray(paths);
+ for (String path : paths) {
+ if (!path.equals(EMPTY_STRING)) {
+ File pathFile = new File(path);
+ if (pathFile.exists()) {
+ if (pathFile.isDirectory()) {
+ File[] macrosFiles = pathFile.listFiles();
+ for (File macrosFile : macrosFiles) {
+ addMacroToMap(macrosFile.getAbsolutePath());
+ }
+ } else {
+ addMacroToMap(path);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Add macro definition to the map
+ *
+ * @param filename macro file definition.
+ */
+ private void addMacroToMap(String filename) {
+ String line = EMPTY_STRING;
+ try (BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(filename)))) {
+ line = reader.readLine();
+ String key = EMPTY_STRING, value = EMPTY_STRING;
+ while (line != null) {
+ if (line.startsWith("%")) { //$NON-NLS-1$
+ String[] item = line.split("\t+| ", 2); //$NON-NLS-1$
+ try {
+ // Get values on more than one line
+ if (line.trim().endsWith("\\")) { //$NON-NLS-1$
+ value = "\n"; //$NON-NLS-1$
+ boolean isKeyLine = true;
+ while (line.trim().endsWith("\\")) { //$NON-NLS-1$
+ if (isKeyLine) {
+ isKeyLine = false;
+ key = item[0];
+ if (item.length > 1) {
+ value += item[1].replaceAll("\\\\", "\n\n"); //$NON-NLS-1$//$NON-NLS-2$
+ }
+ } else {
+ value += line.substring(0, line.length() - 1).trim() + "\n\t"; //$NON-NLS-1$
+ }
+ line = reader.readLine();
+ }
+ } else {
+ key = item[0];
+ value = item[1];
+ }
+ key = key.trim();
+ value = value.trim();
+ macroMap.put(key, value);
+ toStringStr += key + ": " + value + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
+ } catch (Exception e) {
+ line = reader.readLine();
+ continue;
+ }
+ value = EMPTY_STRING;
+ key = EMPTY_STRING;
+ }
+ line = reader.readLine();
+ }
+ } catch (IOException e) {
+ SpecfileLog.logError(e);
+ }
+ }
+
+ /**
+ * Reverse a <code>String</code> array.
+ *
+ * @param stringArrayToReverse the string array to reverse.
+ * @return the reversed <code>String</code> array.
+ */
+ private String[] reverseStringArray(String[] stringArrayToReverse) {
+ int left = 0;
+ int right = stringArrayToReverse.length - 1;
+ while (left < right) {
+ String tmp = stringArrayToReverse[left];
+ stringArrayToReverse[left] = stringArrayToReverse[right];
+ stringArrayToReverse[right] = tmp;
+ left++;
+ right--;
+ }
+ return stringArrayToReverse;
+ }
+
+ /**
+ * Get proposals for a given prefix
+ *
+ * @param prefix The prefix to search.
+ * @return a <code>Map</code> of proposals.
+ */
+ public Map<String, String> getProposals(String prefix) {
+ Map<String, String> proposalsMap = new HashMap<>(macroMap.size());
+ for (Map.Entry<String, String> entry : macroMap.entrySet()) {
+ // Get proposals for macro begin with { char too.
+ if (entry.getKey().startsWith(prefix.replaceFirst("\\{", EMPTY_STRING))) { //$NON-NLS-1$
+ proposalsMap.put(entry.getKey(), entry.getValue());
+ }
+ }
+ // Sort proposals
+ return new TreeMap<>(proposalsMap);
+ }
+
+ /**
+ * Get the value for a given macro.
+ *
+ * @param key Key to retrieve value.
+ * @return a string representation of the value
+ */
+ public String getValue(String key) {
+ String value = macroMap.get("%" + key); //$NON-NLS-1$
+ // get proposals for macro contain ? too.
+ if (value == null) {
+ value = macroMap.get(("%" + key).replaceFirst("\\?", EMPTY_STRING)); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ return value;
+ }
+
+ /**
+ * Find a key in the macroMap
+ *
+ * @param keyToFind The key to find.
+ * @return return the value
+ */
+ public boolean findKey(String keyToFind) {
+ return macroMap.containsKey(keyToFind);
+ }
+
+ /**
+ * Return the ouput of the <code>rpm --eval</code> command for a given macro.
+ *
+ * @param macroName The macro name to eval.
+ * @return the resolved macro content.
+ */
+ public static String getMacroEval(String macroName) {
+ String eval = EMPTY_STRING;
+ try {
+ eval = Utils.runCommandToString("rpm", "--eval", macroName); //$NON-NLS-1$//$NON-NLS-2$
+ } catch (IOException e) {
+ SpecfileLog.logError(e);
+ }
+ return eval.trim();
+ }
+
+ @Override
+ public String toString() {
+ return toStringStr;
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmPackageBuildProposalsJob.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmPackageBuildProposalsJob.java
index 50df8a563f..0d6e04228d 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmPackageBuildProposalsJob.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmPackageBuildProposalsJob.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2016 Alphonse Van Assche.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -130,8 +132,7 @@ public final class RpmPackageBuildProposalsJob extends Job {
* Run the Job if it's needed according with the configuration set in the
* preference page.
*
- * @param async
- * Whether to run synchronously or asynchronously.
+ * @param async Whether to run synchronously or asynchronously.
*/
public static void update(boolean async) {
boolean runJob = false;
@@ -199,9 +200,8 @@ public final class RpmPackageBuildProposalsJob extends Job {
/**
* Enable and disable the property change listener.
*
- * @param activated
- * Flag indicating whether the listener to be enabled or
- * disabled.
+ * @param activated Flag indicating whether the listener to be enabled or
+ * disabled.
*/
public static void setPropertyChangeListener(boolean activated) {
if (activated) {
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmPackageProposalsList.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmPackageProposalsList.java
index ad8165165e..73cb73fe76 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmPackageProposalsList.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmPackageProposalsList.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2016 Alphonse Van Assche.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -73,8 +75,8 @@ public class RpmPackageProposalsList {
}
}
/*
- * Show RPM informations only if the proposal list is less than the
- * limit set in the RPM proposals preference page.
+ * Show RPM informations only if the proposal list is less than the limit set in
+ * the RPM proposals preference page.
*/
if (proposalsList.size() < rpmpkgsMaxProposals) {
List<String[]> proposalsListWithInfo = new ArrayList<>(proposalsList.size());
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmSections.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmSections.java
index dad300d4ab..0b170ed7f8 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmSections.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmSections.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008 Alexander Kurtakov.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Alexander Kurtakov.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alexander Kurtakov - initial API and implementation
@@ -15,20 +17,20 @@ package org.eclipse.linuxtools.internal.rpm.ui.editor;
*/
public interface RpmSections {
- String PREP_SECTION = "%prep"; //$NON-NLS-1$
- String BUILD_SECTION = "%build"; //$NON-NLS-1$
- String INSTALL_SECTION = "%install"; //$NON-NLS-1$
- String PRETRANS_SECTION = "%pretrans"; //$NON-NLS-1$
- String PRE_SECTION = "%pre"; //$NON-NLS-1$
- String PREUN_SECTION = "%preun"; //$NON-NLS-1$
- String POST_SECTION = "%post"; //$NON-NLS-1$
- String POSTUN_SECTION = "%postun"; //$NON-NLS-1$
- String POSTTRANS_SECTION = "%posttrans"; //$NON-NLS-1$
- String CLEAN_SECTION = "%clean"; //$NON-NLS-1$
- String FILES_SECTION = "%files"; //$NON-NLS-1$
- String CHECK_SECTION = "%check"; //$NON-NLS-1$
- String CHANGELOG_SECTION = "%changelog"; //$NON-NLS-1$
- String PACKAGE_SECTION = "%package"; //$NON-NLS-1$
- String DESCRIPTION_SECTION = "%description"; //$NON-NLS-1$
+ String PREP_SECTION = "%prep"; //$NON-NLS-1$
+ String BUILD_SECTION = "%build"; //$NON-NLS-1$
+ String INSTALL_SECTION = "%install"; //$NON-NLS-1$
+ String PRETRANS_SECTION = "%pretrans"; //$NON-NLS-1$
+ String PRE_SECTION = "%pre"; //$NON-NLS-1$
+ String PREUN_SECTION = "%preun"; //$NON-NLS-1$
+ String POST_SECTION = "%post"; //$NON-NLS-1$
+ String POSTUN_SECTION = "%postun"; //$NON-NLS-1$
+ String POSTTRANS_SECTION = "%posttrans"; //$NON-NLS-1$
+ String CLEAN_SECTION = "%clean"; //$NON-NLS-1$
+ String FILES_SECTION = "%files"; //$NON-NLS-1$
+ String CHECK_SECTION = "%check"; //$NON-NLS-1$
+ String CHANGELOG_SECTION = "%changelog"; //$NON-NLS-1$
+ String PACKAGE_SECTION = "%package"; //$NON-NLS-1$
+ String DESCRIPTION_SECTION = "%description"; //$NON-NLS-1$
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmTags.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmTags.java
index 5f95106589..1cb498dd9c 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmTags.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RpmTags.java
@@ -1,48 +1,49 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
*******************************************************************************/
package org.eclipse.linuxtools.internal.rpm.ui.editor;
-
/**
* Definitions of all rpm tags.
*
*/
public interface RpmTags {
- String SUMMARY = "Summary"; //$NON-NLS-1$
- String NAME = "Name"; //$NON-NLS-1$
- String VERSION = "Version"; //$NON-NLS-1$
- String PACKAGER = "Packager"; //$NON-NLS-1$
- String ICON = "Icon"; //$NON-NLS-1$
- String URL = "URL"; //$NON-NLS-1$
- String PREFIX = "Prefix"; //$NON-NLS-1$
- String GROUP = "Group"; //$NON-NLS-1$
- String LICENSE = "License"; //$NON-NLS-1$
- String RELEASE = "Release"; //$NON-NLS-1$
- String BUILD_ROOT = "BuildRoot"; //$NON-NLS-1$
- String DISTRIBUTION = "Distribution"; //$NON-NLS-1$
- String VENDOR = "Vendor"; //$NON-NLS-1$
- String PROVIDES = "Provides"; //$NON-NLS-1$
- String EXCLUSIVE_ARCH = "ExclusiveArch"; //$NON-NLS-1$
- String EXCLUDE_ARCH = "ExcludeArch"; //$NON-NLS-1$
- String EXCLUDE_OS = "ExclusiveOS"; //$NON-NLS-1$
- String BUILD_ARCH = "BuildArch"; //$NON-NLS-1$
- String BUILD_ARCHITECTURES = "BuildArchitectures"; //$NON-NLS-1$
- String AUTO_REQUIRES = "AutoRequires"; //$NON-NLS-1$
- String AUTO_REQ = "AutoReq"; //$NON-NLS-1$
- String AUTO_REQ_PROV = "AutoReqProv"; //$NON-NLS-1$
- String AUTO_PROV = "AutoProv"; //$NON-NLS-1$
- String EPOCH = "Epoch"; //$NON-NLS-1$
- String OBSOLETES = "Obsoletes"; //$NON-NLS-1$
- String REQUIRES = "Requires"; //$NON-NLS-1$
- String REQUIRES_PRE = "Requires(pre)"; //$NON-NLS-1$
- String REQUIRES_POST = "Requires(post)"; //$NON-NLS-1$
- String REQUIRES_POSTUN = "Requires(postun)"; //$NON-NLS-1$
+ String SUMMARY = "Summary"; //$NON-NLS-1$
+ String NAME = "Name"; //$NON-NLS-1$
+ String VERSION = "Version"; //$NON-NLS-1$
+ String PACKAGER = "Packager"; //$NON-NLS-1$
+ String ICON = "Icon"; //$NON-NLS-1$
+ String URL = "URL"; //$NON-NLS-1$
+ String PREFIX = "Prefix"; //$NON-NLS-1$
+ String GROUP = "Group"; //$NON-NLS-1$
+ String LICENSE = "License"; //$NON-NLS-1$
+ String RELEASE = "Release"; //$NON-NLS-1$
+ String BUILD_ROOT = "BuildRoot"; //$NON-NLS-1$
+ String DISTRIBUTION = "Distribution"; //$NON-NLS-1$
+ String VENDOR = "Vendor"; //$NON-NLS-1$
+ String PROVIDES = "Provides"; //$NON-NLS-1$
+ String EXCLUSIVE_ARCH = "ExclusiveArch"; //$NON-NLS-1$
+ String EXCLUDE_ARCH = "ExcludeArch"; //$NON-NLS-1$
+ String EXCLUDE_OS = "ExclusiveOS"; //$NON-NLS-1$
+ String BUILD_ARCH = "BuildArch"; //$NON-NLS-1$
+ String BUILD_ARCHITECTURES = "BuildArchitectures"; //$NON-NLS-1$
+ String AUTO_REQUIRES = "AutoRequires"; //$NON-NLS-1$
+ String AUTO_REQ = "AutoReq"; //$NON-NLS-1$
+ String AUTO_REQ_PROV = "AutoReqProv"; //$NON-NLS-1$
+ String AUTO_PROV = "AutoProv"; //$NON-NLS-1$
+ String EPOCH = "Epoch"; //$NON-NLS-1$
+ String OBSOLETES = "Obsoletes"; //$NON-NLS-1$
+ String REQUIRES = "Requires"; //$NON-NLS-1$
+ String REQUIRES_PRE = "Requires(pre)"; //$NON-NLS-1$
+ String REQUIRES_POST = "Requires(post)"; //$NON-NLS-1$
+ String REQUIRES_POSTUN = "Requires(postun)"; //$NON-NLS-1$
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecCompletionProposal.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecCompletionProposal.java
index a353250453..b1cbd97778 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecCompletionProposal.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecCompletionProposal.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2017 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2017, 2018 Red Hat Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat Inc. - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileCompletionProcessor.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileCompletionProcessor.java
index 6a55e65006..8ea9d269c7 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileCompletionProcessor.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileCompletionProcessor.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 Alphonse Van Assche and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -125,19 +127,15 @@ public class SpecfileCompletionProcessor implements IContentAssistProcessor {
}
/**
- * Compute the templates proposals, these proposals are contextual on
- * sections. Return an array of template proposals for the given viewer,
- * region, specfile, prefix.
+ * Compute the templates proposals, these proposals are contextual on sections.
+ * Return an array of template proposals for the given viewer, region, specfile,
+ * prefix.
*
- * @param viewer
- * the viewer for which the context is created
- * @param region
- * the region into <code>document</code> for which the context is
- * created
- * @param specfile
- * the specfile element
- * @param prefix
- * the prefix string
+ * @param viewer the viewer for which the context is created
+ * @param region the region into <code>document</code> for which the context
+ * is created
+ * @param specfile the specfile element
+ * @param prefix the prefix string
* @return a ICompletionProposal[]
*/
private List<? extends ICompletionProposal> computeTemplateProposals(ITextViewer viewer, IRegion region,
@@ -172,13 +170,10 @@ public class SpecfileCompletionProcessor implements IContentAssistProcessor {
* document. Return an array of RPM macro proposals for the given viewer,
* region, prefix.
*
- * @param viewer
- * the viewer for which the context is created
- * @param region
- * the region into <code>document</code> for which the context is
- * created
- * @param prefix
- * the prefix string to find
+ * @param viewer the viewer for which the context is created
+ * @param region the region into <code>document</code> for which the context is
+ * created
+ * @param prefix the prefix string to find
* @return a ICompletionProposal[]
*/
private List<ICompletionProposal> computeRpmMacroProposals(IRegion region, Specfile specfile, String prefix) {
@@ -201,17 +196,13 @@ public class SpecfileCompletionProcessor implements IContentAssistProcessor {
}
/**
- * Compute patches proposals, these proposals are usable in the whole
- * document. Return an array of patches proposals for the given viewer,
- * region, prefix.
+ * Compute patches proposals, these proposals are usable in the whole document.
+ * Return an array of patches proposals for the given viewer, region, prefix.
*
- * @param viewer
- * the viewer for which the context is created
- * @param region
- * the region into <code>document</code> for which the context is
- * created
- * @param prefix
- * the prefix string to find
+ * @param viewer the viewer for which the context is created
+ * @param region the region into <code>document</code> for which the context is
+ * created
+ * @param prefix the prefix string to find
* @return a ICompletionProposal[]
*/
private List<ICompletionProposal> computePatchesProposals(IRegion region, Specfile specfile, String prefix) {
@@ -229,17 +220,13 @@ public class SpecfileCompletionProcessor implements IContentAssistProcessor {
}
/**
- * Compute sources proposals, these proposals are usable in the whole
- * document. Return an array of sources proposals for the given viewer,
- * region, prefix.
+ * Compute sources proposals, these proposals are usable in the whole document.
+ * Return an array of sources proposals for the given viewer, region, prefix.
*
- * @param viewer
- * the viewer for which the context is created
- * @param region
- * the region into <code>document</code> for which the context is
- * created
- * @param prefix
- * the prefix string to find
+ * @param viewer the viewer for which the context is created
+ * @param region the region into <code>document</code> for which the context is
+ * created
+ * @param prefix the prefix string to find
* @return a ICompletionProposal[]
*/
private List<ICompletionProposal> computeSourcesProposals(IRegion region, Specfile specfile, String prefix) {
@@ -261,13 +248,10 @@ public class SpecfileCompletionProcessor implements IContentAssistProcessor {
* preambule section. Return an array of RPM macro proposals for the given
* viewer, region, specfile, prefix.
*
- * @param viewer
- * the viewer for which the context is created
- * @param region
- * the region into <code>document</code> for which the context is
- * created
- * @param prefix
- * the prefix string
+ * @param viewer the viewer for which the context is created
+ * @param region the region into <code>document</code> for which the context is
+ * created
+ * @param prefix the prefix string
* @return a ICompletionProposal[]
*/
private List<ICompletionProposal> computeRpmPackageProposals(IRegion region, String prefix) {
@@ -299,10 +283,8 @@ public class SpecfileCompletionProcessor implements IContentAssistProcessor {
/**
* Create a template context for the givens Specfile, offset.
*
- * @param specfile
- * the sepcfile element
- * @param offset
- * the offset of the <code>documment</code>
+ * @param specfile the sepcfile element
+ * @param offset the offset of the <code>documment</code>
* @return a TemplateContextType
*/
private TemplateContextType getContextType(Specfile specfile, int offset) {
@@ -324,13 +306,10 @@ public class SpecfileCompletionProcessor implements IContentAssistProcessor {
/**
* Create a template context for the given Specfile and offset.
*
- * @param viewer
- * the viewer for which the context is created
- * @param region
- * the region into <code>document</code> for which the context is
- * created
- * @param specfile
- * the specfile element
+ * @param viewer the viewer for which the context is created
+ * @param region the region into <code>document</code> for which the context
+ * is created
+ * @param specfile the specfile element
* @return a TemplateContextType
*/
private TemplateContext createContext(ITextViewer viewer, IRegion region, Specfile specfile) {
@@ -345,10 +324,8 @@ public class SpecfileCompletionProcessor implements IContentAssistProcessor {
/**
* Get relevance on templates for the given template and prefix.
*
- * @param template
- * the <code>Template</code> to get relevance
- * @param prefix
- * the prefix <code>String</code> to check.
+ * @param template the <code>Template</code> to get relevance
+ * @param prefix the prefix <code>String</code> to check.
* @return a relevant code (90 if <code>true</code> and 0 if not)
*/
private int getRelevance(Template template, String prefix) {
@@ -361,11 +338,9 @@ public class SpecfileCompletionProcessor implements IContentAssistProcessor {
/**
* Get the prefix for a given viewer, offset.
*
- * @param viewer
- * the viewer for which the context is created
- * @param offset
- * the offset into <code>document</code> for which the prefix is
- * research
+ * @param viewer the viewer for which the context is created
+ * @param offset the offset into <code>document</code> for which the prefix is
+ * research
* @return the prefix
*/
private String getGroupPrefix(ITextViewer viewer, int offset) {
@@ -392,10 +367,8 @@ public class SpecfileCompletionProcessor implements IContentAssistProcessor {
/**
* Get defines as a String key->value pair for a given specfile and prefix.
*
- * @param specfile
- * to get defines from.
- * @param prefix
- * used to find defines.
+ * @param specfile to get defines from.
+ * @param prefix used to find defines.
* @return a <code>HashMap</code> of defines.
*
*/
@@ -415,10 +388,8 @@ public class SpecfileCompletionProcessor implements IContentAssistProcessor {
/**
* Get patches as a String key->value pair for a given specfile and prefix.
*
- * @param specfile
- * to get defines from.
- * @param prefix
- * used to find defines.
+ * @param specfile to get defines from.
+ * @param prefix used to find defines.
* @return a <code>HashMap</code> of defines.
*
*/
@@ -439,10 +410,8 @@ public class SpecfileCompletionProcessor implements IContentAssistProcessor {
/**
* Get sources as a String key->value pair for a given specfile and prefix.
*
- * @param specfile
- * to get defines from.
- * @param prefix
- * used to find defines.
+ * @param specfile to get defines from.
+ * @param prefix used to find defines.
* @return a <code>HashMap</code> of defines.
*
*/
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileConfiguration.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileConfiguration.java
index 89d5741d70..5e1a0ef8fd 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileConfiguration.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileConfiguration.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 Red Hat Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileDocumentProvider.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileDocumentProvider.java
index 8034d838e4..381dbb7f58 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileDocumentProvider.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileDocumentProvider.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2016 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileDoubleClickStrategy.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileDoubleClickStrategy.java
index 1a0f383b30..893c1f7749 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileDoubleClickStrategy.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileDoubleClickStrategy.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -17,117 +19,119 @@ import org.eclipse.jface.text.ITextDoubleClickStrategy;
import org.eclipse.jface.text.ITextViewer;
public class SpecfileDoubleClickStrategy implements ITextDoubleClickStrategy {
- protected ITextViewer fText;
- //lTerminator should be either '\r' or '\n' depending on the OS
- final char lTerminator = System.getProperty("line.separator").charAt(0); //$NON-NLS-1$
-
- @Override
- public void doubleClicked(ITextViewer part) {
- int pos = part.getSelectedRange().x;
-
- if (pos < 0) {
- return;
- }
-
- fText = part;
-
- if (!selectComment(pos)) {
- selectWord(pos);
- }
- }
- protected boolean selectComment(int caretPos) {
- IDocument doc = fText.getDocument();
- int startPos, endPos;
- try {
- int pos = caretPos;
- char c = ' ';
-
- while (pos >= 0) {
- c = doc.getChar(pos);
- if (c == '\\') {
- pos -= 2;
- continue;
- }
- if ( c == lTerminator || c == '\"') {
- break;
- }
- --pos;
- }
- if (c != '\"') {
- return false;
- }
-
- startPos = pos;
-
- pos = caretPos;
- int length = doc.getLength();
- c = ' ';
-
- while (pos < length) {
- c = doc.getChar(pos);
- if ( c == lTerminator || c == '\"' ) {
- break;
- }
- ++pos;
- }
- if (c != '\"')
- return false;
-
- endPos = pos;
-
- int offset = startPos + 1;
- int len = endPos - offset;
- fText.setSelectedRange(offset, len);
- return true;
- } catch (BadLocationException x) {
- }
-
- return false;
- }
- protected boolean selectWord(int caretPos) {
-
- IDocument doc = fText.getDocument();
- int startPos, endPos;
-
- try {
-
- int pos = caretPos;
- char c;
-
- while (pos >= 0) {
- c = doc.getChar(pos);
- if (!Character.isJavaIdentifierPart(c)) {
- break;
- }
- --pos;
- }
-
- startPos = pos;
-
- pos = caretPos;
- int length = doc.getLength();
-
- while (pos < length) {
- c = doc.getChar(pos);
- if (!Character.isJavaIdentifierPart(c)) {
- break;
- }
- ++pos;
- }
-
- endPos = pos;
- selectRange(startPos, endPos);
- return true;
-
- } catch (BadLocationException x) {
- }
-
- return false;
- }
-
- private void selectRange(int startPos, int stopPos) {
- int offset = startPos + 1;
- int length = stopPos - offset;
- fText.setSelectedRange(offset, length);
- }
+ protected ITextViewer fText;
+ // lTerminator should be either '\r' or '\n' depending on the OS
+ final char lTerminator = System.getProperty("line.separator").charAt(0); //$NON-NLS-1$
+
+ @Override
+ public void doubleClicked(ITextViewer part) {
+ int pos = part.getSelectedRange().x;
+
+ if (pos < 0) {
+ return;
+ }
+
+ fText = part;
+
+ if (!selectComment(pos)) {
+ selectWord(pos);
+ }
+ }
+
+ protected boolean selectComment(int caretPos) {
+ IDocument doc = fText.getDocument();
+ int startPos, endPos;
+ try {
+ int pos = caretPos;
+ char c = ' ';
+
+ while (pos >= 0) {
+ c = doc.getChar(pos);
+ if (c == '\\') {
+ pos -= 2;
+ continue;
+ }
+ if (c == lTerminator || c == '\"') {
+ break;
+ }
+ --pos;
+ }
+ if (c != '\"') {
+ return false;
+ }
+
+ startPos = pos;
+
+ pos = caretPos;
+ int length = doc.getLength();
+ c = ' ';
+
+ while (pos < length) {
+ c = doc.getChar(pos);
+ if (c == lTerminator || c == '\"') {
+ break;
+ }
+ ++pos;
+ }
+ if (c != '\"')
+ return false;
+
+ endPos = pos;
+
+ int offset = startPos + 1;
+ int len = endPos - offset;
+ fText.setSelectedRange(offset, len);
+ return true;
+ } catch (BadLocationException x) {
+ }
+
+ return false;
+ }
+
+ protected boolean selectWord(int caretPos) {
+
+ IDocument doc = fText.getDocument();
+ int startPos, endPos;
+
+ try {
+
+ int pos = caretPos;
+ char c;
+
+ while (pos >= 0) {
+ c = doc.getChar(pos);
+ if (!Character.isJavaIdentifierPart(c)) {
+ break;
+ }
+ --pos;
+ }
+
+ startPos = pos;
+
+ pos = caretPos;
+ int length = doc.getLength();
+
+ while (pos < length) {
+ c = doc.getChar(pos);
+ if (!Character.isJavaIdentifierPart(c)) {
+ break;
+ }
+ ++pos;
+ }
+
+ endPos = pos;
+ selectRange(startPos, endPos);
+ return true;
+
+ } catch (BadLocationException x) {
+ }
+
+ return false;
+ }
+
+ private void selectRange(int startPos, int stopPos) {
+ int offset = startPos + 1;
+ int length = stopPos - offset;
+ fText.setSelectedRange(offset, length);
+ }
} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileEditor.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileEditor.java
index aabeffe652..9d84f04874 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileEditor.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileEditor.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 Red Hat Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -103,8 +105,7 @@ public class SpecfileEditor extends TextEditor {
/**
* Get a {@link IFile}, this implementation return <code>null</code> if the
- * <code>IEditorInput</code> instance is not of type
- * {@link IFileEditorInput}.
+ * <code>IEditorInput</code> instance is not of type {@link IFileEditorInput}.
*
* @return a <code>IFile</code> or <code>null</code>.
*/
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileFoldingStructureProvider.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileFoldingStructureProvider.java
index 2cb78556c4..fc22a5dcc5 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileFoldingStructureProvider.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileFoldingStructureProvider.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 Alphonse Van Assche and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileHover.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileHover.java
index c4830572ba..44b5779a2f 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileHover.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileHover.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -86,8 +88,8 @@ public class SpecfileHover implements ITextHover, ITextHoverExtension {
if (textViewer != null) {
/*
- * If the hover offset falls within the selection range return the
- * region for the whole selection.
+ * If the hover offset falls within the selection range return the region for
+ * the whole selection.
*/
Point selectedRange = textViewer.getSelectedRange();
if (selectedRange.x >= 0 && selectedRange.y > 0 && offset >= selectedRange.x
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileLog.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileLog.java
index 969efba5fc..37247fcb20 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileLog.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileLog.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007 Alphonse Van Assche.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Alphonse Van Assche and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Alphonse Van Assche - initial API and implementation
@@ -19,91 +21,78 @@ import org.eclipse.core.runtime.Status;
*/
public final class SpecfileLog {
- private SpecfileLog(){
- super();
- }
+ private SpecfileLog() {
+ super();
+ }
- /**
- * Log the specified information.
- *
- * @param message A human-readable message, localized to the
- * current locale.
- */
- public static void logInfo(String message) {
- log(IStatus.INFO, IStatus.OK, message, null);
- }
+ /**
+ * Log the specified information.
+ *
+ * @param message A human-readable message, localized to the current locale.
+ */
+ public static void logInfo(String message) {
+ log(IStatus.INFO, IStatus.OK, message, null);
+ }
- /**
- * Log the specified error.
- *
- * @param exception A low-level exception.
- */
- public static void logError(Throwable exception) {
- logError(Messages.SpecfileLog_0, exception);
- }
+ /**
+ * Log the specified error.
+ *
+ * @param exception A low-level exception.
+ */
+ public static void logError(Throwable exception) {
+ logError(Messages.SpecfileLog_0, exception);
+ }
- /**
- * Log the specified error.
- *
- * @param message A human-readable message, localized to the
- * current locale.
- * @param exception A low-level exception, or <code>null</code>
- * if not applicable.
- */
- public static void logError(String message, Throwable exception) {
- log(IStatus.ERROR, IStatus.OK, message, exception);
- }
+ /**
+ * Log the specified error.
+ *
+ * @param message A human-readable message, localized to the current locale.
+ * @param exception A low-level exception, or <code>null</code> if not
+ * applicable.
+ */
+ public static void logError(String message, Throwable exception) {
+ log(IStatus.ERROR, IStatus.OK, message, exception);
+ }
- /**
- * Log the specified information.
- *
- * @param severity The severity; one of the following:
- * <code>IStatus.OK</code>,
- * <code>IStatus.ERROR</code>,
- * <code>IStatus.INFO</code>, or
- * <code>IStatus.WARNING</code>.
- * @param code The plug-in-specific status code, or
- * <code>OK</code>.
- * @param message A human-readable message, localized to the
- * current locale.
- * @param exception A low-level exception, or <code>null</code>
- * if not applicable.
- */
- public static void log(int severity, int code, String message,
- Throwable exception) {
+ /**
+ * Log the specified information.
+ *
+ * @param severity The severity; one of the following: <code>IStatus.OK</code>,
+ * <code>IStatus.ERROR</code>, <code>IStatus.INFO</code>, or
+ * <code>IStatus.WARNING</code>.
+ * @param code The plug-in-specific status code, or <code>OK</code>.
+ * @param message A human-readable message, localized to the current locale.
+ * @param exception A low-level exception, or <code>null</code> if not
+ * applicable.
+ */
+ public static void log(int severity, int code, String message, Throwable exception) {
- log(createStatus(severity, code, message, exception));
- }
+ log(createStatus(severity, code, message, exception));
+ }
- /**
- * Create a status object representing the specified information.
- *
- * @param severity The severity; one of the following:
- * <code>IStatus.OK</code>,
- * <code>IStatus.ERROR</code>,
- * <code>IStatus.INFO</code>, or
- * <code>IStatus.WARNING</code>.
- * @param code The plug-in-specific status code, or
- * <code>OK</code>.
- * @param message A human-readable message, localized to the
- * current locale.
- * @param exception A low-level exception, or <code>null</code>
- * if not applicable.
- * @return, the status object (not <code>null</code>).
- */
- public static IStatus createStatus(int severity, int code,
- String message, Throwable exception) {
+ /**
+ * Create a status object representing the specified information.
+ *
+ * @param severity The severity; one of the following: <code>IStatus.OK</code>,
+ * <code>IStatus.ERROR</code>, <code>IStatus.INFO</code>, or
+ * <code>IStatus.WARNING</code>.
+ * @param code The plug-in-specific status code, or <code>OK</code>.
+ * @param message A human-readable message, localized to the current locale.
+ * @param exception A low-level exception, or <code>null</code> if not
+ * applicable. @return, the status object (not
+ * <code>null</code>).
+ */
+ public static IStatus createStatus(int severity, int code, String message, Throwable exception) {
- return new Status(severity, Activator.PLUGIN_ID, code,
- message, exception);
- }
+ return new Status(severity, Activator.PLUGIN_ID, code, message, exception);
+ }
- /**
- * Log the given status.
- *
- * @param status The status to log.
- */
- public static void log(IStatus status) {
- Activator.getDefault().getLog().log(status);
- }
+ /**
+ * Log the given status.
+ *
+ * @param status The status to log.
+ */
+ public static void log(IStatus status) {
+ Activator.getDefault().getLog().log(status);
+ }
} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfilePrecentationReconciler.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfilePrecentationReconciler.java
index d6bdf21714..4d36cfc67e 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfilePrecentationReconciler.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfilePrecentationReconciler.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2017 Red Hat, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2017, 2018 Red Hat, Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat Inc. - initial API and implementation
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileReconcilingStrategy.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileReconcilingStrategy.java
index 198a53dec1..f438f850fb 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileReconcilingStrategy.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileReconcilingStrategy.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 Red Hat Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2018 Red Hat Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -26,65 +28,63 @@ import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
public class SpecfileReconcilingStrategy implements IReconcilingStrategy, IReconcilingStrategyExtension {
- private SpecfileFoldingStructureProvider sFoldingStructureProvider;
-
- SpecfileContentOutlinePage outline;
- SpecfileEditor editor;
- IDocumentProvider documentProvider;
+ private SpecfileFoldingStructureProvider sFoldingStructureProvider;
- public SpecfileReconcilingStrategy(SpecfileEditor editor) {
- outline= (SpecfileContentOutlinePage) editor.getAdapter(IContentOutlinePage.class);
- this.editor = editor;
- documentProvider = editor.getDocumentProvider();
- sFoldingStructureProvider= new SpecfileFoldingStructureProvider(editor);
- }
+ SpecfileContentOutlinePage outline;
+ SpecfileEditor editor;
+ IDocumentProvider documentProvider;
+ public SpecfileReconcilingStrategy(SpecfileEditor editor) {
+ outline = (SpecfileContentOutlinePage) editor.getAdapter(IContentOutlinePage.class);
+ this.editor = editor;
+ documentProvider = editor.getDocumentProvider();
+ sFoldingStructureProvider = new SpecfileFoldingStructureProvider(editor);
+ }
- @Override
- public void setDocument(IDocument document) {
- sFoldingStructureProvider.setDocument(document);
- }
+ @Override
+ public void setDocument(IDocument document) {
+ sFoldingStructureProvider.setDocument(document);
+ }
- @Override
- public void setProgressMonitor(IProgressMonitor monitor) {
- sFoldingStructureProvider.setProgressMonitor(monitor);
- }
+ @Override
+ public void setProgressMonitor(IProgressMonitor monitor) {
+ sFoldingStructureProvider.setProgressMonitor(monitor);
+ }
- @Override
- public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
- reconcile();
- }
+ @Override
+ public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
+ reconcile();
+ }
- @Override
- public void initialReconcile() {
- reconcile();
- }
+ @Override
+ public void initialReconcile() {
+ reconcile();
+ }
- private void reconcile() {
- Specfile specfile = editor.getSpecfile();
- if (specfile != null) {
- editor.setSpecfile(editor.getParser().parse(documentProvider
- .getDocument(editor.getEditorInput())));
- outline.update();
- updateFolding();
- updateEditor();
- }
- }
+ private void reconcile() {
+ Specfile specfile = editor.getSpecfile();
+ if (specfile != null) {
+ editor.setSpecfile(editor.getParser().parse(documentProvider.getDocument(editor.getEditorInput())));
+ outline.update();
+ updateFolding();
+ updateEditor();
+ }
+ }
- @Override
- public void reconcile(IRegion partition) {
- reconcile();
- }
+ @Override
+ public void reconcile(IRegion partition) {
+ reconcile();
+ }
- private void updateEditor() {
- Shell shell= editor.getSite().getShell();
- if (!(shell == null || shell.isDisposed())) {
- shell.getDisplay().asyncExec(() -> editor.setSpecfile(editor.getParser().parse(documentProvider
- .getDocument(editor.getEditorInput()))));
- }
- }
+ private void updateEditor() {
+ Shell shell = editor.getSite().getShell();
+ if (!(shell == null || shell.isDisposed())) {
+ shell.getDisplay().asyncExec(() -> editor
+ .setSpecfile(editor.getParser().parse(documentProvider.getDocument(editor.getEditorInput()))));
+ }
+ }
- private void updateFolding() {
- sFoldingStructureProvider.updateFoldingRegions();
- }
+ private void updateFolding() {
+ sFoldingStructureProvider.updateFoldingRegions();
+ }
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/UiUtils.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/UiUtils.java
index fdef25660e..d6a07eaa22 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/UiUtils.java
+++ b/