Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Overholt2011-02-28 14:51:19 -0500
committerAndrew Overholt2011-02-28 14:52:41 -0500
commit5dcdcddbd3efcf2d3d8247e979ea573eae590d67 (patch)
treed8be28786d943ad55a29d9de63a1a192194ed9a7
parenta1289139b808537718337ec15eb0e28055f93ca2 (diff)
parent96139a744d34e9e62ff4f0db04ddbfd3d12cfacf (diff)
downloadorg.eclipse.linuxtools-5dcdcddbd3efcf2d3d8247e979ea573eae590d67.tar.gz
org.eclipse.linuxtools-5dcdcddbd3efcf2d3d8247e979ea573eae590d67.tar.xz
org.eclipse.linuxtools-5dcdcddbd3efcf2d3d8247e979ea573eae590d67.zip
Merge rpm 0.5.1
-rw-r--r--rpm/org.eclipse.linuxtools.rpm-feature/.classpath5
-rw-r--r--rpm/org.eclipse.linuxtools.rpm-feature/.project17
-rw-r--r--rpm/org.eclipse.linuxtools.rpm-feature/ChangeLog85
-rw-r--r--rpm/org.eclipse.linuxtools.rpm-feature/about.html33
-rw-r--r--rpm/org.eclipse.linuxtools.rpm-feature/build.properties21
-rw-r--r--rpm/org.eclipse.linuxtools.rpm-feature/feature.properties134
-rw-r--r--rpm/org.eclipse.linuxtools.rpm-feature/feature.xml59
-rw-r--r--rpm/org.eclipse.linuxtools.rpm-feature/license.html81
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/.classpath7
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/.cvsignore1
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/.project28
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/.settings/org.eclipse.jdt.core.prefs70
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/ChangeLog150
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/META-INF/MANIFEST.MF12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/OSGI-INF/l10n/bundle.properties3
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/build.properties23
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/resources/specs/helloworld.spec30
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/resources/srpms/helloworld-2-2.src.rpmbin0 -> 3344 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/AllTests.java26
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectNatureTest.java60
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectTest.java176
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/.classpath7
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/.cvsignore1
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/.project28
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/.settings/org.eclipse.jdt.core.prefs87
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/.settings/org.eclipse.jdt.ui.prefs54
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/.template4
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/ChangeLog726
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/META-INF/MANIFEST.MF16
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/about.html33
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/build.properties18
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/license.html81
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/plugin.properties14
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/plugin.xml26
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IRPMConstants.java104
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/Messages.java31
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMConfiguration.java153
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMCoreInitializer.java36
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMCorePlugin.java40
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProject.java200
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectNature.java124
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/SourceRPM.java36
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/rpm_strings.properties223
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPM.java83
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPMBuild.java158
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPMQuery.java108
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/Utils.java157
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/.classpath7
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/.cvsignore1
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/.project28
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/.settings/org.eclipse.jdt.core.prefs83
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/ChangeLog479
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/META-INF/MANIFEST.MF26
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/build.properties6
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/plugin.properties12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/plugin.xml113
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/Activator.java94
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/Messages.java26
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/RpmlintLog.java103
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/Messages.java28
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/RunRpmlintAction.java104
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/ToggleRpmlintNatureAction.java90
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/messages.properties13
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/Messages.java28
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintBuilder.java150
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintDeltaVisitor.java52
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintMarkerRemoveVisitor.java43
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintMarkerVisitor.java173
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintNature.java90
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintPreVisitor.java40
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/messages.properties13
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/messages.properties11
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintItem.java130
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintParser.java341
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/preferences/Messages.java29
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/preferences/PreferenceConstants.java30
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/preferences/PreferenceInitializer.java37
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/preferences/RpmlintPreferencePage.java63
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/preferences/messages.properties14
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/AInsertLineResolution.java66
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/ARemoveLineResolution.java40
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/AReplaceTextResolution.java58
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/ARpmlintResolution.java64
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/HardcodedPackagerTag.java37
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/HardcodedPrefixTag.java37
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/MacroInChangelog.java55
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/Messages.java38
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildSection.java49
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildrootTag.java51
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleanSection.java44
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleaningOfBuildroot.java49
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoInstallSection.java44
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoPrepSection.java44
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/PatchNotApplied.java31
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmBuildrootUsage.java33
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmlintMarkerResolutionGenerator.java108
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/SetupNotQuiet.java47
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/messages.properties23
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/.project17
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/ChangeLog52
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/build.properties4
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/epl-v10.html256
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/feature.properties140
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/feature.xml59
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/license.html81
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/.classpath7
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/.project28
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/ChangeLog187
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/META-INF/MANIFEST.MF10
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/about.html33
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/build-helper.xml152
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/build.properties20
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/doc/notices.html22
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/extract-markup.xsl9
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/plugin.properties12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/plugin.xml22
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/src/org/eclipse/linuxtools/internal/rpm/ui/editor/doc/anttask/MediaWikiImageFetcher.java149
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/src/org/eclipse/linuxtools/internal/rpm/ui/editor/doc/anttask/tasks.properties11
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/toc.xml17
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/Configuring-Specfile-Editor-Settings.html212
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/General-Usage.html187
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/Installing.html68
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/SpecfileEditorReference-toc.xml21
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/SpecfileEditorReference.html51
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/Updating-This-Document.html54
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Screenshot-edittemplate.pngbin0 -> 25740 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Screenshot-taskscreenshot.pngbin0 -> 73853 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_enable_rpmlint.pngbin0 -> 129551 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_generic.pngbin0 -> 194908 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_macros_content.pngbin0 -> 5034 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_macros_description.pngbin0 -> 4573 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_new_from_template.pngbin0 -> 53602 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_new_wizard.pngbin0 -> 29257 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_problems_rpmlint.pngbin0 -> 72383 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_rpmlint_fix_after.pngbin0 -> 15655 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_rpmlint_fix_before.pngbin0 -> 14117 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_rpmlint_quickfix.pngbin0 -> 34653 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_changelog.pngbin0 -> 52024 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_macros.pngbin0 -> 56154 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_rpmlint.pngbin0 -> 35423 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_rpms_details.pngbin0 -> 64277 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_rpms_generic.pngbin0 -> 62302 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_tasks.pngbin0 -> 35432 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_templates.pngbin0 -> 100297 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.classpath7
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.cvsignore1
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.project28
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.settings/org.eclipse.jdt.core.prefs70
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.settings/org.eclipse.jdt.ui.prefs54
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/ChangeLog526
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/META-INF/MANIFEST.MF20
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/build.properties6
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/plugin.properties12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/AScannerTest.java60
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java47
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/EpochTagTest.java101
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/FileTestCase.java72
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/HeaderRecognitionTest.java175
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LicenseTagTest.java39
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LinePositionTests.java50
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/NameTagTests.java91
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/PatchApplicationTest.java54
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/ReleaseTagTests.java85
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmMacroProposalsListTest.java79
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmPackageProposalsListTest.java82
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileCompletionProcessorTest.java72
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileTestProject.java59
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/VersionTagTests.java86
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/ActionsAllTests.java23
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/SpecfileChangelogFormatterTest.java54
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/SpecfileChangelogParserTest.java36
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/HyperlinkAllTests.java25
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/MailHyperlinkDetectorTest.java65
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/SourcesFileHyperlinkDetectorTest.java59
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/SpecfileElementHyperlinkDetectorTest.java80
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/URLHyperlinkWithMacroDetectorTest.java47
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/ParserAllTests.java24
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SourceComparatorTest.java49
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileDefineTest.java163
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileTest.java101
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/ScannersAllTests.java24
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfileChangelogScannerTest.java84
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfilePackagesScannerTest.java128
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfileScannerTest.java120
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/test.xml59
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/.classpath7
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/.cvsignore1
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/.project34
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/.settings/org.eclipse.jdt.core.prefs83
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/.settings/org.moreunit.prefs5
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/ChangeLog2594
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/META-INF/MANIFEST.MF31
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/build.properties18
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/macro_obj.gifbin0 -> 155 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/occurrence_obj.gifbin0 -> 200 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/package_obj.gifbin0 -> 176 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/packages_obj.gifbin0 -> 191 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/preamble_obj.gifbin0 -> 185 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/rpm.gifbin0 -> 1019 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/section_obj.gifbin0 -> 114 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/template_obj.gifbin0 -> 359 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/plugin.properties36
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/plugin.xml270
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/Activator.java203
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/ColorManager.java38
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/ISpecfileColorConstants.java32
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/ISpecfileSpecialSymbols.java36
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/Messages.java39
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/NonRuleBasedDamagerRepairer.java148
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroOccurrencesUpdater.java239
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroProposalsList.java227
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageBuildProposalsJob.java199
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageProposalsList.java169
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmSections.java34
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmTags.java48
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java589
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java272
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileDocumentProvider.java34
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileDoubleClickStrategy.java123
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditor.java185
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditorMessages.properties13
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileFoldingStructureProvider.java136
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileHover.java277
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileLog.java109
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitioner.java22
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileReconcilingStrategy.java92
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/UiUtils.java85
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/Messages.java27
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogFormatter.java202
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogParser.java29
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorOrganizePatchesActionDelegate.java35
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorShowOutlineActionDelegate.java33
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorToggleCommentActionDelegate.java102
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/messages.properties18
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/Messages.java27
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecMergeViewer.java77
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecMergeViewerCreator.java31
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecStructureCreator.java233
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecStructureMergeViewerCreator.java36
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/messages.properties12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/HTML2TextReader.java330
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/HTMLTextPresenter.java200
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/LineBreakingReader.java133
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/SingleCharReader.java70
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/SubstitutionTextReader.java164
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/IStrictWordDetector.java18
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/KeywordWordDetector.java26
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/MacroWordDetector.java26
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/PackageWordDetector.java25
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/PatchNumberDetector.java30
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/SuffixNumberDetector.java30
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/TagWordDetector.java25
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/MainPackagePage.java170
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/Messages.java35
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/RpmSectionPage.java52
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/RpmTagText.java84
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/SpecfileFormEditor.java75
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/messages.properties20
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/MailHyperlink.java44
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/MailHyperlinkDetector.java217
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/Messages.java32
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileDownloadHyperlink.java191
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileHyperlink.java98
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileHyperlinkDetector.java95
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SpecfileElementHyperlink.java83
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SpecfileElementHyperlinkDetector.java160
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/URLHyperlinkWithMacroDetector.java57
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/messages.properties17
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileErrorHandler.java72
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileMarkerHandler.java61
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileTaskHandler.java66
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/messages.properties24
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/ContainsFilter.java61
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/Messages.java27
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileContentOutlinePage.java109
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileContentProvider.java115
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileLabelProvider.java79
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileQuickOutlineDialog.java166
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/messages.properties12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/Messages.java32
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SourceComparator.java32
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java315
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileDefine.java38
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileElement.java85
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileMacro.java16
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePackage.java134
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePackageContainer.java99
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParseException.java62
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java602
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePatchMacro.java41
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePreamble.java16
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSection.java84
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSource.java128
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileTag.java88
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/messages.properties27
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MacroProposalsPreferencePage.java427
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MainPreferencePage.java143
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/Messages.java61
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceConstants.java118
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceInitializer.java88
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmInformationsPreferencePage.java72
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmProposalsPreferencePage.java135
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/SpecTemplatePreferencePage.java60
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/TaskTagsPreferencePage.java78
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/messages.properties46
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/AuthorEmailRule.java134
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/CommentRule.java32
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/MacroRule.java34
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/SectionRule.java140
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/StringWithEndingRule.java107
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/VersionReleaseRule.java166
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileChangelogScanner.java78
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePackagesScanner.java83
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePartitionScanner.java109
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileScanner.java161
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/Messages.java54
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/NoExecutableWizardPage.java53
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizard.java171
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java442
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/messages.properties39
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/templates/templates.xml96
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/.classpath7
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/.cvsignore1
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/.project29
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/.settings/org.eclipse.jdt.core.prefs87
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/.settings/org.eclipse.jdt.ui.prefs54
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/.template4
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/ChangeLog649
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/META-INF/MANIFEST.MF22
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/OSGI-INF/l10n/bundle.properties14
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/about.html33
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/build.properties19
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/icons/rpm.gifbin0 -> 1019 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/plugin.xml109
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/IRPMUIConstants.java20
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/Messages.java33
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportOperation.java137
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportPage.java170
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportWizard.java111
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMNewProject.java93
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMUIPlugin.java128
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportOperation.java122
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportPage.java451
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportWizard.java79
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/ChangelogPage.java100
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/InstallScriptsPage.java153
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/Messages.java32
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/ProvidesPage.java101
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/SpecFileHeaderPage.java99
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/TargetPage.java159
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/messages.properties22
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/redhat-system_tools.pngbin0 -> 2438 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/rpm_strings.properties174
354 files changed, 30572 insertions, 0 deletions
diff --git a/rpm/org.eclipse.linuxtools.rpm-feature/.classpath b/rpm/org.eclipse.linuxtools.rpm-feature/.classpath
new file mode 100644
index 0000000000..ac37fb2e4b
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm-feature/.classpath
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/rpm/org.eclipse.linuxtools.rpm-feature/.project b/rpm/org.eclipse.linuxtools.rpm-feature/.project
new file mode 100644
index 0000000000..9af573f7e2
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm-feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.rpm-feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/rpm/org.eclipse.linuxtools.rpm-feature/ChangeLog b/rpm/org.eclipse.linuxtools.rpm-feature/ChangeLog
new file mode 100644
index 0000000000..39b22a5a26
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm-feature/ChangeLog
@@ -0,0 +1,85 @@
+2009-08-07 Alexander Kurtakov <akurtako@redhat.com>
+
+ * feature.properties: Fix provider to be Eclipse not Eclipse.org.
+
+2009-08-06 Alexander Kurtakov <akurtako@redhat.com>
+
+ * feature.xml: Remove doc plugin for now.
+
+2009-07-20 Alexander Kurtakov <akurtako@redhat.com>
+
+ * feature.xml: Remove unpack="false" for the doc plugin.
+
+2009-07-20 Alexander Kurtakov <akurtako@redhat.com>
+
+ * .project: This is not a Java project.
+ * feature.xml: No need for install handler.
+
+2009-07-17 Alexander Kurtakov <akurtako@redhat.com>
+
+ * feature.xml: Add update site.
+ * license.html: New file.
+ * build.properties: Add license.html to bin.includes.
+
+2009-07-17 Alexander Kurtakov <akurtako@redhat.com>
+
+ * feature.properties: Add more missing properties.
+ * feature.xml: Fill correct metadata.
+
+2009-07-17 Alexander Kurtakov <akurtako@redhat.com>
+
+ * build.properties: Fix copyright.
+ * feature.properties: Fix copyright and add Incubation to the name.
+ * feature.xml: Remove plugin versions and fix copyright.
+
+2007-01-29 Andrew Overholt <overholt@redhat.com>
+
+ * feature.xml: Use org.eclipse.linuxtools instead of org.eclipse.cdt.
+
+2005-05-27 Jeremy Handcock <handcock@redhat.com>
+
+ * about.html: New.
+ * build.properties: Include about.html.
+ * feature.xml: Bump version to 3.0.
+
+2005-05-18 Jeremy Handcock <handcock@redhat.com>
+
+ * feature.xml
+ (feature): Remove rpm.propertypage plug-in temporarily.
+ (requires): Remove CDT core dependency.
+ * build.properties (bin.includes): Correct.
+ (src.includes): Ditto.
+
+2004-11-11 Rick Moseley <rmoseley@redhat.com>
+
+ * change versions to 1.1 from 1.2
+ * feature.xml: add propertypage
+
+2004-07-15 Rick Moseley <rmoseley@redhat.com>
+
+ * change versions to 1.1 from 1.0
+ feature.xml - missed one
+
+2004-07-14 Rick Moseley <rmoseley@redhat.com>
+ * feature.xml: id renamed to com.redhat.eclipse.rpm
+ Recompute dependencies
+ * build.properties: added
+
+2004-02-11 Phil Muldoon <pmuldoon@redhat.com>
+
+ * build.xml (all.plugins) added ui/core. Removed import_export
+ * feature.xml : com.redhat.eclipse.rp.import_export removed
+ com.redhat.eclipse.rpm.ui added
+ com.redhat.eclipse.rom.core added
+ * .classpath : Updated for 2.1.2
+
+2003-09-08 Tom Tromey <tromey@redhat.com>
+
+ * feature.xml (id, label): Updated.
+ * feature.properties: New file.
+
+2003-08-27 Phil Muldoon <pmuldoon@redhat.com>
+
+ * build.xml(all.plugins): Added com.redhat.eclipse.rpm.doc
+ * feature.xml: Added com.redhat.eclipse.rpm.doc
+ *.classpath: Added for easier project work
diff --git a/rpm/org.eclipse.linuxtools.rpm-feature/about.html b/rpm/org.eclipse.linuxtools.rpm-feature/about.html
new file mode 100644
index 0000000000..44e229003e
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm-feature/about.html
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>8th September, 2004</p>
+<h3>License</h3>
+<p>The Eclipse Software Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<h3>Contributions</h3>
+
+<p>If this Content is licensed to you under the terms and conditions of the EPL, any Contributions, as defined in the EPL, uploaded, submitted, or otherwise
+made available to the Eclipse Foundation, its members and/or the host of the Eclipse Foundation web site, by you that relate to such
+Content are provided under the terms and conditions of the <a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>
+for the Eclipse Foundation web site and can be made available to others under the terms of the licenses as set out in the
+<a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>.</p>
+
+<p>If this Content is licensed to you under license terms and conditions other than the EPL (&quot;Other License&quot;), any modifications, enhancements and/or
+other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to the Eclipse Foundation, its members and/or the
+host of the Eclipse Foundation web site, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
+to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
+providing the Modifications under the terms and conditions of the <a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>
+for the Eclipse Foundation web site and such Modifications can be made available to others under the terms of the licenses as set out in the
+<a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm-feature/build.properties b/rpm/org.eclipse.linuxtools.rpm-feature/build.properties
new file mode 100644
index 0000000000..c1e6df3c13
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm-feature/build.properties
@@ -0,0 +1,21 @@
+###############################################################################
+# 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
+###############################################################################
+bin.includes = feature.xml,\
+ feature.properties,\
+ about.html
+src.includes = .classpath,\
+ .project,\
+ ChangeLog,\
+ build.properties,\
+ feature.properties,\
+ feature.xml,\
+ about.html,\
+ license.html
diff --git a/rpm/org.eclipse.linuxtools.rpm-feature/feature.properties b/rpm/org.eclipse.linuxtools.rpm-feature/feature.properties
new file mode 100644
index 0000000000..dc9081e230
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm-feature/feature.properties
@@ -0,0 +1,134 @@
+###############################################################################
+# 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
+###############################################################################
+
+# features.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=RPM Import/Export and Building Tool (Incubation)
+provider=Eclipse
+description=Export/Import and Build tools.
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2007-2009 Red Hat, Inc and others. All rights reserved.\n\
+\n\
+This program and the accompanying materials are made available under the terms\n\
+of the Eclipse Public License v1.0 which accompanies this distribution, and is\n\
+available at http://www.eclipse.org/legal/epl-v10.html\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/rpm/org.eclipse.linuxtools.rpm-feature/feature.xml b/rpm/org.eclipse.linuxtools.rpm-feature/feature.xml
new file mode 100644
index 0000000000..5ffc31b701
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm-feature/feature.xml
@@ -0,0 +1,59 @@
+<?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
+ -->
+<feature
+ id="org.eclipse.linuxtools.rpm"
+ label="%featureName"
+ version="0.4.3.qualifier"
+ provider-name="%provider">
+
+ <description url="http://www.eclipse.org/linuxtools/projectPages/specfile/">
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="Linux Tools Update Site" url="http://download.eclipse.org/technology/linuxtools/update"/>
+ </url>
+
+ <requires>
+ <import plugin="org.eclipse.core.resources"/>
+ <import plugin="org.eclipse.core.runtime"/>
+ <import plugin="org.eclipse.ui"/>
+ <import plugin="org.eclipse.ui.ide"/>
+ <import plugin="org.eclipse.jface.text"/>
+ <import plugin="org.eclipse.swt"/>
+ <import plugin="org.eclipse.jface"/>
+ <import plugin="org.eclipse.text"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.linuxtools.rpm.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.rpm.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/rpm/org.eclipse.linuxtools.rpm-feature/license.html b/rpm/org.eclipse.linuxtools.rpm-feature/license.html
new file mode 100644
index 0000000000..f5a16251a8
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm-feature/license.html
@@ -0,0 +1,81 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+(&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/.classpath b/rpm/org.eclipse.linuxtools.rpm.core.tests/.classpath
new file mode 100644
index 0000000000..64c5e31b7a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/.cvsignore b/rpm/org.eclipse.linuxtools.rpm.core.tests/.cvsignore
new file mode 100644
index 0000000000..ba077a4031
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/.cvsignore
@@ -0,0 +1 @@
+bin
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/.project b/rpm/org.eclipse.linuxtools.rpm.core.tests/.project
new file mode 100644
index 0000000000..cc88be150d
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.rpm.core.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/.settings/org.eclipse.jdt.core.prefs b/rpm/org.eclipse.linuxtools.rpm.core.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..b8db5e188c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,70 @@
+#Tue Jul 21 18:25:11 EEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/ChangeLog b/rpm/org.eclipse.linuxtools.rpm.core.tests/ChangeLog
new file mode 100644
index 0000000000..ce3bc925ef
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/ChangeLog
@@ -0,0 +1,150 @@
+2010-01-08 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectTest.java (testBuildSourceRPMHelloWorld): Adapt to api changes.
+
+2009-09-07 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectTest.java (testImportHelloWorld): Drop checks not needed.
+
+2009-08-07 Alexander Kurtakov <akurtako@redhat.com>
+
+ * OSGI-INF/l10n/bundle.properties: Fix provider to be Eclipse not Eclipse.org.
+
+2009-07-22 Alexander Kurtakov <akurtako@redhat.com>
+
+ * .settings/org.eclipse.jdt.core.prefs: Enable more warnings.
+ * src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectNatureTest.java (setUp): Add missing @Override.
+ * src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectTest.java (setUp): Likewise.
+ (suite): Removed as it is not needed.
+
+2009-07-21 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectFactoryTest.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/tests/AllTests.java (suite): Remove nonexisting test.
+ * src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectTest.java (testBuildPrepHelloWorld): Create RPMProject directly.
+ (testImportHelloWorld): Likewise.
+ (testBuildSourceRPMHelloWorld): Likewise.
+
+2009-07-21 Alexander Kurtakov <akurtako@redhat.com>
+
+ * META-INF/MANIFEST.MF: No need to export packages.
+
+2009-07-21 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/core: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/internal/tests/RPMCoreInternalTestSuite.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/internal/tests/RPMProjectTest.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/tests/RPMCoreTestsPlugin.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/tests/RPMCoreTestSuite.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectTest.java: New file.
+ * META-INF/MANIFEST.MF: Remove not needed Require-Bundle and Bundle-Activator.
+ * src/org/eclipse/linuxtools/rpm/core/tests/AllTests.java (suite): Add tests directly.
+ * src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectFactoryTest.java (testGetNewProject): Use RPMProject directly.
+
+2009-07-17 Alexander Kurtakov <akurtako@redhat.com>
+
+ * OSGI-INF/l10n/bundle.properties: New file.
+ * build.properties: Simplify build.
+ * META-INF/MANIFEST.MF: Don't export any package and externalize strings.
+
+2009-06-25 Alexander Kurtakov <akurtako@redhat.com>
+
+ * build.properties: Fix copyright header.
+ * src/org/eclipse/linuxtools/rpm/core/internal/tests/RPMCoreInternalTestSuite.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/internal/tests/RPMProjectTest.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/tests/AllTests.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/tests/RPMCoreTestsPlugin.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/tests/RPMCoreTestSuite.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectFactoryTest.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectNatureTest.java: Likewise.
+
+2009-06-09 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/core/internal/tests/RPMProjectTest.java (testImportHelloWorld): Adapt to API changes.
+ (testBuildSourceRPMHelloWorld): Likewise.
+
+2009-06-08 Alexander Kurtakov <akurtako@redhat.com>
+
+ * plugin.xml: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/internal/tests/SpecFileParserTest.java: Removed.
+ * .settings/org.eclipse.jdt.core.prefs: New file.
+ * .classpath: J2SE-1.5.
+ * build.properties: Likewise.
+ * META-INF/MANIFEST.MF: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/internal/tests/RPMCoreInternalTestSuite.java (suite): Remove test not present anymore.
+ * src/org/eclipse/linuxtools/rpm/core/internal/tests/RPMProjectTest.java (testIsChangedHelloWorld1): Remove code testing old implementation.
+ (setUp): Likewise.
+ (testBuildPrepHelloWorld): Likewise.
+ (testImportHelloWorld): Likewise.
+ (testIsChangedHelloWorld): Likewise.
+ (testBuildSourceRPMHelloWorld): Likewise.
+ (suite): Likewise.
+ (testBuildSourceRPMHelloWorld1): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectFactoryTest.java (testGetNewProject): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectNatureTest.java (testAddRPMProjectNature): Likewise.
+
+2008-11-01 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * META-INF/MANIFEST.MF: Replace deprecated Eclipse-LazyStart usage.
+
+2007-05-04 Andrew Overholt <overholt@redhat.com>
+
+ Bug #185598
+ * META-INF/MANIFEST.MF: Add "Incubation" to Bundle-Name.
+
+2007-04-05 Remy Suen <remy.suen@gmail.com>
+
+ Bug #181249
+ * .classpath: Set required EE.
+ * META-INF/MANIFEST.MF: Initial commit.
+ * build.properties: Include MANIFEST.MF.
+ * plugin.xml: Declare dependency and runtime information in an OSGi
+ manifest.
+
+2007-01-30 Andrew Overholt <overholt@redhat.com>
+
+ * : Re-namespace from cdt to linuxtools.
+
+2005-05-27 Jeremy Handcock <handcock@redhat.com>
+
+ * plugin.xml: Bump version to 3.0.
+
+2005-05-18 Jeremy Handcock <handcock@redhat.com>
+
+ Eclipse.org Bugzilla #82195:
+
+ * plugin.xml (requires): Remove CDT core dependency.
+ * build.properties (src.includes): Correct.
+
+ * resources/specs/helloworld.spec: New.
+
+ * src/org/eclipse/cdt/rpm/core/internal/RPMCoreInternalTestSuite.java:
+ New.
+ * src/org/eclipse/cdt/rpm/core/internal/RPMProjectTest.java: New.
+ * src/org/eclipse/cdt/rpm/core/internal/SpecFileParserTest.java: New.
+
+ * src/org/eclipse/cdt/rpm/core/AllTests.java
+ (suite): Add RPMCoreInternalTestSuite.
+ * src/org/eclipse/cdt/rpm/core/CProjectHelper.java: Remove.
+ * src/org/eclipse/cdt/rpm/core/RPMCoreTestSuite.java
+ (suite): Remove old tests; add new tests.
+ * src/org/eclipse/cdt/rpm/core/RPMExportTests.java: Remove.
+ * src/org/eclipse/cdt/rpm/core/RPMProjetFactoryTests.java: New.
+ * src/org/eclipse/cdt/rpm/core/RPMProjectNatureTests.java: New.
+ * src/org/eclipse/cdt/rpm/core/SRPMExportTests.java: Remove.
+ * src/org/eclipse/cdt/rpm/core/SRPMImportTests.java: Remove.
+
+2004-12-10 Jeremy Handcock <handcock@redhat.com>
+
+ * plugin.xml (requires): Remove org.eclipse.cdt.core.tests dependency.
+ * src/org/eclipse/cdt/rpm/tests/AllTests.java: Move ...
+ * src/org/eclipse/cdt/rpm/core/tests/AllTests.java: ... to here.
+ * src/org/eclipse/cdt/rpm/core/tests/CProjectHelper.java: New file.
+ * src/org/eclipse/cdt/rpm/core/tests/RPMExportTests.java: Don't catch
+ exceptions; let the test harness handle them.
+ * src/org/eclipse/cdt/rpm/core/tests/SRPMExportTests.java: Ditto.
+ * src/org/eclipse/cdt/rpm/core/tests/SRPMImportTests.java: Ditto.
+
+2004-12-03 Aaron Luchko <aluchko@redhat.com>
+
+ * Initial Import
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/META-INF/MANIFEST.MF b/rpm/org.eclipse.linuxtools.rpm.core.tests/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..8db74af63f
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.eclipse.linuxtools.rpm.core.tests;singleton:=true
+Bundle-Version: 0.4.3.qualifier
+Bundle-Vendor: %Bundle-Vendor.0
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.linuxtools.rpm.core,
+ org.eclipse.core.resources,
+ org.junit
+Export-Package: org.eclipse.linuxtools.rpm.core.tests
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/OSGI-INF/l10n/bundle.properties b/rpm/org.eclipse.linuxtools.rpm.core.tests/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 0000000000..4e2cf889ca
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.linuxtools.rpm.core.tests
+Bundle-Vendor.0 = Eclipse
+Bundle-Name.0 = RPM Tests Plug-in (Incubation) \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/build.properties b/rpm/org.eclipse.linuxtools.rpm.core.tests/build.properties
new file mode 100644
index 0000000000..e9bbc96a34
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/build.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# 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
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = .,\
+ resources/,\
+ META-INF/,\
+ OSGI-INF/l10n/bundle.properties
+src.includes = .classpath,\
+ .project,\
+ ChangeLog,\
+ build.properties,\
+ resources/,\
+ src/,\
+ META-INF/
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/resources/specs/helloworld.spec b/rpm/org.eclipse.linuxtools.rpm.core.tests/resources/specs/helloworld.spec
new file mode 100644
index 0000000000..7361d38ad9
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/resources/specs/helloworld.spec
@@ -0,0 +1,30 @@
+%define _unpackaged_files_terminate_build 0
+Summary: None - Eclipse-generated spec file
+Name: helloworld
+Version: 2
+Release: 2
+License: GPL
+Group: Applications/Internet
+Source: helloworld-%{version}.tar.bz2
+Requires: tar
+BuildRoot: %{_tmppath}/%{name}-root
+%description
+
+Basic spec file for rpm build in Eclipse for helloworld
+
+%prep
+%setup -q
+%build
+
+make
+
+%install rm -rf $RPM_BUILD_ROOT
+%makeinstall RPM_BUILD_ROOT=$RPM_BUILD_ROOT
+%clean
+rm -rf $RPM_BUILD_ROOT
+%files
+%defattr(-,root,root)
+/usr/local/bin/helloworld
+%changelog
+* Tue Sep 07 2004 Rick Moseley <rmoseley@redhat.com>
+- Original
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/resources/srpms/helloworld-2-2.src.rpm b/rpm/org.eclipse.linuxtools.rpm.core.tests/resources/srpms/helloworld-2-2.src.rpm
new file mode 100644
index 0000000000..7a757ed11d
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/resources/srpms/helloworld-2-2.src.rpm
Binary files differ
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
new file mode 100644
index 0000000000..ca5f48edd2
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/AllTests.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.core.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTests extends TestSuite{
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Test for org.eclipse.linuxtools.rpm.core.tests");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(RPMProjectTest.class);
+ suite.addTestSuite(RPMProjectNatureTest.class);
+ //$JUnit-END$
+ return suite;
+ }
+}
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
new file mode 100644
index 0000000000..c4b007cd2a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectNatureTest.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.core.tests;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.linuxtools.rpm.core.RPMProjectNature;
+
+public class RPMProjectNatureTest extends TestCase {
+
+ IWorkspace workspace;
+ IWorkspaceRoot root;
+ NullProgressMonitor monitor;
+ String pluginRoot;
+
+ /*
+ * @see TestCase#setUp()
+ */
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ IWorkspaceDescription desc;
+ workspace = ResourcesPlugin.getWorkspace();
+ root = workspace.getRoot();
+ monitor = new NullProgressMonitor();
+ if(workspace == null) {
+ fail("Workspace was not setup");
+ }
+ if(root == null) {
+ fail("Workspace root was not setup");
+ }
+ desc = workspace.getDescription();
+ desc.setAutoBuilding(false);
+ workspace.setDescription(desc);
+ }
+
+ public void testAddRPMProjectNature() throws Exception {
+ IProject testProject = root.getProject("testProject");
+ testProject.create(monitor);
+ testProject.open(monitor);
+ RPMProjectNature.addRPMNature(testProject, monitor);
+ assertTrue(testProject.hasNature(RPMProjectNature.RPM_NATURE_ID));
+ testProject.delete(true, false, monitor);
+ }
+
+}
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
new file mode 100644
index 0000000000..a31730ef30
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectTest.java
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.core.tests;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.linuxtools.rpm.core.IRPMConstants;
+import org.eclipse.linuxtools.rpm.core.RPMCorePlugin;
+import org.eclipse.linuxtools.rpm.core.RPMProject;
+import org.eclipse.linuxtools.rpm.core.RPMProjectNature;
+import org.osgi.framework.FrameworkUtil;
+
+public class RPMProjectTest extends TestCase {
+
+ IWorkspace workspace;
+ IWorkspaceRoot root;
+ NullProgressMonitor monitor;
+ String pluginRoot;
+
+ final String file_sep = System.getProperty("file.separator"); //$NON-NLS-1$
+
+ /*
+ * @see TestCase#setUp()
+ */
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ IWorkspaceDescription desc;
+ workspace = ResourcesPlugin.getWorkspace();
+ root = workspace.getRoot();
+ monitor = new NullProgressMonitor();
+ if (workspace == null) {
+ fail("Workspace was not setup");
+ }
+ if (root == null) {
+ fail("Workspace root was not setup");
+ }
+ desc = workspace.getDescription();
+ desc.setAutoBuilding(false);
+ workspace.setDescription(desc);
+ }
+
+ public void testImportHelloWorld() throws Exception {
+ // Create a project for the test
+ IProject testProject = root.getProject("testHelloWorld");
+ testProject.create(monitor);
+ testProject.open(monitor);
+
+ // Instantiate an RPMProject
+ RPMProject rpmProject = new RPMProject(testProject);
+
+ // Find the test SRPM and install it
+ URL url = FileLocator.find(FrameworkUtil.getBundle(RPMProjectTest.class), new Path(
+ "resources" + file_sep + "srpms" + file_sep + //$NON-NLS-1$ //$NON-NLS-2$
+ "helloworld-2-2.src.rpm"), null);
+ if (url == null) {
+ fail("Unable to find resource" + file_sep + "srpms" + file_sep
+ + "helloworld-2-2.src.rpm");
+ }
+ File foo = new File(FileLocator.toFileURL(url).getPath());
+ rpmProject.importSourceRPM(foo);
+
+ // Make sure the original SRPM got copied into the workspace
+ IFile srpm = rpmProject.getConfiguration().getSrpmsFolder().getFile(
+ "helloworld-2-2.src.rpm");
+ assertTrue(srpm.exists());
+ assertNotNull(rpmProject.getProject()
+ .getPersistentProperty(
+ new QualifiedName(RPMCorePlugin.ID,
+ IRPMConstants.SRPM_PROPERTY)));
+
+ // Make sure everything got installed properly
+ IFile spec = rpmProject.getConfiguration().getSpecsFolder().getFile(
+ "helloworld.spec");
+ assertTrue(spec.exists());
+ IFile sourceBall = rpmProject.getConfiguration().getSourcesFolder()
+ .getFile("helloworld-2.tar.bz2");
+ assertTrue(sourceBall.exists());
+
+ // Make sure we got the spec file
+ IFile specFile = rpmProject.getSpecFile();
+ assertTrue(specFile != null);
+ assertNotNull(rpmProject.getProject().getPersistentProperty(
+ new QualifiedName(RPMCorePlugin.ID,
+ IRPMConstants.SPEC_FILE_PROPERTY)));
+
+ // Make sure the RPM nature was added
+ assertTrue(rpmProject.getProject().hasNature(
+ RPMProjectNature.RPM_NATURE_ID));
+
+ // Clean up
+ testProject.delete(true, false, monitor);
+ }
+
+ public void testBuildPrepHelloWorld() throws Exception {
+ // Create a project for the test
+ IProject testProject = root.getProject("testBuildPrepHelloWorld");
+ testProject.create(monitor);
+ testProject.open(monitor);
+
+ // Instantiate an RPMProject
+ RPMProject rpmProject = new RPMProject(testProject);
+
+ // Find the test SRPM, install, and build-prep it
+ URL url = FileLocator.find(FrameworkUtil.getBundle(RPMProjectTest.class), new Path(
+ "resources" + file_sep + "srpms" + file_sep + //$NON-NLS-1$ //$NON-NLS-2$
+ "helloworld-2-2.src.rpm"), null);
+ if (url == null) {
+ fail("Unable to find resource" + file_sep + "srpms" + file_sep
+ + "helloworld-2-2.src.rpm");
+ }
+ File foo = new File(FileLocator.toFileURL(url).getPath());
+ rpmProject.importSourceRPM(foo);
+ rpmProject.buildPrep();
+
+ // Make sure we got everything in the build directory
+ IFolder builddir = rpmProject.getConfiguration().getBuildFolder();
+ IFolder helloworldFolder = builddir.getFolder("helloworld-2");
+ assertTrue(helloworldFolder.exists());
+
+ // Clean up
+ testProject.delete(true, false, monitor);
+ }
+
+ public void testBuildSourceRPMHelloWorld() throws Exception {
+ // Create a project for the test
+ IProject testProject = root.getProject("testBuildSourceRPMHelloWorld1");
+ testProject.create(monitor);
+ testProject.open(monitor);
+
+ // Instantiate an RPMProject
+ RPMProject rpmProject = new RPMProject(testProject);
+
+ // Find the test SRPM and install it
+ URL url = FileLocator.find(FrameworkUtil.getBundle(RPMProjectTest.class), new Path(
+ "resources" + file_sep + "srpms" + file_sep + //$NON-NLS-1$ //$NON-NLS-2$
+ "helloworld-2-2.src.rpm"), null);
+ if (url == null) {
+ fail("Unable to find resource" + file_sep + "srpms" + file_sep
+ + "helloworld-2-2.src.rpm");
+ }
+ File foo = new File(FileLocator.toFileURL(url).getPath());
+ rpmProject.importSourceRPM(foo);
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ rpmProject.buildSourceRPM(bos);
+
+ IFile foo2 = rpmProject.getConfiguration().getSrpmsFolder().getFile(
+ "helloworld-2-2.src.rpm");
+ assertTrue(foo2.exists());
+
+ testProject.delete(true, false, null);
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/.classpath b/rpm/org.eclipse.linuxtools.rpm.core/.classpath
new file mode 100644
index 0000000000..304e86186a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/.cvsignore b/rpm/org.eclipse.linuxtools.rpm.core/.cvsignore
new file mode 100644
index 0000000000..ba077a4031
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/.cvsignore
@@ -0,0 +1 @@
+bin
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/.project b/rpm/org.eclipse.linuxtools.rpm.core/.project
new file mode 100644
index 0000000000..680f5fa63c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.rpm.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/.settings/org.eclipse.jdt.core.prefs b/rpm/org.eclipse.linuxtools.rpm.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..fe64b522aa
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,87 @@
+#Fri Jan 08 17:15:36 EET 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/.settings/org.eclipse.jdt.ui.prefs b/rpm/org.eclipse.linuxtools.rpm.core/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..7b306f10de
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,54 @@
+#Fri Dec 18 15:00:14 EET 2009
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=false
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=false
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/.template b/rpm/org.eclipse.linuxtools.rpm.core/.template
new file mode 100644
index 0000000000..d65e0f4481
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/.template
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<form>
+ <p/><p><b>Tips on working with this plug-in project</b></p><li>For the view of the new plug-in at a glance, go to the <img href="pageImage"/><a href="OverviewPage">Overview</a>.</li><li>You can test the contributions of this plug-in by launching another instance of the workbench. On the <b>Run</b> menu, click <b>Run As</b> and choose <img href="runTimeWorkbenchImage"/><a href="action.run">Run-time Workbench</a> from the available choices.</li><li>You can add more functionality to this plug-in by adding extensions using the <a href="action.newExtension">New Extension Wizard</a>.</li><li>The plug-in project contains Java code that you can debug. Place breakpoints in Java classes. On the <b>Run</b> menu, select <b>Debug As</b> and choose <img href="runTimeWorkbenchImage"/><a href="action.debug">Run-time Workbench</a> from the available choices.</li>
+</form>
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/ChangeLog b/rpm/org.eclipse.linuxtools.rpm.core/ChangeLog
new file mode 100644
index 0000000000..d0a224ca8e
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/ChangeLog
@@ -0,0 +1,726 @@
+2010-01-19 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/core/RPMCorePlugin.java: Removed not needed methods.
+ * src/org/eclipse/linuxtools/rpm/core/RPMProject.java (importSourceRPM): Assign directly to the variable.
+ * src/org/eclipse/linuxtools/rpm/core/utils/Utils.java (fileExist): New method.
+ (copyFile): Likewise.
+ (inputStreamToString): Concatenate with StringBuilder.
+ (runCommandToString): Fix javadoc.
+
+2010-01-12 Alexander Kurtakov <akurtako@redhat.com>
+
+ * .settings/org.eclipse.jdt.core.prefs: Enable more warnings.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPM.java (install): Fix javadoc.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPMBuild.java (buildAll): Likewise.
+ (buildBinary): Likewise.
+ (buildPrep): Likewise.
+ (buildSource): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/Utils.java (runCommandToInputStream): Likewise.
+ (inputStreamToString): Likewise.
+ (runCommand): Likewise.
+
+2010-01-08 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/core/RPMProject.java (buildSourceRPM): Make it void which writes to the passed OutputStream.
+ (buildBinaryRPM): Likewise.
+ (buildAll): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPMBuild.java (buildAll): Likewise.
+ (buildBinary): Likewise.
+ (buildSource): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/Utils.java (runCommandToInputStream): Remove not needed try/catch.
+ (inputStreamToString): Javadoc format.
+ (runCommand): New method.
+
+2009-12-18 Alexander Kurtakov <akurtako@redhat.com>
+
+ * .settings/org.eclipse.jdt.ui.prefs: New file.
+
+2009-12-18 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/core/RPMProject.java (setSpecFile): Store directly, there is no need to keep local variable.
+
+2009-12-18 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/core/RPMCoreInitializer.java: New file.
+ * plugin.xml: Add preference Initializer.
+ * src/org/eclipse/linuxtools/rpm/core/RPMCorePlugin.java (initializeDefaultPreferences): Remove deprecated message override.
+
+2009-08-13 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/core/RPMProject.java (buildPrep): Don't set sources folder.
+ (generateFileCheckSum): Removed.
+ (generateProjectChecksum): Removed.
+ (prepareExport): Do not store checksums.
+ (importSourceRPM): Likewise.
+ (getSpecFile): Return first member of SPECS folder.
+
+2009-08-07 Alexander Kurtakov <akurtako@redhat.com>
+
+ * plugin.properties: Fix provider to be Eclipse not Eclipse.org.
+
+2009-07-21 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/core/RPMProjectFactory.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/RPMConfiguration.java (initialize): Don't try to create existing folders.
+
+2009-07-21 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/core/internal/Messages.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/internal/rpm_strings.properties: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/internal/RPMConfiguration.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/internal/SourceRPM.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/IRPMConfiguration.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/ISourceRPM.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/Messages.java: New file.
+ * src/org/eclipse/linuxtools/rpm/core/rpm_strings.properties: New file.
+ * src/org/eclipse/linuxtools/rpm/core/RPMConfiguration.java: New file.
+ * src/org/eclipse/linuxtools/rpm/core/SourceRPM.java: New file.
+ * META-INF/MANIFEST.MF: Remove package export.
+ * src/org/eclipse/linuxtools/rpm/core/IRPMConstants.java: Fix imports.
+ * src/org/eclipse/linuxtools/rpm/core/RPMCorePlugin.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/RPMProject.java (getSourceRPM): Use implementations.
+ (setSourceRPM): Likewise.
+ (getConfiguration): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/RPMProjectFactory.java (getRPMProject): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPM.java (RPM): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPMBuild.java (RPMBuild): Likewise.
+
+2009-07-21 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/core/internal/RPMProject.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/IRPMProject.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/RPMProject.java: New file.
+ * src/org/eclipse/linuxtools/rpm/core/RPMProjectFactory.java (getRPMProject): Use the implementation directly.
+
+2009-07-17 Alexander Kurtakov <akurtako@redhat.com>
+
+ * license.html: New file.
+ * build.properties: Add license.html to bin.includes.
+
+2009-07-17 Alexander Kurtakov <akurtako@redhat.com>
+
+ * META-INF/MANIFEST.MF: Sync version with other rpm plugins.
+ * plugin.properties: Fix Copyright.
+ * src/org/eclipse/linuxtools/rpm/core/internal/Messages.java: Fix Copyright.
+
+2009-07-16 Alexander Kurtakov <akurtako@redhat.com>
+
+ * build.properties: Simplify build.
+ * META-INF/MANIFEST.MF: Likewise.
+
+2009-07-16 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/core/utils/Utils.java (runCommandToInputStream): Don't use Java 1.6 API.
+
+2009-07-16 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/core/internal/utils/Command.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/internal/utils/ShellScript.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/internal/utils/StreamReaderThread.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/utils/Diff.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/utils/Utils.java: New file.
+ * META-INF/MANIFEST.MF: Don't export o.e.l.rpm.core.internal.util.
+ * src/org/eclipse/linuxtools/rpm/core/internal/RPMProject.java (buildSourceRPM): Return InputStream.
+ (buildBinaryRPM): Likewise.
+ (buildAll): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/IRPMProject.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPM.java (install): Invoke directly instead of creating shell scripts.
+ (RPM): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPMBuild.java (buildAll): Likewise.
+ (buildBinary): Likewise.
+ (buildPrep): Likewise.
+ (rebuild): Likewise.
+ (buildSource): Likewise.
+ (RPMBuild): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPMQuery.java (getBuildTime): Likewise.
+ (getHeaderInfo): Likewise.
+ (getArch): Likewise.
+ (query): Likewise.
+ (getPostInstallScript): Likewise.
+ (getPreInstallScript): Likewise.
+ (getPlatform): Likewise.
+ (getBuildHost): Likewise.
+ (getChangelog): Likewise.
+ (getPreUninstallScript): Likewise.
+ (getProvides): Likewise.
+ (getPostUninstallScript): Likewise.
+ (getOS): Likewise.
+
+2009-06-29 Alexander Kurtakov <akurtako@redhat.com>
+
+ * .settings/org.eclipse.jdt.core.prefs: Enable more warnings.
+ * src/org/eclipse/linuxtools/rpm/core/internal/utils/ShellScript.java (exec): Fix NON-NLS warning.
+ * src/org/eclipse/linuxtools/rpm/core/internal/utils/StreamReaderThread.java (run): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/IRPMConstants.java (RPM_DISPLAYED_LOG_NAME): Remove not needed constants.
+ * src/org/eclipse/linuxtools/rpm/core/RPMCorePlugin.java (getHostName): Removed.
+ (getWorkspace): Likewise.
+ (start): Likewise.
+ (stop): Likewise.
+ (initializeDefaultPreferences): Remove not needed constants.
+ * src/org/eclipse/linuxtools/rpm/core/utils/Diff.java (Diff): Add missing NON-NLS.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPM.java (RPM): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPMBuild.java (RPMBuild): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPMQuery.java (query): Likewise.
+
+2009-06-29 Alexander Kurtakov <akurtako@redhat.com>
+
+ * plugin.properties: New file.
+ * build.properties: Externalize strings.
+ * META-INF/MANIFEST.MF: Likewise.
+ * plugin.xml: Likewise.
+
+2009-06-25 Alexander Kurtakov <akurtako@redhat.com>
+ Fix for #281480.
+ * src/org/eclipse/linuxtools/rpm/core/internal/RPMProject.java (importSourceRPM): Do not build on import.
+ This prevents importing srpms that are not buildable for some reason.
+
+2009-06-25 Alexander Kurtakov <akurtako@redhat.com>
+ Fix for #179156.
+ * src/org/eclipse/linuxtools/rpm/core/utils/internal/Command.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/utils/internal/ShellScript.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/utils/internal/StreamReaderThread.java: Removed.
+ * build.properties: Remove reference to non-existing file.
+ * META-INF/MANIFEST.MF: Fix package name.
+ * src/org/eclipse/linuxtools/rpm/core/internal/utils/Command.java: Fix internal package names.
+ * src/org/eclipse/linuxtools/rpm/core/internal/utils/ShellScript.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/internal/utils/StreamReaderThread.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/Diff.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPM.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPMBuild.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPMQuery.java: Likewise.
+
+2009-06-25 Alexander Kurtakov <akurtako@redhat.com>
+
+ * plugin.properties: Removed.
+ * build.properties: Fix copyright header.
+ * plugin.xml: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/internal/Messages.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/internal/rpm_strings.properties: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/internal/RPMConfiguration.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/internal/RPMProject.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/internal/SourceRPM.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/IRPMConfiguration.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/IRPMConstants.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/IRPMProject.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/ISourceRPM.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/RPMCorePlugin.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/RPMProjectFactory.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/RPMProjectNature.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/Diff.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/internal/Command.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/internal/ShellScript.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/internal/StreamReaderThread.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPM.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPMBuild.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPMQuery.java: Likewise.
+
+2009-06-09 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/core/IRPMConfiguration.java: Add TODO.
+
+2009-06-09 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/core/RPMExportDelta.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/internal/RPMProject.java (buildSourceRPM): Adapt to RPMExportDelta removal.
+ (buildBinaryRPM): Likewise.
+ (buildAll): Likewise.
+ (prepareExport): Likewise.
+ (importSourceRPM): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/IRPMProject.java: Likewise.
+
+2009-06-08 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/core/internal/Patch.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/internal/SpecFile.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/internal/SpecFileParser.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/IPatch.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/ISpecFile.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/core/internal/RPMProject.java (setSpecFile): Remove not needed parts.
+ (buildBinaryRPM): Likewise.
+ (buildSourceRPM): Likewise.
+ (buildAll): Likewise.
+ (importSourceRPM): Likewise.
+ (buildPrep): Likewise.
+ (copySources): Likewise.
+ (getSpecFile): Likewise.
+ (getSourceRPM): Likewise.
+ (RPMProject): Likewise.
+ (setSourceRPM): Likewise.
+ (prepareExport): Likewise.
+ (generateFileCheckSum): Likewise.
+ (generateProjectChecksum): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/IRPMProject.java (getProject): No more ISpecFile, use IFile.
+ * src/org/eclipse/linuxtools/rpm/core/RPMProjectFactory.java (getRPMProject): Likewise.
+
+2009-05-29 Alexander Kurtakov <akurtako@redhat.com>
+
+ * .classpath: J2SE-1.5.
+ * src/org/eclipse/linuxtools/rpm/core/utils/Diff.java (Diff): Remove deprecated usage.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPM.java (RPM): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPMBuild.java (RPMBuild): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPMQuery.java (query): Likewise.
+
+2009-05-28 Alexander Kurtakov <akurtako@redhat.com>
+
+ * .settings/org.eclipse.jdt.core.prefs: New file.
+ * META-INF/MANIFEST.MF: BREE J2SE-1.5
+ * src/org/eclipse/linuxtools/rpm/core/RPMCorePlugin.java (stop): Add @Override.
+ (start): Likewise.
+ (initializeDefaultPreferences): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/internal/StreamReaderThread.java (run): Likewise.
+
+2009-05-28 Alexander Kurtakov <akurtako@redhat.com>
+ Modernize.
+ * plugin.properties: New file.
+ * build.properties: Include plugin.properties.
+ * src/org/eclipse/linuxtools/rpm/core/internal/RPMProject.java (findExcludedFiles): Modernize.
+ (find): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/internal/SpecFileParser.java (getNumPatches): Likewise.
+ (getLastPatchMacroLine): Likewise.
+ (parseDefine): Likewise.
+ (getSetupLine): Likewise.
+ (parseNameVerRel): Likewise.
+ (getUniquePatchId): Likewise.
+ (parse): Likewise.
+ (getLastSourceLine): Likewise.
+ (parseConfigureArgs): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/RPMProjectNature.java (removeNature): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/internal/Command.java (exec): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPM.java (RPM): Likewise.
+ * src/org/eclipse/linuxtools/rpm/core/utils/RPMBuild.java (RPMBuild): Likewise.
+
+2008-11-01 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * META-INF/MANIFEST.MF: Replace deprecated Eclipse-LazyStart usage.
+
+2007-05-04 Andrew Overholt <overholt@redhat.com>
+
+ Bug #185598
+ * META-INF/MANIFEST.MF: Add "Incubation" to Bundle-Name.
+
+2007-04-05 Remy Suen <remy.suen@gmail.com>
+
+ Bug #181249
+ * META-INF/MANIFEST.MF: Initial commit.
+ * build.properties: Include MANIFEST.MF.
+ * plugin.xml: Declare dependency and runtime information in an OSGi
+ manifest.
+
+2007-01-29 Andrew Overholt <overholt@redhat.com>
+
+ * : Re-namespace from cdt to linuxtools.
+
+2005-05-27 Jeremy Handcock <handcock@redhat.com>
+
+ * plugin.xml: Bump version to 3.0.
+
+2005-05-19 Jeremy Handcock <handcock@redhat.com>
+
+ Eclipse.org Bugzilla #82196:
+ * src/org/eclipse/cdt/rpm/core/utils/RPMQuery.java: New.
+ * src/org/eclipse/cdt/rpm/core/utils/internal/Command.java
+ (exec): Return standard output as String.
+ * src/org/eclipse/cdt/rpm/core/utils/internal/ShellScript.java
+ (execNoLog): Same.
+ (exec): Same.
+
+2005-05-18 Jeremy Handcock <handcock@redhat.com>
+
+ Eclipse.org Bugzilla #82195:
+
+ * build.properties (bin.includes): Correct.
+ (src.includes): Ditto.
+ * plugin.xml (runtime): Remove RPMPluginPreferencesPage.jar.
+
+ * src/org/eclipse/cdt/rpm/core/IPatch.java: New.
+ * src/org/eclipse/cdt/rpm/core/IRPMConfiguration.java: New.
+ * src/org/eclipse/cdt/rpm/core/IRPMConstants.java: New.
+ * src/org/eclipse/cdt/rpm/core/IRPMProject.java: New.
+ * src/org/eclipse/cdt/rpm/core/ISourceRPM.java: New.
+ * src/org/eclipse/cdt/rpm/core/LinuxShellCmds.java: Remove.
+ * src/org/eclipse/cdt/rpm/core/Messages.java: Move to core.internal.
+ * src/org/eclipse/cdt/rpm/core/rpm_strings.properties: Ditto.
+ * src/org/eclipse/cdt/rpm/core/RPMCore.java: Remove.
+ * src/org/eclipse/cdt/rpm/core/RPMCorePlugin.java
+ (initializeDefaultPreferences): Use IRPMConstants.
+ (getExternalLogFile): New method.
+ * src/org/eclipse/cdt/rpm/core/RPMExport.java: Remove.
+ * src/org/eclipse/cdt/rpm/core/RPMExportCore.java: Remove.
+ * src/org/eclipse/cdt/rpm/core/RPMExportDelta.java: New.
+ * src/org/eclipse/cdt/rpm/core/RPMProjectFactory.java: New.
+ * src/org/eclipse/cdt/rpm/core/RPMProjectNature.java: New.
+ * src/org/eclipse/cdt/rpm/core/SpecFileOps.java: Remove; move relics
+ to core.internal.SpecFileParser.
+ * src/org/eclipse/cdt/rpm/core/SRPMExport.java: Remove.
+ * src/org/eclipse/cdt/rpm/core/SRPMImport.java: Remove.
+ * src/org/eclipse/cdt/rpm/core/StreamReaderThread.java: Move to
+ core.utils.internal.
+ * src/org/eclipse/cdt/rpm/core/TarOps.java: Remove.
+
+ * src/org/eclipse/cdt/rpm/core/internal/Messages.java: Move to here.
+ * src/org/eclipse/cdt/rpm/core/internal/Patch.java: New.
+ * src/org/eclipse/cdt/rpm/core/internal/rpm_strings.properties: Move to
+ here.
+ * src/org/eclipse/cdt/rpm/core/internal/RPMConfiguration.java: New.
+ * src/org/eclipse/cdt/rpm/core/internal/RPMProject.java: New.
+ * src/org/eclipse/cdt/rpm/core/internal/SourceRPM.java: New.
+ * src/org/eclipse/cdt/rpm/core/internal/SpecFile.java: New.
+ * src/org/eclipse/cdt/rpm/core/internal/SpecFileParser.java: New.
+
+ * src/org/eclipse/cdt/rpm/core/utils/Diff.java: New.
+ * src/org/eclipse/cdt/rpm/core/utils/RPM.java: New.
+ * src/org/eclipse/cdt/rpm/core/utils/RPMBuild.java: New.
+
+ * src/org/eclipse/cdt/rpm/core/utils/internal/Command.java: New.
+ * src/org/eclipse/cdt/rpm/core/utils/internal/ShellScript.java: New.
+ * src/org/eclipse/cdt/rpm/core/utils/internal/StreamReaderThread.java:
+ Moved to here.
+
+2004-12-14 Rick Moseley <rmoseley@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/core/RPMCore.java (generateChecksum): added call to new
+ method to calculate a true checksum (bz# 78767)
+ * (fileCheckSum): new method to calculate checksum for a file for above change
+ * (RPMCore): catch exception added to generateChecksum() for above change
+ * (createSRPMinfo): catch exception added to generateChecksum() for above change
+ * various externalize strings issues
+
+2004-11-11 Rick Moseley <rmoseley@redhat.com>
+ * plugin.xml: change version to 1.2
+
+2004-11-08 Rick Moseley <rmoseley@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/core/LinuxShellCmds.java (executeLinuxCommand): add
+ capability to capture output from both stdout and stderr simultaneously
+
+2004-11-04 Jeffery Pound <jpound@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/core/LinuxShellCmds.java (): get commands from a
+ properties bundle
+ * src/org/eclipse/cdt/rpm/core/RPMCore.java (): ditto
+ * src/org/eclipse/cdt/rpm/core/RPMCorePlugin.java (): ditto
+ * src/org/eclipse/cdt/rpm/core/SpecFileOps.java (): ditto
+ * src/org/eclipse/cdt/rpm/core/SRPMImport.java (): ditto
+ * src/org/eclipse/cdt/rpm/core/TarOps.java (): ditto
+
+2004-11-02 Rick Moseley <rmoseley@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/core/LinuxShellCmds.java (getInfo): change method to be
+ able to handle output to both stderr and stdout simultaneously
+ * src/org/eclipse/cdt/rpm/core/StreamReaderThread.java : new class to handle
+ reading of stdout and stderr from shell commands
+
+2004-09-08 Rick Moseley <rmoseley@redhat.com>
+
+ * fix screw-up from merge of branch from below fix
+
+2004-09-07 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/core/SpecFileOps.java (createRPMspec): remove
+ call to "id" to get group id; modify "make" command for creating spec file
+
+2004-09-01 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/core/SpecFileOps.java: clean up unnecessary "$NON-NLS-1"s
+ * src/com/redhat/eclipse/rpm/core/TarOps.java: clean up unnecessary "$NON-NLS-1"s
+ * src/com/redhat/eclipse/rpm/core/SRPMImport.java: clean up unnecessary "$NON-NLS-1"s
+ * src/com/redhat/eclipse/rpm/core/RPMCore.java: * clean up unnecessary "$NON-NLS-1"s
+ add a couple that were needed
+ * src/com/redhat/eclipse/rpm/core/RPMExportCore.java (renameSpecFile):
+ BZ #131300
+ * (run): BZ #131300
+ * clean up unnecessary "$NON-NLS-1"s
+
+2004-08-31 rmoseley <rmoseley@dhcp-232.hsv.redhat.com>
+
+ * build.xml: Rebuilt after merging with head
+
+2004-08-30 rmoseley <rmoseley@dhcp-232.hsv.redhat.com>
+
+ * plugin.xml : remove RPMPreferencesPages stuff forgotten from merge
+
+2004-08-04 Jeremy Handcock <handcock@redhat.com>
+
+ * .cvsignore: New file.
+ * src/com/redhat/eclipse/rpm/core/prefs/RPMPluginPreferencesPage.java:
+ Move to com.redhat.eclipse.rpm.ui.
+ * src/com/redhat/eclipse/rpm/core/prefs/RPMCorePlugin.java: Move...
+ * src/com/redhat/eclipse/rpm/core/RPMCorePlugin.java: ...to here.
+ * plugin.xml: Rename main plugin class. Remove preference page
+ extension.
+
+2004-08-04 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/core/rpm_strings.properties: expand message
+ about parsing spec file
+
+2004-07-28 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/core/SpecFileOps.java (createRPMspec):
+ bz #128603 - make method more flexible, use new rpm macros
+
+2004-07-19 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/core/prefs/RPMCorePlugin.java (getHostName): added
+ this method, made it static and public so RPMPluginPreferencesPage can access it
+ * src/com/redhat/eclipse/rpm/core/prefs/RPMPluginPreferencesPage.java (getUserName):
+ (initializeDefaultPreferences): get the default name/e-mail differently
+ remove this method and place it into RPMCorePlugin.java
+ (initializeDefaultPreferences): add call to getUserName in RPMCorePluign
+
+
+2004-07-15 Rick Moseley <rmoseley@redhat.com>
+
+ * build.properties : change RpmCore -> RPMCore
+ * build.xml: same
+ change version from 1.0.0 to 1.1
+ * plugin.xml: change version from 1.0.0 to 1.1
+
+2004-07-14 Rick Moseley <rmoseley@redhat.com>
+
+ * build.xml : Eclipse 3.0 changes
+ * src/com/redhat/eclipse/rpm/core/LinuxShellCmds.java : renames as seen below
+ * src/com/redhat/eclipse/rpm/core/RPMCore.java : renamed from RpmCore.java
+ * src/com/redhat/eclipse/rpm/core/RPMExport.java : renames as seen below
+ * src/com/redhat/eclipse/rpm/core/RPMExportCore.java : renames as seen below
+ * src/com/redhat/eclipse/rpm/core/SpecFileOps.java : renames as seen below
+ * src/com/redhat/eclipse/rpm/core/SRPMExport.java : renames as seen below
+ * src/com/redhat/eclipse/rpm/core/SRPMImport.java : renames as seen below
+ * src/com/redhat/eclipse/rpm/core/TarOps.java : rename RpmCore -> RPMCore
+ * src/com/redhat/eclipse/rpm/core/prefs/RPMPluginPreferencesPage.java : rename
+ * src/com/redhat/eclipse/rpm/core/prefs/RPMCorePlugin.java : rename
+ * plugin.xml :rename RpmPreferencesPage -> RPMPreferencesPage
+ rename RpmCorePlugin -> RPMCorePlugin
+ 3.0 updates
+ removed unneeded dependencies
+
+2004-05-27 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/core/prefs/RpmPluginPreferencesPage.java :
+ remove ISO date variable, RPM changelog does not support it
+ * src/com/redhat/eclipse/rpm/core/prefs/RpmCorePlugin.java :
+ remove ISO date variable, RPM changelog does not support it
+ * src/com/redhat/eclipse/rpm/core/rpm_strings.properties : rename
+ RpmCore -> RPMCore
+ * src/com/redhat/eclipse/rpm/core/SRPMImport.java (): rename
+ RpmCore -> RPMCore
+ * src/com/redhat/eclipse/rpm/core/RPMExportCore.java (): rename
+ RpmCore -> RPMCore
+ * src/com/redhat/eclipse/rpm/core/SpecFileOps.java (returnDate): new for returning
+ date format
+ (createRPMspec):add call to the above new method
+
+2004-05-26 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/core/RPMExport.java (RPMExport): changes for prefs store
+ * src/com/redhat/eclipse/rpm/core/SRPMImport.java (): changed name from ImportSRPM
+ * src/com/redhat/eclipse/rpm/core/SRPMImport.java (): changes for prefs store
+ * src/com/redhat/eclipse/rpm/core/RpmCore.java (): changes for prefs store
+ (RpmCore): change the way rpm build log name is generated
+ (setRpmbuild_logname): set the build log name from other classes
+ * plugin.xml : added preferences page
+ * src/com/redhat/eclipse/rpm/core/prefs/RpmCorePlugin.java : new for prefs store
+ * src/com/redhat/eclipse/rpm/core/prefs/RpmPluginPreferencesPage.java : new for prefs store
+ * src/com/redhat/eclipse/rpm/core/LinuxShellCmds.java (): changes for prefs store
+ * src/com/redhat/eclipse/rpm/core/RPMExportCore.java (): changes for prefs store
+ * src/com/redhat/eclipse/rpm/core/SpecFileOps.java (): changes for prefs store
+ * src/com/redhat/eclipse/rpm/core/SRPMExport.java (SRPMExport): changes for
+ prefs store
+ * src/com/redhat/eclipse/rpm/core/TarOps.java (): changes for prefs store
+
+2004-05-05 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/core/ImportSRPM.java (run): add call to createRPMLogFile()
+ * src/com/redhat/eclipse/rpm/core/rpm_strings.properties : add/change error messages
+ * src/com/redhat/eclipse/rpm/core/RPMExportCore.java (run): call createRPMLogFile()
+ * src/com/redhat/eclipse/rpm/core/RpmCore.java (createRPMLogFile): new method to
+ create a file to hold the current log file name
+
+2004-04-05 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/core/SpecFileOps.java (getHostName): add getHostName()
+ function to get the hostname for the changelog e-mail address
+ (createRPMspec): mod to use the getHostName() function
+
+2004-04-02 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/core/rpm_strings.properties : add more complete message when
+ a source rpm has been deleted from a project and another export is attempted
+ * src/com/redhat/eclipse/rpm/core/RPMExportCore.java (run): add proj_path to firstRPM call
+ * src/com/redhat/eclipse/rpm/core/RpmCore.java (firstSRPM): add proj_path parameter to call
+ (getSRPMexportinfo): rmove logic to throw CoreException if missing .srpminfo file
+
+2004-03-31 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/core/RpmCore.java (RpmCore): add call to new method checkSrpmExists
+ (getSRPMexportinfo): remove check to see if source rpm is still where .srpminfo is pointing to
+ (checkSrpmExists): new method - contains logic removed from getSRPMexportinfo
+
+2004-03-23 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/core/RpmCore.java (getSRPMexportinfo):
+ added additional message about missing source rpm and how to correct it
+
+2004-03-17 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/core/RpmCore.java (deleteEclipseFiles): added the "Binaries"
+ directory to be deleted before exporting a project as a source RPM
+
+2004-02-16 Rick Moseley <rmoseley@redhat.com>
+
+ * RPMExportCore.java (run): fix error on version number
+ parameter being passed to generateSRPMpatch()
+ * ImportSRPM.java (executeRPMbuildprep): updated javadoc comments
+ * RpmCore.java (setRpmbuild_logname): updated javadoc comments
+ * RPMExportCore.java (run): change call to executeRPMbuildprep
+ * RpmCore.java (executeRPMbuildprep): removed "import" logic
+ * RpmCore.java (executeRPMbuildprep): changed debug verbage
+ * ImportSRPM.java (executeRPMbuildprep): added - modified from RpmCore version
+ * ImportSRPM.java (getSourceCode): changed call to executeRPMbuildprep
+
+2004-02-15 Rick Moseley <rmoseley@redhat.com>
+
+ * RpmCore.java (getSRPMexportinfo): remove old debug statement
+ * RPMExportCore.java (setUi_spec_file): correct path_to_specfile calculation
+ * RpmCore.java (RpmCore): correct path_to_specfile calculation
+ * LinuxShellCmds.java : internationalized strings
+ * LinuxShellCmds.java (linuxCopy): added //$NON-NLS-1$ to lines which do not require
+ internationalization
+ * LinuxShellCmds.java (createLinuxShellScript): update javadoc comments
+ * rpm_strings.properties : added new internationalization strings
+ * RpmCore.java : internationalized the strings
+ * RpmCore.java : update javadoc comments
+ * RPMExportCore.java (createSRPM): added //$NON-NLS-1$ to lines which do not require
+ internationalization
+ * RPMExportCore.java (renameSpecFile): added //$NON-NLS-1$ to lines which do not require
+ internationalization
+ * RPMExportCore.java (run): added //$NON-NLS-1$ to lines which do not require
+ internationalization
+ * RPMExportCore.java (): added //$NON-NLS-1$ to lines which do not require
+ internationalization
+ * RPMExportCore.java (): added javadoc comments
+ * RPMExport.java : added //$NON-NLS-1$ to lines which do not require
+ internationalization
+ * SRPMExport.java (run): added javadoc comments
+ * SRPMExport.java (SRPMExport): added javadoc comments
+ * SRPMExport.java : added //$NON-NLS-1$ to lines which do not require
+ internationalization
+ * SRPMExport.java : update comments
+ * SpecFileOps.java (checkForConfigure): added //$NON-NLS-1$ to lines which do not require
+ internationalization
+ * SpecFileOps.java (traverse): update javadoc comments
+ * SpecFileOps.java (createRPMspec): added //$NON-NLS-1$ to lines which do not require
+ internationalization
+ * SpecFileOps.java (createRPMspec): update javadoc comments
+ * SpecFileOps.java (parsePatchArray): update javadoc comments
+ * SpecFileOps.java (parsePatchArray): update javadoc comments
+ * SpecFileOps.java (checkPatch): updated javadoc comments
+ * SpecFileOps.java (changeRPMspecfile): update javadoc comments
+ * TarOps.java : added comments
+ * TarOps.java (createRPMtarfile): changed message for CoreException
+ * TarOps.java (createRPMtarfile): added //$NON-NLS-1$ to lines which do not require
+ internationalization
+ * TarOps.java (createRPMtarfile): update javadoc comments
+ * TarOps.java (renameRPMtarfile): update javadoc comments
+ * TarOps.java (untarSource): changed message for CoreException
+ * TarOps.java (untarSource): added //$NON-NLS-1$ to lines which do not require
+ internationalization
+ * ImportSRPM.java : added comments
+ * ImportSRPM.java (findTarBallPath): added //$NON-NLS-1$ to lines which do not require
+ internationalization
+ * ImportSRPM.java (getSourceCode): added //$NON-NLS-1$ to lines which do not require
+ internationalization
+ * ImportSRPM.java (run): added //$NON-NLS-1$ to lines which do not require
+ internationalization
+ * RpmCore.java (installRPMsource): update javadoc comments
+ * RpmCore.java (executeRpmBuild): change to e.getMessage()
+ * RpmCore.java (deleteRPMresources): update javadoc comments
+ * RpmCore.java (createRPMmacros): update javadoc comments
+ * RpmCore.java (createRPMrpmrc): update javadoc comments
+ * RpmCore.java (deleteEclipseFiles): update javadoc comments
+ * RpmCore.java (executeMakeClean): add comments
+ * RpmCore.java (getNameVerRel): add javadoc comments
+ * RpmCore.java (copyFile): update javadoc comments
+ * RpmCore.java (copyFile): update javadoc comments
+ * RpmCore.java (getSRPMexportinfo): update javadoc comments
+ * RpmCore.java (executeProjConfigure): change error message format
+ * RpmCore.java (executeProjConfigure): update javadoc comments
+ * RpmCore.java (getConfigOpts): update javadoc comments
+ * RpmCore.java (copyDirTree): update javadoc comments
+ * RpmCore.java (checkForMakefile): update javadoc comments
+ * RpmCore.java (RpmCore): update javadoc comments
+ * RpmCore.java : updated javadoc comments
+ * RpmCore.java (createRPMmacros): deleted - no longer used
+ * RpmCore.java (copySpecFile): deleted - no longer used
+
+2004-02-13 Rick Moseley <rmoseley@redhat.com>
+
+ * RPMExportCore.java (buildBinaryFromSourceRpm): add call to deleteResources()
+ * RpmCore.java (RpmCore): remove _import from the build log name
+ * RPMExportCore.java (run): add logic to handle renaming of tarballs
+ * TarOps.java (): delete untarSourceandCopy method
+ * RPMExportCore.java : added static final variables
+ * RPMExport.java (run): add logic to handle user-specified spec files
+
+2004-02-12 Rick Moseley <rmoseley@redhat.com>
+
+ * ImportSRPM.java (getSourceCode): change message for CoreException
+ to e.getMessage()
+ * RpmCore.java :changed debug statement to false
+ * ImportSRPM.java (getSourceCode): added debug print statement
+ * ImportSRPM.java (run): added try/catch around getSourceCode
+ * ImportSRPM.java (run): change message for core exception to
+ e.getMessage() that was thown from a called method
+
+2004-02-12 Rick Moseley <rmoseley@redhat.com>
+
+* RpmCore.java (copyRpms): add debug statement when debug=true
+ * RPMExportCore.java (run): add logic for shortcut for building binary RPMs
+ if the source RPM has just been built
+ * RPMExportCore.java (findSpecFileName): new method
+ * RPMExportCore.java (replaceSpecFile): new method
+ * RPMExportCore.java (buildBinaryFromSourceRpm): New method
+ * RpmCore.java (createRPMdirectories): change message for core exception to
+ e.getMessage() that was thown from a called method
+ * RpmCore.java (deleteSRPMextrafiles): change message for core exception to
+ e.getMessage() that was thown from a called method
+ * RpmCore.java (copyFile): change message for core exception to
+ e.getMessage() that was thown from a called method
+ * RPMExport.java :Initialize patch tag and changelog to "" upon instantiation
+ * SpecFileOps.java (changeRPMspecfile): change message for core exception to
+ e.getMessage() that was thown from a called method
+ * RpmCore.java (setRpmbuild_logname): change message for core exception to
+ e.getMessage() that was thown from a called method
+ * RPMExportCore.java (run): change message for core exception to
+ e.getMessage() that was thown from a called method
+ * RpmCore.java (generateSRPMpatch): change message for core exception to
+ e.getMessage() that was thown from a called method
+ Also, do not throw CoreException if no patch was generated, return a 0
+ * RPMExportCore.java (createSRPM): change message for core exception to
+ e.getMessage() that was thown from a called method
+ * RPMExportCore.java (createSRPMinfo): change message for core exception to
+ e.getMessage() that was thown from a called method
+
+2004-02-11 Phil Muldoon <pmuldoon@redhat.com>
+
+ * build.xml: Rewritten
+ * .classpath: Regenerated for 2.1.2
+
+2004-02-11 Rick Moseley <rmoseley@redhat.com>
+
+ * RPMExportCore.java (renameSpecFile): Fix error with the renaming of the spec file; make sure
+ "eclipse_" is in front
+ * SpecFileOps.java (parseSpecfile): Initailize line_ptr array before using to get rid of any old
+ values that may be hanging around
+ * RPMExportCore.java (createSRPMinfo): Change variable names to not coincide with global
+ names
+ * RPMExportCore.java (run): Change option from "bs" to the correct "-bs"
+ * RPMExportCore.java (createSRPM): change variable name from export_opt to which_rpm
+ * RPMExportCore.java (): Initialize the "which_rpm" variable in the constructor
+ * RpmCore.java (RpmCore): Move logic for "else" to correct area to make sure variables are
+ initialized when exporting a project that was not previously an RPM
+
+2004-02-11 Phil Muldoon <pmuldoon@redhat.com>
+
+ * Initial Import
+
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/META-INF/MANIFEST.MF b/rpm/org.eclipse.linuxtools.rpm.core/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..d0492e73db
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.linuxtools.rpm.core;singleton:=true
+Bundle-Version: 0.4.3.qualifier
+Bundle-Activator: org.eclipse.linuxtools.rpm.core.RPMCorePlugin
+Bundle-Localization: plugin
+Bundle-Vendor: %Bundle-Vendor
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.core.resources,
+ org.eclipse.core.runtime,
+ org.eclipse.ui
+Export-Package:
+ org.eclipse.linuxtools.rpm.core,
+ org.eclipse.linuxtools.rpm.core.utils
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/about.html b/rpm/org.eclipse.linuxtools.rpm.core/about.html
new file mode 100644
index 0000000000..44e229003e
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/about.html
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>8th September, 2004</p>
+<h3>License</h3>
+<p>The Eclipse Software Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<h3>Contributions</h3>
+
+<p>If this Content is licensed to you under the terms and conditions of the EPL, any Contributions, as defined in the EPL, uploaded, submitted, or otherwise
+made available to the Eclipse Foundation, its members and/or the host of the Eclipse Foundation web site, by you that relate to such
+Content are provided under the terms and conditions of the <a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>
+for the Eclipse Foundation web site and can be made available to others under the terms of the licenses as set out in the
+<a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>.</p>
+
+<p>If this Content is licensed to you under license terms and conditions other than the EPL (&quot;Other License&quot;), any modifications, enhancements and/or
+other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to the Eclipse Foundation, its members and/or the
+host of the Eclipse Foundation web site, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
+to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
+providing the Modifications under the terms and conditions of the <a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>
+for the Eclipse Foundation web site and such Modifications can be made available to others under the terms of the licenses as set out in the
+<a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/build.properties b/rpm/org.eclipse.linuxtools.rpm.core/build.properties
new file mode 100644
index 0000000000..497d242367
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/build.properties
@@ -0,0 +1,18 @@
+###############################################################################
+# Copyright (c) 2004-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
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ .,\
+ about.html,\
+ META-INF/,\
+ plugin.properties,\
+ license.html
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/license.html b/rpm/org.eclipse.linuxtools.rpm.core/license.html
new file mode 100644
index 0000000000..f5a16251a8
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/license.html
@@ -0,0 +1,81 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+(&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/plugin.properties b/rpm/org.eclipse.linuxtools.rpm.core/plugin.properties
new file mode 100644
index 0000000000..69c5fda36e
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/plugin.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# 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
+###############################################################################
+#Properties file for org.eclipse.linuxtools.rpm.core
+extension.name = RPM Project Nature
+Bundle-Vendor = Eclipse
+Bundle-Name = RPM Core Plug-in (Incubation) \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/plugin.xml b/rpm/org.eclipse.linuxtools.rpm.core/plugin.xml
new file mode 100644
index 0000000000..ac2300c9ac
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/plugin.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?><!--
+ 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
+ -->
+
+<plugin>
+ <extension
+ id="rpmnature"
+ name="%extension.name"
+ point="org.eclipse.core.resources.natures">
+ <runtime>
+ <run class="org.eclipse.linuxtools.rpm.core.RPMProjectNature"></run>
+ </runtime>
+ </extension>
+<extension point="org.eclipse.core.runtime.preferences">
+ <initializer
+ class="org.eclipse.linuxtools.rpm.core.RPMCoreInitializer" />
+ </extension>
+</plugin>
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
new file mode 100644
index 0000000000..2017205304
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IRPMConstants.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.core;
+
+
+public interface IRPMConstants {
+
+ /**
+ * Contains the name of the preference store key for storing and retrieving
+ * the path to the system's <code>rpm</code> binary.
+ */
+ public static final String RPM_CMD = "RPM_CMD"; //$NON-NLS-1$
+
+ /**
+ * Contains the name of the preference store key for storing and retrieving
+ * the path to the system's <code>rpmbuild</code> binary.
+ */
+ public static final String RPMBUILD_CMD = "RPMBUILD_CMD"; //$NON-NLS-1$
+
+ /**
+ * Contains the name of the preference store key for storing and retrieving
+ * the path to the system's <code>diff</code> binary.
+ */
+ public static final String DIFF_CMD = "DIFF_CMD"; //$NON-NLS-1$
+
+ /**
+ * Contains the name of the preference store key for storing and retrieving
+ * the name of the RPM log viewer.
+ */
+ public static final String RPM_DISPLAYED_LOG_NAME = "RPM_DISPLAYED_LOG_NAME"; //$NON-NLS-1$
+
+ /**
+ * Contains the name of the preference store key for storing and retrieving
+ * the name of the RPM log.
+ */
+ public static final String RPM_LOG_NAME = "RPM_LOG_NAME"; //$NON-NLS-1$
+
+ /**
+ * Contains the name of the default RPMS folder in an RPM project.
+ */
+ public static final String RPMS_FOLDER = "RPMS"; //$NON-NLS-1$
+
+ /**
+ * Contains the name of the default SRPMS folder in an RPM project.
+ */
+ public static final String SRPMS_FOLDER = "SRPMS"; //$NON-NLS-1$
+
+ /**
+ * Contains the name of the default SPECS folder in an RPM project.
+ */
+ public static final String SPECS_FOLDER = "SPECS"; //$NON-NLS-1$
+
+ /**
+ * Contains the name of the default SOURCES folder in an RPM project.
+ */
+ public static final String SOURCES_FOLDER = "SOURCES"; //$NON-NLS-1$
+
+ /**
+ * Contains the name of the default BUILD folder in an RPM project.
+ */
+ public static final String BUILD_FOLDER = "BUILD"; //$NON-NLS-1$
+
+ /**
+ * Contains the name of the project property used to store the project-relative
+ * path of an RPM project's source RPM.
+ */
+ public static final String SRPM_PROPERTY = "SRPM_PROPERTY"; //$NON-NLS-1$
+
+ /**
+ * Contains the name of the project property used to store the project-relative
+ * path of an RPM project's spec file.
+ */
+ public static final String SPEC_FILE_PROPERTY = "SPEC_FILE_PROPERTY"; //$NON-NLS-1$
+
+ /**
+ * Contains the name of the project property used to store an RPM project's
+ * checksum value.
+ */
+ public static final String CHECKSUM_PROPERTY = "CHECKSUM_PROPERTY"; //$NON-NLS-1$
+
+ /**
+ * Contains the system's file separator.
+ */
+ public static final String FILE_SEP = System.getProperty("file.separator"); //$NON-NLS-1$
+
+ /**
+ * Contains the system's line separator.
+ */
+ public static final String LINE_SEP = System.getProperty("line.separator"); //$NON-NLS-1$
+
+ /**
+ * Contains the plug-ins default error message.
+ */
+ public static final String ERROR = Messages.getString("RPMCore.Error_1"); //$NON-NLS-1$
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/Messages.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/Messages.java
new file mode 100644
index 0000000000..af7b2d28d5
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/Messages.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.core;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.rpm.core.rpm_strings"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMConfiguration.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMConfiguration.java
new file mode 100644
index 0000000000..69c474a223
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMConfiguration.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.core;
+
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.QualifiedName;
+
+public class RPMConfiguration {
+
+ private IProject project;
+
+ private IFolder rpmsFolder;
+ private IFolder srpmsFolder;
+ private IFolder specsFolder;
+ private IFolder sourcesFolder;
+ private IFolder buildFolder;
+
+ public RPMConfiguration(IProject project) throws CoreException {
+ this.project = project;
+ initialize();
+ }
+
+ /**
+ * Sets the internal folder fields according to stored properties
+ * in the workspace project, or according to the default properties
+ * if no stored properties are found. If the folders do not exist,
+ * they are created.
+ * @throws CoreException if:
+ * <ul>
+ * <li>Getting or setting project properties fails</ul>
+ * <li>Creating project folders fails</li>
+ * </ul>
+ */
+ private void initialize() throws CoreException {
+ String pluginID = RPMCorePlugin.ID;
+
+ String sourcesPath =
+ project.getPersistentProperty(new QualifiedName(pluginID, IRPMConstants.SOURCES_FOLDER));
+ if(sourcesPath == null) {
+ sourcesFolder = project.getFolder(IRPMConstants.SOURCES_FOLDER);
+ if(!sourcesFolder.exists()) {
+ sourcesFolder.create(false, true, null);
+ }
+ sourcesFolder.setDerived(true);
+ project.setPersistentProperty(new QualifiedName(pluginID, IRPMConstants.SOURCES_FOLDER),
+ sourcesFolder.getName());
+ } else {
+ sourcesFolder = project.getFolder(sourcesPath);
+ if(!sourcesFolder.exists()) {
+ sourcesFolder.create(false, true, null);
+ }
+ }
+
+ String srcRpmPath =
+ project.getPersistentProperty(new QualifiedName(pluginID, IRPMConstants.SRPMS_FOLDER));
+ if(srcRpmPath == null) {
+ srpmsFolder = project.getFolder(IRPMConstants.SRPMS_FOLDER);
+ if(!srpmsFolder.exists()) {
+ srpmsFolder.create(false, true, null);
+ }
+ srpmsFolder.setDerived(true);
+ project.setPersistentProperty(new QualifiedName(pluginID, IRPMConstants.SRPMS_FOLDER),
+ srpmsFolder.getName());
+ } else {
+ srpmsFolder = project.getFolder(srcRpmPath);
+ if(!srpmsFolder.exists()) {
+ srpmsFolder.create(false, true, null);
+ }
+ }
+
+ String buildPath =
+ project.getPersistentProperty(new QualifiedName(pluginID, IRPMConstants.BUILD_FOLDER));
+ if(buildPath == null) {
+ buildFolder = project.getFolder(IRPMConstants.BUILD_FOLDER);
+ if(!buildFolder.exists()) {
+ buildFolder.create(false, true, null);
+ }
+ buildFolder.setDerived(true);
+ project.setPersistentProperty(new QualifiedName(pluginID, IRPMConstants.BUILD_FOLDER),
+ buildFolder.getName());
+ } else {
+ buildFolder = project.getFolder(buildPath);
+ if(!buildFolder.exists()) {
+ buildFolder.create(false, true, null);
+ }
+ }
+
+ String rpmPath =
+ project.getPersistentProperty(new QualifiedName(pluginID, IRPMConstants.RPMS_FOLDER));
+ if(rpmPath == null) {
+ rpmsFolder = project.getFolder(IRPMConstants.RPMS_FOLDER);
+ if(!rpmsFolder.exists()) {
+ rpmsFolder.create(false, true, null);
+ }
+ rpmsFolder.setDerived(true);
+ project.setPersistentProperty(new QualifiedName(pluginID, IRPMConstants.RPMS_FOLDER),
+ rpmsFolder.getName());
+ } else {
+ rpmsFolder = project.getFolder(rpmPath);
+ if(!rpmsFolder.exists()) {
+ rpmsFolder.create(false, true, null);
+ }
+ }
+
+ String specPath =
+ project.getPersistentProperty(new QualifiedName(pluginID, IRPMConstants.SPECS_FOLDER));
+ if(specPath == null) {
+ specsFolder = project.getFolder(IRPMConstants.SPECS_FOLDER);
+ if(!specsFolder.exists()) {
+ specsFolder.create(false, true, null);
+ }
+ specsFolder.setDerived(true);
+ project.setPersistentProperty(new QualifiedName(pluginID, IRPMConstants.SPECS_FOLDER),
+ specsFolder.getName());
+ } else {
+ specsFolder = project.getFolder(specPath);
+ if(!specsFolder.exists()) {
+ specsFolder.create(false, true, null);
+ }
+ }
+ }
+
+ public IFolder getBuildFolder() {
+ return buildFolder;
+ }
+
+ public IFolder getRpmsFolder() {
+ return rpmsFolder;
+ }
+
+ public IFolder getSourcesFolder() {
+ return sourcesFolder;
+ }
+
+ public IFolder getSpecsFolder() {
+ return specsFolder;
+ }
+
+ public IFolder getSrpmsFolder() {
+ return srpmsFolder;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMCoreInitializer.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMCoreInitializer.java
new file mode 100644
index 0000000000..63f7712122
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMCoreInitializer.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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:
+ * Alexander Kurtakov - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.core;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+
+/**
+ * Initialize preferences.
+ *
+ */
+public class RPMCoreInitializer extends AbstractPreferenceInitializer {
+
+ @Override
+ public void initializeDefaultPreferences() {
+ IPreferenceStore store = RPMCorePlugin.getDefault()
+ .getPreferenceStore();
+ String user_name = System.getProperty("user.name"); //$NON-NLS-1$
+ store.setDefault(IRPMConstants.RPM_DISPLAYED_LOG_NAME, ".logfilename_" //$NON-NLS-1$
+ + user_name);
+ store.setDefault(IRPMConstants.RPM_LOG_NAME, "rpmbuild.log"); //$NON-NLS-1$
+
+ store.setDefault(IRPMConstants.RPM_CMD, "/bin/rpm"); //$NON-NLS-1$
+ store.setDefault(IRPMConstants.RPMBUILD_CMD, "/usr/bin/rpmbuild"); //$NON-NLS-1$
+ store.setDefault(IRPMConstants.DIFF_CMD, "/usr/bin/diff"); //$NON-NLS-1$
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMCorePlugin.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMCorePlugin.java
new file mode 100644
index 0000000000..89c3d88820
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMCorePlugin.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2004-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
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.core;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class RPMCorePlugin extends AbstractUIPlugin {
+ //The shared instance.
+ private static RPMCorePlugin plugin;
+
+ public static final String ID = "org.eclipse.linuxtools.rpm.core"; //$NON-NLS-1$
+
+
+ /**
+ * The constructor.
+ */
+ public RPMCorePlugin() {
+ //super();
+ plugin = this;
+ }
+
+ /**
+ * Returns the shared instance.
+ */
+ public static RPMCorePlugin getDefault() {
+ return plugin;
+ }
+
+}
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
new file mode 100644
index 0000000000..f14b232b31
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProject.java
@@ -0,0 +1,200 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.core;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.OutputStream;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.linuxtools.rpm.core.utils.RPM;
+import org.eclipse.linuxtools.rpm.core.utils.RPMBuild;
+
+public class RPMProject {
+
+ private IProject project;
+ private SourceRPM sourceRPM;
+ private RPMConfiguration rpmConfig;
+
+ public RPMProject(IProject project) throws CoreException {
+ this.project = project;
+ rpmConfig = new RPMConfiguration(this.project);
+ }
+
+ public IProject getProject() {
+ return project;
+ }
+
+ public SourceRPM getSourceRPM() {
+ return sourceRPM;
+ }
+
+ public void setSourceRPM(SourceRPM sourceRPM) throws CoreException {
+ this.sourceRPM = sourceRPM;
+ getProject()
+ .setPersistentProperty(
+ new QualifiedName(RPMCorePlugin.ID,
+ IRPMConstants.SRPM_PROPERTY),
+ sourceRPM.getFile().getName());
+ }
+
+ public RPMConfiguration getConfiguration() {
+ return rpmConfig;
+ }
+
+ public IFile getSpecFile() {
+ IFolder specsFolder = getConfiguration().getSpecsFolder();
+ IFile file = null;
+ try {
+ file = specsFolder.getFile(specsFolder.members()[0].getName());
+ } catch (CoreException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return file;
+ }
+
+ public void setSpecFile(IFile specFile) throws CoreException {
+ getProject().setPersistentProperty(
+ new QualifiedName(RPMCorePlugin.ID,
+ IRPMConstants.SPEC_FILE_PROPERTY), specFile.getName());
+ }
+
+ public void importSourceRPM(File externalFile) throws CoreException {
+ // Copy original SRPM to workspace
+ IFile srpmFile = getConfiguration().getSrpmsFolder().getFile(
+ externalFile.getName());
+ try {
+ srpmFile.create(new FileInputStream(externalFile), false, null);
+ } catch (FileNotFoundException e) {
+ String throw_message = Messages
+ .getString("RPMCore.Error_trying_to_copy__") + //$NON-NLS-1$
+ rpmConfig.getSpecsFolder().getLocation().toOSString();
+ IStatus error = new Status(IStatus.ERROR, IRPMConstants.ERROR, 1,
+ throw_message, null);
+ throw new CoreException(error);
+ }
+ setSourceRPM(new SourceRPM(srpmFile));
+
+ // Install the SRPM
+ RPM rpm = new RPM(getConfiguration());
+ rpm.install(getSourceRPM().getFile());
+ getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
+
+ // Set the spec file
+ IResource[] installedSpecs = getConfiguration().getSpecsFolder().members();
+ if (installedSpecs.length != 1) {
+ String throw_message = Messages
+ .getString("RPMCore.spec_file_ambiguous") + //$NON-NLS-1$
+ rpmConfig.getSpecsFolder().getLocation().toOSString();
+ IStatus error = new Status(IStatus.ERROR, IRPMConstants.ERROR, 1,
+ throw_message, null);
+ throw new CoreException(error);
+ }
+ setSpecFile(getConfiguration().getSpecsFolder().getFile(
+ installedSpecs[0].getName()));
+
+ // Set the project nature
+ RPMProjectNature.addRPMNature(getProject(), null);
+
+ }
+
+ public void buildAll(OutputStream outStream) throws CoreException {
+ prepareExport();
+ RPMBuild rpmbuild = new RPMBuild(getConfiguration());
+ rpmbuild.buildAll(getSpecFile(), outStream);
+
+ getConfiguration().getBuildFolder().refreshLocal(
+ IResource.DEPTH_INFINITE, null);
+ getConfiguration().getRpmsFolder().refreshLocal(
+ IResource.DEPTH_INFINITE, null);
+ getConfiguration().getSrpmsFolder().refreshLocal(
+ IResource.DEPTH_INFINITE, null);
+ }
+
+ public void buildBinaryRPM(OutputStream out) throws CoreException {
+ prepareExport();
+ RPMBuild rpmbuild = new RPMBuild(getConfiguration());
+ rpmbuild.buildBinary(getSpecFile(), out);
+
+ getConfiguration().getBuildFolder().refreshLocal(
+ IResource.DEPTH_INFINITE, null);
+ getConfiguration().getRpmsFolder().refreshLocal(
+ IResource.DEPTH_INFINITE, null);
+ }
+
+ public void buildSourceRPM(OutputStream out) throws CoreException {
+ prepareExport();
+ RPMBuild rpmbuild = new RPMBuild(getConfiguration());
+ rpmbuild.buildSource(getSpecFile(), out);
+
+ getConfiguration().getBuildFolder().refreshLocal(
+ IResource.DEPTH_INFINITE, null);
+ getConfiguration().getSrpmsFolder().refreshLocal(
+ IResource.DEPTH_INFINITE, null);
+ }
+
+ public void buildPrep() throws CoreException {
+ RPMBuild rpmbuild = new RPMBuild(getConfiguration());
+ rpmbuild.buildPrep(getSpecFile());
+ getConfiguration().getBuildFolder().refreshLocal(
+ IResource.DEPTH_INFINITE, null);
+ }
+
+ /**
+ * Prepares for project export. This method updates the project model with
+ * the given RPM project export delta by:
+ * <ul>
+ * <li>Parsing the given spec file and updating the model accordingly</li>
+ * <li>Updating the spec file model and writing it to disk</li>
+ * <li>Determining if a patch is needed and generating a patch</li>
+ * </ul>
+ *
+ * @param exportOp
+ * the export delta
+ * @throws CoreException
+ * if:
+ * <ul>
+ * <li>The project does not have an RPM nature</li>
+ * <li>Parsing the spec file fails</li>
+ * <li>Patch generation fails</li>
+ * <li>Writing the spec file fails</li>
+ * </ul>
+ */
+ private void prepareExport() throws CoreException {
+ /* Don't support exporting projects that have not been imported as SRPMs */
+ if (!getProject().hasNature(RPMProjectNature.RPM_NATURE_ID)) {
+ String throw_message = Messages
+ .getString("RPMCore.RPMProject.prepareExport") + //$NON-NLS-1$
+ getProject().getName();
+ IStatus error = new Status(IStatus.ERROR, IRPMConstants.ERROR, 1,
+ throw_message, null);
+ throw new CoreException(error);
+ }
+
+ // Do a buildPrep again to make sure the BUILD folder is pristine
+ buildPrep();
+
+ getConfiguration().getSourcesFolder().refreshLocal(
+ IResource.DEPTH_INFINITE, null);
+ getConfiguration().getSpecsFolder().refreshLocal(
+ IResource.DEPTH_INFINITE, null);
+ }
+
+}
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
new file mode 100644
index 0000000000..29aeee47d9
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectNature.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.core;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IProjectNature;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+/**
+ * The RPM project nature.
+ *
+ */
+public class RPMProjectNature implements IProjectNature {
+
+ /**
+ * The unique nature ID associated with the RPM project nature.
+ */
+ public static final String RPM_NATURE_ID = RPMCorePlugin.ID + ".rpmnature"; //$NON-NLS-1$
+
+ IProject project;
+
+ public RPMProjectNature() {
+ }
+
+ public RPMProjectNature(IProject project) {
+ this.project = project;
+ }
+
+ /**
+ * Adds the RPM project nature to a given workspace project.
+ * @param project the project
+ * @param mon a progress monitor, or <code>null</code> if progress monitoring
+ * is not desired
+ * @throws CoreException if adding the RPM project nature fails
+ */
+ public static void addRPMNature(IProject project, IProgressMonitor mon) throws CoreException {
+ addNature(project, RPM_NATURE_ID, mon);
+ }
+
+ /**
+ * Removes the RPM project nature from a given workspace project.
+ * @param project the project
+ * @param mon a progress monitor, or <code>null</code> if progress monitoring
+ * is not desired
+ * @throws CoreException if removing the RPM project nature fails
+ */
+ public static void removeRPMNature(IProject project, IProgressMonitor mon) throws CoreException {
+ removeNature(project, RPM_NATURE_ID, mon);
+ }
+
+ /**
+ * Utility method for adding a nature to a project.
+ *
+ * @param proj
+ * the project to add the nature
+ * @param natureId
+ * the id of the nature to assign to the project
+ * @param monitor
+ * a progress monitor to indicate the duration of the operation,
+ * or <code>null</code> if progress reporting is not required.
+ *
+ */
+ private static void addNature(IProject project, String natureId, IProgressMonitor monitor) throws CoreException {
+ if(project.hasNature(natureId)) {
+ return;
+ }
+ IProjectDescription description = project.getDescription();
+ String[] prevNatures = description.getNatureIds();
+ String[] newNatures = new String[prevNatures.length + 1];
+ System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);
+ newNatures[prevNatures.length] = natureId;
+ description.setNatureIds(newNatures);
+ project.setDescription(description, monitor);
+ }
+
+ /**
+ * Utility method for removing a project nature from a project.
+ *
+ * @param proj
+ * the project to remove the nature from
+ * @param natureId
+ * the nature id to remove
+ * @param monitor
+ * a progress monitor to indicate the duration of the operation,
+ * or <code>null</code> if progress reporting is not required.
+ */
+ private static void removeNature(IProject project, String natureId, IProgressMonitor monitor) throws CoreException {
+ IProjectDescription description = project.getDescription();
+ String[] prevNatures = description.getNatureIds();
+ List<String> newNatures = new ArrayList<String>(Arrays.asList(prevNatures));
+ newNatures.remove(natureId);
+ description.setNatureIds(newNatures.toArray(new String[newNatures.size()]));
+ project.setDescription(description, monitor);
+ }
+
+ public void configure() throws CoreException {
+ }
+
+ public void deconfigure() throws CoreException {
+ }
+
+ public IProject getProject() {
+ return project;
+ }
+
+ public void setProject(IProject project) {
+ this.project = project;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/SourceRPM.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/SourceRPM.java
new file mode 100644
index 0000000000..ccdba3c312
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/SourceRPM.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.core;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+
+public class SourceRPM {
+
+ private IFile sourceRPM;
+ private IFolder sourcesFolder;
+
+ public SourceRPM(IFile sourceRPM) {
+ this.sourceRPM = sourceRPM;
+ }
+
+ public IFile getFile() {
+ return sourceRPM;
+ }
+
+ public IFolder getSourcesFolder() {
+ return sourcesFolder;
+ }
+
+ public void setSourcesFolder(IFolder sourcesFolder) {
+ this.sourcesFolder = sourcesFolder;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/rpm_strings.properties b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/rpm_strings.properties
new file mode 100644
index 0000000000..1fb1c7ab58
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/rpm_strings.properties
@@ -0,0 +1,223 @@
+###############################################################################
+# Copyright (c) 2004, 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
+###############################################################################
+
+RPMCore.Error=Error
+RPMCore.Error_trying_to_copy__=Error trying to copy
+RPMCore._to__=\ to
+RPMCore.--executeRPMlinux_command__95=--executeRPMlinux_command:
+RPMCore.Error_executing__97=Error executing
+RPMCore.Error_waiting_for__99=Error waiting for
+RPMCore._to_complete._100=\ to complete.
+RPMCore.Command__102=Command
+RPMCore._was_interrupted._103=\ was interrupted.
+RPMCore.The_patch_name__109=The patch name
+RPMCore._is_not_unique._110=\ is not unique.
+RPMCore._nPlease_modify_the___Patch_tag___field_and_try_again._111=\nPlease modify the \'Patch tag\' field and try again.
+RPMCore.Error_trying_to_parse_spec_file_113=Error trying to parse spec file\nMaybe a character encoding error?
+RPMCore._nIs_there_a_spec_file_at___114=\nIs there a spec file at:
+RPMCore.Failed_to_open_the_output_spec_file_at__123=Failed to open the output spec file at
+RPMCore.Error_trying_to_modify__132=Error trying to modify
+RPMCore.Error_parsing_the_spec_file_in_the_project_--_157=Error parsing the spec file in the project --
+RPMCore.Failed_to_find_a___install__or___clean____section_in_the__180=Failed to find a \'install: or \'clean:\' section in the
+RPMCore.project__s_M/makefile.__THIS_IS_REQUIRED_!_!_!_181=project\'s M/makefile. THIS IS REQUIRED\!\!\!
+RPMCore.I/O_error_processing/reading_the_M/makefile__183=I/O error processing/reading the M/makefile
+RPMCore.Failed_to_find_a_M/makefile_in_the_project.___THIS_IS_REQUIRED_!_!_!_185=Failed to find a M/makefile in the project. THIS IS REQUIRED\!\!\!
+RPMCore.Failed_to_create_RPM_directories,_check_file_permissions_in__195=Failed to create RPM directories, check file permissions in
+RPMCore.Failed_to_create_RPM_directories_in__203=Failed to create RPM directories in
+RPMCore._--_check_file_permissions._204=\ -- check file permissions.
+RPMCore.Error_executing__208=Error executing
+RPMCore.command._nSomething_is_wrong_with_file_permissions._209=command.\nSomething is wrong with file permissions.
+RPMCore.Problem_creating_the_.rpmrc_file.__Check_file_permissions_in__217=Problem creating the .rpmrc file. Check file permissions in
+RPMCore.Problem_creating_the_.rpmmacros_file._nCheck_file_permissions_in__226=Problem creating the .rpmmacros file.\nCheck file permissions in
+RPMCore.Problem_creating_the_.rpmmacros_file._nCheck_file_permissions_in__228=Problem creating the .rpmmacros file.\nCheck file permissions in
+RPMCore.Problem_creating_the_rpm_spec_file._nCheck_file_permissions_in__247=Problem creating the rpm spec file.\nCheck file permissions in
+RPMCore.Problem_running_the___make___file_to_create_the_executables._nView_the_log_file_at__249=Problem running the \'make\' file to create the executables.\nView the log file at
+RPMCore.Problem_creating_the___make_install___shell_script_--___rpmbuild.sh__.___270=Problem creating the \'make install\' shell script -- \'rpmbuild.sh\'.
+RPMCore._nCheck_file_permissions_in__271=\nCheck file permissions in
+RPMCore.Problem_running_the___make_install___shell_script_--__273=Problem running the \'make install\' shell script --
+RPMCore._nThere_may_be_a_problem_in_the_M/makefile._274=\nThere may be a problem in the M/makefile.
+RPMCore.No_files_were_found_under_build_root_--__276=No files were found under build root --
+RPMCore._n_--_Problem_with_the___install____section_of_the_spec_file__277=\n -- Problem with the \'install:\' section of the spec file?
+RPMCore.Problem_creating_spec_file.__Check_permissions_in__324=Problem creating spec file. Check permissions in
+RPMCore.Problem_creating_spec_file.__Check_permissions_in__326=Problem creating spec file. Check permissions in
+RPMCore.source_328=source
+RPMCore.Error_executing___make_clean___in__329=Error executing \'make clean\' in
+RPMCore.Problem_creating_a_shell_script_--__342=Problem creating a shell script --
+RPMCore._nThere_may_be_a_problem_in_the_M/makefile._343=\nThere may be a problem in the M/makefile.
+RPMCore.Problem_running_this_command___346=Problem running this command:
+RPMCore._nCheck_permissions._347=\nCheck permissions.
+RPMCore.Error_trying_to_create_shell_script_to_install__352=Error trying to create shell script to install
+RPMCore.the_source_rpm._nCheck_the_file_permissions_in__353=the source rpm.\nCheck the file permissions in
+RPMCore.Error_trying_to_install_the_source_with_this_command__355=Error trying to install the source with this command
+RPMCore._nCheck_the_log_at__356=\nCheck the log at
+RPMCore./SPECS/_359=/SPECS/
+RPMCore.There_is_not_a__360=There is not a
+RPMCore._directory._nCheck_permissions_in_the_path_directories._361=\ directory.\nCheck permissions in the path directories.
+RPMCore.An_error_in_the__364=An error in the
+RPMCore.directory._nEither_there_is_either_no_spec_file_or_more_than_one._365=directory.\nEither there is either no spec file or more than one.
+RPMCore.There_are_either_no_directories_or_too_many_directories_under__369=There are either no directories or too many directories under
+RPMCore.An_error_occurred_trying_to_rename__373=An error occurred trying to rename
+RPMCore.Error_creating_shell_script_for_the__381=Error creating shell script for the
+RPMCore._nCheck_file_permissions._382=\nCheck file permissions.
+RPMCore.Error_executing_the_command_to_build_prep_the_rpm_-__384=Error executing the command to build prep the rpm -
+RPMCore._nCheck_the_log_at__385=\nCheck the log at
+RPMCore.There_should_be_only_one_directory_under__391=There should be only one directory under
+RPMCore._at_this_point_392=\ at this point
+RPMCore.This_file_already_exists___396=This file already exists:
+RPMCore.Error_trying_to_create_.srpminfo_file._401=Error trying to create .srpminfo file.
+RPMCore.Problem_copying_source_rpm_info_file._nCheck_permissions_in__409=Problem copying source rpm info file.\nCheck permissions in
+RPMCore.Problem_copying_source_rpm_info_file._nCheck_permissions_in__411=Problem copying source rpm info file.\nCheck permissions in
+RPMCore.Error_trying_to_copy_the_target_project_directory_tree_with_this_command_--__417=Error trying to copy the target project directory tree with this command --
+RPMCore._nFile_permissions_problem__418=\nFile permissions problem?
+RPMCore.Error_trying_to_check_for_Makefile_in__421=Error trying to check for Makefile in
+RPMCore.Error_--_the_M/makefile_does_not_have_either_an___install____or___clean_____423=Error -- the M/makefile does not have either an \'install:\' or \'clean:\'
+RPMCore.section._nLook_in_this_directory_____424=section.\nLook in this directory:
+RPMCore.Error_running___make_clean___in__426=Error running \'make clean\' in
+RPMCore.Error_either_creating_or_executing_the___make_clean___command_in__428=Error either creating or executing the \'make clean\' command in
+RPMCore.There_are_too_many_directories_in__432=There are too many directories in
+RPMCore.Error_trying_to_rename_directory_in__438=Error trying to rename directory in
+RPMCore.Permissions_problem__440=Permissions problem?
+RPMCore.Error_trying_to_parse_spec_file_442=Error trying to parse spec file
+RPMCore._nIs_there_a_spec_file_at___443=\nIs there a spec file at:
+RPMCore.Error_trying_to_create_a_tarball_of_the_source_using_this_command_--__454=Error trying to create a tarball of the source using this command --
+RPMCore.A_problem_occurred_creating_the_rpmbuild_shell_script.___461=A problem occurred creating the rpmbuild shell script.
+RPMCore._nPlease_check_the_file_permissions_in_/var/tmp__462=\nPlease check the file permissions in /var/tmp
+RPMCore.A_problem_occurred_running_this_command.___464=A problem occurred running this command.
+RPMCore.__nPlease_review_the_log_at__465=\ \nPlease review the log at\nWindows->Show View->Other...->RPM Plugin Log File->RPM Plugin Log Viewer
+RPMCore.There_should_be_only_one_directory_under__467=There should be only one directory under
+RPMCore.__nCheck_the_directories_there.__The_RPM_work_area_in_/var/tmp_will_be_preserved._468=\ \nCheck the directories there. The RPM work area in /var/tmp will be preserved.
+RPMCore.Error_trying_to_delete__477=Error trying to delete
+RPMCore._nCheck_permissions._478=\nCheck permissions.
+RPMCore.Error_deleting_resources.__Check_file_permissions_in__483=Error deleting resources. Check file permissions in
+RPMCore.Problem_deleting_the_log_file_at__486=Problem deleting the log file at
+RPMCore.__Check_the_permissions._487=\ \ Check the permissions.
+RPMCore.Error_deleting_files_in_deleteSRPMextrafiles_496=Error deleting files in deleteSRPMextrafiles
+RPMCore.Error_deleting_files_in_deleteSRPMextrafiles_498=Error deleting files in deleteSRPMextrafiles
+RPMCore.executeProjConfigure_500=executeProjConfigure
+RPMCore./bin/chmod_-R_u+r__501=/bin/chmod -R u+r
+RPMCore./_502=/
+RPMCore.Error_executing_the_command__503=Error executing the command
+RPMCore.__Check_permissions_of__504=\ \ Check permissions of
+RPMCore.Problem_creating_the___make_clean/distclean/maintainer-clean___shell_script_--__515=Problem creating the \'make clean/distclean/maintainer-clean\' shell script --
+RPMCore._nThere_may_be_a_problem_in_the_M/makefile._516=\nThere may be a problem in the M/makefile.
+RPMCore.Problem_running_the___make_install___shell_script_--__518=Problem running the \'make install\' shell script --
+RPMCore._nThere_may_be_a_problem_in_the_M/makefile._519=\nThere may be a problem in the M/makefile.
+RPMCore.Problem_deleting_extra_files_from_project_in_deleteSRPMextrafiles_521=Problem deleting extra files from project in deleteSRPMextrafiles
+RPMCore.Problem_deleting_extra_files_in_the_project_in_deleteEclipseiles._523=Problem deleting extra files in the project in deleteEclipseiles.
+RPMCore.There_should_only_be_two_directories_in__531=There should only be two directories in
+RPMCore.Error_executing_the_command__538=Error executing the command
+RPMCore.__Check_permissions_of__539=\ \ Check permissions of
+RPMCore.Error_in_the_Makefile_in__541=Error in the Makefile in
+RPMCore._nMake_sure_there_is_a_clean_/distclean_/realclean_section__542=\nMake sure there is a clean:/distclean:/realclean section:
+RPMCore.Error_running_the___make_distclean/realclean/mainainer-clean____544=Error running the \'make distclean/realclean/maintainer-clean\'
+RPMCore.command_on_the_previous_source_RPM_545=command on the previous source RPM
+RPMCore.Error_creating_shell_script_for_the__553=Error creating shell script for the
+RPMCore._nCheck_file_permissions._554=\nCheck file permissions.
+RPMCore.Error_executing_the_command_to_create_the_patch_file_-__558=Error executing the command to create the patch file -
+RPMCore._nAre_you_sure_there_were_changes_made_to_the_project__559=\nAre you sure there were changes made to the project?
+RPMCore.rpm_spec_should_not_be_null_here_in__567=rpm_spec should not be null here in
+RPMCore.A_problem_occurred_creating_the_rpmbuild_shell_script.___571=A problem occurred creating the rpmbuild shell script.
+RPMCore._nPlease_check_the_file_permissions_in_/var/tmp__572=\nPlease check the file permissions in /var/tmp
+RPMCore.A_problem_occurred_running_this_command.___574=A problem occurred running this command.
+RPMCore._nPlease_review_the_log_at__575=\nPlease review the log at\nWindows->Show View->Other...->RPM Plugin Log File->RPM Plugin Log Viewer
+RPMCore.There_are_too_many_directories_in__577=There are too many directories in
+RPMCore.Unable_to_delete_file__582=Unable to delete file
+RPMCore._nCheck_permissions_in_the_project._583=\nCheck permissions in the project.
+RPMCore.Error_returned_from_firstSRPM_trying__588=Error returned from firstSRPM() trying
+RPMCore.to_copy_the_spec_file_from_the_work_area_to_the_project_589=to copy the spec file from the work area to the project
+RPMCore.Error_trying_to_rename__591=Error trying to rename
+RPMCore.Error_trying_to_create_.srpminfo_file._594=Error trying to create .srpminfo file.
+RPMCore.Error_trying_to_copy_spec_file_from_work__598=Error trying to copy spec file from work
+RPMCore.area_to_Eclipse_project_directory_599=area to Eclipse project directory
+RPMCore.Error_copying_directories_in__1=Error copying directories in
+RPMCore.Error_trying_to_copy_project_directory(_3=Error trying to copy project directory(
+RPMCore.)_to_the_work_area(_4=) to the work area(
+RPMCore.Error_trying_to_write_to__8=Error trying to write to
+RPMCore.Error_1=Error
+RPMCore.Error_6=Error
+RPMCore.Error_8=Error
+RPMCore.Error_creating_directory___18=Error creating directory:
+RPMCore._nCheck_permissions__19=\nCheck permissions?
+RPMCore.Error_copying_project_source_from__20=Error copying project source from
+RPMCore._to__21=\ to
+RPMCore.Error_creating_the_shell_script_to_untar_or__22=Error creating the shell script to untar or
+RPMCore.executing_the_shell_script_to_untar_the_source._Command____23=executing the shell script to untar the source. Command =
+RPMCore.Error_copying_source_from__24=Error copying source from
+RPMCore._to__25=\ to
+RPMCore.__26=\
+RPMCore.0=Error generating checksum:
+RPMCore.Error_trying_to_copy_file__27=Error trying to copy file
+RPMCore._to__28=\ to
+RPMCore.Error_trying_to_set_up_rpm__29=Error trying to set up rpm
+RPMCore.in__30=in
+RPMCore._to_create_patches_31=\ to create patches
+RPMCore.Checksum___32=Checksum:
+RPMCore.Error_parsing_spec_file_at__33=Error parsing spec file at
+RPMCore.Error_either_creating_or_running_configure_script_34=Error either creating or running configure script
+RPMCore.RPMCore._to__7_35=RPMCore._to__7
+RPMCore.Error_36=Error
+RPMCore.Error_37=Error
+RPMCore.Error_39=Error
+RPMCore.Error_40=Error
+RPMCore.Error_47=Error
+RPMCore.An_error_occurred_either_creating_the_shell_script_containing_2=An error occurred either creating the shell script containing
+RPMCore.this_command____3=this command:\n
+RPMCore._nor_trying_to_execute_it._nView_the_log_at___4=\nor trying to execute it.\nView the log at:
+RPMCore._for_more_details_5=\ for more details
+RPMCore.Error_1=Error
+RPMCore.There_is_not_a_.srpminfo_file_in__7=There is not a .srpminfo file in
+RPMCore.There_is_no_longer_a_source_RPM_at__86=There is no longer a source RPM at
+RPMCore.Error_getting_info_from__93=Error getting info from
+RPMCore.Error_during__191=Error during
+RPMCore._execution..error____192=\ execution..error =
+RPMCore.Error_trying_to_copy__6=Error trying to copy
+RPMCore._to__7=\ to
+RPMCore.Error_trying_to_write_to__8=Error trying to write to
+RPMCore.No___%defines___were_found_in_the_spec_file_38=No \'%defines\' were found in the spec file
+RPMCore.Failed_to_find_a_spec_file_at=Failed to find a spec file at
+RPMCore.Error_using_parseDefine_to_get_the_version_no._41=Error using parseDefine to get the version no.
+RPMCore._from_the_spec_file_at___42=\ from the spec file at:
+RPMCore.Error_using_parseDefine_to_get_the_release_no._44=Error using parseDefine to get the release no.
+RPMCore._from_the_spec_file_at___45=\ from the spec file at:
+RPMCore.Error_parsing_the_spec_file_at=Error parsing the spec file at
+RPMCore.Error_creating_srpminfo_file_in_the_project._9=Error creating srpminfo file in the project.
+RPMCore._nCheck_permissions_in__10=\nCheck permissions in
+RPMExportCore.Too_many_spec_files_in__4=Too many spec files in
+RPMExportCore.Error_trying_to_delete__5=Error trying to delete
+ImportSRPM.Error_occurred_during_the_source_install._n_1=Error occurred during the source install.\n
+ImportSRPM.There_are_either_too_many_or_0_directories_under__2=There are either too many or 0 directories under
+ImportSRPM.Cannot_find_a_tarball_to_untar_in___3=Cannot find a tarball to untar in:
+LinuxShellCmds.Error_attempting_to_create___1=Error attempting to create:
+LinuxShellCmds.Cannot_copy_a_directory___2=Cannot copy a directory:
+LinuxShellCmds._to_a_file___3=\ to a file:
+LinuxShellCmds.Error_attempting_to_copy_source_from___4=Error attempting to copy source from:
+LinuxShellCmds._to__5=\ to
+LinuxShellCmds.1=Process returned non-zero value:
+LinuxShellCmds.2=Process output:\n
+LinuxShellCmds.3=Process error:\n
+LinuxShellCmds.4=Process executed successfully
+LinuxShellCmds.5=Process output:\n
+LinuxShellCmds.6=Process error:\n
+LinuxShellCmds.7=\n Error output from command:\n
+LinuxShellCmds.9=Process returned non-zero value:
+LinuxShellCmds.10=Process output:\n
+LinuxShellCmds.11=Process error:\n
+LinuxShellCmds.12=Process executed successfully
+LinuxShellCmds.13=Process output:\n
+LinuxShellCmds.14=Process error:\n
+LinuxShellCmds.15=Error executing
+RPMCore._nThis_RPM_*must*_be_restored_before_exporting_can_occur._1=\nThis RPM *must* be restored before exporting can occur.
+RPMCore.Error_creating__1=Error creating
+RPMCore._nCheck_permissions__2=\nCheck permissions?
+RPMCore.spec_file_ambiguous=More than one file found in
+RPMCore.RPMProjectFactory.0=Error constructing spec file model
+RPMCore.RPMProjectFactory.1=Error constructing source RPM model
+RPMCore.RPMProject.prepareExport=The project is not an RPM project
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPM.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPM.java
new file mode 100644
index 0000000000..36ec70ef32
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPM.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.core.utils;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.linuxtools.rpm.core.IRPMConstants;
+import org.eclipse.linuxtools.rpm.core.RPMConfiguration;
+import org.eclipse.linuxtools.rpm.core.RPMCorePlugin;
+
+/**
+ * A utility class for executing RPM commands.
+ *
+ */
+public class RPM {
+
+ private static final String DEFINE = "--define"; //$NON-NLS-1$
+ private String[] macroDefines;
+ private String rpmCmd;
+
+ /**
+ * Constructs a new RPM object.
+ *
+ * @param config
+ * the RPM configuration to use
+ */
+ public RPM(RPMConfiguration config) {
+ IEclipsePreferences node = new DefaultScope().getNode(RPMCorePlugin.ID);
+ rpmCmd = node.get(IRPMConstants.RPM_CMD, ""); //$NON-NLS-1$
+ String[] tmpMacroDefines = {
+ rpmCmd,
+ "-v", //$NON-NLS-1$
+ DEFINE, "_sourcedir " //$NON-NLS-1$
+ + config.getSourcesFolder().getLocation().toOSString(),
+ DEFINE, "_srcrpmdir " + //$NON-NLS-1$
+ config.getSrpmsFolder().getLocation().toOSString(),
+ DEFINE, "_builddir " + //$NON-NLS-1$
+ config.getBuildFolder().getLocation().toOSString(),
+ DEFINE, "_rpmdir " + //$NON-NLS-1$
+ config.getRpmsFolder().getLocation().toOSString(),
+ DEFINE, "_specdir " + //$NON-NLS-1$
+ config.getSpecsFolder().getLocation().toOSString() };
+ this.macroDefines = tmpMacroDefines;
+ }
+
+ /**
+ * Installs a given source RPM
+ *
+ * @param sourceRPM The src.rpm file to install.
+ * @return The output of the install command.
+ * @throws CoreException If something fails.
+ */
+ public String install(IFile sourceRPM) throws CoreException {
+ List<String> command = new ArrayList<String>();
+ command.addAll(Arrays.asList(macroDefines));
+ command.add("-i"); //$NON-NLS-1$
+ command.add(sourceRPM.getLocation().toOSString());
+ try {
+ return Utils.runCommandToString(command
+ .toArray(new String[command.size()]));
+ } catch (IOException e) {
+ throw new CoreException(new Status(IStatus.ERROR, RPMCorePlugin.ID,
+ e.getMessage(), e));
+ }
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPMBuild.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPMBuild.java
new file mode 100644
index 0000000000..2fd6dedbbf
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPMBuild.java
@@ -0,0 +1,158 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.core.utils;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.linuxtools.rpm.core.IRPMConstants;
+import org.eclipse.linuxtools.rpm.core.RPMConfiguration;
+import org.eclipse.linuxtools.rpm.core.RPMCorePlugin;
+
+/**
+ * A utility class for executing rpmbuild commands.
+ *
+ */
+public class RPMBuild {
+
+ private static final String DEFINE = "--define"; //$NON-NLS-1$
+
+ private String[] macroDefines;
+
+ private String rpmBuildCmd;
+
+ /**
+ * Constructs a new object.
+ *
+ * @param config
+ * the RPM configuration to use
+ */
+ public RPMBuild(RPMConfiguration config) {
+ IEclipsePreferences node = new DefaultScope().getNode(RPMCorePlugin.ID);
+ rpmBuildCmd = node.get(IRPMConstants.RPMBUILD_CMD, ""); //$NON-NLS-1$
+ String[] tmpMacroDefines = {
+ rpmBuildCmd,
+ "-v", //$NON-NLS-1$
+ DEFINE, "_sourcedir " //$NON-NLS-1$
+ + config.getSourcesFolder().getLocation().toOSString(),
+ DEFINE, "_srcrpmdir " + //$NON-NLS-1$
+ config.getSrpmsFolder().getLocation().toOSString(),
+ DEFINE, "_builddir " + //$NON-NLS-1$
+ config.getBuildFolder().getLocation().toOSString(),
+ DEFINE, "_rpmdir " + //$NON-NLS-1$
+ config.getRpmsFolder().getLocation().toOSString(),
+ DEFINE, "_specdir " + //$NON-NLS-1$
+ config.getSpecsFolder().getLocation().toOSString() };
+ this.macroDefines = tmpMacroDefines;
+ }
+
+ /**
+ * Prepares the sources for a given spec file.
+ *
+ * @param specFile
+ * the spec file
+ * @return The output of the `rpmbuild -bp` command.
+ * @throws CoreException
+ * if the operation fails
+ */
+ public InputStream buildPrep(IFile specFile) throws CoreException {
+ List<String> command = new ArrayList<String>();
+ command.addAll(Arrays.asList(macroDefines));
+ command.add("-bp"); //$NON-NLS-1$
+ command.add(specFile.getLocation().toString());
+ try {
+ return Utils.runCommandToInputStream(command
+ .toArray(new String[command.size()]));
+ } catch (IOException e) {
+ throw new CoreException(new Status(IStatus.ERROR, RPMCorePlugin.ID,
+ e.getMessage(), e));
+ }
+ }
+
+ /**
+ * Builds a binary RPM for a given spec file.
+ *
+ * @param specFile
+ * the spec file
+ * @param outStream The stream to write the output to.
+ * @throws CoreException
+ * if the operation fails
+ */
+ public void buildBinary(IFile specFile, OutputStream outStream) throws CoreException {
+ List<String> command = new ArrayList<String>();
+ command.addAll(Arrays.asList(macroDefines));
+ command.add("-bb"); //$NON-NLS-1$
+ command.add(specFile.getLocation().toString());
+ try {
+ Utils.runCommand(outStream, command
+ .toArray(new String[command.size()]));
+ } catch (IOException e) {
+ throw new CoreException(new Status(IStatus.ERROR, RPMCorePlugin.ID,
+ e.getMessage(), e));
+ }
+ }
+
+ /**
+ * Builds both a binary and source RPM for a given spec file.
+ *
+ * @param specFile
+ * the spec file
+ * @param outStream The stream to write the output to.
+ * @throws CoreException
+ * if the operation fails
+ */
+ public void buildAll(IFile specFile, OutputStream outStream) throws CoreException {
+ List<String> command = new ArrayList<String>();
+ command.addAll(Arrays.asList(macroDefines));
+ command.add("-ba"); //$NON-NLS-1$
+ command.add(specFile.getLocation().toString());
+ try {
+ Utils.runCommand(outStream, command
+ .toArray(new String[command.size()]));
+ } catch (IOException e) {
+ throw new CoreException(new Status(IStatus.ERROR, RPMCorePlugin.ID,
+ e.getMessage(), e));
+ }
+ }
+
+ /**
+ * Builds a source RPM for a given spec file.
+ *
+ * @param specFile
+ * the spec file
+ * @param outStream The stream to write the output to.
+ * @throws CoreException
+ * if the operation fails
+ */
+ public void buildSource(IFile specFile, OutputStream outStream) throws CoreException {
+ List<String> command = new ArrayList<String>();
+ command.addAll(Arrays.asList(macroDefines));
+ command.add("-bs"); //$NON-NLS-1$
+ command.add(specFile.getLocation().toString());
+ try {
+ Utils.runCommand(outStream, command
+ .toArray(new String[command.size()]));
+ } catch (IOException e) {
+ throw new CoreException(new Status(IStatus.ERROR, RPMCorePlugin.ID,
+ e.getMessage(), e));
+ }
+ }
+}
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
new file mode 100644
index 0000000000..df61cc932d
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPMQuery.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.core.utils;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.linuxtools.rpm.core.IRPMConstants;
+import org.eclipse.linuxtools.rpm.core.RPMCorePlugin;
+
+/**
+ * Utility class for executing queries on existing binary and source RPMs
+ *
+ */
+public class RPMQuery {
+
+ private static final String QF = "--qf"; //$NON-NLS-1$
+ private static final String QP = "-qp"; //$NON-NLS-1$
+
+ private RPMQuery() {
+ }
+
+ public static String getHeaderInfo(IFile rpmFile) throws CoreException {
+ return query(rpmFile, "-qip"); //$NON-NLS-1$
+ }
+
+ public static String getChangelog(IFile rpmFile) throws CoreException {
+ return query(rpmFile, "--changelog", QP); //$NON-NLS-1$
+ }
+
+ public static String getArch(IFile rpmFile) throws CoreException {
+ return query(rpmFile, QF, "%{ARCH}", QP); //$NON-NLS-1$
+ }
+
+ public static String getPlatform(IFile rpmFile) throws CoreException {
+ return query(rpmFile, QF, "%{PLATFORM}", QP); //$NON-NLS-1$
+ }
+
+ public static String getOS(IFile rpmFile) throws CoreException {
+ return query(rpmFile, QF, "%{OS}", QP); //$NON-NLS-1$
+ }
+
+ public static String getBuildHost(IFile rpmFile) throws CoreException {
+ return query(rpmFile, QF, "%{BUILDHOST}", QP); //$NON-NLS-1$
+ }
+
+ public static String getBuildTime(IFile rpmFile) throws CoreException {
+ return query(rpmFile, QF, "%{BUILDTIME:date}", QP); //$NON-NLS-1$
+ }
+
+ public static String getPreInstallScript(IFile rpmFile)
+ throws CoreException {
+ return query(rpmFile, QF, "%{PREIN}", QP); //$NON-NLS-1$
+ }
+
+ public static String getPostInstallScript(IFile rpmFile)
+ throws CoreException {
+ return query(rpmFile, QF, "%{POSTIN}", QP); //$NON-NLS-1$
+ }
+
+ public static String getPreUninstallScript(IFile rpmFile)
+ throws CoreException {
+ return query(rpmFile, QF, "%{PREUN}", QP); //$NON-NLS-1$
+ }
+
+ public static String getPostUninstallScript(IFile rpmFile)
+ throws CoreException {
+ return query(rpmFile, QF, "%{POSTUN}", QP); //$NON-NLS-1$
+ }
+
+ public static String getProvides(IFile rpmFile) throws CoreException {
+ return query(rpmFile, "-qlp"); //$NON-NLS-1$
+ }
+
+ private static String query(IFile rpmFile, String... args)
+ throws CoreException {
+ IEclipsePreferences node = new DefaultScope().getNode(RPMCorePlugin.ID);
+ String rpmCmd = node.get(IRPMConstants.RPM_CMD, ""); //$NON-NLS-1$
+ List<String> command = new ArrayList<String>();
+ command.add(rpmCmd);
+ command.addAll(Arrays.asList(args));
+ command.add(rpmFile.getLocation().toOSString());
+ try {
+ return Utils.runCommandToString(command.toArray(new String[command
+ .size()]));
+ } catch (IOException e) {
+ throw new CoreException(new Status(IStatus.ERROR, RPMCorePlugin.ID,
+ e.getMessage(), e));
+ }
+ }
+
+}
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
new file mode 100644
index 0000000000..d1df7a668a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/Utils.java
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * Copyright (c) 2009-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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.core.utils;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.channels.FileChannel;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+
+/**
+ * Utilities for calling system executables.
+ *
+ */
+public class Utils {
+
+ /**
+ * Runs the given command and parameters.
+ *
+ * @param command
+ * The command with all parameters.
+ * @return Stream containing the combined content of stderr and stdout.
+ * @throws IOException
+ * If IOException occurs.
+ */
+ public static BufferedInputStream runCommandToInputStream(String... command)
+ throws IOException {
+ BufferedInputStream in = null;
+ ProcessBuilder pBuilder = new ProcessBuilder(command);
+ pBuilder = pBuilder.redirectErrorStream(true);
+ Process child = pBuilder.start();
+ in = new BufferedInputStream(child.getInputStream());
+ return in;
+ }
+
+ /**
+ * Runs the given command and parameters.
+ *
+ * @param outStream
+ * The stream to write the output to.
+ *
+ * @param command
+ * The command with all parameters.
+ * @throws IOException If an IOException occurs.
+ */
+ public static void runCommand(final OutputStream outStream,
+ String... command) throws IOException {
+ ProcessBuilder pBuilder = new ProcessBuilder(command);
+ pBuilder = pBuilder.redirectErrorStream(true);
+ Process child = pBuilder.start();
+ final BufferedInputStream in = new BufferedInputStream(child
+ .getInputStream());
+ Job readinJob = new Job("") { //$NON-NLS-1$
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ int i;
+ while ((i = in.read()) != -1) {
+ outStream.write(i);
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ return Status.CANCEL_STATUS;
+ }
+ return Status.OK_STATUS;
+ }
+
+ };
+ readinJob.schedule();
+ try {
+ child.waitFor();
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Run a command and return its output.
+ * @param command The command to execute.
+ * @return The output of the executed command.
+ * @throws IOException If an I/O exception occurred.
+ */
+ public static String runCommandToString(String... command)
+ throws IOException {
+ BufferedInputStream in = runCommandToInputStream(command);
+ return inputStreamToString(in);
+ }
+
+ /**
+ * Reads the content of the given InputStream and returns its textual
+ * representation.
+ *
+ * @param stream
+ * The InputStream to read.
+ * @return Textual content of the stream.
+ * @throws IOException If an IOException occurs.
+ */
+ public static String inputStreamToString(InputStream stream)
+ throws IOException {
+ StringBuilder retStr = new StringBuilder();
+ int c;
+ while ((c = stream.read()) != -1) {
+ retStr.append((char) c);
+ }
+ stream.close();
+ return retStr.toString();
+ }
+
+ /**
+ * Checks whether a file exists.
+ *
+ * @param cmdPath The file path to be checked.
+ * @return <code>true</code> if the file exists, <code>false</code> otherwise.
+ */
+ public static boolean fileExist(String cmdPath) {
+ return new File(cmdPath).exists();
+ }
+
+ /**
+ * Copy file from one destination to another.
+ * @param in The source file.
+ * @param out The destination.
+ * @throws IOException If an I/O exception occurs.
+ */
+ public static void copyFile(File in, File out) throws IOException {
+ FileChannel inChannel = new FileInputStream(in).getChannel();
+ FileChannel outChannel = new FileOutputStream(out).getChannel();
+ try {
+ inChannel.transferTo(0, inChannel.size(), outChannel);
+ } catch (IOException e) {
+ throw e;
+ } finally {
+ if (inChannel != null)
+ inChannel.close();
+ if (outChannel != null)
+ outChannel.close();
+ }
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/.classpath b/rpm/org.eclipse.linuxtools.rpm.rpmlint/.classpath
new file mode 100644
index 0000000000..304e86186a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/.cvsignore b/rpm/org.eclipse.linuxtools.rpm.rpmlint/.cvsignore
new file mode 100644
index 0000000000..ba077a4031
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/.cvsignore
@@ -0,0 +1 @@
+bin
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/.project b/rpm/org.eclipse.linuxtools.rpm.rpmlint/.project
new file mode 100644
index 0000000000..6cdf1d6583
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.rpm.rpmlint</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/.settings/org.eclipse.jdt.core.prefs b/rpm/org.eclipse.linuxtools.rpm.rpmlint/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..ae971f06d9
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,83 @@
+#Wed Feb 25 14:59:06 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/ChangeLog b/rpm/org.eclipse.linuxtools.rpm.rpmlint/ChangeLog
new file mode 100644
index 0000000000..78b2ad1eee
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/ChangeLog
@@ -0,0 +1,479 @@
+2010-01-19 Alexander Kurtakov <akurtako@redhat.com>
+
+ * META-INF/MANIFEST.MF: Require o.e.l.rpm.core.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/actions/RunRpmlintAction.java: Use Utils from core.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintParser.java: Likewise.
+
+2010-01-18 Alexander Kurtakov <akurtako@redhat.com>
+
+ * plugin.xml: Switch to commands.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/actions/RunRpmlintAction.java: Make it AbstractHandler.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/actions/ToggleRpmlintNatureAction.java: Likewise.
+
+2009-08-07 Alexander Kurtakov <akurtako@redhat.com>
+
+ * plugin.properties: Fix provider to be Eclipse not Eclipse.org.
+
+2009-06-29 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/rpmlint/actions/Messages.java: New messages for missing rpmlint error.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/actions/messages.properties: Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/actions/RunRpmlintAction.java (run): Show error dialog when rpmlint is not found.
+
+2009-05-29 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/rpmlint/actions/RunRpmlintAction.java (run): Add javadoc.
+ (selectionChanged): Likewise.
+ (setActivePart): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/actions/ToggleRpmlintNatureAction.java (run): Likewise.
+ (selectionChanged): Likewise.
+ (setActivePart): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/Activator.java (stop): Likewise.
+ (SPECFILE_EXTENSION): Likewise.
+ (start): Likewise.
+ (PLUGIN_ID): Likewise.
+ (RPMFILE_EXTENSION): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintBuilder.java (MARKER_ID): Likewise.
+ (MAX_WORKS): Likewise.
+ (BUILDER_ID): Likewise.
+ (getSpecfileTaskHandler): Make it protected.
+
+2009-05-14 Alexander Kurtakov <akurtako@redhat.com>
+
+ * META-INF/MANIFEST.MF: Bump release 0.4.3.
+
+2009-05-08 Alphonse Van Assche <alcapcom@fedoraproject.org>
+ Add support for the new 'specfile-error' rpmlint error. This error is
+ returned by rpmlint when it cannot parse a given .spec file using
+ 'rpm -q --qf= --specfile file.spec' command. The output of the RPM parser
+ give us some useful information about many .spec file syntax errors.
+
+ * src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintParser.java: Parse rpm parser error message.
+ * plugin.xml: Fix typo.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintMarkerVisitor.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintItem.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmlintMarkerResolutionGenerator.java: Likewise.
+
+2009-03-24 Alexander Kurtakov <akurtako@redhat.com>
+
+ * plugin.xml: Add popup menu item for running rpmlint on spec files.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintMarkerRemoveVisitor.java (visit): Clean markers for rpm files.
+
+2009-02-25 Alexander Kurtakov <akurtako@redhat.com>
+
+ * .settings/org.eclipse.jdt.core.prefs: Enable warning for not used parameter.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/ARpmlintResolution.java (getImage): Let's have getImage in the base class to not copy it everywhere.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/HardcodedPackagerTag.java (getImage): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/HardcodedPrefixTag.java (getImage): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/MacroInChangelog.java (getImage): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildrootTag.java (getImage): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildSection.java (getImage): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleaningOfBuildroot.java (getImage): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleanSection.java (getImage): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoInstallSection.java (getImage): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoPrepSection.java (getImage): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/PatchNotApplied.java (getImage): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmBuildrootUsage.java (getImage): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/SetupNotQuiet.java (getImage): Likewise.
+
+2009-02-12 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/HardcodedPackagerTag.java (getDescription): Fix javadoc.
+ (ID): Likewise.
+ (getImage): Likewise.
+ (getLabel): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/HardcodedPrefixTag.java (getDescription): Likewise.
+ (ID): Likewise.
+ (getImage): Likewise.
+ (getLabel): Likewise.
+
+2009-02-09 Alexander Kurtakov <akurtako@redhat.com>
+
+ * .settings/org.eclipse.jdt.core.prefs: Enable warnings for missing javadoc.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/Activator.java: Add constant for rpm file extension.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/Messages.java (static initializer): Remove not used message.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/messages.properties: Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintBuilder.java (visitAndMarkRpmlintItems): Likewise.
+ (incrementalBuild): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintDeltaVisitor.java (visit): Add rpm files to the to be checked list.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintMarkerVisitor.java (visit): Handle markers for rpm files.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintPreVisitor.java (visit): Add rpm files to the to be checked list.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintParser.java (addMarker): New method for markers not related with a source line.
+
+2009-02-06 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildrootTag.java (getLineNumberForInsert): Remove methods that return section arrays.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildSection.java (getLineNumberForInsert): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleaningOfBuildroot.java (getLineNumberForInsert): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleanSection.java (getLineNumberForInsert): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoInstallSection.java (getLineNumberForInsert): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoPrepSection.java (getLineNumberForInsert): Likewise.
+
+2009-02-06 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/rpmlint/actions/RunRpmlintAction.java (run): Use utils for command invocation.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintParser.java (parseVisisted): Likewise.
+ (parseRpmlintOutput): Fix typo.
+ (runRpmlintCommand): Use utils for command invocation.
+
+2009-02-02 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/rpmlint/actions/RunRpmlintAction.java (run): Clear console before outputting to not merge different runs.
+
+2009-02-01 Alexander Kurtakov <akurtako@redhat.com>
+ Fix #262926.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/actions/Messages.java: New file.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/actions/messages.properties: New file.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/actions/RunRpmlintAction.java: New file.
+ * META-INF/MANIFEST.MF: Add o.e.ui.console require.
+ * plugin.xml: Add action for viewing rpmlint output for rpm.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/actions/ToggleRpmlintNatureAction.java (run): Simplify and fix warning.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/Activator.java (getRpmlintPath): New method.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintParser.java
+ (runRpmlintCommand): Simplify.
+ (getRpmlintPath): Moved in activator.
+
+2009-01-22 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/rpmlint/Activator.java: Add constant for specfile extension.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintDeltaVisitor.java (visit): Simplify if and use file extension constant.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintMarkerRemoveVisitor.java (visit): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintMarkerVisitor.java (visit): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintPreVisitor.java (visit): Likewise.
+
+2009-01-22 Alexander Kurtakov <akurtako@redhat.com>
+ Externalize strings.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/Messages.java: New file.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/messages.properties: New file.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/Messages.java: New file.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/messages.properties: New file.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/preferences/Messages.java: New file.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/preferences/messages.properties: New file.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/Messages.java: New file.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/messages.properties: New file.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/actions/ToggleRpmlintNatureAction.java: Add Copyright header.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintBuilder.java (visitAndMarkRpmlintItems): Externalize strings.
+ (fullBuild): Likewise.
+ (incrementalBuild): Likewise.
+ (build): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintDeltaVisitor.java (visit):Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintMarkerRemoveVisitor.java (visit): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintMarkerVisitor.java (fileToString): Likewise.
+ (visit): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintNature.java: Add Copyright header.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintPreVisitor.java (visit): Externalize strings.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/preferences/RpmlintPreferencePage.java (createFieldEditors): Externalize strings.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/ARpmlintResolution.java: Add 2009 to Copyright year.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/HardcodedPackagerTag.java (getDescription): Externalize strings.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/HardcodedPrefixTag.java (getDescription): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/MacroInChangelog.java (getDescription): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildrootTag.java (getDescription): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildSection.java (getDescription): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleaningOfBuildroot.java (getDescription): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleanSection.java (getDescription): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoInstallSection.java (getDescription): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoPrepSection.java (getDescription): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/PatchNotApplied.java (getDescription): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmBuildrootUsage.java (getDescription): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/SetupNotQuiet.java (getDescription): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/RpmlintLog.java (logError): Likewise.
+
+2009-01-21 Alexander Kurtakov <akurtako@redhat.com>
+
+ * .settings/org.eclipse.jdt.core.prefs: Enable non externalized strings warnings.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/Activator.java: Add NON-NLS.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintBuilder.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintNature.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintItem.java (setSeverity): Likewise.
+ (toString): Likewise.
+ (setRefferedContent): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintParser.java (getRealLineNbr): Likewise.
+ (parseRpmlintOurput): Likewise.
+ (runRpmlintCommand): Likewise.
+ (getMixedUseOfTabsAndSpaces): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/preferences/PreferenceConstants.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/ARemoveLineResolution.java (run): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/HardcodedPackagerTag.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/HardcodedPrefixTag.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/MacroInChangelog.java (getReplaceString): Likewise.
+ (getOriginalString): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildrootTag.java (getLineToInsert): Likewise.
+ (getLineNumberForInsert): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildSection.java (getLineToInsert): Likewise.
+ (getLineNumberForInsert): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleaningOfBuildroot.java (getLineToInsert): Likewise.
+ (getLineNumberForInsert): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleanSection.java (getLineToInsert): Likewise.
+ (getLineNumberForInsert): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoInstallSection.java (getLineToInsert): Likewise.
+ (getLineNumberForInsert): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoPrepSection.java (getLineToInsert): Likewise.
+ (getLineNumberForInsert): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/PatchNotApplied.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmBuildrootUsage.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmlintMarkerResolutionGenerator.java (getRpmlintErrorId): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/SetupNotQuiet.java (getReplaceString): Likewise.
+ (getOriginalString): Likewise.
+
+2009-01-15 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/rpmlint/actions/ToggleRpmlintNatureAction.java
+ (toggleNature): Comment empty block.
+
+2009-01-15 Alexander Kurtakov <akurtako@redhat.com>
+
+ * .settings/org.eclipse.jdt.core.prefs: Enable javadoc warnings.
+ ONLY to be correct javadoc, not checking missing javadoc. Yet.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/actions/ToggleRpmlintNatureAction.java
+ (setActivePart): Comment empty block.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintParser.java
+ (getRealLineNbr): Fix javadoc syntax.
+ (parseVisisted): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/AInsertLineResolution.java
+ (getLineNumberForInsert): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/RpmlintLog.java
+ (logInfo): Likewise.
+ (logError): Likewise.
+ (log): Likewise.
+ (createStatus): Likewise.
+
+2009-01-15 Alexander Kurtakov <akurtako@redhat.com>
+
+ * .settings/org.eclipse.jdt.core.prefs: Enable project wide warnings.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintParser.java
+ (RpmlintParser): Make it private so instances can't be made.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/preferences/RpmlintPreferencePage.java
+ (init): Add comment.
+
+2009-01-14 Alexander Kurtakov <akurtako@redhat.com>
+
+ * META-INF/MANIFEST.MF: Add back qualifier for trunk.
+
+2009-01-14 Alexander Kurtakov <akurtako@redhat.com>
+
+ * META-INF/MANIFEST.MF: Bump release for Linuxtools 0.1 release.
+
+2009-01-12 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * META-INF/MANIFEST.MF: Add qualifier to the version.
+
+2009-01-06 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * META-INF/MANIFEST.MF: Bump release to 0.4.1.
+
+2008-12-18 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/ARpmlintResolution.java: New file.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/AInsertLineResolution.java
+ (run): Remove functionality that is in the base class now.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/ARemoveLineResolution.java
+ (run): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/AReplaceTextResolution.java
+ (run): Likewise.
+
+2008-11-28 Alexander Kurtakov <akurtakov@gmail.com>
+ Fix problem with enabling rpmlint warnings after task handler addition.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintBuilder.java
+ (getSpecfileTaskHandler): Match the error handler api.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintMarkerVisitor.java
+ (visit): Set the task handler too.
+
+2008-11-27 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildSection.java
+ (getLineNumberForInsert): Update to latest Specfile changes.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleaningOfBuildroot.java
+ (getLineNumberForInsert): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleanSection.java
+ (getLineNumberForInsert): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoInstallSection.java
+ (getLineNumberForInsert): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoPrepSection.java
+ (getLineNumberForInsert): Likewise.
+
+2008-11-26 Alexander Kurtakov <akurtakov@gmail.com>
+ Fix imports caused by marker handlers movement.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintBuilder.java: Fix imports.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintMarkerRemoveVisitor.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintMarkerVisitor.java: Likewise.
+
+2008-11-01 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * build.properties: Add plugin.properties to bin.includes.
+
+2008-10-31 Andrew Overholt <overholt@redhat.com>
+
+ * plugin.properties: Initial import.
+ * META-INF/MANIFEST.MF: Use plugin.properties. Add "(Incubation)".
+
+2008-10-20 Alexander Kurtakov <akurtakov@gmail.com>
+ Fix deprecations.
+ * META-INF/MANIFEST.MF:
+ Use Bunde-ActivationPolicy instead of the deprecated Eclipse-LazyStart.
+
+2008-10-13 Alexander Kurtakov <akurtakov@gmail.com>
+ 3 more quick fixes with some cleanup.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/AInsertLineResolution.java:
+ (run): Store the marker line for use in the resolution.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/HardcodedPackagerTag.java:
+ Add license.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/MacroInChangelog.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleaningOfBuildroot.java:
+ (getLineNumberForInsert): Handle warning from clean section too.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleanSection.java:
+ New file.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoInstallSection.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoPrepSection.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmlintMarkerResolutionGenerator.java:
+ (getResolutions): Register the new quickfixes.
+ (hasResolutions): Register all the resolutions.
+
+2008-08-02 Alexander Kurtakov <akurtakov@gmail.com>
+ Two more quick fixes.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmlintMarkerResolutionGenerator.java:
+ (getResolutions): Enable new fixes.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/HardcodedPackagerTag.java: New file.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/HardcodedPrefixTag.java: Likewise.
+
+2008-08-02 Alexander Kurtakov <akurtakov@gmail.com>
+ Cleanup.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintMarkerVisitor.java:
+ Remove unused import.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildrootTag.java:
+ Make ID final.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildSection.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleaningOfBuildroot.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/PatchNotApplied.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmBuildrootUsage.java:
+ Likewise.
+
+2007-07-18 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * META-INF/MANIFEST.MF: bump to 0.0.2
+ * src/org/eclipse/linuxtools/rpm/rpmlint/actions/ToggleRpmlintNatureAction.java (run): Generify.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintMarkerVisitor.java (visit): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintNature.java (configure): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintParser.java (getRealLineNbr): Likewise.
+ (parseRpmlintOurput): Ignore rpmlint 0.83 summary line.
+
+2008-05-24 Alexander Kurtakov <akurtakov@gmail.com>
+ Add missing @Override annotations.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/Activator.java:
+ (start): Likewise.
+ (stop): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintBuilder.java:
+ (build): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintItem.java:
+ (toString): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/preferences/PreferenceInitializer.java:
+ (initializeDefaultPreferences): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/preferences/RpmlintPreferencePage.java:
+ (createFieldEditors): Likewise.
+
+2008-05-22 Alexander Kurtakov <akurtakov@gmail.com>
+ Add rpm-buildroot-usage quick fix.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmBuildrootUsage.java: New file.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmlintMarkerResolutionGenerator.java:
+ (getResolutions): Enable rpm-buildroot-usage fix.
+
+2008-05-22 Alexander Kurtakov <akurtakov@gmail.com>
+ Add macro-in-changelog quick fix.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/MacroInChangelog.java: New file.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmlintMarkerResolutionGenerator.java:
+ (getResolutions): Enable macro-in-changelog fix.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/AReplaceTextResolution.java:
+ (run): Replace at the exact position in the line.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/SetunNotQuiet.java:
+ (getOriginalString): Mark as @Override.
+ (getReplaceString): Likewise.
+ * META-INF/MANIFEST.MF: Bump BREE to J2SE-1.5
+
+2008-05-21 Alexander Kurtakov <akurtakov@gmail.com>
+ Add no-%build-section quick fix.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildSection.java: New file.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmlintMarkerResolutionGenerator.java:
+ (getResolutions): Enable no-%build-section fix.
+
+2008-05-19 Alexander Kurtakov <akurtakov@gmail.com>
+ Add no-cleaning-of-buildroot quick fix.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleaningOfBuildroot.java: New file.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmlintMarkerResolutionGenerator.java:
+ (getResolutions): Enable no-cleaning-of-buildroot quick fix.
+
+2008-05-19 Alexander Kurtakov <akurtakov@gmail.com>
+ Add no-buildroot-tag quick fix.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/AInsertLineResolution.java: New file.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildrootTag.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmlintMarkerResolutionGenerator.java:
+ (getResolutions): Enable no-buildroot-tag.
+ * META-INF/MANIFEST.MF: Import org.eclipse.ui.editors package.
+
+2008-04-29 Alexander Kurtakov <akurtakov@gmail.com>
+ Generify.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/actions/ToggleRpmlintNatureAction.java
+ (run): Generify.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintBuilder.java
+ (fullBuild): Likewise.
+ (incrementalBuild): Likewise.
+ (visitAndMarkRpmlintItems): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/RpmlintDeltaVisitor.java
+ (getVisitedPaths): Likewise.
+ (visit): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/RpmlintMarkerVisitor.java
+ (RpmlintMarketVisitor): Likewise.
+ (visit): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/RpmlintPreVisitor.java
+ (getVisitedPaths): Likewise.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintParser.java
+ (getNumberOfIterations): Likewise.
+ (parseRpmlintOurput): Likewise.
+ (parseVisited): Likewise.
+ (runRpmlintCommand): Likewise.
+ (splitArrayList): Likewise.
+
+2008-04-08 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * .classpath:
+ The minimum java version is 5 now.
+ * .settings/org.eclipse.jdt.core.prefs:
+ Bump the compiler lever to 5.
+
+2007-07-18 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * META-INF/MANIFEST.MF: Remove unneeded deps.
+
+2007-06-26 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintDeltaVisitor.java:
+ (visit): Remove old markers when a resource is modified.
+
+2007-06-25 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintBuilder.java:
+ Cleanup some messages.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/Activator.java:
+ Add license.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/RpmlintLog.java:
+ Add license + cleanup the javadoc.
+ * src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintParser.java:
+ Remove unneeded stack traces printing.
+
+2007-06-22 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * .cvsignore: Add bin dir.
+
+2007-06-21 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintParser.java
+ (splitArrayList): Don't return the list to be compatible with parseVisisted new
+ implementation.
+
+2007-05-22 Alphonse Van Assche <alcapcom@gmail.com>
+
+ Initial version. \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/META-INF/MANIFEST.MF b/rpm/org.eclipse.linuxtools.rpm.rpmlint/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..7c8463dd10
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.rpm.rpmlint;singleton:=true
+Bundle-Version: 0.4.3.qualifier
+Bundle-Activator: org.eclipse.linuxtools.rpm.rpmlint.Activator
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.ui,
+ org.eclipse.jface.text,
+ org.eclipse.ui.ide,
+ org.eclipse.ui.workbench.texteditor,
+ org.eclipse.linuxtools.rpm.ui.editor,
+ org.eclipse.ui.editors,
+ org.eclipse.ui.console;bundle-version="3.3.0",
+ org.eclipse.linuxtools.rpm.core
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.linuxtools.rpm.rpmlint,
+ org.eclipse.linuxtools.rpm.rpmlint.actions,
+ org.eclipse.linuxtools.rpm.rpmlint.builder,
+ org.eclipse.linuxtools.rpm.rpmlint.parser,
+ org.eclipse.linuxtools.rpm.rpmlint.preferences,
+ org.eclipse.linuxtools.rpm.rpmlint.resolutions
+Bundle-Vendor: %provider
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/build.properties b/rpm/org.eclipse.linuxtools.rpm.rpmlint/build.properties
new file mode 100644
index 0000000000..7b17480348
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ plugin.properties
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/plugin.properties b/rpm/org.eclipse.linuxtools.rpm.rpmlint/plugin.properties
new file mode 100644
index 0000000000..269c3f3512
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2008 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 Incorporated - initial API and implementation
+#################################################################################
+bundleName=RPM Rpmlint Plug-in (Incubation)
+provider=Eclipse \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/plugin.xml b/rpm/org.eclipse.linuxtools.rpm.rpmlint/plugin.xml
new file mode 100644
index 0000000000..6278bc8f06
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/plugin.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ id="rpmlintBuilder"
+ name="Rpmlint project builder"
+ point="org.eclipse.core.resources.builders">
+ <builder
+ hasNature="true">
+ <run
+ class="org.eclipse.linuxtools.rpm.rpmlint.builder.RpmlintBuilder">
+ </run>
+ </builder>
+ </extension>
+ <extension
+ id="rpmlintNature"
+ name="Rpmlint Projet Nature"
+ point="org.eclipse.core.resources.natures">
+ <runtime>
+ <run
+ class="org.eclipse.linuxtools.rpm.rpmlint.builder.RpmlintNature">
+ </run>
+ </runtime>
+ <builder id="org.eclipse.linuxtools.rpm.rpmlint.rpmlintBuilder"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <category
+ name="Rpmlint Commands"
+ description="Specfile Editor Commands"
+ id="rpmlint.category"/>
+ <command
+ categoryId="rpmlint.category"
+ name="Toggle Rpmlint"
+ id="rpmlint.toggleRpmlint.command"/>
+ <command
+ categoryId="rpmlint.category"
+ name="Run rpmlint"
+ id="rpmlint.runRpmlint.command"/>
+ </extension>
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.linuxtools.rpm.rpmlint.actions.ToggleRpmlintNatureAction"
+ commandId="rpmlint.toggleRpmlint.command" />
+ <handler
+ class="org.eclipse.linuxtools.rpm.rpmlint.actions.RunRpmlintAction"
+ commandId="rpmlint.runRpmlint.command" />
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:org.eclipse.ui.popup.any?after=additions">
+ <command
+ commandId="rpmlint.toggleRpmlint.command"
+ label="Add/Remove Rpmlint Warnings" >
+ <visibleWhen>
+ <iterate operator="and" ifEmpty="false">
+ <adapt type="org.eclipse.core.resources.IProject">
+ </adapt>
+ </iterate>
+ </visibleWhen>
+
+ </command>
+ <command
+ commandId="rpmlint.runRpmlint.command"
+ label="Run Rpmlint ">
+ <visibleWhen>
+ <iterate operator="and" ifEmpty="false">
+ <or>
+ <adapt type="org.eclipse.core.resources.IResource">
+ <or>
+ <test property="org.eclipse.core.resources.name" value="*.rpm"/>
+ <test property="org.eclipse.core.resources.name" value="*.spec"/>
+ </or>
+ </adapt>
+ <adapt type="org.eclipse.jface.text.ITextSelection" />
+ </or>
+ </iterate>
+</visibleWhen>
+
+ </command>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.linuxtools.rpm.ui.editor.mainpage"
+ class="org.eclipse.linuxtools.rpm.rpmlint.preferences.RpmlintPreferencePage"
+ id="org.eclipse.linuxtools.rpm.rpmlint.preferences.rpmlintPreferencePage"
+ name="Rpmlint"/>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer class="org.eclipse.linuxtools.rpm.rpmlint.preferences.PreferenceInitializer"/>
+ </extension>
+ <extension
+ id="rpmlintProblem"
+ name="Rpmlint Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.core.resources.problemmarker"/>
+ <super type="org.eclipse.core.resources.textmarker"/>
+ <persistent value="true"/>
+ <attribute name="rpmlintErrorId"/>
+ <attribute name="rpmlintrefferedContent"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.ide.markerResolution">
+ <markerResolutionGenerator
+ class="org.eclipse.linuxtools.rpm.rpmlint.resolutions.RpmlintMarkerResolutionGenerator"
+ markerType="org.eclipse.linuxtools.rpm.rpmlint.rpmlintProblem"/>
+ </extension>
+
+</plugin>
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/Activator.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/Activator.java
new file mode 100644
index 0000000000..5faac8b3de
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/Activator.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.rpmlint;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.linuxtools.rpm.rpmlint.preferences.PreferenceConstants;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ /**
+ * 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$
+
+ /**
+ * RPM extension constant, i.e. .rpm files.
+ */
+ public static final String RPMFILE_EXTENSION = "rpm"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ plugin = this;
+ }
+
+ /**
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /**
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given
+ * plug-in relative path
+ *
+ * @param path the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ /**
+ * Returns the rpmlint path stored in the preferences.
+ * @return The path to the rpmlint executable.
+ */
+ public static String getRpmlintPath() {
+ return plugin.getPreferenceStore().getString(
+ PreferenceConstants.P_RPMLINT_PATH);
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/Messages.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/Messages.java
new file mode 100644
index 0000000000..ba8926daaf
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/Messages.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.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
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/RpmlintLog.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/RpmlintLog.java
new file mode 100644
index 0000000000..3878572fc3
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/RpmlintLog.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.rpmlint;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
+/**
+ * The logger of convenience for the Rpmlint Plug-In.
+ */
+public class RpmlintLog {
+ /**
+ * 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.RpmlintLog_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 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));
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * 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.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/Messages.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/Messages.java
new file mode 100644
index 0000000000..a3f016b6aa
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/Messages.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.actions;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.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
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/RunRpmlintAction.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/RunRpmlintAction.java
new file mode 100644
index 0000000000..5cb3c9ed11
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/RunRpmlintAction.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.actions;
+
+import java.io.IOException;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.linuxtools.rpm.core.utils.Utils;
+import org.eclipse.linuxtools.rpm.rpmlint.Activator;
+import org.eclipse.linuxtools.rpm.rpmlint.RpmlintLog;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleManager;
+import org.eclipse.ui.console.MessageConsole;
+import org.eclipse.ui.console.MessageConsoleStream;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Manually invoke rpmlint action, which prints the output of rpmlint execution to the console.
+ *
+ */
+public class RunRpmlintAction extends AbstractHandler{
+ /**
+ * @param event The execution event.
+ * @return Nothing.
+ */
+ public Object execute(ExecutionEvent event) {
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection) {
+ for (Object element : ((IStructuredSelection) selection).toList()) {
+ IFile rpmFile = null;
+ if (element instanceof IFile) {
+ rpmFile = (IFile) element;
+ } else if (element instanceof IAdaptable) {
+ rpmFile = (IFile) ((IAdaptable) element)
+ .getAdapter(IFile.class);
+ }
+ if (rpmFile != null) {
+ try {
+ if (Utils.fileExist(Activator.getRpmlintPath())) {
+ String output = Utils.runCommandToString(Activator
+ .getRpmlintPath(),
+ "-i", rpmFile.getLocation() //$NON-NLS-1$
+ .toString());
+ MessageConsole myConsole = findConsole(Messages.RunRpmlintAction_0);
+ MessageConsoleStream out = myConsole
+ .newMessageStream();
+ myConsole.clearConsole();
+ myConsole.activate();
+ out.println(output);
+ } else {
+ IStatus warning = new Status(
+ IStatus.WARNING,
+ Activator.PLUGIN_ID,
+ 1,
+ Messages.RunRpmlintAction_1,
+ null);
+ ErrorDialog.openError(PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getShell(),
+ Messages.RunRpmlintAction_2,
+ null, warning);
+ }
+ } catch (IOException e) {
+ // FIXME: rpmlint is not installed in the default place
+ // -> ask user to open the prefs page.
+ RpmlintLog.logError(e);
+ }
+ }
+ }
+ }
+ return null;
+
+ }
+
+ private MessageConsole findConsole(String name) {
+ ConsolePlugin plugin = ConsolePlugin.getDefault();
+ IConsoleManager conMan = plugin.getConsoleManager();
+ IConsole[] existing = conMan.getConsoles();
+ for (int i = 0; i < existing.length; i++)
+ if (name.equals(existing[i].getName()))
+ return (MessageConsole) existing[i];
+ // no console found, so create a new one
+ MessageConsole myConsole = new MessageConsole(name, null);
+ conMan.addConsoles(new IConsole[] { myConsole });
+ return myConsole;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/ToggleRpmlintNatureAction.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/ToggleRpmlintNatureAction.java
new file mode 100644
index 0000000000..d66366d69f
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/ToggleRpmlintNatureAction.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.actions;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.linuxtools.rpm.rpmlint.builder.RpmlintNature;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Toggle rpmlint nature for the given project.
+ * As a result this enables/disables rpmlint builder.
+ *
+ */
+public class ToggleRpmlintNatureAction extends AbstractHandler {
+
+
+ /**
+ * @param event The event
+ * @return Null.
+ */
+ public Object execute(ExecutionEvent event) {
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection) {
+ for (Object element: ((IStructuredSelection) selection).toList()) {
+ IProject project = null;
+ if (element instanceof IProject) {
+ project = (IProject) element;
+ } else if (element instanceof IAdaptable) {
+ project = (IProject) ((IAdaptable) element)
+ .getAdapter(IProject.class);
+ }
+ if (project != null) {
+ toggleNature(project);
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Toggles sample nature on a project
+ *
+ * @param project
+ * to have sample nature added or removed
+ */
+ private void toggleNature(IProject project) {
+ try {
+ IProjectDescription description = project.getDescription();
+ String[] natures = description.getNatureIds();
+
+ for (int i = 0; i < natures.length; ++i) {
+ if (RpmlintNature.NATURE_ID.equals(natures[i])) {
+ // Remove the nature
+ String[] newNatures = new String[natures.length - 1];
+ System.arraycopy(natures, 0, newNatures, 0, i);
+ System.arraycopy(natures, i + 1, newNatures, i,
+ natures.length - i - 1);
+ description.setNatureIds(newNatures);
+ project.setDescription(description, null);
+ return;
+ }
+ }
+
+ // Add the nature
+ String[] newNatures = new String[natures.length + 1];
+ System.arraycopy(natures, 0, newNatures, 0, natures.length);
+ newNatures[natures.length] = RpmlintNature.NATURE_ID;
+ description.setNatureIds(newNatures);
+ project.setDescription(description, null);
+ } catch (CoreException e) {
+ //TODO log exception
+ }
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/messages.properties b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/messages.properties
new file mode 100644
index 0000000000..cee6e0ee15
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/messages.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# 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
+###############################################################################
+RunRpmlintAction_0=Rpmlint console
+RunRpmlintAction_1=No rpmlint installed or configured
+RunRpmlintAction_2=Please install and configure rpmlint in the plugin preference page.
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/Messages.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/Messages.java
new file mode 100644
index 0000000000..f9c87cc021
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/Messages.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.builder;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.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
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintBuilder.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintBuilder.java
new file mode 100644
index 0000000000..ef009c363b
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintBuilder.java
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.builder;
+
+import java.util.ArrayList;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.linuxtools.rpm.rpmlint.Activator;
+import org.eclipse.linuxtools.rpm.rpmlint.parser.RpmlintItem;
+import org.eclipse.linuxtools.rpm.rpmlint.parser.RpmlintParser;
+import org.eclipse.linuxtools.rpm.ui.editor.markers.SpecfileErrorHandler;
+import org.eclipse.linuxtools.rpm.ui.editor.markers.SpecfileTaskHandler;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileParser;
+
+/**
+ * Project builder responsible for invoking rpmlint and processing it's response.
+ */
+public class RpmlintBuilder extends IncrementalProjectBuilder {
+
+ /**
+ * 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 rpmlint marker problems.
+ */
+ public static final String MARKER_ID = Activator.PLUGIN_ID + ".rpmlintProblem"; //$NON-NLS-1$
+
+ private SpecfileParser specfileParser;
+
+ private SpecfileErrorHandler errorHandler;
+ private SpecfileTaskHandler taskHandler;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.internal.events.InternalBuilder#build(int,
+ * java.util.Map, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ protected IProject[] build(int kind, Map 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;
+ }
+
+ protected void fullBuild(IProgressMonitor monitor) throws CoreException {
+ RpmlintPreVisitor resourceVisitor = new RpmlintPreVisitor();
+ getProject().accept(resourceVisitor);
+ checkCancel(monitor);
+ monitor.worked(50);
+ monitor.setTaskName(Messages.RpmlintBuilder_1);
+ ArrayList<RpmlintItem> rpmlintItems = RpmlintParser.getInstance().parseVisisted(
+ resourceVisitor.getVisitedPaths());
+ visitAndMarkRpmlintItems(monitor, rpmlintItems);
+ }
+
+ protected void incrementalBuild(IResourceDelta delta,
+ IProgressMonitor monitor) throws CoreException {
+ RpmlintDeltaVisitor deltaVisitor = new RpmlintDeltaVisitor();
+ delta.accept(deltaVisitor);
+ monitor.worked(50);
+ monitor.setTaskName(Messages.RpmlintBuilder_1);
+ ArrayList<RpmlintItem> rpmlintItems = RpmlintParser.getInstance().parseVisisted(
+ deltaVisitor.getVisitedPaths());
+ visitAndMarkRpmlintItems(monitor, rpmlintItems);
+ }
+
+ private void visitAndMarkRpmlintItems(IProgressMonitor monitor,
+ ArrayList<RpmlintItem> rpmlintItems) throws CoreException {
+ if (rpmlintItems.size() > 0) {
+ checkCancel(monitor);
+ monitor.worked(70);
+ monitor.setTaskName(Messages.RpmlintBuilder_2);
+ getProject().accept(new RpmlintMarkerVisitor(this, rpmlintItems));
+ monitor.worked(MAX_WORKS);
+ }
+ }
+
+ protected SpecfileParser getSpecfileParser() {
+ if (specfileParser == null) {
+ specfileParser = new SpecfileParser();
+ }
+ return specfileParser;
+ }
+
+ protected 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;
+ }
+
+ protected 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;
+ }
+
+ protected void checkCancel(IProgressMonitor monitor) {
+ if (monitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintDeltaVisitor.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintDeltaVisitor.java
new file mode 100644
index 0000000000..71a67c2740
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintDeltaVisitor.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.builder;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.linuxtools.rpm.rpmlint.Activator;
+import org.eclipse.linuxtools.rpm.rpmlint.parser.RpmlintParser;
+
+public class RpmlintDeltaVisitor implements IResourceDeltaVisitor {
+
+ private ArrayList<String> paths = new ArrayList<String>();
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.resources.IResourceDeltaVisitor#visit(org.eclipse.core.resources.IResourceDelta)
+ */
+ 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.getInstance().deleteMarkers(resource);
+ paths.add(resource.getLocation().toOSString());
+ break;
+ }
+ }
+ return true;
+ }
+
+ public ArrayList<String> getVisitedPaths() {
+ return paths;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintMarkerRemoveVisitor.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintMarkerRemoveVisitor.java
new file mode 100644
index 0000000000..33378285fc
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintMarkerRemoveVisitor.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.builder;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.linuxtools.rpm.rpmlint.Activator;
+import org.eclipse.linuxtools.rpm.rpmlint.parser.RpmlintParser;
+import org.eclipse.linuxtools.rpm.ui.editor.markers.SpecfileErrorHandler;
+
+/**
+ * Removes all the markers created by rpmlint.
+ *
+ */
+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)
+ */
+ public boolean visit(IResource resource) throws CoreException {
+ if (Activator.SPECFILE_EXTENSION.equals(resource.getFileExtension())
+ || Activator.RPMFILE_EXTENSION.equals(resource
+ .getFileExtension())) {
+ RpmlintParser.getInstance().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/rpm/rpmlint/builder/RpmlintMarkerVisitor.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintMarkerVisitor.java
new file mode 100644
index 0000000000..0c988f70a2
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintMarkerVisitor.java
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.builder;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.linuxtools.rpm.rpmlint.Activator;
+import org.eclipse.linuxtools.rpm.rpmlint.RpmlintLog;
+import org.eclipse.linuxtools.rpm.rpmlint.parser.RpmlintItem;
+import org.eclipse.linuxtools.rpm.rpmlint.parser.RpmlintParser;
+import org.eclipse.linuxtools.rpm.ui.editor.markers.SpecfileErrorHandler;
+
+public class RpmlintMarkerVisitor implements IResourceVisitor {
+
+ private ArrayList<RpmlintItem> rpmlintItems;
+
+ private int lineNumber;
+
+ private RpmlintBuilder builder;
+
+ private String specContent;
+
+ private boolean firstWarningInResource;
+
+ private IFile currentFile;
+
+ private IDocument document;
+
+ private int charStart;
+
+ private int charEnd;
+
+
+ public RpmlintMarkerVisitor(RpmlintBuilder builder, ArrayList<RpmlintItem> rpmlintItems) {
+ this.rpmlintItems = rpmlintItems;
+ this.builder = builder;
+ rpmlintItems = new ArrayList<RpmlintItem>();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.resources.IResourceVisitor#visit(org.eclipse.core.resources.IResource)
+ */
+ public boolean visit(IResource resource) throws CoreException {
+ if (Activator.SPECFILE_EXTENSION.equals(resource.getFileExtension())) {
+ firstWarningInResource = true;
+ for (RpmlintItem item : rpmlintItems) {
+ if (item.getFileName().equals(resource.getLocation().toOSString())) {
+ currentFile = ((IFile)resource);
+ if (firstWarningInResource) {
+ RpmlintParser.getInstance().deleteMarkers(resource);
+ // remove internal marks on the current resource
+ currentFile.deleteMarkers(SpecfileErrorHandler.SPECFILE_ERROR_MARKER_ID, false, IResource.DEPTH_ZERO);
+ firstWarningInResource = false;
+ }
+
+ specContent = fileToString(currentFile);
+ // 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.getInstance().getRealLineNbr(specContent, "./configure"); //$NON-NLS-1$
+ if (lineNumber == -1)
+ lineNumber = RpmlintParser.getInstance().getRealLineNbr(specContent, "%configure"); //$NON-NLS-1$
+ item.setLineNbr(lineNumber);
+ }
+
+ lineNumber = item.getLineNbr();
+ if (lineNumber == -1) {
+ lineNumber = RpmlintParser.getInstance().getRealLineNbr(specContent, item.getRefferedContent());
+ if (lineNumber == -1) {
+ lineNumber = 1;
+ }
+ }
+ lineNumber -= 1;
+ // end workaround
+
+ // BTW we mark specfile with the internal marker.
+ builder.getSpecfileParser().setErrorHandler(builder.getSpecfileErrorHandler(currentFile, specContent));
+ builder.getSpecfileParser().setTaskHandler(builder.getSpecfileTaskHandler(currentFile, specContent));
+ builder.getSpecfileParser().parse(specContent);
+
+ document = new Document(specContent);
+ charStart = getLineOffset(lineNumber);
+ charEnd = charStart + getLineLenght(lineNumber);
+ RpmlintParser.getInstance().addMarker((IFile) resource, 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) {
+ currentFile = ((IFile) resource);
+ if (firstWarningInResource) {
+ RpmlintParser.getInstance().deleteMarkers(resource);
+ // remove internal marks on the current resource
+ currentFile.deleteMarkers(
+ SpecfileErrorHandler.SPECFILE_ERROR_MARKER_ID,
+ false, IResource.DEPTH_ZERO);
+ firstWarningInResource = false;
+ }
+
+ // BTW we mark specfile with the internal marker.
+ builder.getSpecfileParser().setErrorHandler(
+ builder.getSpecfileErrorHandler(currentFile,
+ specContent));
+ builder.getSpecfileParser().setTaskHandler(
+ builder.getSpecfileTaskHandler(currentFile,
+ specContent));
+
+ RpmlintParser.getInstance().addMarker((IFile) resource,
+ item.getId() + ": " //$NON-NLS-1$
+ + item.getMessage(), item.getSeverity(),
+ item.getId(), item.getRefferedContent());
+ }
+ }
+ return true;
+ }
+
+ private int getLineOffset(int lineNumber) {
+ try {
+ return document.getLineOffset(lineNumber);
+ } catch (BadLocationException e) {
+ RpmlintLog.logError(e);
+ return 1;
+ }
+ }
+
+ private int getLineLenght(int lineNumber) {
+ try {
+ return document.getLineLength(lineNumber);
+ } catch (BadLocationException e) {
+ RpmlintLog.logError(e);
+ return 1;
+ }
+ }
+
+ private 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);
+ in.close();
+ } catch (CoreException e) {
+ RpmlintLog.logError(e);
+ } catch (IOException e) {
+ RpmlintLog.logError(e);
+ }
+ return ret;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintNature.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintNature.java
new file mode 100644
index 0000000000..ec40872609
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintNature.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.builder;
+
+import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IProjectNature;
+import org.eclipse.core.runtime.CoreException;
+
+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$
+
+ private IProject project;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.resources.IProjectNature#configure()
+ */
+ 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);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.resources.IProjectNature#deconfigure()
+ */
+ 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;
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.resources.IProjectNature#getProject()
+ */
+ public IProject getProject() {
+ return project;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.resources.IProjectNature#setProject(org.eclipse.core.resources.IProject)
+ */
+ public void setProject(IProject project) {
+ this.project = project;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintPreVisitor.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintPreVisitor.java
new file mode 100644
index 0000000000..f15d74da4e
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintPreVisitor.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.builder;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.linuxtools.rpm.rpmlint.Activator;
+
+public class RpmlintPreVisitor implements IResourceVisitor {
+
+ private ArrayList<String> paths = new ArrayList<String>();
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.resources.IResourceVisitor#visit(org.eclipse.core.resources.IResource)
+ */
+ 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.
+ paths.add(resource.getLocation().toOSString());
+ }
+ return true;
+ }
+
+ public ArrayList<String> getVisitedPaths() {
+ return paths;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/messages.properties b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/messages.properties
new file mode 100644
index 0000000000..39d2deb453
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/messages.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# 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
+###############################################################################
+RpmlintBuilder_0=Check rpmlint problems
+RpmlintBuilder_1=Retrive Rpmlint problems...
+RpmlintBuilder_2=Add Rpmlint problems...
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/messages.properties b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/messages.properties
new file mode 100644
index 0000000000..45979e8f19
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/messages.properties
@@ -0,0 +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
+#
+# Contributors:
+# Red Hat - initial API and implementation
+###############################################################################
+RpmlintLog_0=Unexpected Exception
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintItem.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintItem.java
new file mode 100644
index 0000000000..0b34605955
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintItem.java
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.parser;
+
+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 refferedSection;
+
+ private String message;
+
+ private String fileName;
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ public void setFileName(String file) {
+ this.fileName = file;
+ }
+
+ public int getLineNbr() {
+ return lineNbr;
+ }
+
+ public void setLineNbr(int lineNbr) {
+ this.lineNbr = lineNbr;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public String getRefferedContent() {
+ return refferedContent;
+ }
+
+ 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];
+ this.refferedSection = sections[i];
+ i = sections.length;
+ } else {
+ this.refferedContent = refferedContent;
+ this.refferedSection = ""; //$NON-NLS-1$
+ }
+ }
+ }
+
+ public String getrefferedSection() {
+ return refferedSection;
+ }
+
+ public int getSeverity() {
+ return severity;
+ }
+
+ 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/rpm/rpmlint/parser/RpmlintParser.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintParser.java
new file mode 100644
index 0000000000..954884128a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintParser.java
@@ -0,0 +1,341 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.parser;
+
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.LineNumberReader;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.linuxtools.rpm.core.utils.Utils;
+import org.eclipse.linuxtools.rpm.rpmlint.Activator;
+import org.eclipse.linuxtools.rpm.rpmlint.RpmlintLog;
+import org.eclipse.linuxtools.rpm.rpmlint.builder.RpmlintBuilder;
+import org.eclipse.linuxtools.rpm.rpmlint.preferences.PreferenceConstants;
+import org.eclipse.linuxtools.rpm.rpmlint.resolutions.RpmlintMarkerResolutionGenerator;
+
+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 RpmlintParser rpmlintParser;
+
+ // default constructor
+ private RpmlintParser() {
+ // Empty constructor for making it a singleton.
+ }
+
+ public static RpmlintParser getInstance() {
+ if (rpmlintParser == null) {
+ rpmlintParser = new RpmlintParser();
+ }
+ return rpmlintParser;
+ }
+
+ /**
+ * Parse visited resources.
+ * @param visitedResources The list of resources to parse.
+ *
+ * @return
+ * a <code>RpmlintItem</code> ArrayList.
+ */
+ public ArrayList<RpmlintItem> parseVisisted(ArrayList<String> visitedResources) {
+ ArrayList<RpmlintItem> retList = new ArrayList<RpmlintItem>();
+ // workaround "Argument list too long" xargs limitation.
+ ArrayList<List<String>> commandsList = splitArrayList(visitedResources, 500);
+ Iterator<List<String>> iterator = commandsList.iterator();
+ while (iterator.hasNext()) {
+ if (commandsList.size() > 1)
+ retList.addAll(parseRpmlintOutput(runRpmlintCommand(iterator.next())));
+ else
+ return parseRpmlintOutput(runRpmlintCommand(visitedResources));
+ }
+ return retList;
+
+ }
+
+ public 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);
+ }
+ }
+
+ public 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);
+ }
+ }
+
+ public 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 ArrayList<RpmlintItem> parseRpmlintOutput(BufferedInputStream in) {
+ RpmlintItem item = new RpmlintItem();
+ ArrayList<RpmlintItem> rpmlintItems = new ArrayList<RpmlintItem>();
+ 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
+ }
+
+ // 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();
+
+ // 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;
+ }
+
+ private 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;
+ }
+
+ /**
+ * Run rpmlint command on given visitedResources.
+ *
+ * @param specContent
+ * the specfile content
+ * @return the rpmlint command <code>InputStream</code>
+ * @throws IOException
+ */
+ private BufferedInputStream runRpmlintCommand(List<String> visitedResources) {
+ BufferedInputStream in = null;
+ int i = 2;
+ String[] cmd = new String[visitedResources.size() + i];
+ cmd[0] = Activator.getRpmlintPath();
+ cmd[1] = "-i"; //$NON-NLS-1$
+ Iterator<String> iterator = visitedResources.iterator();
+ while(iterator.hasNext()) {
+ cmd[i] = iterator.next();
+ 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 int getRealLineNbr(String specContent, String strToFind) {
+ int ret = -1;
+ if (strToFind.equals(EMPTY_STRING)) {
+ 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 int getMixedUseOfTabsAndSpaces(String refferedContent){
+ int lineNbr = -1;
+ if (refferedContent.indexOf("(spaces: line") > -1) { //$NON-NLS-1$
+ String tabsAndSpacesPref = Activator
+ .getDefault()
+ .getPreferenceStore()
+ .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 ArrayList<List<String>> splitArrayList(ArrayList<String> list, int listSize) {
+ ArrayList<List<String>> resultList = new ArrayList<List<String>>();
+ if (list.size() <= listSize) {
+ resultList.add(list);
+ return resultList;
+ }
+ for (int i = 0; i < getNumberOfIterations(list, listSize); i++) {
+ int maxLength = ((i + 1) * listSize > list.size()) ? list
+ .size() : (i + 1) * listSize;
+ List<List<String>> sublist = new ArrayList<List<String>>();
+ sublist.add(list.subList(i * listSize, maxLength));
+ resultList.addAll(sublist);
+ }
+ return resultList;
+ }
+
+ private int getNumberOfIterations(List<String> list, int subCollectionSize) {
+ return list.size() % subCollectionSize == 0 ? list.size()
+ / subCollectionSize : (list.size() / subCollectionSize) + 1;
+ }
+
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/preferences/Messages.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/preferences/Messages.java
new file mode 100644
index 0000000000..d6f9629334
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/preferences/Messages.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.preferences;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.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
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/preferences/PreferenceConstants.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/preferences/PreferenceConstants.java
new file mode 100644
index 0000000000..c011951f3c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/preferences/PreferenceConstants.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.rpmlint.preferences;
+
+/**
+ * Constant definitions for rpmlint plug-in preferences
+ */
+public class PreferenceConstants {
+ /*
+ * keys
+ */
+ public static final String P_RPMLINT_PATH = "RpmlintPath"; //$NON-NLS-1$
+ public static final String P_RPMLINT_TABS = "RpmlintTab"; //$NON-NLS-1$
+ public static final String P_RPMLINT_SPACES = "RpmlintSpaces"; //$NON-NLS-1$
+ public static final String P_RPMLINT_TABS_AND_SPACES = P_RPMLINT_SPACES;
+
+ /*
+ * default values
+ */
+ 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/rpm/rpmlint/preferences/PreferenceInitializer.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/preferences/PreferenceInitializer.java
new file mode 100644
index 0000000000..156632caf9
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/preferences/PreferenceInitializer.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.rpmlint.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.linuxtools.rpm.rpmlint.Activator;
+
+
+/**
+ * Class used to initialize default preference values.
+ */
+public class PreferenceInitializer extends AbstractPreferenceInitializer {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+ */
+ @Override
+ public void initializeDefaultPreferences() {
+ IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+ 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/rpm/rpmlint/preferences/RpmlintPreferencePage.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/preferences/RpmlintPreferencePage.java
new file mode 100644
index 0000000000..40e162dcd4
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/preferences/RpmlintPreferencePage.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.preferences;
+
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.FileFieldEditor;
+import org.eclipse.jface.preference.RadioGroupFieldEditor;
+import org.eclipse.linuxtools.rpm.rpmlint.Activator;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class RpmlintPreferencePage extends FieldEditorPreferencePage implements
+ IWorkbenchPreferencePage {
+
+ /**
+ * default constructor
+ */
+ public RpmlintPreferencePage() {
+ super(GRID);
+ setPreferenceStore(Activator.getDefault().getPreferenceStore());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+ */
+ @Override
+ public 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);
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ public void init(IWorkbench workbench) {
+ // Do nothing
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/preferences/messages.properties b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/preferences/messages.properties
new file mode 100644
index 0000000000..83fae4a31c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/preferences/messages.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# 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
+###############################################################################
+RpmlintPreferencePage_0=rpmlint path
+RpmlintPreferencePage_1=Mixed use of tabs and spaces
+RpmlintPreferencePage_2=Show warnings about spaces
+RpmlintPreferencePage_3=Show warnings about tabulations
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/AInsertLineResolution.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/AInsertLineResolution.java
new file mode 100644
index 0000000000..225779e8e9
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/AInsertLineResolution.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alexander Kurtakov - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.resolutions;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.linuxtools.rpm.rpmlint.RpmlintLog;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+
+/**
+ * Defines the common functionality for a resolution which fix is only inserting line.
+ *
+ */
+abstract public class AInsertLineResolution extends ARpmlintResolution {
+
+ protected int markerLine;
+
+ /**
+ * Returns the line to be inserted for the fix.
+ * Note: If there are some whitespace requirements for this line(e.g. an empty line after it)
+ * just append it to the real fix.
+ *
+ * @return The entire line for the fix.
+ */
+ public abstract String getLineToInsert();
+
+ /**
+ * 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.
+ * @return The number of the line following the inserted line.
+ */
+ public abstract int getLineNumberForInsert(SpecfileEditor editor);
+
+ /**
+ * Inserts an entire line at a given position as a resolution for a problem.
+ *
+ * @see org.eclipse.ui.IMarkerResolution#run(org.eclipse.core.resources.IMarker)
+ */
+ public void run(IMarker marker) {
+ markerLine = marker.getAttribute(IMarker.LINE_NUMBER, 0);
+ SpecfileEditor editor = getEditor(marker);
+ if (editor == null) {
+ return;
+ }
+ // Get the document
+ IDocument doc = editor.getSpecfileSourceViewer().getDocument();
+
+ try {
+ int index = doc.getLineOffset(getLineNumberForInsert(editor));
+ doc.replace(index, 0, getLineToInsert());
+ } catch (BadLocationException e) {
+ RpmlintLog.logError(e);
+ }
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/ARemoveLineResolution.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/ARemoveLineResolution.java
new file mode 100644
index 0000000000..0a5f3512c3
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/ARemoveLineResolution.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.resolutions;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.linuxtools.rpm.rpmlint.RpmlintLog;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+
+abstract public class ARemoveLineResolution extends ARpmlintResolution {
+
+ public void run(IMarker marker) {
+
+ SpecfileEditor editor = getEditor(marker);
+ if (editor == null) {
+ return;
+ }
+ // Get the document
+ IDocument doc = editor.getSpecfileSourceViewer().getDocument();
+
+ try {
+ int index = doc.getLineOffset(marker.getAttribute(IMarker.LINE_NUMBER, 0));
+ int lineLength = doc.getLineLength(marker.getAttribute(IMarker.LINE_NUMBER, 0));
+ doc.replace(index, lineLength, ""); //$NON-NLS-1$
+ } catch (BadLocationException e) {
+ RpmlintLog.logError(e);
+ }
+ }
+
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/AReplaceTextResolution.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/AReplaceTextResolution.java
new file mode 100644
index 0000000000..ff028b6f85
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/AReplaceTextResolution.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.resolutions;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.linuxtools.rpm.rpmlint.RpmlintLog;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+
+abstract public class AReplaceTextResolution extends ARpmlintResolution {
+
+ /**
+ * Returns the original string
+ *
+ * @return the original string
+ */
+ abstract public String getOriginalString();
+
+ /**
+ * Returns the string to replace in the <code>Document</code>
+ *
+ * @return the string to replace
+ *
+ */
+ abstract public String getReplaceString();
+
+ public void run(IMarker marker) {
+
+ SpecfileEditor editor = getEditor(marker);
+ if (editor == null) {
+ return;
+ }
+ IDocument doc = editor.getSpecfileSourceViewer().getDocument();
+
+ try {
+ int lineNumber = marker.getAttribute(IMarker.LINE_NUMBER, 0);
+ int index = doc.getLineOffset(lineNumber);
+ String line = editor.getSpecfile().getLine(lineNumber);
+ int rowIndex = line.indexOf(getOriginalString());
+ if (rowIndex > -1){
+ doc.replace(index+rowIndex, getOriginalString().length(), getReplaceString());
+ }
+ } catch (BadLocationException e) {
+ RpmlintLog.logError(e);
+ }
+ }
+
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/ARpmlintResolution.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/ARpmlintResolution.java
new file mode 100644
index 0000000000..64d27483f1
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/ARpmlintResolution.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.resolutions;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.linuxtools.rpm.rpmlint.RpmlintLog;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IMarkerResolution2;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+
+/**
+ * Base class providing common functionality for rpmlint resolution.
+ *
+ */
+public abstract class ARpmlintResolution implements IMarkerResolution2 {
+
+
+ /**
+ * No image for rpmlint resolutions for now.
+ *
+ * @see org.eclipse.ui.IMarkerResolution2#getImage()
+ */
+ 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 SpecfileEditor this marker is from or null if it's not a SpecfileEditor.
+ */
+ protected SpecfileEditor 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;
+ }
+ // Get the editor's document.
+ if (!(part instanceof SpecfileEditor)) {
+ return null;
+ }
+ SpecfileEditor editor = (SpecfileEditor) part;
+ return editor;
+ }
+} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/HardcodedPackagerTag.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/HardcodedPackagerTag.java
new file mode 100644
index 0000000000..2091dad593
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/HardcodedPackagerTag.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alexander Kurtakov - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.resolutions;
+
+/**
+ * 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$
+
+ /**
+ * @see org.eclipse.ui.IMarkerResolution2#getDescription()
+ */
+ public String getDescription() {
+ return Messages.HardcodedPackagerTag_0;
+ }
+
+ /**
+ * @see org.eclipse.ui.IMarkerResolution#getLabel()
+ */
+ public String getLabel() {
+ return ID;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/HardcodedPrefixTag.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/HardcodedPrefixTag.java
new file mode 100644
index 0000000000..efb370a5a4
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/HardcodedPrefixTag.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alexander Kurtakov - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.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$
+
+ /**
+ * @see org.eclipse.ui.IMarkerResolution2#getDescription()
+ */
+ public String getDescription() {
+ return Messages.HardcodedPrefixTag_0;
+ }
+
+ /**
+ * @see org.eclipse.ui.IMarkerResolution#getLabel()
+ */
+ public String getLabel() {
+ return ID;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/MacroInChangelog.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/MacroInChangelog.java
new file mode 100644
index 0000000000..b0502b6a33
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/MacroInChangelog.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alexander Kurtakov - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.resolutions;
+
+public class MacroInChangelog extends AReplaceTextResolution {
+
+ public static final String ID = "macro-in-%changelog"; //$NON-NLS-1$
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.linuxtools.rpm.rpmlint.quickfixes.AReplaceTextResolution#getOriginalString()
+ */
+ @Override
+ public String getOriginalString() {
+ return "%"; //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.linuxtools.rpm.rpmlint.quickfixes.AReplaceTextResolution#getReplaceString()
+ */
+ @Override
+ public String getReplaceString() {
+ return "%%"; //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IMarkerResolution2#getDescription()
+ */
+ public String getDescription() {
+ return Messages.MacroInChangelog_0
+ + Messages.MacroInChangelog_1;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IMarkerResolution#getLabel()
+ */
+ public String getLabel() {
+ return ID;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/Messages.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/Messages.java
new file mode 100644
index 0000000000..bc42a95f26
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/Messages.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.resolutions;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.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
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildSection.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildSection.java
new file mode 100644
index 0000000000..3c993ab23d
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildSection.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alexander Kurtakov - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.resolutions;
+
+import java.util.List;
+
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+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.
+ *
+ */
+public class NoBuildSection extends AInsertLineResolution {
+ public static final String ID = "no-%build-section"; //$NON-NLS-1$
+
+ public String getDescription() {
+ return Messages.NoBuildSection_0;
+ }
+
+ public String getLabel() {
+ return ID;
+ }
+
+ @Override
+ public String getLineToInsert() {
+ return "%build\n\n"; //$NON-NLS-1$
+ }
+
+ @Override
+ public int getLineNumberForInsert(SpecfileEditor editor) {
+ List<SpecfileSection> sections = editor.getSpecfile().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/rpm/rpmlint/resolutions/NoBuildrootTag.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildrootTag.java
new file mode 100644
index 0000000000..692267df2d
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoBuildrootTag.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alexander Kurtakov - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.resolutions;
+
+import java.util.List;
+
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSection;
+
+/**
+ * Quick fix for the "no-buildroot-tag" error.
+ * TODO: Provide UI for defining the BuildRoot format.
+ *
+ */
+public class NoBuildrootTag extends AInsertLineResolution {
+ public static final String ID = "no-buildroot-tag"; //$NON-NLS-1$
+
+ public String getDescription() {
+ return Messages.NoBuildrootTag_0;
+ }
+
+ public String getLabel() {
+ return ID;
+ }
+
+ @Override
+ public String getLineToInsert() {
+ return "BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root\n\n"; //$NON-NLS-1$
+ }
+
+ @Override
+ public int getLineNumberForInsert(SpecfileEditor editor) {
+ List<SpecfileSection> sections = editor.getSpecfile()
+ .getComplexSections();
+ for (SpecfileSection section : sections) {
+ if (section.getName().equals("description") //$NON-NLS-1$
+ && section.getPackage() == null) {
+ return section.getLineNumber();
+ }
+ }
+ return 0;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleanSection.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleanSection.java
new file mode 100644
index 0000000000..e33f791e6f
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleanSection.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alexander Kurtakov - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.resolutions;
+
+import java.util.List;
+
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSection;
+
+public class NoCleanSection extends AInsertLineResolution {
+ public static final String ID = "no-%clean-section"; //$NON-NLS-1$
+
+ public String getDescription() {
+ return Messages.NoCleanSection_0;
+ }
+
+ public String getLabel() {
+ return ID;
+ }
+
+ @Override
+ public String getLineToInsert() {
+ return "%clean\n\n"; //$NON-NLS-1$
+ }
+
+ @Override
+ public int getLineNumberForInsert(SpecfileEditor editor) {
+ List<SpecfileSection> sections = editor.getSpecfile().getSections();
+ for (SpecfileSection section : sections) {
+ if (section.getName().equals("changelog")) { //$NON-NLS-1$
+ return section.getLineNumber();
+ }
+ }
+ return 0;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleaningOfBuildroot.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleaningOfBuildroot.java
new file mode 100644
index 0000000000..c0118c42b1
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoCleaningOfBuildroot.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alexander Kurtakov - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.resolutions;
+
+import java.util.List;
+
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSection;
+
+public class NoCleaningOfBuildroot extends AInsertLineResolution {
+
+ public static final String ID = "no-cleaning-of-buildroot"; //$NON-NLS-1$
+
+ public String getDescription() {
+ return Messages.NoCleaningOfBuildroot_0;
+ }
+
+ public String getLabel() {
+ return ID;
+ }
+
+ @Override
+ public String getLineToInsert() {
+ return "rm -Rf $RPM_BUILD_ROOT\n"; //$NON-NLS-1$
+ }
+
+ @Override
+ public int getLineNumberForInsert(SpecfileEditor editor) {
+ List<SpecfileSection> sections = editor.getSpecfile().getSections();
+ for (SpecfileSection section : sections) {
+ if (section.getName().equals("install") //$NON-NLS-1$
+ || section.getName().equals("clean")) { //$NON-NLS-1$
+ if (markerLine == section.getLineNumber()) {
+ return section.getLineNumber() + 1;
+ }
+ }
+ }
+ return 0;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoInstallSection.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoInstallSection.java
new file mode 100644
index 0000000000..b695307a98
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoInstallSection.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alexander Kurtakov - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.resolutions;
+
+import java.util.List;
+
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSection;
+
+public class NoInstallSection extends AInsertLineResolution {
+ public static final String ID = "no-%install-section"; //$NON-NLS-1$
+
+ public String getDescription() {
+ return Messages.NoInstallSection_0;
+ }
+
+ public String getLabel() {
+ return ID;
+ }
+
+ @Override
+ public String getLineToInsert() {
+ return "%install\n\n"; //$NON-NLS-1$
+ }
+
+ @Override
+ public int getLineNumberForInsert(SpecfileEditor editor) {
+ List<SpecfileSection> sections = editor.getSpecfile().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/rpm/rpmlint/resolutions/NoPrepSection.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoPrepSection.java
new file mode 100644
index 0000000000..eb92cd2c0f
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/NoPrepSection.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alexander Kurtakov - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.resolutions;
+
+import java.util.List;
+
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSection;
+
+public class NoPrepSection extends AInsertLineResolution{
+ public static final String ID = "no-%prep-section"; //$NON-NLS-1$
+
+ public String getDescription() {
+ return Messages.NoPrepSection_0;
+ }
+
+ public String getLabel() {
+ return ID;
+ }
+
+ @Override
+ public String getLineToInsert() {
+ return "%prep\n\n"; //$NON-NLS-1$
+ }
+
+ @Override
+ public int getLineNumberForInsert(SpecfileEditor editor) {
+ List<SpecfileSection> sections = editor.getSpecfile().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/rpm/rpmlint/resolutions/PatchNotApplied.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/PatchNotApplied.java
new file mode 100644
index 0000000000..7027b653b7
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/PatchNotApplied.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.resolutions;
+
+public class PatchNotApplied extends ARemoveLineResolution {
+
+ public static final String ID = "patch-not-applied"; //$NON-NLS-1$
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IMarkerResolution2#getDescription()
+ */
+ public String getDescription() {
+ return Messages.PatchNotApplied_0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IMarkerResolution#getLabel()
+ */
+ public String getLabel() {
+ return ID;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmBuildrootUsage.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmBuildrootUsage.java
new file mode 100644
index 0000000000..649976f4fa
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmBuildrootUsage.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alexander Kurtakov - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.resolutions;
+
+public class RpmBuildrootUsage extends ARemoveLineResolution{
+ public static final String ID = "rpm-buildroot-usage"; //$NON-NLS-1$
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IMarkerResolution2#getDescription()
+ */
+ public String getDescription() {
+ return Messages.RpmBuildrootUsage_0;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IMarkerResolution#getLabel()
+ */
+ public String getLabel() {
+ return ID;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmlintMarkerResolutionGenerator.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmlintMarkerResolutionGenerator.java
new file mode 100644
index 0000000000..1f26d3a38c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/RpmlintMarkerResolutionGenerator.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.resolutions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.ui.IMarkerResolution;
+import org.eclipse.ui.IMarkerResolutionGenerator2;
+
+public class RpmlintMarkerResolutionGenerator implements IMarkerResolutionGenerator2 {
+
+ // rpmlint error id atribut 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$
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IMarkerResolutionGenerator2#hasResolutions(org.eclipse.core.resources.IMarker)
+ */
+ 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(NoBuildrootTag.ID)) {
+ return true;
+ } else if (rpmlintErrorId.equals(NoCleaningOfBuildroot.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;
+ } else if (rpmlintErrorId.equals(NoCleanSection.ID)){
+ return true;
+ }
+
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IMarkerResolutionGenerator#getResolutions(org.eclipse.core.resources.IMarker)
+ */
+ public IMarkerResolution[] getResolutions(IMarker marker) {
+ List<IMarkerResolution> resolutions = new ArrayList<IMarkerResolution>();
+ 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(NoBuildrootTag.ID)) {
+ resolutions.add(new NoBuildrootTag());
+ } else if (rpmlintErrorId.equals(NoCleaningOfBuildroot.ID)){
+ resolutions.add(new NoCleaningOfBuildroot());
+ } 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());
+ } else if (rpmlintErrorId.equals(NoCleanSection.ID)){
+ resolutions.add(new NoCleanSection());
+ }
+
+ 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 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/rpm/rpmlint/resolutions/SetupNotQuiet.java b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/SetupNotQuiet.java
new file mode 100644
index 0000000000..c0b2f4a609
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/SetupNotQuiet.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.rpmlint.resolutions;
+
+public class SetupNotQuiet extends AReplaceTextResolution {
+
+ public static final String ID = "setup-not-quiet"; //$NON-NLS-1$
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.rpm.rpmlint.quickfixes.AReplaceTextResolution#getOriginalString()
+ */
+ @Override
+ public String getOriginalString() {
+ return "%setup"; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.rpm.rpmlint.quickfixes.AReplaceTextResolution#getReplaceString()
+ */
+ @Override
+ public String getReplaceString() {
+ return "%setup -q"; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IMarkerResolution2#getDescription()
+ */
+ public String getDescription() {
+ return Messages.SetupNotQuiet_0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IMarkerResolution#getLabel()
+ */
+ public String getLabel() {
+ return ID;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/messages.properties b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/messages.properties
new file mode 100644
index 0000000000..b2656de764
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/resolutions/messages.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# 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
+###############################################################################
+HardcodedPackagerTag_0=The Packager tag is hardcoded in your spec file. It should be removed, so as to use rebuilder's own defaults.
+HardcodedPrefixTag_0=The Prefix tag is hardcoded in your spec file. It should be removed, so as to allow package relocation.
+MacroInChangelog_0=Macros are expanded in %changelog too, which can in unfortunate cases lead
+MacroInChangelog_1=to the package not building at all, or other subtle unexpected conditions that\taffect the build.
+NoBuildrootTag_0=The BuildRoot tag isn't used in your spec. It must be used in order to allow building the package as non root on some systems.
+NoBuildSection_0=Insert empty %build section
+NoCleaningOfBuildroot_0=You should clean $RPM_BUILD_ROOT in the %clean section and just after the beginning of %install section. Use "rm -Rf $RPM_BUILD_ROOT"
+NoCleanSection_0=Insert empty %clean section
+NoInstallSection_0=Insert empty %install section
+NoPrepSection_0=Insert empty %prep section
+PatchNotApplied_0=A patch is included in your package but was not applied. Refer to the patches documentation to see what's wrong.
+RpmBuildrootUsage_0=$RPM_BUILD_ROOT should not be touched during %build or %prep stage, as it will break short circuiting.
+SetupNotQuiet_0=Use the -q option to the %setup macro to avoid useless build output from unpacking the sources
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/.project b/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/.project
new file mode 100644
index 0000000000..d8a6e9c994
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.rpm.ui.editor-feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/ChangeLog b/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/ChangeLog
new file mode 100644
index 0000000000..9767b35d41
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/ChangeLog
@@ -0,0 +1,52 @@
+2009-11-10 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Make featureName a bit more user-friendly.
+
+2009-08-05 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Update description.
+
+2009-05-19 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Change provider from Eclipse.org to Eclipse.
+
+2009-05-14 Alexander Kurtakov <akurtako@redhat.com>
+
+ * feature.xml: Bump release 0.4.3.
+
+2009-01-24 Alexander Kurtakov <akurtako@redhat.com>
+
+ * feature.xml: Include doc plugin.
+
+2009-01-14 Andrew Overholt <overholt@redhat.com>
+
+ * feature.xml: Re-added update site information (sorry). Re-add "qualifier" for trunk.
+
+2009-01-14 Alexander Kurtakov <akurtako@redhat.com>
+
+ * feature.xml: Bump release for Linuxtools 0.1 release.
+
+2009-01-14 Alexander Kurtakov <akurtako@redhat.com>
+
+ * feature.xml: Remove update site.
+
+2009-01-09 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * feature.properties: Add 2009 to copyright text.
+ * feature.xml: Add qualifier to version.
+
+2009-01-06 Andrew Overholt <overholt@redhat.com>
+
+ * feature.xml: Add update site information.
+
+2009-01-06 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * feature.xml: Bump release to 0.4.1 and add url to our site.
+
+2008-10-31 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Add "(Incubation)".
+
+2007-08-19 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * feature.xml: change version to 0.1.0 \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/build.properties b/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/build.properties
new file mode 100644
index 0000000000..279df8fba9
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/build.properties
@@ -0,0 +1,4 @@
+bin.includes = feature.xml,\
+ license.html,\
+ feature.properties,\
+ epl-v10.html
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/epl-v10.html b/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/epl-v10.html
new file mode 100644
index 0000000000..9321f4082e
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/epl-v10.html
@@ -0,0 +1,256 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
+
+<style type="text/css">
+ body {
+ size: 8.5in 11.0in;
+ margin: 0.25in 0.5in 0.25in 0.5in;
+ tab-interval: 0.5in;
+ }
+ p {
+ margin-left: auto;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ p.list {
+ margin-left: 0.5in;
+ margin-top: 0.05em;
+ margin-bottom: 0.05em;
+ }
+ </style></head><body lang="EN-US">
+
+<p align="center"><b>Eclipse Public License - v 1.0</b></p>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>"Contribution" means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.</p>
+
+<p>"Contributor" means any person or entity that distributes
+the Program.</p>
+
+<p>"Licensed Patents" mean patent claims licensable by a
+Contributor which are necessarily infringed by the use or sale of its
+Contribution alone or when combined with the Program.</p>
+
+<p>"Program" means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>"Recipient" means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">a) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free copyright license to reproduce, prepare derivative works
+of, publicly display, publicly perform, distribute and sublicense the
+Contribution of such Contributor, if any, and such derivative works, in
+source code and object code form.</p>
+
+<p class="list">b) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free patent license under Licensed Patents to make, use, sell,
+offer to sell, import and otherwise transfer the Contribution of such
+Contributor, if any, in source code and object code form. This patent
+license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to be covered
+by the Licensed Patents. The patent license shall not apply to any other
+combinations which include the Contribution. No hardware per se is
+licensed hereunder.</p>
+
+<p class="list">c) Recipient understands that although each Contributor
+grants the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe the
+patent or other intellectual property rights of any other entity. Each
+Contributor disclaims any liability to Recipient for claims brought by
+any other entity based on infringement of intellectual property rights
+or otherwise. As a condition to exercising the rights and licenses
+granted hereunder, each Recipient hereby assumes sole responsibility to
+secure any other intellectual property rights needed, if any. For
+example, if a third party patent license is required to allow Recipient
+to distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">d) Each Contributor represents that to its knowledge it
+has sufficient copyright rights in its Contribution, if any, to grant
+the copyright license set forth in this Agreement.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">i) effectively disclaims on behalf of all Contributors
+all warranties and conditions, express and implied, including warranties
+or conditions of title and non-infringement, and implied warranties or
+conditions of merchantability and fitness for a particular purpose;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">iv) states that source code for the Program is available
+from such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for software
+exchange.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>Commercial distributors of software may accept certain
+responsibilities with respect to end users, business partners and the
+like. While this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and
+indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses")
+arising from claims, lawsuits and other legal actions brought by a third
+party against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection with its
+distribution of the Program in a commercial product offering. The
+obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In
+order to qualify, an Indemnified Contributor must: a) promptly notify
+the Commercial Contributor in writing of such claim, and b) allow the
+Commercial Contributor to control, and cooperate with the Commercial
+Contributor in, the defense and any related settlement negotiations. The
+Indemnified Contributor may participate in any such claim at its own
+expense.</p>
+
+<p>For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to
+the risks and costs of program errors, compliance with applicable laws,
+damage to or loss of data, programs or equipment, and unavailability or
+interruption of operations.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.</p>
+
+<p>If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other
+software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of time
+after becoming aware of such noncompliance. If all Recipient's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>Everyone is permitted to copy and distribute copies of this
+Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The
+Agreement Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other than the
+Agreement Steward has the right to modify this Agreement. The Eclipse
+Foundation is the initial Agreement Steward. The Eclipse Foundation may
+assign the responsibility to serve as the Agreement Steward to a
+suitable separate entity. Each new version of the Agreement will be
+given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the
+Agreement under which it was received. In addition, after a new version
+of the Agreement is published, Contributor may elect to distribute the
+Program (including its Contributions) under the new version. Except as
+expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
+rights or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under this
+Agreement are reserved.</p>
+
+<p>This Agreement is governed by the laws of the State of New York and
+the intellectual property laws of the United States of America. No party
+to this Agreement will bring a legal action under this Agreement more
+than one year after the cause of action arose. Each party waives its
+rights to a jury trial in any resulting litigation.</p>
+
+</body></html> \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/feature.properties b/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/feature.properties
new file mode 100644
index 0000000000..1424ff7d6b
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/feature.properties
@@ -0,0 +1,140 @@
+#*******************************************************************************
+# Copyright (c) 2007 Alphonse Van Assche.
+# Copyright (c) 2008 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:
+# Alphonse Van Assche - initial API and implementation
+# Red Hat, Inc.
+#********************************************************************************
+
+# NLS_MESSAGEFORMAT_NONE
+# NLS_ENCODING=UTF-8
+
+# "featureName" property - name of the feature
+featureName=RPM Specfile Editor (Incubation)
+
+# "description" property - description of the feature
+description=This feature provides an editor with completion assistance, hover variable expansion, and more for RPM specfiles.
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2007-2009 Red Hat, Inc and others. All rights reserved.\n\
+\n\
+This program and the accompanying materials are made available under the terms\n\
+of the Eclipse Public License v1.0 which accompanies this distribution, and is\n\
+available at http://www.eclipse.org/legal/epl-v10.html\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
+
+
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/feature.xml b/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/feature.xml
new file mode 100644
index 0000000000..89d7c81ea5
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/feature.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.linuxtools.rpm.ui.editor"
+ label="%featureName"
+ version="0.4.3.qualifier"
+ provider-name="%featureProvider"
+ plugin="org.eclipse.linuxtools.rpm.ui.editor">
+
+ <description url="http://www.eclipse.org/linuxtools/">
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="Linux Tools Update Site" url="http://download.eclipse.org/technology/linuxtools/update"/>
+ </url>
+
+ <requires>
+ <import plugin="org.eclipse.core.runtime"/>
+ <import plugin="org.eclipse.core.resources"/>
+ <import plugin="org.eclipse.ui"/>
+ <import plugin="org.eclipse.jface"/>
+ <import plugin="org.eclipse.jface.text"/>
+ <import plugin="org.eclipse.ui.ide"/>
+ <import plugin="org.eclipse.ui.editors"/>
+ <import plugin="org.eclipse.ui.workbench.texteditor"/>
+ <import plugin="org.eclipse.ui.views"/>
+ <import plugin="org.eclipse.linuxtools.changelog.core"/>
+ <import plugin="com.ibm.icu"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.linuxtools.rpm.rpmlint"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.rpm.ui.editor"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.rpm.ui.editor.doc"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+</feature>
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/license.html b/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/license.html
new file mode 100644
index 0000000000..f5a16251a8
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/license.html
@@ -0,0 +1,81 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+(&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/.classpath b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/.classpath
new file mode 100644
index 0000000000..64c5e31b7a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/.project b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/.project
new file mode 100644
index 0000000000..13327c3a93
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.rpm.ui.editor.doc</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/ChangeLog b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/ChangeLog
new file mode 100644
index 0000000000..d0e869171c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/ChangeLog
@@ -0,0 +1,187 @@
+2009-08-07 Alexander Kurtakov <akurtako@redhat.com>
+
+ * plugin.properties: Fix provider to be Eclipse not Eclipse.org.
+
+2009-08-04 Alexander Kurtakov <akurtako@redhat.com>
+ Sync with wiki.
+ * userguide/Customizing-Editor-Settings.html: Removed.
+ * userguide/images/\ Specfile_enable_rpmlint.png: Removed.
+ * userguide/images/\ Specfile_generic.png: Removed.
+ * userguide/images/\ Specfile_macros_content.png: Removed.
+ * userguide/images/\ Specfile_macros_description.png: Removed.
+ * userguide/images/\ Specfile_new_from_template.png: Removed.
+ * userguide/images/\ Specfile_new_wizard.png: Removed.
+ * userguide/images/\ Specfile_problems_rpmlint.png: Removed.
+ * userguide/images/\ Specfile_rpmlint_fix_after.png: Removed.
+ * userguide/images/\ Specfile_rpmlint_fix_before.png: Removed.
+ * userguide/images/\ Specfile_rpmlint_quickfix.png: Removed.
+ * userguide/images/\ Specfile_settings_changelog.png: Removed.
+ * userguide/images/\ Specfile_settings_macros.png: Removed.
+ * userguide/images/\ Specfile_settings_rpmlint.png: Removed.
+ * userguide/images/\ Specfile_settings_tasks.png: Removed.
+ * userguide/images/\ Specfile_settings_templates.png: Removed.
+ * userguide/images/\ Specfile_warnings_rpmlint.png: Removed.
+ * userguide/Rpmlint.html: Removed.
+ * userguide/Configuring-Specfile-Editor-Settings.html: New file.
+ * userguide/General-Usage.html: New file.
+ * userguide/images/Screenshot-edittemplate.png: New file.
+ * userguide/images/Screenshot-taskscreenshot.png: New file.
+ * userguide/images/Specfile_enable_rpmlint.png: New file.
+ * userguide/images/Specfile_generic.png: New file.
+ * userguide/images/Specfile_macros_content.png: New file.
+ * userguide/images/Specfile_macros_description.png: New file.
+ * userguide/images/Specfile_new_from_template.png: New file.
+ * userguide/images/Specfile_new_wizard.png: New file.
+ * userguide/images/Specfile_problems_rpmlint.png: New file.
+ * userguide/images/Specfile_rpmlint_fix_after.png: New file.
+ * userguide/images/Specfile_rpmlint_fix_before.png: New file.
+ * userguide/images/Specfile_rpmlint_quickfix.png: New file.
+ * userguide/images/Specfile_settings_changelog.png: New file.
+ * userguide/images/Specfile_settings_macros.png: New file.
+ * userguide/images/Specfile_settings_rpmlint.png: New file.
+ * userguide/images/Specfile_settings_tasks.png: New file.
+ * userguide/images/Specfile_settings_templates.png: New file.
+ * userguide/Installing.html: New file.
+ * userguide/images/Specfile_settings_rpms_details.png: Updated.
+ * userguide/images/Specfile_settings_rpms_generic.png: Updated.
+ * userguide/SpecfileEditorReference-toc.xml: Updated.
+ * userguide/SpecfileEditorReference.html: Updated.
+ * userguide/Updating-This-Document.html: Updated.
+
+2009-07-17 Alexander Kurtakov <akurtako@redhat.com>
+
+ * build-helper.xml: Add copyright.
+ * build.properties: Likewise.
+ * META-INF/MANIFEST.MF: Add Bundle-Lokalization.
+ * plugin.properties: Add copyright.
+ * plugin.xml: Likewise.
+ * src/org/eclipse/linuxtools/internal/rpm/ui/editor/doc/anttask/tasks.properties: Likewise.
+ * toc.xml: Likewise.
+
+2009-05-26 Alexander Kurtakov <akurtako@redhat.com>
+
+ * META-INF/MANIFEST.MF: Don't require versioned org.apache.ant.
+
+2009-05-26 Alexander Kurtakov <akurtako@redhat.com>
+ Move documentation to wiki.eclipse.org.
+ * html/generic.html: Removed.
+ * html/images/enable_rpmlint.png: Removed.
+ * html/images/generic.png: Removed.
+ * html/images/macros_long.png: Removed.
+ * html/images/macros_short.png: Removed.
+ * html/images/new_from_template.png: Removed.
+ * html/images/problems_rpmlint.png: Removed.
+ * html/images/rpmlint_fix_after.png: Removed.
+ * html/images/rpmlint_fix_before.png: Removed.
+ * html/images/rpmlint_quickfix.png: Removed.
+ * html/images/settings_changelog.png: Removed.
+ * html/images/settings_macros.png: Removed.
+ * html/images/settings_rpmlint.png: Removed.
+ * html/images/settings_rpms_details.png: Removed.
+ * html/images/settings_rpms_generic.png: Removed.
+ * html/images/settings_tasks.png: Removed.
+ * html/images/settings_templates.png: Removed.
+ * html/images/Unti.xcf: Removed.
+ * html/images/warnings_rpmlint.png: Removed.
+ * html/images/wizard.png: Removed.
+ * html/macro_settings.html: Removed.
+ * html/package_settings.html: Removed.
+ * html/rpmlint.html: Removed.
+ * html/settings.html: Removed.
+ * html/support.html: Removed.
+ * html/toc.html: Removed.
+ * .classpath: New file.
+ * about.html: New file.
+ * build-helper.xml: New file.
+ * doc/notices.html: New file.
+ * extract-markup.xsl: New file.
+ * plugin.properties: New file.
+ * src/org/eclipse/linuxtools/internal/rpm/ui/editor/doc/anttask/MediaWikiImageFetcher.java: New file.
+ * src/org/eclipse/linuxtools/internal/rpm/ui/editor/doc/anttask/tasks.properties: New file.
+ * userguide/Customizing-Editor-Settings.html: New file.
+ * userguide/images/\ Specfile_enable_rpmlint.png: New file.
+ * userguide/images/\ Specfile_generic.png: New file.
+ * userguide/images/\ Specfile_macros_content.png: New file.
+ * userguide/images/\ Specfile_macros_description.png: New file.
+ * userguide/images/\ Specfile_new_from_template.png: New file.
+ * userguide/images/\ Specfile_new_wizard.png: New file.
+ * userguide/images/\ Specfile_problems_rpmlint.png: New file.
+ * userguide/images/\ Specfile_rpmlint_fix_after.png: New file.
+ * userguide/images/\ Specfile_rpmlint_fix_before.png: New file.
+ * userguide/images/\ Specfile_rpmlint_quickfix.png: New file.
+ * userguide/images/\ Specfile_settings_changelog.png: New file.
+ * userguide/images/\ Specfile_settings_macros.png: New file.
+ * userguide/images/\ Specfile_settings_rpmlint.png: New file.
+ * userguide/images/\ Specfile_settings_tasks.png: New file.
+ * userguide/images/\ Specfile_settings_templates.png: New file.
+ * userguide/images/\ Specfile_warnings_rpmlint.png: New file.
+ * userguide/images/Specfile_settings_rpms_details.png: New file.
+ * userguide/images/Specfile_settings_rpms_generic.png: New file.
+ * userguide/Rpmlint.html: New file.
+ * userguide/SpecfileEditorReference-toc.xml: New file.
+ * userguide/SpecfileEditorReference.html: New file.
+ * userguide/Updating-This-Document.html: New file.
+ * .project: Make it java project.
+ * build.properties: Add new files for distribution.
+ * META-INF/MANIFEST.MF: Use plugin.properties for name and vendor, add new bundle requires.
+ * plugin.xml: Add new TOC generated from wiki.
+ * toc.xml: Reference the genertated TOC.
+
+2009-05-14 Alexander Kurtakov <akurtako@redhat.com>
+
+ * META-INF/MANIFEST.MF: Bump release 0.4.3.
+
+2009-04-15 Alexander Kurtakov <akurtako@redhat.com>
+
+ * META-INF/MANIFEST.MF: Fix Bundle-Name and Bundle-Vendor.
+
+2009-01-26 Alexander Kurtakov <akurtako@redhat.com>
+
+ * html/images/settings_rpms_details.png: New file.
+ * html/images/settings_rpms_generic.png: New file.
+ * html/images/Unti.xcf: New file.
+ * html/package_settings.html: Fill packages setting page.
+ * html/images/macros_long.png: New file.
+ * html/images/macros_short.png: New file.
+ * html/images/settings_macros.png: New file.
+ * html/macro_settings.html: Fill macro settings page.
+ * html/images/settings_changelog.png: New file.
+ * html/images/settings_rpmlint.png: New file.
+ * html/images/settings_tasks.png: New file.
+ * html/images/settings_templates.png: New file.
+ * html/settings.html: Fill the settings documentation page.
+ * html/support.html: Fill the support documentation page.
+ * html/images/rpmlint_fix_after.png: New file.
+ * html/images/rpmlint_fix_before.png: New file.
+ * html/images/enable_rpmlint.png: New file.
+ * html/images/problems_rpmlint.png: New file.
+ * html/images/rpmlint_quickfix.png: New file.
+ * html/images/warnings_rpmlint.png: New file.
+ * html/rpmlint.html: Fill the documentation for rpmlint integration.
+
+2009-01-24 Alexander Kurtakov <akurtako@redhat.com>
+
+ * html/images/new_from_template.png: New file.
+ * html/images/generic.png: New file.
+ * html/images/wizard.png: New file.
+ * html/generic.html: Starting editing and creating a new specfile described.
+
+
+2009-01-23 Alexander Kurtakov <akurtako@redhat.com>
+
+ * html/toc.html: TOC with basic intro created.
+
+2009-01-16 Alexander Kurtakov <akurtako@redhat.com>
+ Stubs for the documentation.
+ * .project: New file.
+ * build.properties: New file.
+ * html/generic.html: New file.
+ * html/macro_settings.html: New file.
+ * html/package_settings.html: New file.
+ * html/rpmlint.html: New file.
+ * html/settings.html: New file.
+ * html/support.html: New file.
+ * html/toc.html: New file.
+ * META-INF/MANIFEST.MF: New file.
+ * plugin.xml: New file.
+ * toc.xml: New file. \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/META-INF/MANIFEST.MF b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..87f4de7c22
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/META-INF/MANIFEST.MF
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.rpm.ui.editor.doc; singleton:=true
+Bundle-Version: 0.4.3.qualifier
+Bundle-Vendor: %provider
+Bundle-Localization: plugin
+Require-Bundle: org.apache.ant,
+ org.eclipse.help
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/about.html b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/about.html
new file mode 100644
index 0000000000..0c6525d9a8
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/about.html
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>24th October, 2008</p>
+<h3>License</h3>
+<p>The Eclipse Software Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<h3>Contributions</h3>
+
+<p>If this Content is licensed to you under the terms and conditions of the EPL, any Contributions, as defined in the EPL, uploaded, submitted, or otherwise
+made available to the Eclipse Foundation, its members and/or the host of the Eclipse Foundation web site, by you that relate to such
+Content are provided under the terms and conditions of the <a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>
+for the Eclipse Foundation web site and can be made available to others under the terms of the licenses as set out in the
+<a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>.</p>
+
+<p>If this Content is licensed to you under license terms and conditions other than the EPL (&quot;Other License&quot;), any modifications, enhancements and/or
+other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to the Eclipse Foundation, its members and/or the
+host of the Eclipse Foundation web site, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
+to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
+providing the Modifications under the terms and conditions of the <a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>
+for the Eclipse Foundation web site and such Modifications can be made available to others under the terms of the licenses as set out in the
+<a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>.</p>
+
+</body>
+</html> \ No newline at end of file
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
new file mode 100644
index 0000000000..051d11fe82
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/build-helper.xml
@@ -0,0 +1,152 @@
+<?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
+ -->
+
+<project name="org.eclipse.linuxtools.rpm.ui.editor.doc" default="all">
+ <description>
+ Generate Eclipse help content for the Linux Tools Specfile Editor user guide
+ </description>
+
+ <property name="specfile.help.doc.url.base" value="http://wiki.eclipse.org"/>
+ <property name="specfile.wiki.url.base" value="${specfile.help.doc.url.base}/Linux_Tools_Project/SpecfileEditor"/>
+ <property name="imageFolder" value="images"/>
+
+ <path id="tasks.classpath" path="bin"/>
+
+ <!-- See the paths below?
+ Check org.eclipse.mylyn.wikitext.{core,mediawiki.core} into your workspace
+ from Mylyn CVS (under tools project in eclipse.org CVS)
+ -->
+
+ <path id="wikitext.tasks.classpath">
+ <pathelement location="../org.eclipse.mylyn.wikitext.core/@dot"/>
+ <pathelement location="../org.eclipse.mylyn.wikitext.core/bin"/>
+ <pathelement location="../org.eclipse.mylyn.wikitext.mediawiki.core/@dot"/>
+ <pathelement location="../org.eclipse.mylyn.wikitext.mediawiki.core/bin"/>
+ </path>
+
+ <taskdef classpathref="tasks.classpath" resource="org/eclipse/linuxtools/internal/rpm/ui/editor/doc/anttask/tasks.properties"/>
+ <taskdef classpathref="wikitext.tasks.classpath" resource="org/eclipse/mylyn/wikitext/core/util/anttask/tasks.properties"/>
+
+ <target name="init">
+ <mkdir dir="tmp"/>
+ </target>
+
+ <target name="clean" depends="init">
+ <delete includeemptydirs="true" failonerror="false">
+ <fileset dir="tmp"/>
+ </delete>
+ </target>
+
+ <target name="all" depends="init" description="Generate Eclipse help content for the Linux Tools OProfile user guide">
+ <eclipse-wiki-to-help
+ help.doc.filenamenoextension="SpecfileEditorReference"
+ help.doc.url.base="${specfile.help.doc.url.base}"
+ help.doc.url.html="${specfile.wiki.url.base}/User_Guide"
+ help.doc.url.xml="${specfile.help.doc.url.base}/Special:Export/Linux_Tools_Project/SpecfileEditor/User_Guide"
+ help.imagefolder="${imageFolder}"
+ targetfolder="userguide"
+ wiki.url.base="${oprofile.help.doc.url.base}/Linux_Tools_Project"/>
+ </target>
+
+ <macrodef name="eclipse-wiki-to-help">
+ <attribute name="help.doc.url.base"/>
+ <attribute name="wiki.url.base"/>
+ <attribute name="help.doc.url.html"/>
+ <attribute name="help.doc.url.xml"/>
+ <attribute name="help.doc.filenameNoExtension"/>
+ <attribute name="help.imageFolder"/>
+ <attribute name="targetFolder"/>
+ <sequential>
+ <get dest="tmp/help.doc.xml" src="@{help.doc.url.xml}"/>
+ <get dest="tmp/help.doc.html" src="@{help.doc.url.html}"/>
+
+ <!--
+ <copy todir="tmp">
+ <fileset dir="images"/>
+ </copy>
+ -->
+ <mediawiki-fetch-images src="tmp/help.doc.html" dest="tmp" base="@{help.doc.url.base}"/>
+
+ <xslt style="extract-markup.xsl" in="tmp/help.doc.xml" out="tmp/@{help.doc.filenameNoExtension}.mediawiki"/>
+ <echo append="true" file="tmp/@{help.doc.filenameNoExtension}.mediawiki">
+
+= Updating This Document =
+
+This document is maintained in a collaborative wiki. If you wish to update or modify this document please visit
+@{help.doc.url.html}
+ </echo>
+
+ <!-- Removing Phoenix extensions -->
+ <replaceregexp match="\{\{\#eclipseproject.*" replace="" flags="g" byline="true">
+ <fileset dir="tmp" includes="**/*.mediawiki"/>
+ </replaceregexp>
+
+ <wikitext-to-eclipse-help markupLanguage="org.eclipse.mylyn.wikitext.mediawiki.core.MediaWikiLanguage"
+ multipleOutputFiles="true"
+ navigationImages="true"
+ helpPrefix="@{targetFolder}"
+ internallinkpattern="@{wiki.url.base}/{0}"
+ validate="true"
+ failonvalidationerror="true"
+ prependImagePrefix="${imageFolder}"
+ formatoutput="true">
+ <fileset dir="tmp" includes="**/*.mediawiki"/>
+ <stylesheet url="book.css"/>
+ </wikitext-to-eclipse-help>
+
+ <mkdir dir="@{targetFolder}/${imageFolder}"/>
+ <copy todir="@{targetFolder}/${imageFolder}" overwrite="true">
+ <fileset dir="tmp">
+ <include name="*.gif"/>
+ <include name="*.png"/>
+ </fileset>
+ </copy>
+ <copy todir="@{targetFolder}" overwrite="true">
+ <fileset dir="tmp">
+ <include name="*.html"/>
+ <include name="*toc.xml"/>
+ <exclude name="help.doc.html"/>
+ </fileset>
+ </copy>
+ <antcall target="test"/>
+ </sequential>
+ </macrodef>
+
+
+ <target name="test" depends="init" description="verify that all of the HTML files are well-formed XML">
+ <echo level="info">
+Validating help content XML and HTML files: The Eclipse help system expects well-formed XML
+
+If validation fails it is because either:
+
+* the userguide source code is poorly formed, or
+* the WikiText MediaWiki parser has a bug
+
+Problems with userguide source are usually caused by improper use of HTML markup in the MediaWiki source,
+or inadvertently starting a line with a space character (in MediaWiki this starts a preformatted block)
+ </echo>
+
+ <!--
+ Don't bother with DTD validation: we only care if the files are well-formed.
+ We therefore provide an empty DTD
+ -->
+ <echo file="tmp/__empty.dtd" message=""/>
+ <xmlvalidate lenient="true">
+ <fileset dir="userguide">
+ <include name="**/*.xml"/>
+ </fileset>
+ <fileset dir="userguide">
+ <include name="**/*.html"/>
+ </fileset>
+ <dtd publicid="-//W3C//DTD XHTML 1.0 Transitional//EN" location="${basedir}/tmp/__empty.dtd"/>
+ </xmlvalidate>
+ </target>
+</project>
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/build.properties b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/build.properties
new file mode 100644
index 0000000000..b931697cf0
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/build.properties
@@ -0,0 +1,20 @@
+###############################################################################
+# 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
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ doc/,\
+ userguide/,\
+ toc.xml,\
+ plugin.properties,\
+ about.html
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/doc/notices.html b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/doc/notices.html
new file mode 100644
index 0000000000..dd6688fd29
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/doc/notices.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+
+<meta name="copyright" content="&#169; Copyright 2009 Eclipse Linux Tools project committers and others. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <LINK REL="STYLESHEET" HREF="book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+ <title>Legal Notices</title>
+</head>
+<body>
+
+<h3>
+<a NAME="Notices"></a>Notices</h3>
+<p>
+The material in this guide is &#169; Copyright 2009 Eclipse Linux Tools project committers and others.
+</p>
+<p>
+<a href="../about.html">Terms and conditions regarding the use of this guide.</a>
+</p>
+</body>
+</html>
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/extract-markup.xsl b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/extract-markup.xsl
new file mode 100644
index 0000000000..4c4e731948
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/extract-markup.xsl
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:mw="http://www.mediawiki.org/xml/export-0.3/">
+ <xsl:output method="text"/>
+
+ <xsl:template match="/">
+ <xsl:value-of select="//mw:text"/>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/plugin.properties b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/plugin.properties
new file mode 100644
index 0000000000..6dc3204739
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# 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
+###############################################################################
+provider=Eclipse
+bundleName=Documentation for RPM specfile editor (Incubation) \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/plugin.xml b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/plugin.xml
new file mode 100644
index 0000000000..c8e20b5cdc
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/plugin.xml
@@ -0,0 +1,22 @@
+<?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
+
+ Contributors:
+ Red Hat - initial API and implementation
+ -->
+
+<plugin>
+ <extension
+ point="org.eclipse.help.toc">
+ <toc file="toc.xml" primary="true" />
+ <toc
+ file="userguide/SpecfileEditorReference-toc.xml"
+ primary="false">
+ </toc>
+ </extension>
+</plugin>
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/src/org/eclipse/linuxtools/internal/rpm/ui/editor/doc/anttask/MediaWikiImageFetcher.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/src/org/eclipse/linuxtools/internal/rpm/ui/editor/doc/anttask/MediaWikiImageFetcher.java
new file mode 100644
index 0000000000..080c25bdc8
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/src/org/eclipse/linuxtools/internal/rpm/ui/editor/doc/anttask/MediaWikiImageFetcher.java
@@ -0,0 +1,149 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 David Green 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
+ *
+ * Contributors:
+ * David Green - initial API and implementation
+ *
+ * Re-namespaced 2009-04-14 without changes from org.eclipse.mylyn.help.ui.
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.rpm.ui.editor.doc.anttask;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.Reader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.Get;
+
+/**
+ * Fetch images from a MediaWiki-generated HTML page source
+ *
+ * @author David Green
+ */
+public class MediaWikiImageFetcher extends Task {
+
+ private String base;
+
+ private File dest;
+
+ private File src;
+
+ @Override
+ public void execute() throws BuildException {
+ if (dest == null) {
+ throw new BuildException("Must specify @dest"); //$NON-NLS-1$
+ }
+ if (!dest.exists()) {
+ throw new BuildException("@dest does not exist: " + dest); //$NON-NLS-1$
+ }
+ if (!dest.isDirectory()) {
+ throw new BuildException("@dest is not a directory: " + dest); //$NON-NLS-1$
+ }
+ if (src == null) {
+ throw new BuildException("Must specify @src"); //$NON-NLS-1$
+ }
+ if (!src.exists()) {
+ throw new BuildException("@src does not exist: " + src); //$NON-NLS-1$
+ }
+ if (!src.isFile()) {
+ throw new BuildException("@src is not a file: " + src); //$NON-NLS-1$
+ }
+ if (base == null) {
+ throw new BuildException("Must specify @base"); //$NON-NLS-1$
+ }
+ if (base.endsWith("/")) { //$NON-NLS-1$
+ base = base.substring(0, base.length() - 1);
+ }
+ Pattern fragmentUrlPattern = Pattern.compile("src=\"([^\"]+)\""); //$NON-NLS-1$
+ Pattern imagePattern = Pattern.compile("alt=\"Image:([^\"]*)\"([^>]+)", Pattern.MULTILINE); //$NON-NLS-1$
+ String htmlSrc;
+ try {
+ htmlSrc = readSrc();
+ } catch (IOException e) {
+ throw new BuildException("Cannot read src: " + src + ": " + e.getMessage(), e); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ log("Parsing " + src, Project.MSG_INFO); //$NON-NLS-1$
+ int fileCount = 0;
+ Matcher imagePatternMatcher = imagePattern.matcher(htmlSrc);
+ while (imagePatternMatcher.find()) {
+ String alt = imagePatternMatcher.group(1);
+ String imageFragment = imagePatternMatcher.group(2);
+ if (imageFragment != null) {
+ Matcher fragmentUrlMatcher = fragmentUrlPattern.matcher(imageFragment);
+ if (fragmentUrlMatcher.find()) {
+ String url = fragmentUrlMatcher.group(1);
+ String qualifiedUrl = base + url;
+ log("Fetching " + qualifiedUrl, Project.MSG_INFO); //$NON-NLS-1$
+ Get get = new Get();
+ get.setProject(getProject());
+ get.setLocation(getLocation());
+ try {
+ get.setSrc(new URL(qualifiedUrl));
+ } catch (MalformedURLException e) {
+ log("Skipping " + url + ": " + e.getMessage(), Project.MSG_WARN); //$NON-NLS-1$ //$NON-NLS-2$
+ continue;
+ }
+ // note: we use the alt text for the name since for some files there is a case-difference between
+ // the server URL and the text used in the image src of the markup
+ String name = alt == null ? url.substring(url.lastIndexOf('/')) : alt;
+ get.setDest(new File(dest, name));
+ get.execute();
+ ++fileCount;
+ }
+ }
+ }
+ log("Fetched " + fileCount + " image files for " + src, Project.MSG_INFO); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public String getBase() {
+ return base;
+ }
+
+ public File getDest() {
+ return dest;
+ }
+
+ public File getSrc() {
+ return src;
+ }
+
+ private String readSrc() throws IOException {
+ StringBuilder buf = new StringBuilder((int) src.length());
+ Reader reader = new BufferedReader(new FileReader(src));
+ try {
+ int i;
+ while ((i = reader.read()) != -1) {
+ buf.append((char) i);
+ }
+ } finally {
+ reader.close();
+ }
+ return buf.toString();
+ }
+
+ public void setBase(String base) {
+ this.base = base;
+ }
+
+ public void setDest(File dest) {
+ this.dest = dest;
+ }
+
+ public void setSrc(File src) {
+ this.src = src;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/src/org/eclipse/linuxtools/internal/rpm/ui/editor/doc/anttask/tasks.properties b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/src/org/eclipse/linuxtools/internal/rpm/ui/editor/doc/anttask/tasks.properties
new file mode 100644
index 0000000000..f7c05bc305
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/src/org/eclipse/linuxtools/internal/rpm/ui/editor/doc/anttask/tasks.properties
@@ -0,0 +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
+#
+# Contributors:
+# Red Hat - initial API and implementation
+###############################################################################
+mediawiki-fetch-images=org.eclipse.linuxtools.internal.rpm.ui.editor.doc.anttask.MediaWikiImageFetcher
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/toc.xml b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/toc.xml
new file mode 100644
index 0000000000..72b906c1cb
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/toc.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+<!--
+ 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
+ -->
+
+<toc label="Specfile Editor User Guide">
+ <link toc="userguide/SpecfileEditorReference-toc.xml"/>
+ <topic href="doc/notices.html" label="Legal" />
+</toc>
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/Configuring-Specfile-Editor-Settings.html b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/Configuring-Specfile-Editor-Settings.html
new file mode 100644
index 0000000000..dab1cf6c4a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/Configuring-Specfile-Editor-Settings.html
@@ -0,0 +1,212 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>SpecfileEditorReference - Configuring Specfile Editor Settings</title>
+ <link type="text/css" rel="stylesheet" href="book.css"/>
+ </head>
+ <body>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <th style="width: 100%" align="center" colspan="3">Configuring Specfile Editor Settings</th>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="General-Usage.html" title="General Usage">
+ <img alt="Previous" border="0" src="images/images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right">
+ <a href="Updating-This-Document.html" title="Updating This Document">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">General Usage</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Updating This Document</td>
+ </tr>
+ </table><hr/>
+ <h1 id="Configuring_Specfile_Editor_Settings">Configuring Specfile Editor Settings</h1>
+ <p>To configure Specfile Editor settings, navigate to <u>Window</u> / <u>Preferences</u>. Then, from the left pane of the
+ <b>
+ <i>Preferences</i>
+ </b> menu, select
+ <b>
+ <i>Specfile Editor</i>
+ </b>.
+ </p>
+ <p>
+ <img border="0" src="images/Specfile_settings_changelog.png"/>
+ </p>
+ <p>Upon selecting the
+ <b>
+ <i>Specfile Editor</i>
+ </b> menu, you can configure the format and locale of Changelog entries. To edit the actual content of your Changelogs, click the <u>ChangeLog</u> hyperlink in the menu, or use
+ <b>Ctrl</b>+'
+ <i>Alt</i>'+'
+ <i>C'</i> (outside of the
+ <b>
+ <i>Preferences</i>
+ </b> menu).
+ </p>
+ <h2 id="Macro_Completion">Macro Completion</h2>
+ <p>Macro definitions enable the Specfile Editor to properly highlight and autocompile
+ <i>.spec</i> files. The
+ <b>
+ <i>Macro Completion</i>
+ </b> sub-menu allows you to add/remove macro definitions and configure how the Specfile Editor should present macro values during mouse hovers.
+ </p>
+ <p>
+ <img border="0" src="images/Specfile_settings_macros.png"/>
+ </p>
+ <p>The
+ <b>
+ <i>Macro Definitions</i>
+ </b> section shows what macros the Specfile Editor is using. You can add, delete, and reorder macros using the buttons to the left of this section.
+ </p>
+ <p>The
+ <b>
+ <i>Mouse hover content</i>
+ </b> section enables you to specify what kind of information about a macro value whenever you hover your mouse over it. You can choose whether to display the contents or description of a macro value. The following screenshots illustrate the difference between both options:
+ </p>
+ <dl>
+ <dt>Show macro descriptions </dt>
+ <dd>
+ <img border="0" src="images/Specfile_macros_description.png"/>
+ </dd>
+ <dt>Show macro contents </dt>
+ <dd>
+ <img border="0" src="images/Specfile_macros_content.png"/>
+ </dd>
+ </dl>
+ <h2 id="RPM_Completions">RPM Completions</h2>
+ <p>The
+ <b>
+ <i>RPM Completions</i>
+ </b> section allows you to configure generic package list settings. This section allows you to use distribution-specific references which supplement auto-completion in editing
+ <i><code>.spec</code></i> files. These distribution-specific references include a list of installed RPM packages as well as online repositories.
+ </p>
+ <p>
+ <img border="0" src="images/Specfile_settings_rpms_generic.png"/>
+ </p>
+ <p>
+ <b>
+ <i>RPM Completions</i>
+ </b> configures the following settings:
+ </p>
+ <ul>
+ <li>Whether to use <code>rpm</code> or <code>yum</code> to build the package list</li>
+ <li>The path to the package list file </li>
+ <li>Whether or not to automatically build the RPM packages proposals list</li>
+ <li>When to refresh package list (
+ <b>
+ <i>Proposals RPM list build rate</i>
+ </b>)
+ </li>
+ </ul>
+ <p>The Specfile Editor can use package management tools to build the package list. Currently, the Specfile Editor only supports <code>yum</code> and <code>urpmi</code>. If neither package management tools are present in the system, the Specfile Editor will use <code>rpm</code> to build the package list.</p>
+ <h3 id="Package_Information">Package Information</h3>
+ <p>This sub-section of
+ <b>
+ <i>RPM Completions</i>
+ </b> allows you to configure what package details (i.e. RPM tags) to display during mouse hovers over appropriate values.
+ <b>
+ <i>Package Information</i>
+ </b> also lets you set the number of packages to show details for.
+ </p>
+ <p>
+ <img border="0" src="images/Specfile_settings_rpms_details.png"/>
+ </p>
+ <p>
+ <b>
+ <i>Package Information</i>
+ </b> contains a checklist of RPM tags (e.g.
+ <b>
+ <i>Name</i>
+ </b>,
+ <b>
+ <i>Version</i>
+ </b>,
+ <b>
+ <i>Release</i>
+ </b>). The Specfile Editor displays these tags during mouse hovers on package information in the
+ <i><code>.spec</code></i> file. You can also set a threshold for the number of proposals that enables the Specfile Editor to display this information. By default, the threshold is 10.
+ </p>
+ <h2 id="Rpmlint">Rpmlint</h2>
+ <p>The
+ <b>
+ <i>Rpmlint</i>
+ </b> section allows you to configure where <code>rpmlint</code> is installed, which is useful if it is installed somewhere other than the default
+ <i><code>/usr/bin/rpmlint</code></i>. This section also allows you to set whether warnings should be used for tabs or spaces, which is useful if you use both in the
+ <i><code>.spec</code></i> file.
+ </p>
+ <p>
+ <img border="0" src="images/Specfile_settings_rpmlint.png"/>
+ </p>
+ <h2 id="Task_Tags">Task Tags</h2>
+ <p>The
+ <b>
+ <i>Task Tags</i>
+ </b> section allows the Specfile Editor to identify specific strings as
+ <i>task tags</i>. The Specfile Editor will only search for these strings in comments. By default, the Specfile Editor identifies the strings <code>TODO</code> and
+ <i><code>FIXME</code></i> as task tags.
+ </p>
+ <p>
+ <img border="0" src="images/Specfile_settings_tasks.png"/>
+ </p>
+ <p>Whenever the Specfile Editor finds a task tag in the
+ <i><code>.spec</code></i> file, it adds the tag to the
+ <b>
+ <i>Tasks</i>
+ </b> view and plots an appropriate marker in the editor. Clicking the tag in the
+ <b>
+ <i>Tasks</i>
+ </b> view will automatically place the insertion point on the corresponding string in the
+ <i><code>.spec</code></i> file.
+ </p>
+ <p>
+ <img border="0" src="images/Screenshot-taskscreenshot.png"/>
+ </p>
+ <h2 id="Templates">Templates</h2>
+ <p>The
+ <b>
+ <i>Templates</i>
+ </b> section allows you to share and manage different
+ <i><code>.spec</code></i> file directive/section templates for all contexts.
+ </p>
+ <p>
+ <img border="0" src="images/Specfile_settings_templates.png"/>
+ </p>
+ <p>The <u>Import</u> and <u>Export</u> functions allow you to share templates with other developers who may also be working on the same package. The <u>New</u> and <u>Edit</u> buttons open a menu for adding or revising templates; they both contain the same options.</p>
+ <p>
+ <img border="0" src="images/Screenshot-edittemplate.png"/>
+ </p><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="General-Usage.html" title="General Usage">
+ <img alt="Previous" border="0" src="images/images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center">
+ <a href="SpecfileEditorReference.html" title="SpecfileEditorReference">
+ <img alt="SpecfileEditorReference" border="0" src="images/images/home.gif"/>
+ </a>
+ </td>
+ <td style="width: 20%" align="right">
+ <a href="Updating-This-Document.html" title="Updating This Document">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">General Usage</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Updating This Document</td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/General-Usage.html b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/General-Usage.html
new file mode 100644
index 0000000000..50766ba2d5
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/General-Usage.html
@@ -0,0 +1,187 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>SpecfileEditorReference - General Usage</title>
+ <link type="text/css" rel="stylesheet" href="book.css"/>
+ </head>
+ <body>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <th style="width: 100%" align="center" colspan="3">General Usage</th>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Installing.html" title="Installing">
+ <img alt="Previous" border="0" src="images/images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right">
+ <a href="Configuring-Specfile-Editor-Settings.html" title="Configuring Specfile Editor Settings">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Installing</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Configuring Specfile Editor Settings</td>
+ </tr>
+ </table><hr/>
+ <h1 id="General_Usage">General Usage</h1>
+ <p>To fully benefit from all the features offered by the Specfile Editor, ensure that your
+ <i><code>.spec</code></i> file is part of a project inside the Eclipse workspace. <code>rpmlint</code> integration, file hyperlinks, and some auto-completion features are not available otherwise. The following screenshot provides an impression of the full interface benefits provided by the Specfile Editor plug-in:
+ <br/>
+ <img border="0" src="images/Specfile_generic.png"/>
+ </p>
+ <h2 id="Creating_a_New_Specfile">Creating a New Specfile</h2>
+ <p>The Specfile Editor plug-in provides a wizard for creating new
+ <i><code>.spec</code></i> files. To use this wizard, navigate first to <u>File</u> > <u>New</u> > <u>Other...</u> ; then, expand the <u>RPM Wizards</u> entry to select <u>New specfile based on a template</u>.
+ </p>
+ <p>
+ <img border="0" src="images/Specfile_new_wizard.png"/>
+ </p>
+ <p>This will open the Specfile Creation wizard, which provides an interface for generating the basic contents of a
+ <i><code>.spec</code></i> file.
+ </p>
+ <p>
+ <img border="0" src="images/Specfile_new_from_template.png"/>
+ </p>
+ <p>The Specfile Creation wizard contains the following fields:</p>
+ <dl>
+ <dt>Project</dt>
+ <dd>This field associates the generated
+ <i><code>.spec</code></i> with a project in the current workspace, which ultimately specifies where the
+ <i><code>.spec</code></i> will be saved. The
+ <b>
+ <i>Select a project...</i>
+ </b> button allows you to select a specific project for this field with ease. By default, the Specfile Editor plug-in specifies the last active project when you invoked the Specfile Creation wizard.
+ </dd>
+ </dl>
+ <dl>
+ <dt>Select a template </dt>
+ <dd>This drop-down list allows you to select a
+ <i><code>.spec</code></i> template to use. You can install templates provided by <code>rpmdevtools</code>, which is available
+ <a href="https://fedorahosted.org/rpmdevtools">https://fedorahosted.org/rpmdevtools</a> .
+ </dd>
+ </dl>
+ <dl>
+ <dt>Version </dt>
+ <dd>This fills in the <code>Version:</code> line of the
+ <i><code>.spec</code></i> file.
+ </dd>
+ </dl>
+ <dl>
+ <dt>Summary </dt>
+ <dd>This fills in the <code>Summary:</code> line of the
+ <i><code>.spec</code></i> file.
+ </dd>
+ </dl>
+ <dl>
+ <dt>Group </dt>
+ <dd>This drop-down list allows you to select a package group to which the project belongs.</dd>
+ </dl>
+ <dl>
+ <dt>License </dt>
+ <dd>This fills in the <code>License:</code> line of the
+ <i><code>.spec</code></i> file.
+ </dd>
+ </dl>
+ <dl>
+ <dt>URL </dt>
+ <dd>This fills in the <code>URL:</code> line of the
+ <i><code>.spec</code></i> file, which typically specifies the public home page of the project.
+ </dd>
+ </dl>
+ <dl>
+ <dt>Source0 </dt>
+ <dd>This field specifies the source archive from which the package is built.</dd>
+ </dl>
+ <h2 id="rpmlint">rpmlint</h2>
+ <p>To enable <code>rpmlint</code> warnings, right-click on the project containing the
+ <i><code>.spec</code></i> file. Then, select <u>Add/Remove rpmlint warnings</u> from the context menu. You can use this menu selection to disable <code>rpmlint</code> warnings as well.
+ </p>
+ <p>
+ <img border="0" src="images/Specfile_enable_rpmlint.png"/>
+ </p>
+ <p>Enabling <code>rpmlint</code> warnings will add a new <code>rpmlint</code> builder to the project. This <code>rpmlint</code> builder checks the
+ <i><code>.spec</code></i> file during each project build or clean. Afterwards, the builder displays any appropriate warnings and errors in the
+ <b>
+ <i>Problems</i>
+ </b> pane. Each warning/error is plotted in the
+ <i><code>.spec</code></i> file as well; clicking an <code>rpmlint</code> warning/error in the
+ <b>
+ <i>Problems</i>
+ </b> pane will automatically place the insertion point on the corresponding section in the
+ <i><code>.spec</code></i> file.
+ </p>
+ <p>
+ <img border="0" src="images/Specfile_problems_rpmlint.png"/>
+ </p>
+ <h3 id="Quick_Fixes">Quick Fixes</h3>
+ <p>You can also directly resolve several warnings and errors through the
+ <b>
+ <i>Quick Fix</i>
+ </b> menu. To access this menu, right-click on a warning or error from the
+ <b>
+ <i>Problems</i>
+ </b> pane and select <u>Quick Fix</u>.
+ </p>
+ <p>As the name suggests, the
+ <b>
+ <i>Quick Fix</i>
+ </b> menu provides you with quick solutions to common
+ <i><code>.spec</code></i> file errors and problems. For example, <code>rpmlint</code> detected a <code>no-cleaning-of-buildroot</code> error in the following <code>%install</code> section from the <code>.spec</code> file:
+ </p>
+ <p>
+ <img border="0" src="images/Specfile_rpmlint_fix_before.png"/>
+ </p>
+ <p>If the
+ <b>
+ <i>Quick Fix</i>
+ </b> menu can provide a solution for a particular error, it will be available in the menu. To apply it, simply select the solution (from the
+ <b>
+ <i>Select a fix:</i>
+ </b> area) and the corresponding problem (from the
+ <b>
+ <i>Problems:</i>
+ </b> area), then click the <u>Finish</u> button.
+ </p>
+ <p>
+ <img border="0" src="images/Specfile_rpmlint_quickfix.png"/>
+ </p>
+ <p>The following screenshot shows the revisions to the <code>%install</code> section applied by the
+ <b>
+ <i>Quick Fix</i>
+ </b> menu:
+ </p>
+ <p>
+ <img border="0" src="images/Specfile_rpmlint_fix_after.png"/>
+ </p><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Installing.html" title="Installing">
+ <img alt="Previous" border="0" src="images/images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center">
+ <a href="SpecfileEditorReference.html" title="SpecfileEditorReference">
+ <img alt="SpecfileEditorReference" border="0" src="images/images/home.gif"/>
+ </a>
+ </td>
+ <td style="width: 20%" align="right">
+ <a href="Configuring-Specfile-Editor-Settings.html" title="Configuring Specfile Editor Settings">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Installing</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Configuring Specfile Editor Settings</td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/Installing.html b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/Installing.html
new file mode 100644
index 0000000000..2773c23dea
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/Installing.html
@@ -0,0 +1,68 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>SpecfileEditorReference - Installing</title>
+ <link type="text/css" rel="stylesheet" href="book.css"/>
+ </head>
+ <body>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <th style="width: 100%" align="center" colspan="3">Installing</th>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="SpecfileEditorReference.html" title="Overview">
+ <img alt="Previous" border="0" src="images/images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right">
+ <a href="General-Usage.html" title="General Usage">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Overview</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">General Usage</td>
+ </tr>
+ </table><hr/>
+ <h1 id="Installing">Installing</h1>
+ <p>In order for the Specfile Editor Plug-in for Eclipse to work, you should have the
+ <i><code>rpmlint</code></i> package installed.
+ </p>
+ <p>Once the
+ <i><code>rpmlint</code></i> package is installed, the easiest way to install the Valgrind plug-in for Eclipse is through the
+ <b>
+ <i>Software Updates and Add-ons</i>
+ </b> menu. For information on how to use this menu, refer to
+ <a href="http://wiki.eclipse.org/Linux_Tools_Project/PluginInstallHelp">http://wiki.eclipse.org/Linux_Tools_Project/PluginInstallHelp</a>.
+ </p><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="SpecfileEditorReference.html" title="Overview">
+ <img alt="Previous" border="0" src="images/images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center">
+ <a href="SpecfileEditorReference.html" title="SpecfileEditorReference">
+ <img alt="SpecfileEditorReference" border="0" src="images/images/home.gif"/>
+ </a>
+ </td>
+ <td style="width: 20%" align="right">
+ <a href="General-Usage.html" title="General Usage">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Overview</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">General Usage</td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/SpecfileEditorReference-toc.xml b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/SpecfileEditorReference-toc.xml
new file mode 100644
index 0000000000..2689610256
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/SpecfileEditorReference-toc.xml
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<toc topic="userguide/SpecfileEditorReference.html" label="SpecfileEditorReference">
+ <topic href="userguide/SpecfileEditorReference.html" label="Overview"></topic>
+ <topic href="userguide/Installing.html" label="Installing"></topic>
+ <topic href="userguide/General-Usage.html" label="General Usage">
+ <topic href="userguide/General-Usage.html#Creating_a_New_Specfile" label="Creating a New Specfile"></topic>
+ <topic href="userguide/General-Usage.html#rpmlint" label="rpmlint">
+ <topic href="userguide/General-Usage.html#Quick_Fixes" label="Quick Fixes"></topic>
+ </topic>
+ </topic>
+ <topic href="userguide/Configuring-Specfile-Editor-Settings.html" label="Configuring Specfile Editor Settings">
+ <topic href="userguide/Configuring-Specfile-Editor-Settings.html#Macro_Completion" label="Macro Completion"></topic>
+ <topic href="userguide/Configuring-Specfile-Editor-Settings.html#RPM_Completions" label="RPM Completions">
+ <topic href="userguide/Configuring-Specfile-Editor-Settings.html#Package_Information" label="Package Information"></topic>
+ </topic>
+ <topic href="userguide/Configuring-Specfile-Editor-Settings.html#Rpmlint" label="Rpmlint"></topic>
+ <topic href="userguide/Configuring-Specfile-Editor-Settings.html#Task_Tags" label="Task Tags"></topic>
+ <topic href="userguide/Configuring-Specfile-Editor-Settings.html#Templates" label="Templates"></topic>
+ </topic>
+ <topic href="userguide/Updating-This-Document.html" label="Updating This Document"></topic>
+</toc> \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/SpecfileEditorReference.html b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/SpecfileEditorReference.html
new file mode 100644
index 0000000000..6a5a82620d
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/SpecfileEditorReference.html
@@ -0,0 +1,51 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>SpecfileEditorReference</title>
+ <link type="text/css" rel="stylesheet" href="book.css"/>
+ </head>
+ <body>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <th style="width: 100%" align="center" colspan="3">SpecfileEditorReference</th>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left"></td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right">
+ <a href="Installing.html" title="Installing">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top"></td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Installing</td>
+ </tr>
+ </table><hr/>
+ <h1 id="Overview">Overview</h1>
+ <p>The Specfile Editor Plug-in for Eclipse provides useful features to help developers manage
+ <i><code>.spec</code></i> files. This plug-in allows users to leverage several Eclipse GUI features in editing
+ <i><code>.spec</code></i> files, including outline/quick outline view in the editor, auto-completion, highlighting, file hyperlinks, and folding.
+ </p>
+ <p>In addition, the Specfile Editor Plug-in also integrates the <code>rpmlint</code> tool into the Eclipse interface. <code>rpmlint</code> is a command-line tool that helps developers detect common RPM package errors. The richer visualization offered by the Eclipse interface helps developers quickly detect, view, and correct mistakes reported by <code>rpmlint</code>.</p><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left"></td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right">
+ <a href="Installing.html" title="Installing">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top"></td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Installing</td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/Updating-This-Document.html b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/Updating-This-Document.html
new file mode 100644
index 0000000000..c09e57db54
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/Updating-This-Document.html
@@ -0,0 +1,54 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>SpecfileEditorReference - Updating This Document</title>
+ <link type="text/css" rel="stylesheet" href="book.css"/>
+ </head>
+ <body>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <th style="width: 100%" align="center" colspan="3">Updating This Document</th>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Configuring-Specfile-Editor-Settings.html" title="Configuring Specfile Editor Settings">
+ <img alt="Previous" border="0" src="images/images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right"></td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Configuring Specfile Editor Settings</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top"></td>
+ </tr>
+ </table><hr/>
+ <h1 id="Updating_This_Document">Updating This Document</h1>
+ <p>This document is maintained in a collaborative wiki. If you wish to update or modify this document please visit
+
+ <a href="http://wiki.eclipse.org/Linux_Tools_Project/SpecfileEditor/User_Guide">http://wiki.eclipse.org/Linux_Tools_Project/SpecfileEditor/User_Guide</a>
+ </p><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Configuring-Specfile-Editor-Settings.html" title="Configuring Specfile Editor Settings">
+ <img alt="Previous" border="0" src="images/images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center">
+ <a href="SpecfileEditorReference.html" title="SpecfileEditorReference">
+ <img alt="SpecfileEditorReference" border="0" src="images/images/home.gif"/>
+ </a>
+ </td>
+ <td style="width: 20%" align="right"></td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Configuring Specfile Editor Settings</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top"></td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Screenshot-edittemplate.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Screenshot-edittemplate.png
new file mode 100644
index 0000000000..446cb19149
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Screenshot-edittemplate.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Screenshot-taskscreenshot.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Screenshot-taskscreenshot.png
new file mode 100644
index 0000000000..6b32601a7a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Screenshot-taskscreenshot.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_enable_rpmlint.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_enable_rpmlint.png
new file mode 100644
index 0000000000..db7f40df66
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_enable_rpmlint.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_generic.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_generic.png
new file mode 100644
index 0000000000..dc490cff54
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_generic.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_macros_content.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_macros_content.png
new file mode 100644
index 0000000000..7f8e582fe3
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_macros_content.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_macros_description.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_macros_description.png
new file mode 100644
index 0000000000..a8721478ea
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_macros_description.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_new_from_template.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_new_from_template.png
new file mode 100644
index 0000000000..d38f936a5b
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_new_from_template.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_new_wizard.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_new_wizard.png
new file mode 100644
index 0000000000..2beefd502c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_new_wizard.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_problems_rpmlint.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_problems_rpmlint.png
new file mode 100644
index 0000000000..18eb49b9b5
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_problems_rpmlint.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_rpmlint_fix_after.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_rpmlint_fix_after.png
new file mode 100644
index 0000000000..02e438e5f7
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_rpmlint_fix_after.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_rpmlint_fix_before.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_rpmlint_fix_before.png
new file mode 100644
index 0000000000..f47bd381f5
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_rpmlint_fix_before.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_rpmlint_quickfix.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_rpmlint_quickfix.png
new file mode 100644
index 0000000000..6b461efd45
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_rpmlint_quickfix.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_changelog.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_changelog.png
new file mode 100644
index 0000000000..b62848e69d
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_changelog.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_macros.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_macros.png
new file mode 100644
index 0000000000..f26f152f6b
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_macros.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_rpmlint.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_rpmlint.png
new file mode 100644
index 0000000000..7719232447
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_rpmlint.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_rpms_details.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_rpms_details.png
new file mode 100644
index 0000000000..01179efc50
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_rpms_details.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_rpms_generic.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_rpms_generic.png
new file mode 100644
index 0000000000..2d4b21fff8
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_rpms_generic.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_tasks.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_tasks.png
new file mode 100644
index 0000000000..f8de5778f5
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_tasks.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_templates.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_templates.png
new file mode 100644
index 0000000000..21c9bde86d
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/userguide/images/Specfile_settings_templates.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.classpath b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.classpath
new file mode 100644
index 0000000000..304e86186a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.cvsignore b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.cvsignore
new file mode 100644
index 0000000000..ba077a4031
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.cvsignore
@@ -0,0 +1 @@
+bin
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.project b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.project
new file mode 100644
index 0000000000..f3af6ee615
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.rpm.ui.editor.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.settings/org.eclipse.jdt.core.prefs b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..4c50b9c655
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,70 @@
+#Wed Nov 19 14:24:04 CET 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.settings/org.eclipse.jdt.ui.prefs b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..38a7d02ea5
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,54 @@
+#Wed Mar 04 13:50:18 CET 2009
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=false
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/ChangeLog b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/ChangeLog
new file mode 100644
index 0000000000..e8c05fdae5
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/ChangeLog
@@ -0,0 +1,526 @@
+2010-03-01 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/SourcesFileHyperlinkDetectorTest.java (testDetectHyperlinks): Fix number of hyperlink detectors.
+
+2010-01-19 Alexander Kurtakov <akurtako@redhat.com>
+
+ * META-INF/MANIFEST.MF: Require core.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmMacroProposalsListTest.java: Use Utils from core.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmPackageProposalsListTest.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileTestProject.java: Likewise.
+
+2010-01-18 Alexander Kurtakov <akurtako@redhat.com>
+ Remove an empty test class now that it's AbstractHandler not an ActionDelegate.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/SpecfileEditorShowOutlineActionDelegateTest.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/ActionsAllTests.java (suite): Remove action delegate test.
+
+2009-08-07 Alexander Kurtakov <akurtako@redhat.com>
+
+ * plugin.properties: Fix provider to be Eclipse not Eclipse.org.
+
+2009-07-08 Alphonse Van Assche <alcapcom@fedoraproject.org>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfilePackagesScannerTest.java : Fix disabled tests.
+
+2009-05-19 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileDefineTest.java (testResolve): Fix compile.
+
+2009-05-14 Alexander Kurtakov <akurtako@redhat.com>
+
+ * META-INF/MANIFEST.MF: Sync release with the feature 0.4.3.
+
+2009-05-08 Alphonse Van Assche <alcapcom@fedoraproject.org>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileDefineTest.java: Disable test define
+ without value, because of the fact that this error is no more managed by our internal parser.
+
+2009-04-02 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmMacroProposalsListTest.java (testGetMacroEval): Fix %_libdir expectation.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmPackageProposalsListTest.java (testGetRpmInfo): Use rpm package for the test.
+ (setUp): Add rpm to the packagelist.
+ (testGetValue): Use rpm package for the test.
+
+2009-04-02 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmMacroProposalsListTest.java (testGetMacroEval): Run the test only when rpm executable is available.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmPackageProposalsListTest.java (setUp): Fix deprecation.
+ (testGetRpmInfo): Exec only when rpm executable is available.
+ (testGetValue): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfilePackagesScannerTest.java (setUp): Likewise.
+
+2009-03-26 Alexander Kurtakov <akurtako@redhat.com>
+
+ * .settings/org.eclipse.jdt.ui.prefs: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/ActionsAllTests.java (suite): Add one more test.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/SpecfileEditorShowOutlineActionDelegateTest.java: New file.
+
+2009-03-08 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfileScannerTest.java (testKeyword): Fix order in asserts.
+
+2009-03-04 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/ActionsAllTests.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/SpecfileChangelogFormatterTest.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/SpecfileChangelogParserTest.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java (suite): Add new tests.
+
+2009-02-28 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/MailHyperlinkDetectorTest.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/SourcesFileHyperlinkDetectorTest.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/HyperlinkAllTests.java (suite): Add new test files.
+
+2009-02-25 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/HyperlinkAllTests.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/SpecfileElementHyperlinkDetectorTest.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java (suite): Add HyperlinkAllTests.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/EpochTagTest.java: Add 2009 to the Copyright year.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/FileTestCase.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/HeaderRecognitionTest.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/LicenseTagTest.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/LinePositionTests.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/NameTagTests.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SourceComparatorTest.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileDefineTest.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileTest.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/PatchApplicationTest.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/ReleaseTagTests.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileCompletionProcessorTest.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileTestProject.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/VersionTagTests.java: Likewise.
+
+2009-02-25 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/DefineTests.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileDefineTest.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java (suite): Remove DefineTests, which is renamed and moved.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/FileTestCase.java: More protected fields.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/ParserAllTests.java (suite): Add SpecfileDefineTest.
+
+2009-02-25 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/HyperlinkWithMacroTests.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SourceComparatorTests.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/URLHyperlinkWithMacroDetectorTest.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/ParserAllTests.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SourceComparatorTest.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java (suite): Use ParserAllTests instead of every test.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/FileTestCase.java: Make testFileProtected.
+
+2009-02-25 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RefactoringTests.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileTest.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java (suite): Adapt to SpecfileTest rename.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/FileTestCase.java: Make specfile member protected.
+
+2009-02-18 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/LinePositionTests.java (testLineNumber): Adapt to latest api changes.
+ (testLineNumber2): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SourceComparatorTests.java (testPatchComparator): Likewise.
+ (testPatchComparator2): Likewise.
+
+2009-02-06 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileTestProject.java (dispose): Use utils for command invocation.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfilePackagesScannerTest.java (getContents): Do not concatenate strings.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfileScannerTest.java (getContents): Likewise.
+
+2009-02-02 Andrew Overholt <overholt@redhat.com>
+
+ * test.xml: Update.
+
+2009-01-14 Alexander Kurtakov <akurtako@redhat.com>
+ Mimic plugin packages for easier navigation.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmMacroProposalsListTests.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmPackageProposalsListTests.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileChangelogScannerTests.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfilePackagesScannerTests.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileScannerTests.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmMacroProposalsListTest.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmPackageProposalsListTest.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/ScannersAllTests.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfileChangelogScannerTest.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfilePackagesScannerTest.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfileScannerTest.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java
+ (suite): Add ScannersAllTests.suite not every scaner test separately.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/AScannerTest.java: Make it public.
+
+2008-12-04 Andrew Overholt <overholt@redhat.com>
+
+ * build.properties: Add test.xml to bin.includes.
+
+2008-12-02 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileCompletionProcessorTest.java
+ (setUp): Removed - not needed.
+ (tearDown): Likewise.
+ (initEditor): Don't do things done in the parent.
+
+2008-11-30 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/EditorTests.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/ParserTests.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/FileTestCase.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java (suite): Don't add empty test case.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/AScannerTest.java: Extend FileTestCase and skip work done in parent.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/DefineTests.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/EpochTagTest.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/HeaderRecognitionTest.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/HyperlinkWithMacroTests.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/LicenseTagTest.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/LinePositionTests.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/NameTagTests.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/PatchApplicationTest.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RefactoringTests.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/ReleaseTagTests.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmMacroProposalsListTests.java: Remove unneeded constructor.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileChangelogScannerTests.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SourceComparatorTests.java: Extend FileTestCase and skip work done in parent.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfilePackagesScannerTests.java
+ (setUp): Throw correct exception.
+ (SpecfilePackagesScannerTests): Removed unneeded constructor.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileScannerTests.java
+ (SpecfileScannerTests): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/VersionTagTests.java: Extend FileTestCase and skip work done in parent.
+
+2008-11-29 Alexander Kurtakov <akurtakov@gmail.com>
+ Adopt imports to the editor package movements.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileCompletionProcessorTest.java: Adopt imports.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileScannerTests.java: Likewise.
+
+2008-11-28 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileChangelogScannerTests.java: Adapt to package movements.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileCompletionProcessorTest.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfilePackagesScannerTests.java: Likewise.
+
+2008-11-27 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SourceComparatorTests.java
+ (testPatchComparator2): Use the generic method.
+
+2008-11-26 Alexander Kurtakov <akurtakov@gmail.com>
+ Fix imports caused by the marker handlers moving.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/DefineTests.java: Fix imports.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/EpochTagTest.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/HeaderRecognitionTest.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/HyperlinkWithMacroTests.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/LicenseTagTest.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/LinePositionTests.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/NameTagTests.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/PatchApplicationTest.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RefactoringTests.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/ReleaseTagTests.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SourceComparatorTests.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/VersionTagTests.java: Likewise.
+
+2008-11-19 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * .settings/org.eclipse.jdt.core.prefs: Add project specific compiler warnings.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java
+ (suite): Enable SpecfilePackagesScannerTests.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileCompletionProcessorTest.java
+ (setUp): Add missing @Override.
+ (tearDown): Likewise.
+
+2008-11-19 Alexander Kurtakov <akurtakov@gmail.com>
+ Fix #214247 + cleanups.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileCompletionProcessorTest.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java
+ (suite): Run SpecfileCompletionProcessorTest.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/AScannerTest.java
+ (setUp): Ensure using the modified test file.
+ (tearDown): Do not dispose editor.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/HyperlinkWithMacroTests.java
+ (testMacroResolutionInUrl): Ensure using the modified test file.
+ (newFile): Force changing file content.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileTestProject.java
+ (createFile): Use the parameter as a file name instead of the hardcoded value.
+ (refresh): New method to synchronize the project content with local fs.
+
+2008-11-06 Andrew Overholt <overholt@redhat.com>
+
+ * test.xml: gef-folder -> specfile-folder.
+
+2008-11-05 Andrew Overholt <overholt@redhat.com>
+
+ * test.xml: New file to drive tests on build.eclipse.org.
+
+2008-11-01 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * META-INF/MANIFEST.MF: Replace deprecated Eclipse-LazyStart usage.
+ * build.properties: Add plugin.properties to bin.includes.
+
+2008-10-31 Andrew Overholt <overholt@redhat.com>
+
+ * plugin.properties: Initial import.
+ * META-INF/MANIFEST.MF: Use plugin.properties. Add "(Incubation)".
+
+2008-07-04 Andrew Overholt <overholt@redhat.com>
+
+ * .settings/org.eclipse.jdt.core.prefs: Set to 1.5.
+
+2008-07-03 Alexander Kurtakov <akurtakov@gmail.com>
+ Adapt to Java 5 and cleanup.
+ * META_INF/MANIFEST.MF: Bump Bundle-RequiredExecutionEnvironment to J2SE-1.5.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/AScannerTest.java:
+ (setUp): Add @Override.
+ (tearDown): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/DefineTests.java:
+ (setUp): Likewise.
+ (tearDown): Likewise.
+ (testDefine): Don't catch Exception when it's not thrown.
+ (testDefine2): Likewise.
+ (testDefine3): Likewise.
+ (testDefine4): Likewise.
+ (testUnderscoreDefine): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/EditorTests.java:
+ (start): Add @Override.
+ (stop): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/EpochTagTest.java:
+ (setUp): Likewise.
+ (tearDown): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/HeaderRecognitionTest.java:
+ (setUp): Likewise.
+ (tearDown): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/HyperlinkWithMacroTest.java:
+ (setUp): Likewise.
+ (tearDown): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/LicenseTagTest.java:
+ (setUp): Likewise.
+ (tearDown): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/LinePositionTest.java:
+ (setUp): Likewise.
+ (tearDown): Likewise.
+ (testLineNumber): Use foreach instead of iterator.
+ (testLineNumber2): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/NameTagTest.java:
+ (setUp): Add @Override.
+ (tearDown): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/ParserTests.java:
+ (setUp): Likewise.
+ (tearDown): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/PatcApplicationTest.java:
+ (setUp): Likewise.
+ (tearDown): Likewise.
+ (testMultiplePatchLineNumbers): Use foreach instead of iterator.
+ (testPatchLineNumber): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RefactoringTests.java:
+ (setUp): Add @Override.
+ (tearDown): Likewise.
+ (testOrganizePatches): Generify.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/ReleaseTagTests.java:
+ (setUp): Add @Override.
+ (tearDown): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmMacroProposalsListTests.java:
+ (setUp): Likewise.
+ (testGetProposals): Generify.
+ (testGetProposals): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmPackageProposalsListTests.java:
+ (setUp): Add @Override.
+ (testGetProposals): Generify.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SourceComparatorTests.java:
+ (setUp): Add @Override.
+ (tearDown): Likewise.
+ (testPatchComparator): Use foreach instead of iterator.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileChangelogScannerTests.java:
+ (getContents): Add @Override.
+ (getScanner): Likewise.
+ (testMail): Remove unneeded catch and variable.
+ (testSection): Likewise.
+ (testVerRel): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfilePackagesScannerTests.java:
+ (getContents): Add @Override.
+ (getScanner): Likewise.
+ (setUp): Likewise.
+ (testComment): Remove unneeded catch and variable.
+ (testPackageTag): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileScannerTests.java:
+ (getContents): Add @Override.
+ (getScanner): Likewise.
+ (testComment): Remove unneeded catch and variable.
+ (testDefineCorrectlyScanned): Likewise.
+ (testDefinedMacro): Likewise.
+ (testKeyword): Likewise.
+ (testMacro): Likewise.
+ (testSection): Likewise.
+ (testTag): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/VersionTagTests.java:
+ (setUp): Add @Override.
+ (tearDown): Likewise.
+
+2008-05-12 Alexander Kurtakov <akurtakov@gmail.com>
+ Fix compile.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/HyperlinkWithMacroTests.java:
+ Fix compile.
+
+2008-04-08 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * .classpat: Bump requirement to java 5.
+
+2007-07-05 Andrew Overholt <overholt@redhat.com>
+
+ * Too many files to list: Add standard copyright and license header.
+
+2007-06-22 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * META-INF/MANIFEST.MF: Add "org.eclipse.ui.editors" dependencie requiere by
+ Ecliple 3.3
+
+2007-06-20 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/AScannerTest.java:
+ Abstract test case class for scanners.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java
+ (suite): Add new test cases classes.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileScannerTests.java:
+ New tests.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfilePackagesScannerTests.java:
+ New tests.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileChangelogScannerTests.java:
+ New tests.
+
+2007-06-20 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmPackageProposalsListTests.java
+ (tearDown): Remove method.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileTestProject.java
+ (dispose): Remove /tmp/pkglist file at the end of the test suite.
+
+2007-06-20 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * META-INF/MANIFEST.MF: Add org.eclipse.ui.ide package.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java
+ (suite): Enable HyperlinkWithMacroTests.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/HyperlinkWithMacroTests.java
+ (testMacroResolutionInUrl): Using org.eclipse.ui.ide.IDE.openEditor to get the
+ editor instance.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/LicenseTagTest.java:
+ (testMultipleLicenseTag): Disable this test case according with the current
+ code.
+
+2007-05-04 Andrew Overholt <overholt@redhat.com>
+
+ Bug #185598
+ * META-INF/MANIFEST.MF: Add "Incubation" to Bundle-Name. Add Bundle-Vendor.
+
+2007-04-16 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java (suite):
+ Add (commented-out) HyperlinkWithMacroTests.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/HyperlinkWithMacroTests.java:
+ New file.
+
+2007-04-12 Alphonse Van Assche <alcapcom@gmail.com>
+
+ Bug #181236
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmPackageProposalsListTests.java:
+ New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmMacroProposalsListTests.java:
+ New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java
+ (suite): Add new tests.
+
+2007-04-05 Remy Suen <remy.suen@gmail.com>
+
+ Bug #181249
+ * META-INF/MANIEST.MF: Set the Bundle-RequiredExecutionEnvironment
+ attribute to J2SE-1.4.
+
+2007-04-05 Andrew Overholt <overholt@redhat.com>
+
+ * .classpath: Remove spurious junit.jar entry (bug #181238).
+
+2007-04-05 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/HeaderRecognitionTest.java
+ (newFile): Remove unnecessary specfile instantiation.
+ (setUp): Instantiate specfile object.
+ (testGetComplexSectionName3): Update test to use getPackageName() instead of getName().
+ (testGetComplexSectionName4): Likewise.
+ (testGetComplexSectionName5): Likewise.
+
+2007-04-04 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/tests/HeaderRecognitionTest.java
+ (newFile): Un-comment creation of specfile object.
+ * .settings/org.eclipse.jdt.core.prefs: New file.
+ * .classpath: New file. Set J2SE-1.4 as EE.
+
+2007-03-28 Andrew Overholt <overholt@redhat.com>
+
+ Re-namespace to org.eclipse.linuxtools.rpm.ui.editor.tests.
+
+2006-11-07 Andrew Overholt <overholt@redhat.com>
+
+ Add license tag tests.
+
+ * src/org/eclipse/cdt/rpm/editor/tests/LicenseTagTest.java: New file.
+ * src/org/eclipse/cdt/rpm/editor/tests/DefineTests.java: Re-write to better handle out-of-order error markers.
+ * src/org/eclipse/cdt/rpm/editor/tests/AllTests.java (suite): Add license tag tests.
+
+2006-10-03 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/tests/RefactoringTests.java: New file.
+ * src/org/eclipse/cdt/rpm/editor/tests/PatchApplicationTest.java
+ (testPatchLineNumber): Fix line numbers.
+ (testMultiplePatchLineNumbers): Likewise.
+ * src/org/eclipse/cdt/rpm/editor/tests/LinePositionTests.java
+ (testLineNumber2): New method.
+ (testLineNumber): Likewise.
+ * src/org/eclipse/cdt/rpm/editor/tests/HeaderRecognitionTest.java
+ (testGetComplexSectionName2): Remove unused 'element'.
+ (testGetComplexSectionName7): Likewise.
+ * src/org/eclipse/cdt/rpm/editor/tests/AllTests.java
+ (suite): Add SourceComparator and Refactoring tests.
+ * src/org/eclipse/cdt/rpm/editor/tests/SourceComparatorTests.java: Clean up
+ imports.
+
+2006-09-19 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/tests/SourceComparatorTests.java: New file.
+ * src/org/eclipse/cdt/rpm/editor/tests/PatchApplicationTest.java
+ (testPatchLineNumber): New test. Ensure patch application line number is
+ correctly parsed.
+ (testMultiplePatchLineNumbers): Likewise but for multiple applications of the
+ same patch.
+
+2006-09-05 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/tests/AllTests.java
+ (suite): Re-enable all tests.
+
+2006-09-04 Igor Foox <ifoox@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/tests/EpochTagTest.java: Fix imports.
+ * src/org/eclipse/cdt/rpm/editor/tests/DefineTests.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/tests/VersionTagTests.java: Fix tests
+ to new testing process.
+ * src/org/eclipse/cdt/rpm/editor/tests/LinePositionTests.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/tests/NameTagTests.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/tests/ReleaseTagTests.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/tests/PatchApplicationTest.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/tests/HeaderRecognitionTest.java: Likewise.
+ (testMain): Removed unused method.
+
+2006-09-01 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/tests/AllTests.java: New file.
+ (suite): New method. Suite for all tests.
+ * src/org/eclipse/cdt/rpm/editor/tests/SpecfileTestProject.java: New file.
+ (createFile): New method.
+ (getFailureMarkers): Likewise.
+ (SpecfileTestProject): Likewise.
+ (dispose): Likewise.
+ * src/org/eclipse/cdt/rpm/editor/tests/EpochTagTest.java: Re-write to use
+ SpecfileTestProject.
+ * src/org/eclipse/cdt/rpm/editor/tests/DefineTests.java: Likewise.
+ * META-INF/MANIFEST.MF: Add dependency on editor plugin.
+ * .classpath: Add JUnit dependency. \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/META-INF/MANIFEST.MF b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..1ad772241c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.rpm.ui.editor.tests
+Bundle-Version: 0.4.3
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.jface.text,
+ org.eclipse.core.resources,
+ org.eclipse.osgi,
+ org.eclipse.ui.workbench,
+ org.eclipse.ui.ide,
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.rpm.ui.editor,
+ org.eclipse.jface,
+ org.eclipse.ui.editors,
+ org.junit;bundle-version="3.8.2",
+ org.eclipse.linuxtools.rpm.core
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %provider
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/build.properties b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/build.properties
new file mode 100644
index 0000000000..33230c0457
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ test.xml
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/plugin.properties b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/plugin.properties
new file mode 100644
index 0000000000..6271532735
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2008 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 Incorporated - initial API and implementation
+#################################################################################
+bundleName=RPM Specfile Editor Tests Plug-in (Incubation)
+provider=Eclipse \ No newline at end of file
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
new file mode 100644
index 0000000000..b6fed77e3f
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/AScannerTest.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.editor.tests;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.ui.IEditorPart;
+
+public abstract class AScannerTest extends FileTestCase {
+
+ protected RuleBasedScanner rulesBasedScanner;
+
+ protected abstract String getContents();
+
+ protected abstract RuleBasedScanner getScanner();
+
+ public SpecfileEditor editor;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see junit.framework.TestCase#setUp()
+ */
+ @Override
+ protected void setUp() throws CoreException {
+ super.setUp();
+ newFile(getContents());
+ testProject.refresh();
+ IEditorPart openEditor = org.eclipse.ui.ide.IDE.openEditor(Activator
+ .getDefault().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
new file mode 100644
index 0000000000..3a08623041
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/AllTests.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.linuxtools.rpm.ui.editor.tests.actions.ActionsAllTests;
+import org.eclipse.linuxtools.rpm.ui.editor.tests.hyperlink.HyperlinkAllTests;
+import org.eclipse.linuxtools.rpm.ui.editor.tests.parser.ParserAllTests;
+import org.eclipse.linuxtools.rpm.ui.editor.tests.scanners.ScannersAllTests;
+
+public class AllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(
+ "Test for org.eclipse.linuxtools.rpm.ui.editor.tests");
+ // $JUnit-BEGIN$
+ suite.addTestSuite(EpochTagTest.class);
+ suite.addTestSuite(ReleaseTagTests.class);
+ suite.addTestSuite(NameTagTests.class);
+ suite.addTestSuite(VersionTagTests.class);
+ suite.addTestSuite(HeaderRecognitionTest.class);
+ suite.addTestSuite(LicenseTagTest.class);
+ suite.addTestSuite(PatchApplicationTest.class);
+ suite.addTestSuite(LinePositionTests.class);
+ suite.addTestSuite(RpmMacroProposalsListTest.class);
+ suite.addTestSuite(RpmPackageProposalsListTest.class);
+ suite.addTest(ActionsAllTests.suite());
+ suite.addTest(ScannersAllTests.suite());
+ suite.addTest(ParserAllTests.suite());
+ suite.addTest(HyperlinkAllTests.suite());
+ suite.addTestSuite(SpecfileCompletionProcessorTest.class);
+ // $JUnit-END$
+ return suite;
+ }
+
+}
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
new file mode 100644
index 0000000000..1068c52c0a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/EpochTagTest.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor.tests;
+
+import org.eclipse.core.resources.IMarker;
+
+public class EpochTagTest extends FileTestCase {
+
+ public void testEpochTag() {
+ String testText = "Epoch: 1";
+ newFile(testText);
+ assertEquals(1, specfile.getEpoch());
+ }
+
+ public void testEpochTag2() {
+ String testText = "Epoch: 1";
+ newFile(testText);
+ assertEquals(1, specfile.getEpoch());
+ }
+
+ public void testNullEpochTag() {
+ String testText = "Epoch:";
+ newFile(testText);
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals(6, marker.getAttribute(IMarker.CHAR_END, 0));
+ assertEquals(IMarker.SEVERITY_ERROR, marker.getAttribute(
+ IMarker.SEVERITY, -1));
+ assertEquals("Epoch declaration without value.", marker.getAttribute(
+ IMarker.MESSAGE, ""));
+ }
+
+ public void testNullEpochTag2() {
+ String testText = "Epoch: ";
+ newFile(testText);
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals(7, marker.getAttribute(IMarker.CHAR_END, 0));
+ assertEquals(IMarker.SEVERITY_ERROR, marker.getAttribute(
+ IMarker.SEVERITY, -1));
+ assertEquals("Epoch declaration without value.", marker.getAttribute(
+ IMarker.MESSAGE, ""));
+ }
+
+ public void testMultipleEpochsTag() {
+ String testText = "Epoch: 1 2";
+ newFile(testText);
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals(10, marker.getAttribute(IMarker.CHAR_END, 0));
+ assertEquals(IMarker.SEVERITY_ERROR, marker.getAttribute(
+ IMarker.SEVERITY, -1));
+ assertEquals("Epoch cannot have multiple values.", marker.getAttribute(
+ IMarker.MESSAGE, ""));
+ }
+
+ public void testMultipleEpochsTag2() {
+ String testText = "Epoch: 1 2";
+ newFile(testText);
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals(11, marker.getAttribute(IMarker.CHAR_END, 0));
+ assertEquals(IMarker.SEVERITY_ERROR, marker.getAttribute(
+ IMarker.SEVERITY, -1));
+ assertEquals("Epoch cannot have multiple values.", marker.getAttribute(
+ IMarker.MESSAGE, ""));
+ }
+
+ public void testNonIntegerEpoch() {
+ String testText = "Epoch: blah";
+ newFile(testText);
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals(11, marker.getAttribute(IMarker.CHAR_END, 0));
+ assertEquals(IMarker.SEVERITY_ERROR, marker.getAttribute(
+ IMarker.SEVERITY, -1));
+ assertEquals("Epoch cannot have non-integer value.", marker
+ .getAttribute(IMarker.MESSAGE, ""));
+ }
+
+ public void testNonIntegerEpoch2() {
+ String testText = "Epoch: blah";
+ newFile(testText);
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals(11, marker.getAttribute(IMarker.CHAR_END, 0));
+ assertEquals(IMarker.SEVERITY_ERROR, marker.getAttribute(
+ IMarker.SEVERITY, -1));
+ assertEquals("Epoch cannot have non-integer value.", marker
+ .getAttribute(IMarker.MESSAGE, ""));
+ }
+}
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
new file mode 100644
index 0000000000..c58180b7e9
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/FileTestCase.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.editor.tests;
+
+import java.io.ByteArrayInputStream;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.linuxtools.rpm.ui.editor.markers.SpecfileErrorHandler;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileParser;
+
+/**
+ * Test case providing all the objects needed for the rpm editor tests.
+ *
+ */
+public abstract class FileTestCase extends TestCase {
+
+ protected SpecfileParser parser;
+ protected Specfile specfile;
+ protected IFile testFile;
+ protected Document testDocument;
+ SpecfileErrorHandler errorHandler;
+ SpecfileTestProject testProject;
+
+ @Override
+ protected void setUp() throws CoreException {
+ testProject = new SpecfileTestProject();
+ testFile = testProject.createFile("test.spec");
+ parser = new SpecfileParser();
+ specfile = new Specfile();
+ }
+
+ @Override
+ protected void tearDown() throws CoreException {
+ testProject.dispose();
+ }
+
+ protected IMarker[] getFailureMarkers() {
+ try {
+ return testProject.getFailureMarkers();
+ } catch (CoreException e) {
+ fail(e.getMessage());
+ }
+ return null;
+ }
+
+ 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);
+ errorHandler = new SpecfileErrorHandler(testFile, 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
new file mode 100644
index 0000000000..184af7f280
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/HeaderRecognitionTest.java
@@ -0,0 +1,175 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor.tests;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileElement;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSection;
+
+/**
+ * @author overholt
+ *
+ */
+public class HeaderRecognitionTest extends FileTestCase {
+
+ String testText;
+
+ public void testGetSimpleSectionName() {
+ testText = "%prep";
+ SpecfileElement element;
+
+ newFile(testText);
+ element = parser.parseLine(testText, specfile, 0);
+ assertEquals(SpecfileSection.class, element.getClass());
+ assertEquals(testText.substring(1), ((SpecfileSection) element)
+ .getName());
+ }
+
+ public void testGetComplexSectionName1() {
+ 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());
+ }
+
+ public void testGetComplexSectionName2() {
+ testText = "%post -n";
+ newFile(testText);
+ specfile = parser.parse(testDocument);
+
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals("No package name after -n in post section.", marker
+ .getAttribute(IMarker.MESSAGE, ""));
+ assertEquals(testText.length(), marker
+ .getAttribute(IMarker.CHAR_END, 0));
+ }
+
+ public void testGetComplexSectionName3() {
+ 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());
+ }
+
+ public void testGetComplexSectionName4() {
+ // FIXME: check for rest of line when -p is implemented
+ // this should be an error case
+ 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());
+ }
+
+ public void testGetComplexSectionName5() {
+ // FIXME: check for rest of line when -p is implemented
+ // "blah bleh" should become the actual text of the section
+ 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());
+ }
+
+ public void testGetComplexSectionName6() {
+ 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());
+ }
+
+ public void testGetComplexSectionName7() {
+ testText = "%post -n -p blah";
+
+ newFile(testText);
+ specfile = parser.parse(testDocument);
+
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals("Package name must not start with '-': -p.", marker
+ .getAttribute(IMarker.MESSAGE, ""));
+ assertEquals(testText.length(), marker
+ .getAttribute(IMarker.CHAR_END, 0));
+ }
+
+ // public void testGetComplexSectionName8() {
+ // testText = "%files blah -f blah.list";
+ //
+ // SpecfileElement element;
+ // specfile = new Specfile("testspec");
+ // try {
+ // element = parser.parseLine(testText, specfile);
+ // fail();
+ // } catch (Exception e) {
+ // assertTrue(e.getMessage().startsWith(""));
+ // }
+ // }
+ //
+ // public void testGetComplexSectionName9() {
+ // testText = "%files blah blah -f blah.list";
+ //
+ // SpecfileElement element;
+ // specfile = new Specfile("testspec");
+ // try {
+ // element = parser.parseLine(testText, specfile);
+ // fail();
+ // } catch (Exception e) {
+ // assertTrue(e.getMessage().startsWith(""));
+ // }
+ // }
+ //
+ // public void testGetComplexSectionName10() {
+ // // FIXME: can you have multiple files lists?
+ // testText = "%files blah -f blah.list blah2.list";
+ //
+ // SpecfileElement element;
+ // specfile = new Specfile("testspec");
+ // try {
+ // element = parser.parseLine(testText, specfile);
+ // fail();
+ // } catch (Exception e) {
+ // assertTrue(e.getMessage().startsWith(""));
+ // }
+ // }
+
+}
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
new file mode 100644
index 0000000000..c224208164
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LicenseTagTest.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor.tests;
+
+public class LicenseTagTest extends FileTestCase {
+
+ public void testSingleLicenseTag() {
+ String testText = "License: EPL";
+ newFile(testText);
+ assertEquals("EPL", specfile.getLicense());
+ }
+ // FIXME: investigate whether we should keep this or not
+ // See SpecfileParser at line 450
+ // public void testMultipleLicenseTag() {
+ // String testText = "License: Eclipse Public License";
+ // try {
+ // newFile(testText);
+ // IMarker marker= testProject.getFailureMarkers()[0];
+ // assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ // assertEquals(31, marker.getAttribute(IMarker.CHAR_END, 0));
+ // assertEquals(IMarker.SEVERITY_WARNING,
+ // marker.getAttribute(IMarker.SEVERITY, -1));
+ // assertEquals("License should be an acronym.",
+ // marker.getAttribute(IMarker.MESSAGE, ""));
+ // } catch (Exception e) {
+ // e.printStackTrace();
+ // fail();
+ // }
+ // }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LinePositionTests.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LinePositionTests.java
new file mode 100644
index 0000000000..7d8519210c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/LinePositionTests.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor.tests;
+
+import java.util.Collection;
+
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSource;
+
+public class LinePositionTests extends FileTestCase {
+
+ 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();
+ }
+ }
+
+ 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();
+ }
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/NameTagTests.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/NameTagTests.java
new file mode 100644
index 0000000000..72f228d31a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/NameTagTests.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor.tests;
+
+import org.eclipse.core.resources.IMarker;
+
+public class NameTagTests extends FileTestCase {
+
+ public void testResolvedNameTag() {
+
+ String testText = "%define blah notblah\nName: %{blah}";
+
+ newFile(testText);
+
+ assertEquals("notblah", specfile.getName());
+ }
+
+ public void testResolvedSetName() {
+ String testText = "%define blah notblah\nName: %{blah}";
+ newFile(testText);
+ assertEquals("notblah", specfile.getName());
+ }
+
+ public void testNameTag() {
+ String testText = "Name: blah";
+ newFile(testText);
+ assertEquals("blah", specfile.getName());
+ }
+
+ public void testNameTag2() {
+ String testText = "Name: blah";
+ newFile(testText);
+ assertEquals("blah", specfile.getName());
+ }
+
+ public void testNullNameTag() {
+ String testText = "Name: ";
+ newFile(testText);
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals(testText.length(), marker
+ .getAttribute(IMarker.CHAR_END, 0));
+ assertEquals("Name declaration without value.", marker.getAttribute(
+ IMarker.MESSAGE, ""));
+ }
+
+ public void testNullNameTag2() {
+ String testText = "Name: ";
+
+ newFile(testText);
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals(testText.length(), marker
+ .getAttribute(IMarker.CHAR_END, 0));
+ assertEquals("Name declaration without value.", marker.getAttribute(
+ IMarker.MESSAGE, ""));
+ }
+
+ public void testMultipleNamesTag() {
+ String testText = "Name: blah bleh";
+
+ newFile(testText);
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals(testText.length(), marker
+ .getAttribute(IMarker.CHAR_END, 0));
+ assertEquals("Name cannot have multiple values.", marker.getAttribute(
+ IMarker.MESSAGE, ""));
+ }
+
+ public void testMultipleNamesTag2() {
+ String testText = "Name: blah bleh";
+
+ newFile(testText);
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals(testText.length(), marker
+ .getAttribute(IMarker.CHAR_END, 0));
+ assertEquals("Name cannot have multiple values.", marker.getAttribute(
+ IMarker.MESSAGE, ""));
+ }
+}
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
new file mode 100644
index 0000000000..32b560b3bd
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/PatchApplicationTest.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor.tests;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileElement;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfilePatchMacro;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSource;
+
+public class PatchApplicationTest extends FileTestCase {
+
+ 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());
+ }
+
+ public void testPatchLineNumber() {
+ String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
+
+ newFile(specText);
+ SpecfileSource thisPatch = specfile.getPatch(3);
+ List<Integer> usedList = new ArrayList<Integer>(1);
+ usedList.add(Integer.valueOf(1));
+ assertEquals(thisPatch.getLinesUsed(), usedList);
+ }
+
+ 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<Integer>(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/ReleaseTagTests.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/ReleaseTagTests.java
new file mode 100644
index 0000000000..4c37532650
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/ReleaseTagTests.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor.tests;
+
+import org.eclipse.core.resources.IMarker;
+
+public class ReleaseTagTests extends FileTestCase {
+
+ public void testResolvedSetRelease() {
+ String testText = "%define blah notblah\nRelease: %{blah}";
+
+ newFile(testText);
+ assertEquals("notblah", specfile.getRelease());
+ }
+
+ public void testReleaseTag() {
+ String testText = "Release: blah";
+ newFile(testText);
+ assertEquals("blah", specfile.getRelease());
+ }
+
+ public void testReleaseTag2() {
+ String testText = "Release: blah";
+ newFile(testText);
+ assertEquals("blah", specfile.getRelease());
+ }
+
+ public void testNullReleaseTag() {
+ String testText = "Release: ";
+ newFile(testText);
+
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals(testText.length(), marker
+ .getAttribute(IMarker.CHAR_END, 0));
+ assertEquals("Release declaration without value.", marker.getAttribute(
+ IMarker.MESSAGE, ""));
+ }
+
+ public void testNullReleaseTag2() {
+ String testText = "Release: ";
+
+ newFile(testText);
+
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals(testText.length(), marker
+ .getAttribute(IMarker.CHAR_END, 0));
+ assertEquals("Release declaration without value.", marker.getAttribute(
+ IMarker.MESSAGE, ""));
+ }
+
+ public void testMultipleReleasesTag() {
+ String testText = "Release: blah bleh";
+ newFile(testText);
+
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals(testText.length(), marker
+ .getAttribute(IMarker.CHAR_END, 0));
+ assertEquals("Release cannot have multiple values.", marker
+ .getAttribute(IMarker.MESSAGE, ""));
+ }
+
+ public void testMultipleReleasesTag2() {
+ String testText = "Release: blah bleh";
+ newFile(testText);
+
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals(testText.length(), marker
+ .getAttribute(IMarker.CHAR_END, 0));
+ assertEquals("Release cannot have multiple values.", marker
+ .getAttribute(IMarker.MESSAGE, ""));
+ }
+}
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
new file mode 100644
index 0000000000..cdec7459ca
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmMacroProposalsListTest.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor.tests;
+
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.eclipse.linuxtools.rpm.core.utils.Utils;
+import org.eclipse.linuxtools.rpm.ui.editor.RpmMacroProposalsList;
+
+public class RpmMacroProposalsListTest extends TestCase {
+
+ RpmMacroProposalsList macroProposalsList;
+
+ @Override
+ protected void setUp() throws Exception {
+ macroProposalsList = new RpmMacroProposalsList();
+ }
+
+ public final void testBuildMacroList() {
+ macroProposalsList.buildMacroList();
+ if (!macroProposalsList.findKey("%_libdir"))
+ fail("buildMacroList faild, %_libdir macro was not found!");
+ }
+
+ public final void testGetProposals() {
+ Map<String, String> proposals = macroProposalsList
+ .getProposals("%_libdir");
+ if (proposals.size() != 1) {
+ fail("getProposals faild, %_libdir macro was retrive as proposals");
+ }
+ }
+
+ public final void testGetProposals2() {
+ Map<String, String> proposals = macroProposalsList
+ .getProposals("%_unexistingmacro");
+ if (proposals.size() != 0) {
+ fail("getProposals faild, %_unexistingmacro don't can exist");
+ }
+ }
+
+ public final void testGetValue() {
+ if (macroProposalsList.getValue("_libdir").indexOf("lib") == -1) {
+ fail("getValue faild, %_libdir value don't end with '%{_lib}'");
+ }
+ }
+
+ public final void testGetValue2() {
+ if (macroProposalsList.getValue("_unexistingmacro") != null) {
+ fail("getValue faild, %_libdir value don't end with '%{_lib}'");
+ }
+ }
+
+ public final void testGetMacroEval() {
+ if (Utils.fileExist("/bin/rpm")) {
+ if (RpmMacroProposalsList.getMacroEval("%_libdir").indexOf("lib") == -1) {
+ fail("getMacroEval faild, eval don't end with 'lib'");
+ }
+ }
+ }
+
+ 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
new file mode 100644
index 0000000000..6512842237
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/RpmPackageProposalsListTest.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Alphonse Van Assche - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor.tests;
+
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.eclipse.linuxtools.rpm.core.utils.Utils;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.RpmPackageProposalsList;
+import org.eclipse.linuxtools.rpm.ui.editor.preferences.PreferenceConstants;
+
+public class RpmPackageProposalsListTest extends TestCase {
+
+ private RpmPackageProposalsList packageProposalsList;
+
+ @Override
+ protected void setUp() throws Exception {
+ Activator.getDefault().getPreferenceStore().setValue(
+ PreferenceConstants.P_RPM_LIST_FILEPATH, "/tmp/pkglist");
+ try {
+ BufferedWriter out = new BufferedWriter(new FileWriter(
+ "/tmp/pkglist"));
+ out.write("setup\ntest\nrpm\n");
+ out.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ packageProposalsList = new RpmPackageProposalsList();
+ }
+
+ public final void testGetProposals() {
+ List<String[]> proposals = packageProposalsList.getProposals("setup");
+ if (!(proposals.size() == 1)) {
+ fail("getProposals failed, setup package was retrieve as proposals!");
+ }
+ }
+
+ public final void testGetValue() {
+ if (Utils.fileExist("/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'");
+ }
+ }
+ }
+
+ public final void testGetValue2() {
+ if (packageProposalsList.getValue("test").indexOf("test") == -1) {
+ fail("getValue failed, test package info doesn't contain 'test'");
+ }
+ }
+
+ public final void testGetRpmInfo() {
+ if (Utils.fileExist("/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'");
+ }
+ }
+ }
+
+ 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
new file mode 100644
index 0000000000..1423e0c77a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileCompletionProcessorTest.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.editor.tests;
+
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileCompletionProcessor;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.ide.IDE;
+
+public class SpecfileCompletionProcessorTest extends FileTestCase {
+
+ public static final String ONE_SOURCE = "Source0: text.zip\n";
+ public static final String NO_SOURCE = "Patch3: somefilesomewhere.patch"
+ + "\n" + "Patch2: someotherfile.patch\n";
+ public static final String THREE_SOURCE_SEPARATED = "Source0: text.zip"
+ + "\n" + "Patch0: first.patch" + "\n" + "Source2: ant.jar" + "\n"
+ + "Source3: main.tar.gz";
+
+ private SpecfileEditor initEditor(String contents) throws Exception {
+ newFile(contents);
+ IEditorPart openEditor = IDE.openEditor(Activator.getDefault()
+ .getWorkbench().getActiveWorkbenchWindow().getActivePage(),
+ testFile);
+ return (SpecfileEditor) openEditor;
+ }
+
+ private synchronized void computeCompletionProposals(String specContent,
+ int occurances) throws Exception {
+ SpecfileEditor editor = initEditor(specContent);
+ testProject.refresh();
+ // This is needed so the changes in the testFile are loaded in the
+ // editor
+ editor.doRevertToSaved();
+ SpecfileCompletionProcessor complProcessor = new SpecfileCompletionProcessor(
+ editor);
+ assertNotNull(complProcessor);
+ ICompletionProposal[] proposals = complProcessor
+ .computeCompletionProposals(editor.getSpecfileSourceViewer(), 0);
+ int sourceComplCount = 0;
+ for (int i = 0; i < proposals.length; i++) {
+ ICompletionProposal proposal = proposals[i];
+ if (proposal.getDisplayString().startsWith("%{SOURCE")) {
+ ++sourceComplCount;
+ }
+ }
+ assertEquals(occurances, sourceComplCount);
+ }
+
+ public void testComputeComplProposalsOneSource() throws Exception {
+ computeCompletionProposals(ONE_SOURCE, 1);
+ }
+
+ public void testComputeComplProposalsNoSource() throws Exception {
+ computeCompletionProposals(NO_SOURCE, 0);
+ }
+
+ public void testComputeComplProposalsThreeSourceSeparated()
+ throws Exception {
+ computeCompletionProposals(THREE_SOURCE_SEPARATED, 3);
+ }
+
+}
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
new file mode 100644
index 0000000000..6cc9c7f980
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/SpecfileTestProject.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor.tests;
+
+import java.io.IOException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+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");
+ 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);
+ 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/VersionTagTests.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/VersionTagTests.java
new file mode 100644
index 0000000000..17a8daa8d9
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/VersionTagTests.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor.tests;
+
+import org.eclipse.core.resources.IMarker;
+
+public class VersionTagTests extends FileTestCase {
+
+ public void testResolvedSetVersion() {
+ String testText = "%define blah notblah\nVersion: %{blah}";
+ newFile(testText);
+ assertEquals("notblah", specfile.getVersion());
+ }
+
+ public void testVersionTag() {
+ String testText = "Version: blah";
+ newFile(testText);
+ assertEquals("blah", specfile.getVersion());
+ }
+
+ public void testVersionTag2() {
+ String testText = "Version: blah";
+ newFile(testText);
+ assertEquals("blah", specfile.getVersion());
+ }
+
+ public void testNullVersionTag() {
+ String testText = "Version: ";
+ newFile(testText);
+
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals(testText.length(), marker
+ .getAttribute(IMarker.CHAR_END, 0));
+ assertEquals("Version declaration without value.", marker.getAttribute(
+ IMarker.MESSAGE, ""));
+ }
+
+ public void testNullVersionTag2() {
+ String testText = "Version: ";
+
+ newFile(testText);
+
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals(testText.length(), marker
+ .getAttribute(IMarker.CHAR_END, 0));
+ assertEquals("Version declaration without value.", marker.getAttribute(
+ IMarker.MESSAGE, ""));
+ }
+
+ public void testMultipleVersionsTag() {
+ String testText = "Version: blah bleh";
+ newFile(testText);
+
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals(testText.length(), marker
+ .getAttribute(IMarker.CHAR_END, 0));
+ assertEquals("Version cannot have multiple values.", marker
+ .getAttribute(IMarker.MESSAGE, ""));
+ }
+
+ public void testMultipleVersionsTag2() {
+ String testText = "Version: blah bleh";
+
+ newFile(testText);
+
+ IMarker marker = getFailureMarkers()[0];
+ assertEquals(0, marker.getAttribute(IMarker.CHAR_START, 0));
+ assertEquals(testText.length(), marker
+ .getAttribute(IMarker.CHAR_END, 0));
+ assertEquals("Version cannot have multiple values.", marker
+ .getAttribute(IMarker.MESSAGE, ""));
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/ActionsAllTests.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/ActionsAllTests.java
new file mode 100644
index 0000000000..54c752a2ee
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/ActionsAllTests.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.editor.tests.actions;
+
+import junit.framework.TestSuite;
+
+public class ActionsAllTests {
+ public static TestSuite suite() {
+ TestSuite suite = new TestSuite(
+ "Test for org.eclipse.linuxtools.rpm.ui.editor.tests.actions");
+ suite.addTestSuite(SpecfileChangelogFormatterTest.class);
+ suite.addTestSuite(SpecfileChangelogParserTest.class);
+ return suite;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/SpecfileChangelogFormatterTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/SpecfileChangelogFormatterTest.java
new file mode 100644
index 0000000000..bdb8a64a3c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/SpecfileChangelogFormatterTest.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.editor.tests.actions;
+
+import java.text.MessageFormat;
+import java.util.Date;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.actions.SpecfileChangelogFormatter;
+import org.eclipse.linuxtools.rpm.ui.editor.tests.FileTestCase;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.ide.IDE;
+
+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;
+
+ @Override
+ protected void setUp() throws CoreException {
+ super.setUp();
+ newFile("%changelog");
+ editor = IDE.openEditor(Activator.getDefault().getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage(), testFile,
+ "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
+ formatter = new SpecfileChangelogFormatter();
+ }
+
+ public void testFormatDateLine() {
+ String expectedLine = MessageFormat
+ .format(
+ "* {0} {1} <{2}> {3}{4}-{5}", SpecfileChangelogFormatter.SIMPLE_DATE_FORMAT.format(new Date()), //$NON-NLS-1$
+ USER_NAME, USER_MAIL, "", "0", "0");
+ assertEquals(expectedLine, formatter.formatDateLine(USER_NAME,
+ USER_MAIL));
+ }
+
+ 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/rpm/ui/editor/tests/actions/SpecfileChangelogParserTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/SpecfileChangelogParserTest.java
new file mode 100644
index 0000000000..7969c93f26
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/SpecfileChangelogParserTest.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.editor.tests.actions;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.linuxtools.rpm.ui.editor.actions.SpecfileChangelogParser;
+
+public class SpecfileChangelogParserTest extends TestCase {
+
+ private SpecfileChangelogParser parser;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ parser = new SpecfileChangelogParser();
+ }
+
+ public void testParseCurrentFunctionIEditorPart() throws CoreException {
+ assertEquals("", parser.parseCurrentFunction(null));
+ }
+
+ public void testParseCurrentFunctionIEditorInputInt() throws CoreException {
+ assertEquals("", parser.parseCurrentFunction(null, 0));
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/HyperlinkAllTests.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/HyperlinkAllTests.java
new file mode 100644
index 0000000000..6231475bad
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/HyperlinkAllTests.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.editor.tests.hyperlink;
+
+import junit.framework.TestSuite;
+
+public class HyperlinkAllTests extends TestSuite {
+ public static TestSuite suite() {
+ TestSuite suite = new TestSuite(
+ "Test for org.eclipse.linuxtools.rpm.ui.editor.tests.hyperlink");
+ suite.addTestSuite(MailHyperlinkDetectorTest.class);
+ suite.addTestSuite(SourcesFileHyperlinkDetectorTest.class);
+ suite.addTestSuite(SpecfileElementHyperlinkDetectorTest.class);
+ suite.addTestSuite(URLHyperlinkWithMacroDetectorTest.class);
+ return suite;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/MailHyperlinkDetectorTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/MailHyperlinkDetectorTest.java
new file mode 100644
index 0000000000..392025a9e6
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/MailHyperlinkDetectorTest.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.editor.tests.hyperlink;
+
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.hyperlink.MailHyperlink;
+import org.eclipse.linuxtools.rpm.ui.editor.hyperlink.MailHyperlinkDetector;
+import org.eclipse.linuxtools.rpm.ui.editor.tests.FileTestCase;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.ide.IDE;
+
+public class MailHyperlinkDetectorTest extends FileTestCase {
+
+ private SpecfileEditor editor;
+ private MailHyperlinkDetector elementDetector;
+
+ 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(Activator.getDefault().getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage(), testFile,
+ "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
+
+ editor = (SpecfileEditor) openEditor;
+ editor.doRevertToSaved();
+ elementDetector = new MailHyperlinkDetector(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);
+ }
+
+ public void testDetectHyperlinksNoRegionAndTextViewer() {
+ elementDetector = new MailHyperlinkDetector(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/rpm/ui/editor/tests/hyperlink/SourcesFileHyperlinkDetectorTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/SourcesFileHyperlinkDetectorTest.java
new file mode 100644
index 0000000000..d5cac55d70
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/SourcesFileHyperlinkDetectorTest.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.editor.tests.hyperlink;
+
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.hyperlink.SourcesFileHyperlinkDetector;
+import org.eclipse.linuxtools.rpm.ui.editor.tests.FileTestCase;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.ide.IDE;
+
+public class SourcesFileHyperlinkDetectorTest extends FileTestCase {
+ private SpecfileEditor editor;
+ private SourcesFileHyperlinkDetector elementDetector;
+
+ public void testDetectHyperlinks() throws PartInitException {
+ String testText = "Source0: test.zip\n";
+ newFile(testText);
+
+ IEditorPart openEditor = IDE
+ .openEditor(Activator.getDefault().getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage(), testFile,
+ "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
+
+ editor = (SpecfileEditor) openEditor;
+ editor.doRevertToSaved();
+ elementDetector = new SourcesFileHyperlinkDetector(editor);
+ // test source element
+ IRegion region = new Region(10, 0);
+ IHyperlink[] returned = elementDetector.detectHyperlinks(editor
+ .getSpecfileSourceViewer(), region, false);
+ assertEquals(2, returned.length);
+
+ //test empty
+ region = new Region(4, 0);
+ returned = elementDetector.detectHyperlinks(editor
+ .getSpecfileSourceViewer(), region, false);
+ assertNull(returned);
+ }
+
+ public void testDetectHyperlinksNoRegionAndTextViewer() {
+ elementDetector = new SourcesFileHyperlinkDetector(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/rpm/ui/editor/tests/hyperlink/SpecfileElementHyperlinkDetectorTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/SpecfileElementHyperlinkDetectorTest.java
new file mode 100644
index 0000000000..1c9e0a36a5
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/SpecfileElementHyperlinkDetectorTest.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.editor.tests.